createSettings method Null safety

Widget createSettings(
  1. {double? toolbarOpacity,
  2. double? minExtent,
  3. double? maxExtent,
  4. bool? isScrolledUnder,
  5. required double currentExtent,
  6. 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,
  required double currentExtent,
  required Widget child,
}) {
  assert(currentExtent != null);
  return FlexibleSpaceBarSettings(
    toolbarOpacity: toolbarOpacity ?? 1.0,
    minExtent: minExtent ?? currentExtent,
    maxExtent: maxExtent ?? currentExtent,
    isScrolledUnder: isScrolledUnder,
    currentExtent: currentExtent,
    child: child,
  );
}