m3_lightmeter/lib/screens/film_edit/state_film_edit.dart

33 lines
765 B
Dart
Raw Normal View History

2024-10-21 10:22:25 +00:00
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
class FilmEditState {
2024-10-22 16:34:23 +00:00
final String name;
2024-10-21 10:22:25 +00:00
final IsoValue isoValue;
2024-10-22 16:34:23 +00:00
final double? exponent;
final bool canSave;
2024-10-31 15:59:45 +00:00
final bool isLoading;
2024-10-21 10:22:25 +00:00
2024-10-22 16:34:23 +00:00
const FilmEditState({
required this.name,
required this.isoValue,
required this.exponent,
required this.canSave,
2024-10-31 15:59:45 +00:00
this.isLoading = false,
2024-10-22 16:34:23 +00:00
});
2024-10-31 15:59:45 +00:00
FilmEditState copyWith({
String? name,
IsoValue? isoValue,
double? exponent,
bool? canSave,
bool? isLoading,
}) =>
FilmEditState(
name: name ?? this.name,
isoValue: isoValue ?? this.isoValue,
exponent: exponent ?? this.exponent,
canSave: canSave ?? this.canSave,
isLoading: isLoading ?? this.isLoading,
);
2024-10-21 10:22:25 +00:00
}