createLargeTitle static method
KeyedSubtree?
createLargeTitle({
- required GlobalKey<
State< largeTitleKey,StatefulWidget> > - required Widget? userLargeTitle,
- required bool large,
- required bool automaticImplyTitle,
- required ModalRoute? route,
Implementation
static KeyedSubtree? createLargeTitle({
required GlobalKey largeTitleKey,
required Widget? userLargeTitle,
required bool large,
required bool automaticImplyTitle,
required ModalRoute<dynamic>? route,
}) {
if (!large) {
return null;
}
final Widget? largeTitleContent = userLargeTitle ??
_derivedTitle(
automaticallyImplyTitle: automaticImplyTitle,
currentRoute: route,
);
assert(
largeTitleContent != null,
'largeTitle was not provided and there was no title from the route.',
);
return KeyedSubtree(
key: largeTitleKey,
child: largeTitleContent!,
);
}