ScanModel class
converts pinelabs response to dart object
- Annotations
Constructors
-
ScanModel({required HeaderModel header, required int responseCode, required String responseMsg, required List<
ScanProductModel> scannedProducts, String rawResponse = ''}) -
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.scannedProducts
is the list of details of scanned products i.ee gives the list of ScanProductModel carrying itemCount & itemDetailsconst - ScanModel.fromJson(String source)
-
get ScanModel from json string.
factory
-
ScanModel.fromMap(Map<
String, dynamic> map) -
get ScanModel 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
-
scannedProducts
→ List<
ScanProductModel> -
scannedProducts is the List of scanned items response,
received from pinelabs.
final
Methods
-
copyWith(
{HeaderModel? header, int? responseCode, String? responseMsg, String? rawResponse, List< ScanProductModel> ? scannedProducts}) → ScanModel - copy new instance of ScanModel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String - get json string from ScanModel.
-
toMap(
) → Map< String, dynamic> - get map from ScanModel.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override