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

@@ -359,7 +359,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 268;
CURRENT_PROJECT_VERSION = 269;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -367,7 +367,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.268;
MARKETING_VERSION = 1.0.269;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -490,7 +490,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 268;
CURRENT_PROJECT_VERSION = 269;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -498,7 +498,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.268;
MARKETING_VERSION = 1.0.269;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -515,7 +515,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 268;
CURRENT_PROJECT_VERSION = 269;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -523,7 +523,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.268;
MARKETING_VERSION = 1.0.269;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View File

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:logging/logging.dart';
import 'package:r_upgrade/r_upgrade.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../data/provider/app.dart';
import '../data/res/build_data.dart';
@@ -85,7 +86,7 @@ Future<void> _doUpdate(String url, BuildContext context, S s) async {
} else {
showRoundDialog(context, s.attention, Text(s.platformNotSupportUpdate), [
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(s.ok),
)
]);

View File

@@ -1,8 +1,7 @@
import 'package:flutter/material.dart';
extension ContextX on BuildContext {
void pop<T>([T? result]) {
Navigator.of(this).pop(T);
}
Navigator.of(this).pop(T);
}
}

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/utils/navigator.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../data/model/server/snippet.dart';
@@ -135,7 +136,7 @@ void showSnippetDialog(
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
context.pop();
AppRoute(const SnippetEditPage(), 'edit snippet').go(context);
},
child: Text(s.addOne),
@@ -156,7 +157,7 @@ void showSnippetDialog(
[
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
onSelected(snippet);
},
child: Text(s.ok),

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 268;
static const int build = 269;
static const String engine = "3.7.11";
static const String buildAt = "2023-04-19 20:26:15.641670";
static const int modifications = 4;
static const String buildAt = "2023-04-19 20:53:37.738261";
static const int modifications = 15;
}

View File

@@ -5,6 +5,7 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/utils/navigator.dart';
import 'package:toolbox/data/res/path.dart';
import '../../core/extension/colorx.dart';
@@ -145,7 +146,7 @@ class BackupPage extends StatelessWidget {
Text(s.restoreSureWithDate(backup.date)),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(s.cancel),
),
TextButton(
@@ -162,6 +163,7 @@ class BackupPage extends StatelessWidget {
for (final k in backup.dockerHosts.keys) {
_dockerHosts.setDockerHost(k, backup.dockerHosts[k]!);
}
context.pop();
showRoundDialog(
context,
s.attention,
@@ -172,7 +174,7 @@ class BackupPage extends StatelessWidget {
child: Text(s.restart),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(s.cancel),
),
],

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../core/utils/ui.dart';
import '../../data/model/docker/ps.dart';
@@ -50,7 +51,7 @@ class _DockerManagePageState extends State<DockerManagePage> {
final client = locator<ServerProvider>().getServer(widget.spi.id).client;
if (client == null) {
showSnackBar(context, Text(_s.noClient));
Navigator.of(context).pop();
context.pop();
return;
}
_docker.init(client, widget.spi.user, onPwdRequest, widget.spi.id);
@@ -119,12 +120,12 @@ class _DockerManagePageState extends State<DockerManagePage> {
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
await _showAddCmdPreview(
_buildAddCmd(
imageCtrl.text.trim(),
@@ -146,12 +147,12 @@ class _DockerManagePageState extends State<DockerManagePage> {
Text(cmd),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
final result = await _docker.run(cmd);
if (result != null) {
showSnackBar(context, Text(getErrMsg(result) ?? _s.unknownError));
@@ -187,13 +188,13 @@ class _DockerManagePageState extends State<DockerManagePage> {
if (_textController.text == '') {
showRoundDialog(context, _s.attention, Text(_s.fieldMustNotEmpty), [
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
),
]);
return;
}
Navigator.of(context).pop();
context.pop();
}
Future<String> onPwdRequest() async {
@@ -213,8 +214,8 @@ class _DockerManagePageState extends State<DockerManagePage> {
[
TextButton(
onPressed: () {
Navigator.of(context).pop();
Navigator.of(context).pop();
context.pop();
context.pop();
},
child: Text(_s.cancel),
),
@@ -294,12 +295,12 @@ class _DockerManagePageState extends State<DockerManagePage> {
Text(_s.sureDelete(e.repo)),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
final result = await _docker.run(
'docker rmi ${e.id} -f',
);
@@ -375,12 +376,12 @@ class _DockerManagePageState extends State<DockerManagePage> {
onSubmitted: (value) {
locator<DockerStore>().setDockerHost(widget.spi.id, value.trim());
_docker.refresh();
Navigator.of(context).pop();
context.pop();
},
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
],
@@ -478,7 +479,7 @@ class _DockerManagePageState extends State<DockerManagePage> {
[
TextButton(
onPressed: () {
Navigator.of(context).pop();
context.pop();
_docker.delete(dItem.containerId);
},
child: Text(_s.ok),

View File

@@ -2,6 +2,7 @@ import 'package:after_layout/after_layout.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:get_it/get_it.dart';
import 'package:toolbox/core/utils/navigator.dart';
import 'package:toolbox/data/provider/app.dart';
import 'package:toolbox/data/res/misc.dart';
@@ -253,7 +254,7 @@ class _MyHomePageState extends State<MyHomePage>
child: Text(_s.feedback),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.close),
)
],
@@ -297,7 +298,7 @@ class _MyHomePageState extends State<MyHomePage>
child: Text(_s.license),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.close),
)
],

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../data/model/pkg/upgrade_info.dart';
import '../../data/model/server/dist.dart';
@@ -51,7 +52,7 @@ class _PkgManagePageState extends State<PkgManagePage>
final si = locator<ServerProvider>().getServer(widget.spi.id);
if (si.client == null) {
showSnackBar(context, Text(_s.waitConnection));
Navigator.of(context).pop();
context.pop();
return;
}
@@ -76,14 +77,14 @@ class _PkgManagePageState extends State<PkgManagePage>
Text(_s.fieldMustNotEmpty),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
),
],
);
return;
}
Navigator.of(context).pop();
context.pop();
}
Future<String> onPwdRequest() async {
@@ -103,8 +104,8 @@ class _PkgManagePageState extends State<PkgManagePage>
[
TextButton(
onPressed: () {
Navigator.of(context).pop();
Navigator.of(context).pop();
context.pop();
context.pop();
},
child: Text(_s.cancel)),
TextButton(

View File

@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/extension/numx.dart';
import 'package:toolbox/core/utils/misc.dart';
import 'package:toolbox/core/utils/navigator.dart';
import 'package:toolbox/data/res/misc.dart';
import '../../../core/utils/server.dart';
@@ -68,7 +69,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
tooltip: _s.delete,
onPressed: () {
_provider.delInfo(widget.info!);
Navigator.of(context).pop();
context.pop();
},
icon: const Icon(Icons.delete))
: const SizedBox()
@@ -176,7 +177,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
} else {
_provider.addInfo(info);
}
Navigator.of(context).pop();
context.pop();
},
child: const Icon(Icons.save),
),

View File

@@ -2,6 +2,7 @@ import 'package:after_layout/after_layout.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../../core/route.dart';
import '../../../core/utils/ui.dart';
@@ -74,8 +75,8 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
TextButton(
onPressed: () {
_serverProvider.delServer(widget.spi!.id);
Navigator.of(context).pop();
Navigator.of(context).pop();
context.pop();
context.pop();
},
child: Text(
_s.ok,
@@ -83,7 +84,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
)
],
@@ -232,11 +233,11 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
Text(_s.sureNoPwd),
[
TextButton(
onPressed: () => Navigator.of(context).pop(false),
onPressed: () => context.pop(false),
child: Text(_s.ok),
),
TextButton(
onPressed: () => Navigator.of(context).pop(true),
onPressed: () => context.pop(true),
child: Text(_s.cancel),
)
],
@@ -277,7 +278,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
_serverProvider.updateServer(widget.spi!, spi);
}
Navigator.of(context).pop();
context.pop();
},
),
);

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),
)
],

