createBackLabel static method
KeyedSubtree?
createBackLabel({
- required GlobalKey<
State< backLabelKey,StatefulWidget> > - required Widget? userLeading,
- required ModalRoute? route,
- required bool automaticallyImplyLeading,
- required String? previousPageTitle,
Implementation
static KeyedSubtree? createBackLabel({
required GlobalKey backLabelKey,
required Widget? userLeading,
required ModalRoute<dynamic>? route,
required bool automaticallyImplyLeading,
required String? previousPageTitle,
}) {
if (userLeading != null ||
!automaticallyImplyLeading ||
route == null ||
!route.canPop ||
(route is PageRoute && route.fullscreenDialog)) {
return null;
}
return KeyedSubtree(
key: backLabelKey,
child: BackLabel(
specifiedPreviousTitle: previousPageTitle,
route: route,
),
);
}