createSettings method

Widget createSettings ({double toolbarOpacity, double minExtent, double maxExtent, @required double currentExtent, @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.

See also:

Implementation

static Widget createSettings({
  double toolbarOpacity,
  double minExtent,
  double maxExtent,
  @required double currentExtent,
  @required Widget child,
}) {
  assert(currentExtent != null);
  return FlexibleSpaceBarSettings(
    toolbarOpacity: toolbarOpacity ?? 1.0,
    minExtent: minExtent ?? currentExtent,
    maxExtent: maxExtent ?? currentExtent,
    currentExtent: currentExtent,
    child: child,
  );
}