|
|
|
|
|
|
Widget flexibleSpace = null, |
|
|
|
PreferredSizeWidget bottom = null, |
|
|
|
float? elevation = null, |
|
|
|
ShapeBorder shape = null, |
|
|
|
IconThemeData actionsIconTheme = null, |
|
|
|
TextTheme textTheme = null, |
|
|
|
bool primary = true, |
|
|
|
bool? centerTitle = null, |
|
|
|
|
|
|
this.flexibleSpace = flexibleSpace; |
|
|
|
this.bottom = bottom; |
|
|
|
this.elevation = elevation; |
|
|
|
this.shape = shape; |
|
|
|
this.actionsIconTheme = actionsIconTheme; |
|
|
|
this.textTheme = textTheme; |
|
|
|
this.primary = primary; |
|
|
|
this.centerTitle = centerTitle; |
|
|
|
|
|
|
|
|
|
|
public readonly float? elevation; |
|
|
|
|
|
|
|
public readonly ShapeBorder shape; |
|
|
|
|
|
|
|
|
|
|
|
public readonly IconThemeData actionsIconTheme; |
|
|
|
|
|
|
|
public readonly TextTheme textTheme; |
|
|
|
|
|
|
|
|
|
|
bool canPop = parentRoute?.canPop ?? false; |
|
|
|
bool useCloseButton = parentRoute is PageRoute && ((PageRoute) parentRoute).fullscreenDialog; |
|
|
|
|
|
|
|
IconThemeData appBarIconTheme = this.widget.iconTheme |
|
|
|
IconThemeData overallIconTheme = this.widget.iconTheme |
|
|
|
IconThemeData actionsIconTheme = this.widget.actionsIconTheme |
|
|
|
?? appBarTheme.actionsIconTheme |
|
|
|
?? overallIconTheme; |
|
|
|
TextStyle centerStyle = this.widget.textTheme?.title |
|
|
|
?? appBarTheme.textTheme?.title |
|
|
|
?? themeData.primaryTextTheme.title; |
|
|
|
|
|
|
sideStyle = sideStyle.copyWith(color: sideStyle.color.withOpacity(opacity)); |
|
|
|
} |
|
|
|
|
|
|
|
appBarIconTheme = appBarIconTheme.copyWith( |
|
|
|
opacity: opacity * (appBarIconTheme.opacity ?? 1.0f) |
|
|
|
overallIconTheme = overallIconTheme.copyWith( |
|
|
|
opacity: opacity * (overallIconTheme.opacity ?? 1.0f) |
|
|
|
); |
|
|
|
actionsIconTheme = actionsIconTheme.copyWith( |
|
|
|
opacity: opacity * (actionsIconTheme.opacity ?? 1.0f) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip); |
|
|
|
} |
|
|
|
|
|
|
|
if (actions != null) { |
|
|
|
actions = IconTheme.merge( |
|
|
|
data: actionsIconTheme, |
|
|
|
child: actions |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
Widget toolbar = new NavigationToolbar( |
|
|
|
leading: leading, |
|
|
|
middle: title, |
|
|
|
|
|
|
child: new CustomSingleChildLayout( |
|
|
|
layoutDelegate: new _ToolbarContainerLayout(), |
|
|
|
child: IconTheme.merge( |
|
|
|
data: appBarIconTheme, |
|
|
|
data: overallIconTheme, |
|
|
|
child: new DefaultTextStyle( |
|
|
|
style: sideStyle, |
|
|
|
child: toolbar) |
|
|
|
|
|
|
elevation: this.widget.elevation |
|
|
|
?? appBarTheme.elevation |
|
|
|
?? _defaultElevation, |
|
|
|
shape: this.widget.shape, |
|
|
|
child: appBar |
|
|
|
)); |
|
|
|
} |
|
|
|
|
|
|
Color backgroundColor, |
|
|
|
Brightness? brightness, |
|
|
|
IconThemeData iconTheme, |
|
|
|
IconThemeData actionsIconTheme, |
|
|
|
TextTheme textTheme, |
|
|
|
bool primary, |
|
|
|
bool? centerTitle, |
|
|
|
|
|
|
this.backgroundColor = backgroundColor; |
|
|
|
this.brightness = brightness; |
|
|
|
this.iconTheme = iconTheme; |
|
|
|
this.actionsIconTheme = actionsIconTheme; |
|
|
|
this.textTheme = textTheme; |
|
|
|
this.primary = primary; |
|
|
|
this.centerTitle = centerTitle; |
|
|
|
|
|
|
public readonly Color backgroundColor; |
|
|
|
public readonly Brightness? brightness; |
|
|
|
public readonly IconThemeData iconTheme; |
|
|
|
public readonly IconThemeData actionsIconTheme; |
|
|
|
public readonly TextTheme textTheme; |
|
|
|
public readonly bool primary; |
|
|
|
public readonly bool? centerTitle; |
|
|
|
|
|
|
|| this.backgroundColor != oldDelegate.backgroundColor |
|
|
|
|| this.brightness != oldDelegate.brightness |
|
|
|
|| this.iconTheme != oldDelegate.iconTheme |
|
|
|
|| this.actionsIconTheme != oldDelegate.actionsIconTheme |
|
|
|
|| this.textTheme != oldDelegate.textTheme |
|
|
|
|| this.primary != oldDelegate.primary |
|
|
|
|| this.centerTitle != oldDelegate.centerTitle |
|
|
|
|
|
|
Color backgroundColor = null, |
|
|
|
Brightness? brightness = null, |
|
|
|
IconThemeData iconTheme = null, |
|
|
|
IconThemeData actionsIconTheme = null, |
|
|
|
TextTheme textTheme = null, |
|
|
|
bool primary = true, |
|
|
|
bool? centerTitle = null, |
|
|
|
|
|
|
this.backgroundColor = backgroundColor; |
|
|
|
this.brightness = brightness; |
|
|
|
this.iconTheme = iconTheme; |
|
|
|
this.actionsIconTheme = actionsIconTheme; |
|
|
|
this.textTheme = textTheme; |
|
|
|
this.primary = primary; |
|
|
|
this.centerTitle = centerTitle; |
|
|
|
|
|
|
public readonly Brightness? brightness; |
|
|
|
|
|
|
|
public readonly IconThemeData iconTheme; |
|
|
|
|
|
|
|
public readonly IconThemeData actionsIconTheme; |
|
|
|
|
|
|
|
public readonly TextTheme textTheme; |
|
|
|
|
|
|
|
|
|
|
backgroundColor: this.widget.backgroundColor, |
|
|
|
brightness: this.widget.brightness, |
|
|
|
iconTheme: this.widget.iconTheme, |
|
|
|
actionsIconTheme: this.widget.actionsIconTheme, |
|
|
|
textTheme: this.widget.textTheme, |
|
|
|
primary: this.widget.primary, |
|
|
|
centerTitle: this.widget.centerTitle, |
|
|
|