Yimaru-Mobile/StudioProjects/bloc_tutorial/lib/logic/cubit/counter_state.dart
2026-01-21 16:58:01 +03:00

22 lines
553 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'counter_state.g.dart';
@JsonSerializable()
class CounterState {
final int counterValue;
final bool wasIncremented;
CounterState({required this.counterValue,required this.wasIncremented});
factory CounterState.fromJson(Map<String, dynamic> json) =>
_$CounterStateFromJson(json);
Map<String, dynamic> toJson() => _$CounterStateToJson(this);
@override
String toString() {
return "CounterState(counterValue : $counterValue, wasIncremented : $wasIncremented)";
}
}