Transactions class

Transactions represent a single transaction of a user e.g. buy or sell.

The symbol parameter is the security symbol. The amount parameter is used to determine the trade direction. The buyDate parameter is the buy date Unix timestamp. The tradeDirection parameter is the trade direction e.g. buy or sell.

Constructors

Transactions({required String symbol, required double amount, required int? buyDate, required TradeDirection tradeDirection})
Constructor to create a new Transactions object.
Transactions.create({required String symbol, required double amount, required int buyDate})
Factory method to create a new Transactions object without specifying the trade direction.
factory
Transactions.fromJson(Map<String, dynamic> json)
factory

Properties

amount double
Amount of shares
final
buyDate int?
Buy date Unix timestamp
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
Security symbol
final
tradeDirection TradeDirection
Trade direction
final

Methods

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

Operators

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