replace: context.pop

This commit is contained in:
lollipopkit
2023-04-19 20:58:29 +08:00
parent e709262477
commit 9cdfd86f70
17 changed files with 96 additions and 84 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:get_it/get_it.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../../core/route.dart';
import '../../../core/utils/ui.dart';
@@ -222,7 +223,7 @@ class _ServerPageState extends State<ServerPage>
[
TextButton(
onPressed: () {
Navigator.of(context).pop();
context.pop();
AppRoute(SSHPage(spi: spi), 'ssh page').go(context);
},
child: Text(_s.ok),
@@ -272,7 +273,7 @@ class _ServerPageState extends State<ServerPage>
Text(result ?? _s.error, style: textSize13),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
)
],