createMiddle static method
KeyedSubtree?
createMiddle({
- required GlobalKey<
State< middleKey,StatefulWidget> > - required Widget? userMiddle,
- required Widget? userLargeTitle,
- required bool large,
- required bool automaticallyImplyTitle,
- required ModalRoute? route,
Implementation
static KeyedSubtree? createMiddle({
required GlobalKey middleKey,
required Widget? userMiddle,
required Widget? userLargeTitle,
required bool large,
required bool automaticallyImplyTitle,
required ModalRoute<dynamic>? route,
}) {
Widget? middleContent = userMiddle;
if (large) {
middleContent ??= userLargeTitle;
}
middleContent ??= _derivedTitle(
automaticallyImplyTitle: automaticallyImplyTitle,
currentRoute: route,
);
if (middleContent == null) {
return null;
}
return KeyedSubtree(
key: middleKey,
child: middleContent,
);
}