copyWith method

ScreenLayoutBreakpoints copyWith({
  1. String? name,
  2. double? portraitStandardBreakpoint,
  3. double? portraitConstrainedWidth,
  4. double? landscapeStandardBreakpoint,
  5. double? landscapeConstrainedWidth,
  6. double? maxScale,
})

Partially modifies the properties of the existing ScreenLayoutBreakpoints. If a property is not specified, the existing value will be used.

Implementation

ScreenLayoutBreakpoints copyWith({
  String? name,
  double? portraitStandardBreakpoint,
  double? portraitConstrainedWidth,
  double? landscapeStandardBreakpoint,
  double? landscapeConstrainedWidth,
  double? maxScale,
}) {
  return ScreenLayoutBreakpoints(
    name: name ?? this.name,
    portraitStandardBreakpoint:
        portraitStandardBreakpoint ?? this.portraitStandardBreakpoint,
    portraitConstrainedWidth:
        portraitConstrainedWidth ?? this.portraitConstrainedWidth,
    landscapeStandardBreakpoint:
        landscapeStandardBreakpoint ?? this.landscapeStandardBreakpoint,
    landscapeConstrainedWidth:
        landscapeConstrainedWidth ?? this.landscapeConstrainedWidth,
    maxScale: maxScale ?? this.maxScale,
  );
}