Added Smart Linkage Button

This commit is contained in:
Mohammad Salameh
2024-04-28 09:32:49 +03:00
parent b9c181c944
commit ca71574bf2
3 changed files with 40 additions and 16 deletions

View File

@ -15,15 +15,18 @@ class DefaultButton extends StatelessWidget {
this.customButtonStyle,
this.backgroundColor,
this.foregroundColor,
this.borderRadius,
this.height,
this.padding,
});
final void Function()? onPressed;
final Widget child;
final double? height;
final bool isSecondary;
final double? borderRadius;
final bool enabled;
final double? padding;
final bool isDone;
final bool isLoading;
@ -65,21 +68,21 @@ class DefaultButton extends StatelessWidget {
}),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
borderRadius: BorderRadius.circular(borderRadius ?? 20),
),
),
fixedSize: MaterialStateProperty.all(
const Size.fromHeight(50),
),
padding: MaterialStateProperty.all(
const EdgeInsets.all(10),
EdgeInsets.all(padding ?? 10),
),
minimumSize: MaterialStateProperty.all(
const Size.fromHeight(50),
),
),
child: SizedBox(
height: 50,
height: height ?? 50,
child: Center(
child: isLoading
? const SizedBox.square(