feat: slicing home page
This commit is contained in:
@@ -18,6 +18,8 @@ class Button extends StatelessWidget {
|
||||
this.icon,
|
||||
this.disabled = false,
|
||||
this.fontSize = 16.0,
|
||||
this.elevation,
|
||||
this.labelStyle,
|
||||
});
|
||||
|
||||
const Button.outlined({
|
||||
@@ -33,6 +35,8 @@ class Button extends StatelessWidget {
|
||||
this.icon,
|
||||
this.disabled = false,
|
||||
this.fontSize = 16.0,
|
||||
this.elevation,
|
||||
this.labelStyle,
|
||||
});
|
||||
|
||||
final Function() onPressed;
|
||||
@@ -43,9 +47,11 @@ class Button extends StatelessWidget {
|
||||
final double? width;
|
||||
final double height;
|
||||
final double borderRadius;
|
||||
final double? elevation;
|
||||
final Widget? icon;
|
||||
final bool disabled;
|
||||
final double fontSize;
|
||||
final TextStyle? labelStyle;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -60,6 +66,7 @@ class Button extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
),
|
||||
elevation: elevation,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
),
|
||||
child: Row(
|
||||
@@ -73,11 +80,12 @@ class Button extends StatelessWidget {
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: disabled ? Colors.grey : textColor,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
style: labelStyle ??
|
||||
TextStyle(
|
||||
color: disabled ? Colors.grey : textColor,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
@@ -106,11 +114,12 @@ class Button extends StatelessWidget {
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: disabled ? Colors.grey : textColor,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
style: labelStyle ??
|
||||
TextStyle(
|
||||
color: disabled ? Colors.grey : textColor,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user