build method
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: Material(
color: themeData.colorScheme.onSecondary,
child: 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))
bottomDetailBuilder(context),
],
],
),
),
),
);
}