copyWith method

ScaffoldTheme copyWith({
  1. ValueGetter<Color?>? backgroundColor,
  2. ValueGetter<Color?>? headerBackgroundColor,
  3. ValueGetter<Color?>? footerBackgroundColor,
  4. ValueGetter<bool?>? showLoadingSparks,
  5. ValueGetter<bool?>? resizeToAvoidBottomInset,
})

Implementation

ScaffoldTheme copyWith({
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<Color?>? headerBackgroundColor,
  ValueGetter<Color?>? footerBackgroundColor,
  ValueGetter<bool?>? showLoadingSparks,
  ValueGetter<bool?>? resizeToAvoidBottomInset,
}) {
  return ScaffoldTheme(
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    headerBackgroundColor: headerBackgroundColor == null
        ? this.headerBackgroundColor
        : headerBackgroundColor(),
    footerBackgroundColor: footerBackgroundColor == null
        ? this.footerBackgroundColor
        : footerBackgroundColor(),
    showLoadingSparks: showLoadingSparks == null
        ? this.showLoadingSparks
        : showLoadingSparks(),
    resizeToAvoidBottomInset: resizeToAvoidBottomInset == null
        ? this.resizeToAvoidBottomInset
        : resizeToAvoidBottomInset(),
  );
}