Skip to content

Instantly share code, notes, and snippets.

@dllewellyn
Created November 20, 2019 17:48
Show Gist options
  • Save dllewellyn/ad7353e2a1499a604786dcbcf66ca0ab to your computer and use it in GitHub Desktop.
Save dllewellyn/ad7353e2a1499a604786dcbcf66ca0ab to your computer and use it in GitHub Desktop.
class AllUserDetails {
final List<AccountData> accounts;
AllUserDetails({this.accounts});
}
class AccountData {
final String key;
final SupportedCurrency currencyValue;
final double balance;
final String uid;
final String provider;
AccountData(
{this.currencyValue, this.balance, this.uid, this.provider, this.key});
}
class SupportedCurrency {
final String id;
final String name;
SupportedCurrency({this.id, this.name});
}
String urlImageForCurrency(SupportedCurrency currency) {
return "https://coinbaseliveexchange.appspot.com/currencies/image/" +
currency.id;
}
AccountData mockAccount() => AccountData(
key: "Test data",
balance: 1,
currencyValue: SupportedCurrency(id: "BTC", name: "Bitcoin"),
provider: "coinbase",
uid: "123123");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment