feat:增加主题颜色和暗黑模式
This commit is contained in:
@@ -8,21 +8,25 @@ BoxDecoration buildBoxDecoration() {
|
||||
);
|
||||
}
|
||||
|
||||
Container buildBody({Widget? child}) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
color: Colors.grey[50],
|
||||
padding: EdgeInsets.all(8),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
class BuildCard extends StatelessWidget {
|
||||
final Widget? child;
|
||||
|
||||
Container buildCard({Widget? child}) {
|
||||
return Container(
|
||||
decoration: buildBoxDecoration(),
|
||||
padding: EdgeInsets.all(10),
|
||||
child: child,
|
||||
);
|
||||
const BuildCard({super.key, this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: colors.surface,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: colors.outline.withAlpha(50), width: 1),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void buildModalBottom({
|
||||
|
||||
Reference in New Issue
Block a user