mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push bug fixes
This commit is contained in:
@ -18,6 +18,7 @@ class DefaultButton extends StatelessWidget {
|
||||
this.height,
|
||||
this.padding,
|
||||
this.borderColor,
|
||||
this.elevation,
|
||||
});
|
||||
final void Function()? onPressed;
|
||||
final Widget child;
|
||||
@ -33,6 +34,7 @@ class DefaultButton extends StatelessWidget {
|
||||
final Color? backgroundColor;
|
||||
final Color? foregroundColor;
|
||||
final Color? borderColor;
|
||||
final double? elevation;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -45,7 +47,9 @@ class DefaultButton extends StatelessWidget {
|
||||
textStyle: WidgetStateProperty.all(
|
||||
customTextStyle ??
|
||||
Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
fontSize: 13, color: foregroundColor, fontWeight: FontWeight.normal),
|
||||
fontSize: 13,
|
||||
color: foregroundColor,
|
||||
fontWeight: FontWeight.normal),
|
||||
),
|
||||
foregroundColor: WidgetStateProperty.all(
|
||||
isSecondary
|
||||
@ -54,7 +58,8 @@ class DefaultButton extends StatelessWidget {
|
||||
? foregroundColor ?? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
backgroundColor: WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
|
||||
backgroundColor: WidgetStateProperty.resolveWith<Color>(
|
||||
(Set<WidgetState> states) {
|
||||
return enabled
|
||||
? backgroundColor ?? ColorsManager.primaryColor
|
||||
: Colors.black.withOpacity(0.2);
|
||||
@ -74,6 +79,7 @@ class DefaultButton extends StatelessWidget {
|
||||
minimumSize: WidgetStateProperty.all(
|
||||
const Size.fromHeight(50),
|
||||
),
|
||||
elevation: WidgetStateProperty.all(elevation ?? 0),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: height ?? 50,
|
||||
|
Reference in New Issue
Block a user