ResponseModel class
converts pinelabs response to dart object
- Annotations
Constructors
- ResponseModel({required HeaderModel header, required int responseCode, required String responseMsg, String rawResponse = '', String scannedData = ''})
-
converts pinelabs response to dart object
header
is the header of the response. Which is same as theheader
passed in request.responseCode
is the response code of the response.responseMsg
is the response message of the response.rawResponse
is the string response received from pinelabs.const - ResponseModel.fromJson(String source)
-
get ResponseModel from json string.
factory
-
ResponseModel.fromMap(Map<
String, dynamic> map) -
get ResponseModel from
map
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- header → HeaderModel
-
header is the header of the response. Which
is same as the header passed in request.
final
- rawResponse → String
-
rawResponse is the string response received from pinelabs.
final
- responseCode → int
-
responseCode is the response code of the response.
final
- responseMsg → String
-
responseMsg is the response message of the response.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scannedData → String
-
scannedData is the String response received from the scanner methods.
final
Methods
-
copyWith(
{HeaderModel? header, int? responseCode, String? responseMsg, String? rawResponse, String? scannedData}) → ResponseModel - copy new instance of ResponseModel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String - get json string from ResponseModel.
-
toMap(
) → Map< String, dynamic> - get map from ResponseModel.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override