mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-23 08:34:39 +01:00
chore: README
This commit is contained in:
5
lib/core/extension/build.dart
Normal file
5
lib/core/extension/build.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
import 'package:toolbox/data/res/build_data.dart';
|
||||
|
||||
extension BuildDataX on BuildData {
|
||||
static const versionStr = 'v1.0.${BuildData.build}';
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 845;
|
||||
static const int build = 852;
|
||||
static const String engine = "3.19.5";
|
||||
static const String buildAt = "2024-04-09 16:51:43";
|
||||
static const int modifications = 2;
|
||||
static const String buildAt = "2024-04-10 23:54:34";
|
||||
static const int modifications = 5;
|
||||
static const int script = 44;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@ abstract final class GithubIds {
|
||||
'calvinweb',
|
||||
'Liloupar',
|
||||
'dccif',
|
||||
'QazCetelic',
|
||||
};
|
||||
|
||||
static const participants = <GhId>{
|
||||
'jaychoubaby',
|
||||
'fecture',
|
||||
@@ -65,5 +67,8 @@ abstract final class GithubIds {
|
||||
'MoMingRose',
|
||||
'sakalakagg',
|
||||
'cz32483490',
|
||||
'zj1123581321',
|
||||
'pctoolsx',
|
||||
'pgs666',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:get_it/get_it.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:toolbox/core/channel/bg_run.dart';
|
||||
import 'package:toolbox/core/channel/home_widget.dart';
|
||||
import 'package:toolbox/core/extension/build.dart';
|
||||
import 'package:toolbox/core/extension/context/common.dart';
|
||||
import 'package:toolbox/core/extension/context/dialog.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
@@ -206,12 +207,12 @@ class _HomePageState extends State<HomePage>
|
||||
_buildIcon(),
|
||||
TextButton(
|
||||
onPressed: () => context.showRoundDialog(
|
||||
title: Text(_versionStr),
|
||||
title: const Text(BuildDataX.versionStr),
|
||||
child: const Text(
|
||||
'${BuildData.buildAt}\nFlutter ${BuildData.engine}'),
|
||||
),
|
||||
child: Text(
|
||||
'${BuildData.name}\n$_versionStr',
|
||||
child: const Text(
|
||||
'${BuildData.name}\n${BuildDataX.versionStr}',
|
||||
textAlign: TextAlign.center,
|
||||
style: UIs.text15,
|
||||
),
|
||||
@@ -309,14 +310,6 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
|
||||
);
|
||||
}
|
||||
|
||||
String get _versionStr {
|
||||
var mod = '';
|
||||
if (BuildData.modifications != 0) {
|
||||
mod = '(+${BuildData.modifications})';
|
||||
}
|
||||
return 'v1.0.${BuildData.build}$mod';
|
||||
}
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
@@ -336,6 +329,7 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
|
||||
await Pros.server.refresh();
|
||||
}
|
||||
|
||||
// It's required by RUpgrade to send update progress
|
||||
Future<void> _reqNotiPerm() async {
|
||||
if (!isAndroid) return;
|
||||
final suc = await PermUtils.request(Permission.notification);
|
||||
|
||||
Reference in New Issue
Block a user