mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-22 08:24:21 +01:00
Rename wallet to instance (#379)
* Rename wallet of BreezLiquidSDK to instance on example Flutter project * Generate Dart bindings * Update dependencies to latest
This commit is contained in:
@@ -10,10 +10,14 @@ import 'package:flutter_breez_liquid_example/services/breez_liquid_sdk.dart';
|
||||
import 'package:flutter_breez_liquid_example/services/credentials_manager.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
final CredentialsManager credentialsManager;
|
||||
final BreezLiquidSDK liquidSDK;
|
||||
final CredentialsManager credentialsManager;
|
||||
|
||||
const HomePage({super.key, required this.credentialsManager, required this.liquidSDK});
|
||||
const HomePage({
|
||||
super.key,
|
||||
required this.liquidSDK,
|
||||
required this.credentialsManager,
|
||||
});
|
||||
|
||||
@override
|
||||
State<HomePage> createState() => _HomePageState();
|
||||
@@ -65,11 +69,11 @@ class _HomePageState extends State<HomePage> {
|
||||
},
|
||||
),
|
||||
drawer: HomePageDrawer(
|
||||
liquidSDK: widget.liquidSDK.wallet!, credentialsManager: widget.credentialsManager),
|
||||
floatingActionButton: QrActionButton(liquidSDK: widget.liquidSDK.wallet!),
|
||||
liquidSDK: widget.liquidSDK.instance!, credentialsManager: widget.credentialsManager),
|
||||
floatingActionButton: QrActionButton(liquidSDK: widget.liquidSDK.instance!),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
bottomNavigationBar: HomePageBottomAppBar(
|
||||
liquidSDK: widget.liquidSDK.wallet!,
|
||||
liquidSDK: widget.liquidSDK.instance!,
|
||||
paymentsStream: widget.liquidSDK.paymentsStream,
|
||||
),
|
||||
),
|
||||
@@ -79,7 +83,7 @@ class _HomePageState extends State<HomePage> {
|
||||
Future<void> _sync() async {
|
||||
try {
|
||||
debugPrint("Syncing wallet.");
|
||||
await widget.liquidSDK.wallet!.sync();
|
||||
await widget.liquidSDK.instance!.sync();
|
||||
debugPrint("Wallet synced!");
|
||||
} on Exception catch (e) {
|
||||
final errMsg = "Failed to sync wallet. $e";
|
||||
|
||||
@@ -4,8 +4,8 @@ import 'package:flutter_breez_liquid_example/routes/home/widgets/mnemonics_dialo
|
||||
import 'package:flutter_breez_liquid_example/services/credentials_manager.dart';
|
||||
|
||||
class HomePageDrawer extends StatefulWidget {
|
||||
final CredentialsManager credentialsManager;
|
||||
final BindingLiquidSdk liquidSDK;
|
||||
final CredentialsManager credentialsManager;
|
||||
|
||||
const HomePageDrawer({super.key, required this.liquidSDK, required this.credentialsManager});
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_breez_liquid/flutter_breez_liquid.dart';
|
||||
|
||||
class SendPaymentDialog extends StatefulWidget {
|
||||
final String? barcodeValue;
|
||||
final BindingLiquidSdk liquidSdk;
|
||||
final String? barcodeValue;
|
||||
|
||||
const SendPaymentDialog({super.key, required this.liquidSdk, this.barcodeValue});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user