AutoLeadingButton.builder constructor
const
AutoLeadingButton.builder({})
builds a nullable leading widget based on the current router state
This meant to be used above the AppBar so the leading
property
is passed to the AppBar's leading property,
e.g
AutoLeadingButton.builder(
builder: (context, leading) {
return AppBar(
leading: leading,
title: Text('My Page'),
),
..
),
),
Implementation
const AutoLeadingButton.builder({
super.key,
this.color,
bool? showIfParentCanPop,
this.showIfChildCanPop = true,
this.ignorePagelessRoutes = false,
required NullableWidgetBuilder builder,
}) : _nullableBuilder = builder,
builder = null,
_showIfParentCanPop = showIfParentCanPop ?? true;