mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
Redesign net speed part
This commit is contained in:
@@ -12,7 +12,7 @@ A new Flutter project which provide a chart view to display server status data.
|
||||
<img width="200px" src="https://raw.githubusercontent.com/LollipopKit/flutter_server_monitor_toolbox/main/screenshots/IMG_3347.PNG">
|
||||
</td>
|
||||
<td>
|
||||
<img width="200px" src="https://raw.githubusercontent.com/LollipopKit/flutter_server_monitor_toolbox/main/screenshots/IMG_3385.PNG">
|
||||
<img width="200px" src="https://raw.githubusercontent.com/LollipopKit/flutter_server_monitor_toolbox/main/screenshots/detail.jpg">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ToolBox";
|
||||
static const int build = 50;
|
||||
static const String engine =
|
||||
"Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 18116933e7 (2 weeks ago) • 2021-10-15 10:46:35 -0700\nEngine • revision d3ea636dc5\nTools • Dart 2.14.4\n";
|
||||
static const String buildAt = "2021-10-31 22:21:56.798068";
|
||||
static const int modifications = 1;
|
||||
static const int build = 54;
|
||||
static const String engine = "Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 18116933e7 (2 weeks ago) • 2021-10-15 10:46:35 -0700\nEngine • revision d3ea636dc5\nTools • Dart 2.14.4\n";
|
||||
static const String buildAt = "2021-11-01 22:19:44.302306";
|
||||
static const int modifications = 0;
|
||||
}
|
||||
|
||||
@@ -23,11 +23,13 @@ class ServerDetailPage extends StatefulWidget {
|
||||
class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late MediaQueryData _media;
|
||||
late ThemeData _theme;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
_media = MediaQuery.of(context);
|
||||
_theme = Theme.of(context);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -272,14 +274,30 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
}
|
||||
|
||||
Widget _buildNetView(NetSpeed ns) {
|
||||
final children = <Widget>[_buildNetSpeedTop(), const Divider(height: 7,)];
|
||||
children.addAll(ns.devices.map((e) => _buildNetSpeedItem(ns, e)));
|
||||
return RoundRectCard(Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 7),
|
||||
child: Column(
|
||||
children: ns.devices.map((e) => _buildNetSpeedItem(ns, e)).toList(),
|
||||
children: children,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildNetSpeedTop() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const [
|
||||
Icon(Icons.device_hub, size: 17,),
|
||||
Icon(Icons.arrow_upward, size: 17),
|
||||
Icon(Icons.arrow_downward, size: 17)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNetSpeedItem(NetSpeed ns, String device) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 258 KiB |
BIN
screenshots/detail.jpg
Normal file
BIN
screenshots/detail.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
Reference in New Issue
Block a user