migrate: fl_lib
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
import 'package:server_box/data/res/build_data.dart';
|
||||
|
||||
extension BuildDataX on BuildData {
|
||||
static const versionStr = 'v1.0.${BuildData.build}';
|
||||
}
|
||||
@@ -54,7 +54,7 @@ enum ShellFunc {
|
||||
return '''
|
||||
mkdir -p $scriptDir
|
||||
cat > $scriptPath
|
||||
chmod 744 $scriptPath
|
||||
chmod 755 $scriptPath
|
||||
''';
|
||||
}
|
||||
|
||||
|
||||
@@ -306,11 +306,10 @@ class ServerProvider extends Provider {
|
||||
|
||||
_setServerState(s, ServerConn.connected);
|
||||
|
||||
final scriptRaw = ShellFunc.allScript(spi.custom?.cmds).uint8List;
|
||||
|
||||
try {
|
||||
final (_, writeScriptResult) = await sv.client!.exec(
|
||||
(session) async {
|
||||
final scriptRaw = ShellFunc.allScript(spi.custom?.cmds).uint8List;
|
||||
session.stdin.add(scriptRaw);
|
||||
session.stdin.close();
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// This file is generated by fl_build. Do not edit.
|
||||
// ignore_for_file: prefer_single_quotes
|
||||
|
||||
class BuildData {
|
||||
abstract class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 1076;
|
||||
static const int build = 1091;
|
||||
static const int script = 58;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ abstract final class GithubIds {
|
||||
'Liloupar',
|
||||
'dccif',
|
||||
'mikropsoft',
|
||||
'CakesTwix',
|
||||
};
|
||||
|
||||
static const participants = <GhId>{
|
||||
|
||||
@@ -127,7 +127,6 @@ class SettingStore extends PersistentStore {
|
||||
/// Whether use system's primary color as the app's primary color
|
||||
late final useSystemPrimaryColor = property('useSystemPrimaryColor', false);
|
||||
|
||||
|
||||
/// Only valid on iOS / Android / Windows
|
||||
late final useBioAuth = property('useBioAuth', false);
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import 'package:server_box/data/provider/server.dart';
|
||||
import 'package:server_box/data/provider/sftp.dart';
|
||||
import 'package:server_box/data/provider/snippet.dart';
|
||||
import 'package:server_box/data/res/build_data.dart';
|
||||
import 'package:server_box/data/res/misc.dart';
|
||||
import 'package:server_box/data/res/store.dart';
|
||||
import 'package:server_box/data/store/no_backup.dart';
|
||||
|
||||
@@ -53,7 +52,7 @@ void _runInZone(void Function() body) {
|
||||
Future<void> _initApp() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
await Paths.init(BuildData.name, bakName: Miscs.bakFileName);
|
||||
await Paths.init(BuildData.name, bakName: 'srvbox_bak.json');
|
||||
await _initData();
|
||||
_setupDebug();
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ final class _AppBar extends CustomAppBar {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final placeholder = SizedBox(
|
||||
height: CustomAppBar.sysStatusBarHeight ?? 0 + MediaQuery.of(context).padding.top,
|
||||
height: CustomAppBar.sysStatusBarHeight ??
|
||||
0 + MediaQuery.of(context).padding.top,
|
||||
);
|
||||
return selectIndex.listenVal(
|
||||
(idx) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:icons_plus/icons_plus.dart';
|
||||
import 'package:server_box/core/channel/home_widget.dart';
|
||||
import 'package:server_box/core/extension/build.dart';
|
||||
import 'package:server_box/core/extension/context/locale.dart';
|
||||
import 'package:server_box/core/route.dart';
|
||||
import 'package:server_box/data/model/app/tab.dart';
|
||||
@@ -218,7 +217,7 @@ class _HomePageState extends State<HomePage>
|
||||
children: [
|
||||
_buildIcon(),
|
||||
const Text(
|
||||
'${BuildData.name}\n${BuildDataX.versionStr}',
|
||||
'${BuildData.name}\nv${BuildData.build}',
|
||||
textAlign: TextAlign.center,
|
||||
style: UIs.text15,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user