File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,18 @@ import 'package:equatable/equatable.dart';
3
3
/// Super class of all requests.
4
4
class Request extends Equatable {
5
5
/// Initializes.
6
- Request ({
6
+ const Request ({
7
7
this .msgType,
8
8
this .passthrough,
9
9
this .reqId,
10
10
this .acceptNullValue = false ,
11
11
});
12
12
13
13
/// Generate an instance from JSON.
14
- factory Request .fromJson (Map <String , dynamic > json) => Request (
14
+ factory Request .fromJson (
15
+ {bool acceptNullValue = false , required Map <String , dynamic > json}) =>
16
+ Request (
17
+ acceptNullValue: acceptNullValue,
15
18
passthrough: json['passthrough' ] as Map <String , dynamic >? ,
16
19
reqId: json['req_id' ] as int ? ,
17
20
);
@@ -27,7 +30,7 @@ class Request extends Equatable {
27
30
final int ? reqId;
28
31
29
32
/// Determine accept null value in request or not.
30
- bool acceptNullValue;
33
+ final bool acceptNullValue;
31
34
32
35
/// Converts an instance to JSON.
33
36
Map <String , dynamic > toJson () => < String , dynamic > {
You can’t perform that action at this time.
0 commit comments