build method
Yes, the build method. 没错,是它是它就是它,我们亲爱的 build 方法~
Implementation
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: syncSelectedAssetsWhenPop,
child: Theme(
data: themeData,
child: AnnotatedRegion<SystemUiOverlayStyle>(
value: themeData.appBarTheme.systemOverlayStyle ??
(themeData.effectiveBrightness.isDark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark),
child: Material(
color: Colors.black,
child: Stack(
children: <Widget>[
Positioned.fill(
child: ExtendedImageGesturePageView.builder(
physics: previewAssets.length == 1
? const CustomClampingScrollPhysics()
: const CustomBouncingScrollPhysics(),
controller: pageController,
itemCount: previewAssets.length,
itemBuilder: assetPageBuilder,
onPageChanged: (int index) {
currentIndex = index;
pageStreamController.add(index);
},
scrollDirection: Axis.horizontal,
),
),
appBar(context),
if (selectedAssets != null ||
(isAppleOS && isWeChatMoment && hasVideo))
bottomDetailBuilder(context),
],
),
),
),
),
);
}