1- import 'choice_item.dart' ;
2-
3- typedef Future <List <S2Choice <T >>> S2ChoiceLoader <T >(
4- S2ChoiceLoaderInfo <T > info
5- );
6-
7- class S2ChoiceLoaderInfo <T > {
8-
9- /// Single select value
10- final T value;
11-
12- /// Multiple select value
13- final List <T > values;
14-
15- /// Search query
16- final String query;
17-
18- // final int page;
19- // final int limit;
20-
21- S2ChoiceLoaderInfo ({
22- this .value,
23- this .values,
24- this .query,
25- // this.page,
26- // this.limit,
27- });
28-
29- /// Creates a copy of this [S2ChoiceLoaderInfo] but with
30- /// the given fields replaced with the new values.
31- S2ChoiceLoaderInfo <T > copyWith ({
32- T value,
33- List <T > values,
34- String query,
35- // int page,
36- // int limit,
37- }) {
38- return S2ChoiceLoaderInfo <T >(
39- value: value ?? this .value,
40- values: values ?? this .values,
41- query: query ?? this .query,
42- // page: page ?? this.page,
43- // limit: limit ?? this.limit,
44- );
45- }
46-
47- /// Creates a copy of this [S2ChoiceLoaderInfo] but with
48- /// the given fields replaced with the new values.
49- S2ChoiceLoaderInfo <T > merge (S2ChoiceLoaderInfo <T > other) {
50- // if null return current object
51- if (other == null ) return this ;
52-
53- return copyWith (
54- value: other.value,
55- values: other.values,
56- query: other.query,
57- // page: other.page,
58- // limit: other.limit,
59- );
60- }
61- }
1+ // import 'choice_item.dart';
2+
3+ // typedef Future<List<S2Choice<T>>> S2ChoiceLoader<T>(
4+ // S2ChoiceLoaderInfo<T> info
5+ // );
6+
7+ // class S2ChoiceLoaderInfo<T> {
8+
9+ // /// Single select value
10+ // final T value;
11+
12+ // /// Multiple select value
13+ // final List<T> values;
14+
15+ // /// Search query
16+ // final String query;
17+
18+ // // final int page;
19+ // // final int limit;
20+
21+ // S2ChoiceLoaderInfo({
22+ // this.value,
23+ // this.values,
24+ // this.query,
25+ // // this.page,
26+ // // this.limit,
27+ // });
28+
29+ // /// Creates a copy of this [S2ChoiceLoaderInfo] but with
30+ // /// the given fields replaced with the new values.
31+ // S2ChoiceLoaderInfo<T> copyWith({
32+ // T value,
33+ // List<T> values,
34+ // String query,
35+ // // int page,
36+ // // int limit,
37+ // }) {
38+ // return S2ChoiceLoaderInfo<T>(
39+ // value: value ?? this.value,
40+ // values: values ?? this.values,
41+ // query: query ?? this.query,
42+ // // page: page ?? this.page,
43+ // // limit: limit ?? this.limit,
44+ // );
45+ // }
46+
47+ // /// Creates a copy of this [S2ChoiceLoaderInfo] but with
48+ // /// the given fields replaced with the new values.
49+ // S2ChoiceLoaderInfo<T> merge(S2ChoiceLoaderInfo<T> other) {
50+ // // if null return current object
51+ // if (other == null) return this;
52+
53+ // return copyWith(
54+ // value: other.value,
55+ // values: other.values,
56+ // query: other.query,
57+ // // page: other.page,
58+ // // limit: other.limit,
59+ // );
60+ // }
61+ // }
0 commit comments