feat:更新组件UI

This commit is contained in:
2025-11-19 19:53:05 +08:00
parent 8acad9c63a
commit 07180965cc
13 changed files with 360 additions and 237 deletions

View File

@@ -29,20 +29,18 @@ InputDecoration formInputDecoration({
}
Widget buildCard({required BuildContext context, required Widget child}) {
final colors = Theme
.of(context)
.colorScheme;
final colors = Theme.of(context).colorScheme;
return Card(
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: colors.surface,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: colors.outline.withAlpha(50), width: 1),
border: Border.all(color: colors.outline.withAlpha(50)),
),
child: Padding(padding: EdgeInsets.all(8), child: child),
child: Padding(padding: EdgeInsets.all(10 ), child: child),
),
);
}
@@ -66,11 +64,7 @@ Widget buildToggleSwitch<T extends Enum>({
initialLabelIndex: tabValues.indexOf(currentTab),
totalSwitches: tabValues.length,
labels: labels,
activeBgColor: [Theme
.of(context)
.colorScheme
.primary
],
activeBgColor: [Theme.of(context).colorScheme.primary],
activeFgColor: Colors.white,
inactiveBgColor: Colors.grey.shade200,
inactiveFgColor: Colors.grey.shade700,
@@ -99,10 +93,7 @@ Widget circleIconButton({
fixedSize: Size(size, size),
shape: CircleBorder(),
elevation: 0,
backgroundColor: Theme
.of(context)
.colorScheme
.primary,
backgroundColor: Theme.of(context).colorScheme.primary,
padding: EdgeInsets.zero,
minimumSize: const Size(0, 0),
),
@@ -111,9 +102,7 @@ Widget circleIconButton({
}
Widget buildTag(BuildContext context, String title) {
final colors = Theme
.of(context)
.colorScheme;
final colors = Theme.of(context).colorScheme;
return Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
@@ -195,11 +184,7 @@ Widget buildLoadingIndicator(BuildContext context) {
color: colors.surface,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 8,
offset: Offset(0, 2),
),
BoxShadow(color: Colors.black12, blurRadius: 8, offset: Offset(0, 2)),
],
),
child: Column(