This commit is contained in:
zhutao
2025-11-20 18:00:34 +08:00
parent 701b99b138
commit b7239292d1
45 changed files with 1499 additions and 354 deletions

View File

@@ -34,7 +34,7 @@ class Button extends StatelessWidget {
};
return Opacity(
opacity: disabled ? 0.5 : 1,
opacity: disabled || loading ? 0.5 : 1,
child: Container(
width: width,
decoration: bgDecoration.copyWith(borderRadius: radius),
@@ -47,14 +47,27 @@ class Button extends StatelessWidget {
highlightColor: Colors.white.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
child: Center(
child: Text(
text,
style: TextStyle(
color: type != ThemeType.info ? Colors.white : Colors.black,
child: Row(
spacing: 10,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (loading)
const SizedBox(
width: 15,
height: 15,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation(Colors.white),
),
),
Text(
text,
style: TextStyle(
color: type != ThemeType.info ? Colors.white : Colors.black,
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
),
],
),
),
),