mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
new: pve dashboard (#307)
This commit is contained in:
39
lib/view/widget/kv_row.dart
Normal file
39
lib/view/widget/kv_row.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/data/res/ui.dart';
|
||||
|
||||
final class KvRow extends StatelessWidget {
|
||||
final String k;
|
||||
final String v;
|
||||
final void Function()? onTap;
|
||||
|
||||
const KvRow({
|
||||
super.key,
|
||||
required this.k,
|
||||
required this.v,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(k, style: UIs.text12),
|
||||
UIs.width7,
|
||||
Text(
|
||||
v,
|
||||
style: UIs.text11Grey,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (onTap != null) UIs.width7,
|
||||
if (onTap != null) const Icon(Icons.keyboard_arrow_right, size: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user