mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-08 09:15:11 +01:00
Update & Fix
- update deps. - splash support dark bg - fix parse cpu temp
This commit is contained in:
@@ -17,4 +17,8 @@ extension StringX on String {
|
||||
}
|
||||
return Distribution.unknown;
|
||||
}
|
||||
|
||||
Uri get uri {
|
||||
return Uri.parse(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:toolbox/core/persistant_store.dart';
|
||||
import 'package:toolbox/view/widget/card_dialog.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:toolbox/core/extension/stringx.dart';
|
||||
|
||||
void unawaited(Future<void> future) {}
|
||||
|
||||
@@ -27,10 +28,11 @@ void showSnackBarWithAction(BuildContext context, String content, String action,
|
||||
}
|
||||
|
||||
Future<bool> openUrl(String url) async {
|
||||
if (!await canLaunch(url)) {
|
||||
final uri = url.uri;
|
||||
if (!await canLaunchUrl(uri)) {
|
||||
return false;
|
||||
}
|
||||
final ok = await launch(url, forceSafariVC: false);
|
||||
final ok = await launchUrl(uri);
|
||||
if (ok == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ class ServerProvider extends BusyProvider {
|
||||
}
|
||||
|
||||
String _getCPUTemp(String type, String value) {
|
||||
const noMatch = r"cat: '/sys/class/thermal/thermal_zone*/type'";
|
||||
const noMatch = "/sys/class/thermal/thermal_zone*/type";
|
||||
// Not support to get CPU temperature
|
||||
if (value.contains(noMatch) ||
|
||||
type.contains(noMatch) ||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 119;
|
||||
static const int build = 120;
|
||||
static const String engine =
|
||||
"Flutter 2.10.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision c860cba910 (6 weeks ago) • 2022-03-25 00:23:12 -0500\nEngine • revision 57d3bac3dd\nTools • Dart 2.16.2 • DevTools 2.9.2\n";
|
||||
static const String buildAt = "2022-05-03 12:06:26.688732";
|
||||
static const String buildAt = "2022-05-04 19:40:22.762092";
|
||||
static const int modifications = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user