AvailableReward class

Represents an available reward in the Kruzr rewards system.

This model contains information about rewards that users can claim using accumulated points from their driving achievements and performance. Each reward has a unique identifier, code, title, description, and point cost.

Constructors

AvailableReward({int? id, String? rewardCode, String? title, String? description, int? points})
const
AvailableReward.fromJson(Map<String, dynamic> json)
Factory constructor to create an instance from JSON.
factory

Properties

description String?
Detailed description of the reward. Provides users with more information about what the reward includes, terms and conditions, or how to use it. Example: "Get a free coffee at participating locations. Valid for 30 days."
final
hashCode int
The hash code for this object.
no setteroverride
id int?
Unique identifier for the reward. This is used to reference the specific reward in the system.
final
points int?
Number of points required to redeem this reward. Users must have at least this many points to claim the reward. Example: 100, 250, 500
final
rewardCode String?
Unique code identifier for the reward. This code can be used for reward redemption or tracking purposes. Example: "COFFEE_VOUCHER_10", "GAS_DISCOUNT_5"
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
Display title of the reward. This is the name shown to users in the rewards catalog. Example: "Free Coffee Voucher", "5% Gas Discount"
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the instance to a JSON map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override