AssignVoucherResponse class
The AssignVoucherResponse class represents a response object with a message and optional data, which can be initialized from a map.
Constructors
- AssignVoucherResponse({required String message, AssignVoucherData? data})
- AssignVoucherResponse.fromMap(Map map)
-
AssignVoucherResponse.fromMap(Map map) : this(message: map['message'], data: AssignVoucherData.fromMap(map['data']));is a constructor that takes a map as input and initializes anAssignVoucherResponseobject with the values extracted from the map. It uses themessagekey from the map to initialize themessagefield of theAssignVoucherResponseobject, and it uses thedatakey from the map to initialize thedatafield of theAssignVoucherResponseobject by calling theAssignVoucherData.fromMapconstructor with the value associated with thedatakey. ThefromMapconstructor is a common pattern in Dart for initializing objects from maps, which is often used when parsing JSON data.
Properties
- data → AssignVoucherData?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited