opt.: pve dashboard (#307)

This commit is contained in:
lollipopkit
2024-03-19 01:26:53 -06:00
parent 48fdf4cc84
commit 7edef87a4f
14 changed files with 338 additions and 240 deletions

25
lib/view/widget/row.dart Normal file
View File

@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
final class AvgWidthRow extends StatelessWidget {
final List<Widget> children;
final double? width;
final double padding;
const AvgWidthRow({
super.key,
required this.children,
this.width,
this.padding = 0,
});
@override
Widget build(BuildContext context) {
final width =
((this.width ?? MediaQuery.of(context).size.width) - padding) /
children.length;
return Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: children.map((e) => SizedBox(width: width, child: e)).toList(),
);
}
}