Skip to content

Instantly share code, notes, and snippets.

View dllewellyn's full-sized avatar

Dan dllewellyn

View GitHub Profile
name: crypto_currency_wallet
description: A new Flutter application.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
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,
theme: ThemeData(
primarySwatch: Colors.red,
textTheme: TextTheme(
title: TextStyle(
fontFamily: "stonehenge",
fontWeight: FontWeight.bold,
fontSize: 26,
),
caption: TextStyle(
fontFamily: "stonehenge",
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,
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: ListView(
children: mockAccount()
.map((account) => AccountListItem(
accountData: account,
))
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(
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
class TransactionListItem extends StatefulWidget {
final Transaction transaction;
const TransactionListItem({Key key, @required this.transaction})
: super(key: key);
@override
_TransactionListItemState createState() => _TransactionListItemState();
}
class TransactionListItem extends StatefulWidget {
final Transaction transaction;
const TransactionListItem({Key key, @required this.transaction})
: super(key: key);
@override
_TransactionListItemState createState() => _TransactionListItemState();
}
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(