Transactions.fromJson constructor
Implementation
factory Transactions.fromJson(Map<String, dynamic> json) => Transactions(
symbol: json["symbol"],
amount: json["amount"].toDouble(),
buyDate: json["buy_date"]?.toInt(),
tradeDirection: json["amount"].toInt() > 0
? TradeDirection.buy
: TradeDirection.sell,
);