feat:some changes done in login
This commit is contained in:
@@ -14,6 +14,7 @@ class AppButton extends StatelessWidget {
|
||||
this.leading,
|
||||
this.trailing,
|
||||
this.mainAxisAlignment,
|
||||
this.isActive = true,
|
||||
this.isLoading = false,
|
||||
});
|
||||
|
||||
@@ -28,12 +29,14 @@ class AppButton extends StatelessWidget {
|
||||
final Widget? leading;
|
||||
final Widget? trailing;
|
||||
final bool isLoading;
|
||||
final bool isActive;
|
||||
|
||||
final MainAxisAlignment? mainAxisAlignment;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Bounceable(
|
||||
onTap: onPressed,
|
||||
onTap: isActive ? onPressed : null,
|
||||
duration: TimeDelayConst.durationMill150,
|
||||
child: Container(
|
||||
width: width ?? double.infinity,
|
||||
@@ -42,7 +45,9 @@ class AppButton extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? AppColors.cFF6F00,
|
||||
color: isActive
|
||||
? backgroundColor ?? AppColors.cFF6F00
|
||||
: context.appThemeColors.inActiveColor,
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 12),
|
||||
),
|
||||
child: isLoading
|
||||
|
||||
@@ -6,19 +6,29 @@ class WLayout extends StatelessWidget {
|
||||
this.bgColor,
|
||||
this.bottom = true,
|
||||
this.top = true,
|
||||
this.left = true,
|
||||
this.right = true,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final Color? bgColor;
|
||||
final bool bottom;
|
||||
final bool top;
|
||||
final bool right;
|
||||
final bool left;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: bgColor ?? context.theme.scaffoldBackgroundColor,
|
||||
child: SafeArea(top: top, bottom: bottom, child: child),
|
||||
child: SafeArea(
|
||||
top: top,
|
||||
bottom: bottom,
|
||||
right: right,
|
||||
left: left,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user