Fix get mem failed in chinese

This commit is contained in:
Junyuan Feng
2022-03-02 11:14:32 +08:00
parent bb80f093e0
commit 07fbf78853
4 changed files with 56 additions and 33 deletions

View File

@@ -307,7 +307,17 @@ class _ServerDetailPageState extends State<ServerDetailPage>
height: 7,
)
];
children.addAll(ns.devices.map((e) => _buildNetSpeedItem(ns, e)));
if (ns.devices.isEmpty) {
children.add(const Center(
child: Text(
'No interface.',
style: TextStyle(color: Colors.grey),
),
));
} else {
children.addAll(ns.devices.map((e) => _buildNetSpeedItem(ns, e)));
}
return RoundRectCard(Padding(
padding: const EdgeInsets.symmetric(vertical: 7, horizontal: 17),
child: Column(