buildPage method

Widget buildPage(
  1. OnboardingPage page
)

Implementation

Widget buildPage(OnboardingPage page) {
  return Container(
    color: page.backgroundColor,
    child: Padding(
      padding: widget.contentPadding,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          if (page.image != null) page.image!,
          const SizedBox(height: 50),
          Text(
            page.title,
            style: widget.titleTextStyle ??
                const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
            textAlign: TextAlign.center,
          ),
          const SizedBox(height: 20),
          Text(
            page.description,
            style: widget.descriptionTextStyle ?? const TextStyle(fontSize: 16),
            textAlign: TextAlign.center,
          ),
        ],
      ),
    ),
  );
}