Transaction constructor

const Transaction({
  1. required double price,
  2. required Currency currency,
  3. String? id,
})

Creates a new Transaction with the specified price, currency, and optional transaction ID.

The price represents the total transaction amount. The currency should be a valid Currency enum value. The id is optional but recommended for tracking purposes.

Implementation

const Transaction({
  required this.price,
  required this.currency,
  this.id,
});