checkout page
This commit is contained in:
@@ -4,3 +4,5 @@ import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import '../../../common/theme/theme.dart';
|
||||
|
||||
part 'elevated_button.dart';
|
||||
part 'outline_button.dart';
|
||||
part 'qty_button.dart';
|
||||
|
||||
@@ -6,7 +6,7 @@ class AppElevatedButton extends StatelessWidget {
|
||||
required this.onPressed,
|
||||
required this.title,
|
||||
this.width = double.infinity,
|
||||
this.height = 48.0,
|
||||
this.height = 44.0,
|
||||
this.isLoading = false,
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ class AppElevatedButton extends StatelessWidget {
|
||||
)
|
||||
: Text(
|
||||
title,
|
||||
style: AppStyle.lg.copyWith(
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.white,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
part of 'button.dart';
|
||||
|
||||
class AppOutlineButton extends StatelessWidget {
|
||||
const AppOutlineButton({
|
||||
super.key,
|
||||
required this.onPressed,
|
||||
required this.title,
|
||||
this.width = double.infinity,
|
||||
this.height = 44.0,
|
||||
this.isLoading = false,
|
||||
this.borderColor,
|
||||
});
|
||||
|
||||
final Function()? onPressed;
|
||||
final String title;
|
||||
final double width;
|
||||
final double height;
|
||||
final bool isLoading;
|
||||
final Color? borderColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: width,
|
||||
height: height,
|
||||
child: OutlinedButton(
|
||||
onPressed: onPressed,
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: EdgeInsets.zero,
|
||||
side: BorderSide(color: borderColor ?? AppColor.primary),
|
||||
),
|
||||
child: isLoading
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SpinKitFadingCircle(color: AppColor.white, size: 24),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'Loading',
|
||||
style: AppStyle.lg.copyWith(
|
||||
color: AppColor.white,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Text(
|
||||
title,
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.primary,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
part of 'button.dart';
|
||||
|
||||
class QtyButton extends StatelessWidget {
|
||||
const QtyButton({super.key});
|
||||
|
||||
Reference in New Issue
Block a user