1
This commit is contained in:
@@ -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,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user