createSettings static method

Widget createSettings({
  1. double? toolbarOpacity,
  2. double? minExtent,
  3. double? maxExtent,
  4. bool? isScrolledUnder,
  5. bool? hasLeading,
  6. required double currentExtent,
  7. required Widget child,
})

Wraps a widget that contains an AppBar to convey sizing information down to the FlexibleSpaceBar.

Used by Scaffold and SliverAppBar.

toolbarOpacity affects how transparent the text within the toolbar appears. minExtent sets the minimum height of the resulting FlexibleSpaceBar when fully collapsed. maxExtent sets the maximum height of the resulting FlexibleSpaceBar when fully expanded. currentExtent sets the scale of the FlexibleSpaceBar.background and FlexibleSpaceBar.title widgets of FlexibleSpaceBar upon initialization. scrolledUnder is true if the FlexibleSpaceBar overlaps the app's primary scrollable, false if it does not, and null if the caller has not determined as much. See also:

Implementation

static Widget createSettings({
  double? toolbarOpacity,
  double? minExtent,
  double? maxExtent,
  bool? isScrolledUnder,
  bool? hasLeading,
  required double currentExtent,
  required Widget child,
}) {
  return FlexibleSpaceBarSettings(
    toolbarOpacity: toolbarOpacity ?? 1.0,
    minExtent: minExtent ?? currentExtent,
    maxExtent: maxExtent ?? currentExtent,
    isScrolledUnder: isScrolledUnder,
    hasLeading: hasLeading,
    currentExtent: currentExtent,
    child: child,
  );
}