feat: slicing home page

This commit is contained in:
efrilm
2025-07-31 19:25:45 +07:00
parent 73320561b0
commit 445a22a5a4
13 changed files with 1231 additions and 696 deletions
+19 -10
View File
@@ -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,
),
),
+2
View File
@@ -36,4 +36,6 @@ class AppColors {
/// stroke = #EFF0F6
static const Color stroke = Color(0xffEFF0F6);
static const Color background = Color.fromARGB(255, 241, 241, 241);
}