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';
33/// Super class of all requests.
44class Request extends Equatable {
55 /// Initializes.
6- Request ({
6+ const Request ({
77 this .msgType,
88 this .passthrough,
99 this .reqId,
1010 this .acceptNullValue = false ,
1111 });
1212
1313 /// 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,
1518 passthrough: json['passthrough' ] as Map <String , dynamic >? ,
1619 reqId: json['req_id' ] as int ? ,
1720 );
@@ -27,7 +30,7 @@ class Request extends Equatable {
2730 final int ? reqId;
2831
2932 /// Determine accept null value in request or not.
30- bool acceptNullValue;
33+ final bool acceptNullValue;
3134
3235 /// Converts an instance to JSON.
3336 Map <String , dynamic > toJson () => < String , dynamic > {
You can’t perform that action at this time.
0 commit comments