Polish manager icons, alignment and card spacing

This commit is contained in:
tongtong committed 2026-11-16 11:42:37 +08:00
1 parent 40ff016f6b
commit e12cb76d68
3 files changed
+219 -68

No files matched your search

+24 -4
View File
@@ -81,11 +81,15 @@ class ActionButton extends m.StatelessWidget {
padding: const m.EdgeInsets.symmetric(horizontal: 14, vertical: 9),
minimumSize: const m.Size(0, 36),
color: primary ? c.CupertinoColors.activeBlue : null,
// 填充按钮的背景是主色,未指定前景色时图标会沿用主色而在蓝底上不可见。
foregroundColor: primary && onPressed != null
? c.CupertinoColors.white
: null,
onPressed: onPressed,
child: m.DefaultTextStyle.merge(
style: m.TextStyle(
fontSize: 13,
color: primary ? c.CupertinoColors.white : null,
color: primary && onPressed != null ? c.CupertinoColors.white : null,
),
child: content,
),
@@ -193,8 +197,18 @@ class TextField extends m.StatelessWidget {
minLines: minLines,
style: style,
placeholder: decoration.hintText,
prefix: decoration.prefixIcon,
suffix: decoration.suffixIcon,
prefix: decoration.prefixIcon == null
? null
: m.Padding(
padding: const m.EdgeInsets.only(left: 10),
child: decoration.prefixIcon!,
),
suffix: decoration.suffixIcon == null
? null
: m.Padding(
padding: const m.EdgeInsets.only(right: 8),
child: decoration.suffixIcon!,
),
padding: const m.EdgeInsets.all(12),
),
],
@@ -238,7 +252,13 @@ class SwitchListTile extends m.StatelessWidget {
children: [title, ?subtitle],
),
),
c.CupertinoSwitch(value: value, onChanged: onChanged),
m.SizedBox(
width: 40,
child: m.FittedBox(
fit: m.BoxFit.contain,
child: c.CupertinoSwitch(value: value, onChanged: onChanged),
),
),
],
),
),