Skip to content

Commit 0cfcecb

Browse files
committed
commented the rest of pending feature codes
1 parent de46b1a commit 0cfcecb

File tree

3 files changed

+223
-223
lines changed

3 files changed

+223
-223
lines changed

lib/src/model/choice_item.dart

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
import 'package:meta/meta.dart';
22
import 'package:smart_select/src/utils/accent.dart';
33

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

5757
/// Choice option configuration
5858
class S2Choice<T> {

lib/src/model/choice_loader.dart

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,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-
}
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

Comments
 (0)