Line data Source code
1 : import 'package:fast_immutable_collections/fast_immutable_collections.dart';
2 : import 'package:freezed_annotation/freezed_annotation.dart';
3 : import 'package:redfire/types.dart';
4 :
5 : import 'adventure_model.dart';
6 :
7 : part 'adventures_state.freezed.dart';
8 : part 'adventures_state.g.dart';
9 :
10 : @freezed
11 : class AdventuresState with _$AdventuresState, ReduxState {
12 : static const String className = 'AdventuresState';
13 :
14 5 : const AdventuresState._();
15 : const factory AdventuresState(
16 : {AdventureModel? selected,
17 : required ISet<AdventureModel> all}) = _AdventuresState;
18 :
19 0 : factory AdventuresState.fromJson(JsonMap json) =>
20 0 : _$AdventuresStateFromJson(json);
21 :
22 15 : factory AdventuresState.init() => AdventuresState(all: ISet());
23 :
24 0 : @override
25 : String get typeName => className;
26 : }
|