WooProductReview class
Represents a product review with rating and metadata.
Brief description of the model's purpose and usage for product reviews.
Constructors
- WooProductReview({int? id, DateTime? dateCreated, DateTime? dateCreatedGmt, int? productId, WooProductReviewStatus? status = WooProductReviewStatus.approved, String? reviewer, String? reviewerEmail, String? review, int? rating, bool? verified})
- Creates a new WooProductReview instance.
- WooProductReview.fake([int? id])
-
Creates a fake WooProductReview instance for testing purposes.
factory
-
WooProductReview.fromJson(Map<
String, dynamic> json) - Creates a WooProductReview instance from JSON data.
Properties
- dateCreated ↔ DateTime?
-
The date the review was created, in the site's timezone. Read-only.
getter/setter pair
- dateCreatedGmt ↔ DateTime?
-
The date the review was created, as GMT. Read-only.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- id ↔ int?
-
Unique identifier for the resource. Read-only.
getter/setter pair
- productId ↔ int?
-
Unique identifier for the product that the review belongs to.
getter/setter pair
- rating ↔ int?
-
Review rating (0 to 5).
getter/setter pair
- review ↔ String?
-
The content of the review.
getter/setter pair
- reviewer ↔ String?
-
Reviewer name.
getter/setter pair
- reviewerEmail ↔ String?
-
Reviewer email.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status ↔ WooProductReviewStatus?
-
Status of the review. Options: approved, hold, spam, unspam, trash, and untrash. Defaults to approved.
getter/setter pair
- verified ↔ bool?
-
Shows if the reviewer bought the product or not.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the WooProductReview instance to JSON format.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override