build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Yes, the build method. 没错,是它是它就是它,我们亲爱的 build 方法~

Implementation

@override
Widget build(BuildContext context) {
  return Theme(
    data: themeData,
    child: AnnotatedRegion<SystemUiOverlayStyle>(
      value: themeData.appBarTheme.systemOverlayStyle ??
          (themeData.effectiveBrightness.isDark
              ? SystemUiOverlayStyle.light
              : SystemUiOverlayStyle.dark),
      child: Scaffold(
        resizeToAvoidBottomInset: false,
        body: Stack(
          children: <Widget>[
            Positioned.fill(child: _pageViewBuilder(context)),
            if (isWeChatMoment && hasVideo) ...<Widget>[
              momentVideoBackButton(context),
              PositionedDirectional(
                end: 16,
                bottom: context.bottomPadding + 16,
                child: confirmButton(context),
              ),
            ] else ...<Widget>[
              appBar(context),
              if (selectedAssets != null ||
                  (isWeChatMoment && hasVideo && isAppleOS(context)))
                bottomDetailBuilder(context),
            ],
          ],
        ),
      ),
    ),
  );
}