fix: crash while opening terminal (#658)

Fixes #639
This commit is contained in:
lollipopkit🏳️‍⚧️
2024-12-14 21:06:37 +08:00
committed by GitHub
parent 831efa833b
commit 2f6db2961f
12 changed files with 125 additions and 85 deletions

View File

@@ -8,11 +8,12 @@ abstract final class BgRunMC {
_channel.invokeMethod('sendToBackground');
}
/// TODO: try fix the fn, then uncomment it and [stopService]
static void startService() {
_channel.invokeMethod('startService');
// _channel.invokeMethod('startService');
}
static void stopService() {
_channel.invokeMethod('stopService');
// _channel.invokeMethod('stopService');
}
}

View File

@@ -3,6 +3,6 @@
abstract class BuildData {
static const String name = "ServerBox";
static const int build = 1110;
static const int build = 1117;
static const int script = 59;
}

View File

@@ -18,28 +18,26 @@ final class _TopBar extends StatelessWidget implements PreferredSizeWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Center(
child: InkWell(
borderRadius: BorderRadius.circular(13),
onTap: () {
SettingsPage.route.go(context);
},
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 7, vertical: 3),
child: Row(
children: [
Text(
BuildData.name,
style: TextStyle(fontSize: 19),
),
SizedBox(width: 3),
Icon(
Icons.keyboard_arrow_right,
color: Colors.grey,
size: 17,
),
],
),
InkWell(
borderRadius: BorderRadius.circular(13),
onTap: () {
SettingsPage.route.go(context);
},
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 7, vertical: 3),
child: Row(
children: [
Text(
BuildData.name,
style: TextStyle(fontSize: 19),
),
SizedBox(width: 5),
Icon(
Icons.settings,
color: Colors.grey,
size: 17,
),
],
),
),
),

View File

@@ -83,8 +83,8 @@ class _SettingsPageState extends State<SettingsPage>
.toList(growable: false),
),
actions: [
Btn.icon(
icon: const Icon(Icons.developer_board),
Btn.text(
text: 'Logs',
onTap: () => DebugPage.route.go(
context,
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),