diff --git a/lib/core/extension/uint8list.dart b/lib/core/extension/uint8list.dart index f20f57b1..222c67db 100644 --- a/lib/core/extension/uint8list.dart +++ b/lib/core/extension/uint8list.dart @@ -3,4 +3,4 @@ import 'dart:typed_data'; extension Uint8ListX on Future { Future get string async => utf8.decode(await this); -} \ No newline at end of file +} diff --git a/lib/data/model/docker/ps.dart b/lib/data/model/docker/ps.dart index 88277bdd..8457eea4 100644 --- a/lib/data/model/docker/ps.dart +++ b/lib/data/model/docker/ps.dart @@ -14,7 +14,7 @@ class DockerPsItem { List parts = rawString.split(' '); parts.removeWhere((element) => element.isEmpty); parts = parts.map((e) => e.trim()).toList(); - + containerId = parts[0]; image = parts[1]; command = parts[2].trim(); diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index 4b5ef7b1..213eafe8 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,9 +2,9 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 102; + static const int build = 106; static const String engine = - "Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 7e9793dee1 (5 days ago) • 2022-03-02 11:23:12 -0600\nEngine • revision bd539267b4\nTools • Dart 2.16.1 • DevTools 2.9.2\n"; - static const String buildAt = "2022-03-07 19:19:07.115966"; - static const int modifications = 18; + "Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 7e9793dee1 (6 days ago) • 2022-03-02 11:23:12 -0600\nEngine • revision bd539267b4\nTools • Dart 2.16.1 • DevTools 2.9.2\n"; + static const String buildAt = "2022-03-08 18:06:40.014600"; + static const int modifications = 8; } diff --git a/lib/view/page/apt.dart b/lib/view/page/apt.dart index e877ffa4..643034e6 100644 --- a/lib/view/page/apt.dart +++ b/lib/view/page/apt.dart @@ -54,6 +54,7 @@ class _AptManagePageState extends State Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + centerTitle: true, title: TwoLineText(up: 'Apt', down: widget.spi.ip), actions: [ IconButton( diff --git a/lib/view/page/docker.dart b/lib/view/page/docker.dart index 4cd15773..c6a9e102 100644 --- a/lib/view/page/docker.dart +++ b/lib/view/page/docker.dart @@ -57,6 +57,7 @@ class _DockerManagePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + centerTitle: true, title: TwoLineText(up: 'Docker', down: widget.spi.ip), ), body: _buildMain(), @@ -125,7 +126,9 @@ class _DockerManagePageState extends State { return ListTile( title: Text(item.image), subtitle: Text(item.status), - trailing: docker.isBusy ? const CircularProgressIndicator() : _buildMoreBtn(item.running, item.containerId), + trailing: docker.isBusy + ? const CircularProgressIndicator() + : _buildMoreBtn(item.running, item.containerId), ); }).toList(), ); diff --git a/lib/view/page/sftp.dart b/lib/view/page/sftp.dart index c5e3c750..fdc69163 100644 --- a/lib/view/page/sftp.dart +++ b/lib/view/page/sftp.dart @@ -195,8 +195,8 @@ class _SFTPPageState extends State { ]); return; } - _status.client!.mkdir( - _status.path!.path + '/' + textController.text); + _status.client! + .mkdir(_status.path!.path + '/' + textController.text); Navigator.of(context).pop(); listDir(); }, @@ -234,8 +234,7 @@ class _SFTPPageState extends State { ]); return; } - await _status - .client! + await _status.client! .rename(file.filename, textController.text); Navigator.of(context).pop(); listDir(); @@ -270,9 +269,8 @@ class _SFTPPageState extends State { final sftpc = await client.sftp(); _status.client = sftpc; } - final fs = await _status - .client! - .listdir(path ?? (_status.path?.path ?? '/')); + final fs = + await _status.client!.listdir(path ?? (_status.path?.path ?? '/')); fs.sort((a, b) => a.filename.compareTo(b.filename)); fs.removeAt(0); if (mounted) { @@ -339,7 +337,7 @@ class _SFTPPageState extends State { _status.selected = true; _status.path = AbsolutePath('/'); listDir( - client: locator() + client: locator() .servers .firstWhere((s) => s.info == spi) .client, diff --git a/lib/view/widget/two_line_text.dart b/lib/view/widget/two_line_text.dart index be76c30a..10ac7a8d 100644 --- a/lib/view/widget/two_line_text.dart +++ b/lib/view/widget/two_line_text.dart @@ -1,17 +1,24 @@ import 'package:flutter/material.dart'; class TwoLineText extends StatelessWidget { - const TwoLineText({Key? key, required this.up, required this.down}) : super(key: key); + const TwoLineText({Key? key, required this.up, required this.down}) + : super(key: key); final String up; final String down; @override Widget build(BuildContext context) { return Column( - children: [ - Text(up, style: const TextStyle(fontSize: 15),), - Text(down, style: const TextStyle(fontSize: 11),) - ], - ); + children: [ + Text( + up, + style: const TextStyle(fontSize: 15), + ), + Text( + down, + style: const TextStyle(fontSize: 11), + ) + ], + ); } } diff --git a/pubspec.lock b/pubspec.lock index 2716724a..cdb53bc2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -335,6 +335,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -521,7 +528,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" typed_data: dependency: transitive description: