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
import com.google.firebase.auth.FirebaseToken | |
import io.micronaut.security.authentication.Authentication | |
class FirebaseAuthenticationInternal(private val firebaseToken: FirebaseToken) : Authentication { | |
override fun getName(): String = firebaseToken.uid | |
override fun getAttributes(): MutableMap<String, Any> = firebaseToken.claims | |
} |
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
import com.google.firebase.auth.FirebaseAuth | |
import com.google.firebase.auth.FirebaseAuthException | |
import io.micronaut.security.authentication.Authentication | |
import io.micronaut.security.token.validator.TokenValidator | |
import io.reactivex.Flowable | |
import org.intellij.lang.annotations.Flow | |
import javax.inject.Singleton | |
@Singleton |
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
object FirebaseUtil { | |
private val loader: ResourceLoader = ResourceResolver().getLoader(ClassPathResourceLoader::class.java).get(); | |
private var initialised: Boolean = false | |
private val options: FirebaseOptions? = FirebaseOptions.Builder() | |
.setCredentials( | |
GoogleCredentials.fromStream( | |
loader.getResourceAsStream("static/firebase-admin.json") |
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
import 'package:charts_flutter/flutter.dart' as charts; | |
import 'package:crypto_currency_wallet/account/transaction_data.dart'; | |
import 'package:flutter/material.dart'; | |
class SimpleTimeSeriesChart extends StatelessWidget { | |
final List<charts.Series> seriesList; | |
final Function(DateTime) onItemClicked; | |
SimpleTimeSeriesChart(this.seriesList, this.onItemClicked); |
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
import 'package:crypto_currency_wallet/account/account_data.dart'; | |
import 'package:crypto_currency_wallet/account/transaction_data.dart'; | |
import 'package:crypto_currency_wallet/widgets/transaction_list_graph.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_svg/svg.dart'; | |
AccountData( | |
key: "Test data", | |
balance: 0.50, |
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( |
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
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 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( |