Skip to content

Commit

Permalink
fix: replace textScaleFactor with textScaler
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
mdmohsin7 authored and vincenzopalazzo committed May 8, 2024
1 parent 6034ae8 commit 93e980e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/components/bottomsheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pay/pay_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _PayViewState extends State<PayView> {
Future<void> payInvoice(String boltString) async {
try {
await widget.provider.get<AppApi>().payInvoice(invoice: boltString);
if (context.mounted) {
if (mounted) {
PopUp.showPopUp(
context, 'Payment Successful', 'Payment successfully sent', false);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/views/request/request_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class _RequestViewState extends State<RequestView> {
)
: Text(
value,
textScaleFactor: 1.0,
textScaler: const TextScaler.linear(1.0),
style: const TextStyle(
fontSize: 35,
fontWeight: FontWeight.bold,
Expand Down
17 changes: 9 additions & 8 deletions lib/views/setting/setting_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,19 @@ class _SettingViewState extends State<SettingView> {
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<dynamic> route) => false);
if (context.mounted) {
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(
builder: (context) => HomeView(
provider: widget.provider,
)),
(Route<dynamic> route) => false);
}
} else {
PopUp.showPopUp(
context,
Expand Down

0 comments on commit 93e980e

Please sign in to comment.