import 'dart:convert';

import 'package:aman_kassa_flutter/core/models/transaction_item.dart';

void main() {
  var date = "2021-01-14T12:15:34.511Z";

  String text = '{'+
  '"amount": 5500,'+
  '"cardExpireDate": "09/22",'+
  '"cardNumber": "400303******6254",'+
  '"cardType": "VISA",'+
  '"date": "2021-01-14 12:22:09",'+
  '"transactionType": "PAYMENT"'+
  '}';

  print(text);
  dynamic data = json.decode(text);
  TransactionItem item = TransactionItem.fromJson(data);

  print(item.date);
}