copyWith method Null safety

SystemUiOverlayStyle copyWith(
  1. {Color? systemNavigationBarColor,
  2. Color? systemNavigationBarDividerColor,
  3. bool? systemNavigationBarContrastEnforced,
  4. Color? statusBarColor,
  5. Brightness? statusBarBrightness,
  6. Brightness? statusBarIconBrightness,
  7. bool? systemStatusBarContrastEnforced,
  8. Brightness? systemNavigationBarIconBrightness}
)

Creates a copy of this theme with the given fields replaced with new values.

Implementation

SystemUiOverlayStyle copyWith({
  Color? systemNavigationBarColor,
  Color? systemNavigationBarDividerColor,
  bool? systemNavigationBarContrastEnforced,
  Color? statusBarColor,
  Brightness? statusBarBrightness,
  Brightness? statusBarIconBrightness,
  bool? systemStatusBarContrastEnforced,
  Brightness? systemNavigationBarIconBrightness,
}) {
  return SystemUiOverlayStyle(
    systemNavigationBarColor: systemNavigationBarColor ?? this.systemNavigationBarColor,
    systemNavigationBarDividerColor: systemNavigationBarDividerColor ?? this.systemNavigationBarDividerColor,
    systemNavigationBarContrastEnforced: systemNavigationBarContrastEnforced ?? this.systemNavigationBarContrastEnforced,
    statusBarColor: statusBarColor ?? this.statusBarColor,
    statusBarIconBrightness: statusBarIconBrightness ?? this.statusBarIconBrightness,
    statusBarBrightness: statusBarBrightness ?? this.statusBarBrightness,
    systemStatusBarContrastEnforced: systemStatusBarContrastEnforced ?? this.systemStatusBarContrastEnforced,
    systemNavigationBarIconBrightness: systemNavigationBarIconBrightness ?? this.systemNavigationBarIconBrightness,
  );
}