View File

@@ -2,6 +2,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../../core/extension/numx.dart';
import '../../../core/extension/stringx.dart';
@@ -144,21 +145,21 @@ class _SFTPDownloadedPageState extends State<SFTPDownloadedPage> {
leading: const Icon(Icons.delete),
title: Text(_s.delete),
onTap: () {
Navigator.of(context).pop();
context.pop();
showRoundDialog(
context,
_s.sureDelete(fileName),
const SizedBox(),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () {
file.deleteSync();
setState(() {});
Navigator.of(context).pop();
context.pop();
},
child: Text(_s.ok),
),
@@ -177,7 +178,7 @@ class _SFTPDownloadedPageState extends State<SFTPDownloadedPage> {
),
[
TextButton(
onPressed: (() => Navigator.of(context).pop()),
onPressed: (() => context.pop()),
child: Text(_s.close),
)
],

View File

@@ -3,6 +3,7 @@ import 'dart:typed_data';
import 'package:dartssh2/dartssh2.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../../core/extension/numx.dart';
import '../../../core/extension/stringx.dart';
@@ -114,7 +115,7 @@ class _SFTPPageState extends State<SFTPPage> {
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.close),
)
],
@@ -135,14 +136,13 @@ class _SFTPPageState extends State<SFTPPage> {
labelText: _s.path,
hintText: '/',
),
onSubmitted: (value) =>
Navigator.of(context).pop(value),
onSubmitted: (value) => context.pop(value),
),
],
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
)
],
@@ -280,7 +280,7 @@ class _SFTPPageState extends State<SFTPPage> {
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
)
],
@@ -294,12 +294,12 @@ class _SFTPPageState extends State<SFTPPage> {
Text('${_s.dl2Local(name.filename)}\n${_s.keepForeground}'),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
final remotePath = _getRemotePath(name);
final local = '${(await sftpDir).path}$remotePath';
final pubKeyId = widget.spi.pubKeyId;
@@ -315,7 +315,7 @@ class _SFTPPageState extends State<SFTPPage> {
: locator<PrivateKeyStore>().get(pubKeyId).privateKey,
);
Navigator.of(context).pop();
context.pop();
},
child: Text(_s.download),
)
@@ -324,7 +324,7 @@ class _SFTPPageState extends State<SFTPPage> {
}
void delete(BuildContext context, SftpName file) {
Navigator.of(context).pop();
context.pop();
final isDir = file.attr.isDirectory;
showRoundDialog(
context,
@@ -333,12 +333,12 @@ class _SFTPPageState extends State<SFTPPage> {
'${_s.sureDelete(file.filename)}${isDir ? '\n${_s.sureDirEmpty}' : ''}'),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
context.pop();
showRoundDialog(context, 'Waiting...', centerSizedLoading, [],
barrierDismiss: false);
final remotePath = _getRemotePath(file);
@@ -348,16 +348,16 @@ class _SFTPPageState extends State<SFTPPage> {
} else {
await _status.client!.remove(remotePath);
}
Navigator.of(context).pop();
context.pop();
} catch (e) {
Navigator.of(context).pop();
context.pop();
showRoundDialog(
context,
_s.attention,
Text(e.toString()),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
)
],
@@ -376,7 +376,7 @@ class _SFTPPageState extends State<SFTPPage> {
}
void mkdir(BuildContext context) {
Navigator.of(context).pop();
context.pop();
final textController = TextEditingController();
showRoundDialog(
context,
@@ -389,7 +389,7 @@ class _SFTPPageState extends State<SFTPPage> {
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
@@ -401,7 +401,7 @@ class _SFTPPageState extends State<SFTPPage> {
Text(_s.fieldMustNotEmpty),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
),
],
@@ -410,7 +410,7 @@ class _SFTPPageState extends State<SFTPPage> {
}
_status.client!
.mkdir('${_status.path!.path}/${textController.text}');
Navigator.of(context).pop();
context.pop();
listDir();
},
child: Text(
@@ -423,7 +423,7 @@ class _SFTPPageState extends State<SFTPPage> {
}
void newFile(BuildContext context) {
Navigator.of(context).pop();
context.pop();
final textController = TextEditingController();
showRoundDialog(
context,
@@ -436,7 +436,7 @@ class _SFTPPageState extends State<SFTPPage> {
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.cancel),
),
TextButton(
@@ -448,7 +448,7 @@ class _SFTPPageState extends State<SFTPPage> {
Text(_s.fieldMustNotEmpty),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
),
],
@@ -458,7 +458,7 @@ class _SFTPPageState extends State<SFTPPage> {
(await _status.client!
.open('${_status.path!.path}/${textController.text}'))
.writeBytes(Uint8List(0));
Navigator.of(context).pop();
context.pop();
listDir();
},
child: Text(
@@ -471,7 +471,7 @@ class _SFTPPageState extends State<SFTPPage> {
}
void rename(BuildContext context, SftpName file) {
Navigator.of(context).pop();
context.pop();
final textController = TextEditingController();
showRoundDialog(
context,
@@ -483,9 +483,7 @@ class _SFTPPageState extends State<SFTPPage> {
),
),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(_s.cancel)),
TextButton(onPressed: () => context.pop(), child: Text(_s.cancel)),
TextButton(
onPressed: () async {
if (textController.text == '') {
@@ -495,7 +493,7 @@ class _SFTPPageState extends State<SFTPPage> {
Text(_s.fieldMustNotEmpty),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
),
],
@@ -503,7 +501,7 @@ class _SFTPPageState extends State<SFTPPage> {
return;
}
await _status.client!.rename(file.filename, textController.text);
Navigator.of(context).pop();
context.pop();
listDir();
},
child: Text(
@@ -547,7 +545,7 @@ class _SFTPPageState extends State<SFTPPage> {
Text(e.toString()),
[
TextButton(
onPressed: () => Navigator.of(context).pop(),
onPressed: () => context.pop(),
child: Text(_s.ok),
)
],

View File

@@ -1,6 +1,7 @@
import 'package:after_layout/after_layout.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:toolbox/core/utils/navigator.dart';
import '../../../core/utils/ui.dart';
import '../../../data/model/server/snippet.dart';
@@ -49,7 +50,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
? IconButton(
onPressed: () {
_provider.del(widget.snippet!);
Navigator.of(context).pop();
context.pop();
},
tooltip: _s.delete,
icon: const Icon(Icons.delete))
@@ -93,7 +94,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
} else {
_provider.add(snippet);
}
Navigator.of(context).pop();
context.pop();
},
),
);

View File

@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/core/utils/navigator.dart';
import 'package:xterm/xterm.dart' hide TerminalColors;
import '../../core/utils/platform.dart';
@@ -119,7 +120,7 @@ class _SSHPageState extends State<SSHPage> {
await session.done;
if (mounted) {
Navigator.of(context).pop();
context.pop();
}
}

View File

@@ -196,6 +196,8 @@ void main(List<String> args) async {
final stopwatch = Stopwatch()..start();
await dartFormat();
await getGitCommitCount();
// always change version to avoid dismatch version between different
// platforms
await changeAppleVersion();
await updateBuildData();
if (args.length > 1) {