diff --git a/lib/components/bottomsheet.dart b/lib/components/bottomsheet.dart index 288028b..dbe3dc2 100644 --- a/lib/components/bottomsheet.dart +++ b/lib/components/bottomsheet.dart @@ -57,7 +57,7 @@ class CLNBottomSheet { }, child: Text( '$display msats', - textScaleFactor: 1.0, + textScaler: const TextScaler.linear(1.0), style: TextStyle( fontSize: 40, fontWeight: FontWeight.bold, diff --git a/lib/views/pay/pay_view.dart b/lib/views/pay/pay_view.dart index fd06c42..926f77c 100644 --- a/lib/views/pay/pay_view.dart +++ b/lib/views/pay/pay_view.dart @@ -32,7 +32,7 @@ class _PayViewState extends State { Future payInvoice(String boltString) async { try { await widget.provider.get().payInvoice(invoice: boltString); - if (context.mounted) { + if (mounted) { PopUp.showPopUp( context, 'Payment Successful', 'Payment successfully sent', false); } diff --git a/lib/views/request/request_view.dart b/lib/views/request/request_view.dart index 4c9eb6e..3d5b51c 100644 --- a/lib/views/request/request_view.dart +++ b/lib/views/request/request_view.dart @@ -363,7 +363,7 @@ class _RequestViewState extends State { ) : Text( value, - textScaleFactor: 1.0, + textScaler: const TextScaler.linear(1.0), style: const TextStyle( fontSize: 35, fontWeight: FontWeight.bold, diff --git a/lib/views/setting/setting_view.dart b/lib/views/setting/setting_view.dart index 9d1fd73..6c65a0f 100644 --- a/lib/views/setting/setting_view.dart +++ b/lib/views/setting/setting_view.dart @@ -91,18 +91,19 @@ class _SettingViewState extends State { children: [ ElevatedButton( onPressed: () async { - if (setting.isValid()) { + if (setting.isValid() && context.mounted) { await saveSettings(setting: setting); await ManagerAPIProvider.registerClientFromSetting( setting, widget.provider); // https://stackoverflow.com/questions/68871880/do-not-use-buildcontexts-across-async-gaps - if (!mounted) return; - Navigator.of(context).pushAndRemoveUntil( - MaterialPageRoute( - builder: (context) => HomeView( - provider: widget.provider, - )), - (Route route) => false); + if (context.mounted) { + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute( + builder: (context) => HomeView( + provider: widget.provider, + )), + (Route route) => false); + } } else { PopUp.showPopUp( context,