This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: crypto_currency_wallet | |
| description: A new Flutter application. | |
| version: 1.0.0+1 | |
| environment: | |
| sdk: ">=2.1.0 <3.0.0" | |
| dependencies: | |
| flutter: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| theme: ThemeData( | |
| primarySwatch: Colors.red, | |
| textTheme: TextTheme( | |
| title: TextStyle( | |
| fontFamily: "stonehenge", | |
| fontWeight: FontWeight.bold, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| theme: ThemeData( | |
| primarySwatch: Colors.red, | |
| textTheme: TextTheme( | |
| title: TextStyle( | |
| fontFamily: "stonehenge", | |
| fontWeight: FontWeight.bold, | |
| fontSize: 26, | |
| ), | |
| caption: TextStyle( | |
| fontFamily: "stonehenge", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<AccountData> mockAccount() => [ | |
| AccountData( | |
| key: "Test data", | |
| balance: 0.50, | |
| currencyValue: SupportedCurrency(id: "BTC", name: "Bitcoin"), | |
| provider: "coinbase", | |
| uid: "123123"), | |
| AccountData( | |
| key: "Test data2", | |
| balance: 100, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyHomePage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar(), | |
| body: ListView( | |
| children: mockAccount() | |
| .map((account) => AccountListItem( | |
| accountData: account, | |
| )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AccountListItem extends StatelessWidget { | |
| final AccountData accountData; | |
| const AccountListItem({Key key, this.accountData}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Card( | |
| elevation: 2, | |
| child: Container( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TransactionListItem extends StatefulWidget { | |
| final Transaction transaction; | |
| const TransactionListItem({Key key, @required this.transaction}) | |
| : super(key: key); | |
| @override | |
| _TransactionListItemState createState() => _TransactionListItemState(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TransactionListItem extends StatefulWidget { | |
| final Transaction transaction; | |
| const TransactionListItem({Key key, @required this.transaction}) | |
| : super(key: key); | |
| @override | |
| _TransactionListItemState createState() => _TransactionListItemState(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<Transaction> mockTransactions() => [ | |
| Transaction( | |
| amount: "6", | |
| type: "RECEIVE", | |
| date: DateTime.now().subtract(Duration(hours: 4))), | |
| Transaction( | |
| amount: "-3", | |
| type: "SEND", | |
| date: DateTime.now().subtract(Duration(hours: 3))), | |
| Transaction( |