createWidget method

Widget createWidget(
  1. BuildContext context
)

Implementation

Widget createWidget(BuildContext context) {
  final appBar = title == null
      ? null
      : PlatformAppBar(
          backgroundColor: sunnyColors.modalBackground,
          title: title,
          cupertino: (context, platform) => CupertinoNavigationBarData(
            brightness: context.brightness,
          ),
          material: (context, platform) => MaterialAppBarData(
              brightness: context.brightness,
              centerTitle: true,
              textTheme: sunnyText
                  .apply(TextTheme())
                  .withBrightness(context.brightness),
              iconTheme: IconThemeData(
                color: sunnyColors.primaryColor,
              )),
          automaticallyImplyLeading: automaticallyImplyLeading,
        );
  if (isScrolling) {
    return PlatformScaffold(
      backgroundColor: sunnyColors.modalBackground,
      appBar: appBar,
      body: body,
    ).tpad(dismissible ? 1 : 0);
  } else {
    return Layout.column().reset.min.build([
      if (dismissible) verticalSpace,
      if (appBar != null) appBar,
      body,
    ]);
  }
}