19 lines
446 B
Dart
19 lines
446 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:robo_advisory/models/wallet.dart';
|
|
import 'package:robo_advisory/repository/wallet.repository.dart';
|
|
|
|
class WalletProvider with ChangeNotifier {
|
|
Wallet _wallet = new Wallet();
|
|
|
|
Wallet get wallet => _wallet;
|
|
|
|
void setWallet(Wallet wallet) {
|
|
_wallet = wallet;
|
|
notifyListeners();
|
|
}
|
|
|
|
Future<Wallet> loadWallet() async {
|
|
return await WalletRepository.loadWallet();
|
|
}
|
|
}
|