Skip to content

Commit

Permalink
finish1
Browse files Browse the repository at this point in the history
  • Loading branch information
mo7amedaliEbaid authored and devAhmed94 committed Aug 6, 2023
1 parent d93d67b commit 290b945
Show file tree
Hide file tree
Showing 23 changed files with 307 additions and 506 deletions.
7 changes: 5 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import 'package:beautify/view/landing_screen/landing_screen.dart';
import 'package:beautify/view/rootscreen/root.dart';
import 'package:beautify/viewmodel/initial/initial.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'configs/core_theme.dart' as theme;
import 'package:get/get.dart';
Expand All @@ -15,6 +14,10 @@ import 'model/controllers/duplicate_controller.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await HighPriorityInitial.initial();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
runApp(MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => ThemeProvider()),
Expand Down
2 changes: 1 addition & 1 deletion lib/view/cartscreen/checout_screen/check_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class _CheckoutScreenState extends State<CheckoutScreen> {
addresList.isNotEmpty
? SizedBox(
width: Get.width * 0.45,
height: 50,
height: AppDimensions.normalize(20),
child: DropdownButtonFormField2(
decoration: InputDecoration(
hintText:
Expand Down
86 changes: 23 additions & 63 deletions lib/view/cartscreen/payment_screen/payment_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'package:beautify/configs/configs.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import '../../../model/controllers/duplicate_controller.dart';
Expand Down Expand Up @@ -30,8 +30,8 @@ class PaymentScreen extends StatelessWidget {
return Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: SizedBox(
height: 60,
width: Get.mediaQuery.size.width * 0.7,
height: AppDimensions.normalize(20),
width: Get.mediaQuery.size.width * 0.6,
child: FloatingActionButton.extended(
onPressed: () {
showCupertinoDialog(
Expand All @@ -43,7 +43,6 @@ class PaymentScreen extends StatelessWidget {
),
content: Text(
"Do you want pay?",
// style: textStyle.bodyNormal,
),
actions: [
CupertinoButton(
Expand Down Expand Up @@ -72,8 +71,7 @@ class PaymentScreen extends StatelessWidget {
snackBar(
title: "Pay",
message: "Successfully payed",
// textStyle: textStyle,
/* colors: colors*/);
);
}
},
),
Expand All @@ -84,37 +82,34 @@ class PaymentScreen extends StatelessWidget {
},
label: Text(
"Pay",
// style: textStyle.titleLarge.copyWith(color: colors.whiteColor),
)),
),
appBar: AppBar(
// backgroundColor: colors.whiteColor,
// foregroundColor: colors.blackColor,
centerTitle: true,
automaticallyImplyLeading: true,
title: Text(
"E-Payment",
// style: textStyle.titleLarge,
),
),
body: Padding(
padding: const EdgeInsets.all(15),
padding:Space.v1!,
child: SingleChildScrollView(
physics: duplicateController.uiDuplicate.defaultScroll,
child: Column(
children: [
Space.y1!,
Align(
alignment: Alignment.center,
child: SvgPicture.string(
paymentFunctions.createBarcode(),
),
),
Space.y1!,
duplicateContainer(
// colors: colors,
widget: Column(
children: [
SizedBox(
height: 100,
height: AppDimensions.normalize(40),
width: Get.mediaQuery.size.width * 0.8,
child: GridView.builder(
physics: duplicateController.uiDuplicate.defaultScroll,
Expand All @@ -126,53 +121,44 @@ class PaymentScreen extends StatelessWidget {
crossAxisSpacing: 10),
itemBuilder: (context, index) {
return SizedBox(
height: 40,
height: AppDimensions.normalize(20),
child: CircleAvatar(
// backgroundColor: colors.whiteColor,
foregroundImage: CachedNetworkImageProvider(
productList[index].imageUrl),
),
);
},
),
),
const SizedBox(
width: 10,
),
Space.y!,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
width: Get.mediaQuery.size.width * 0.48,
width: AppDimensions.normalize(100),
child: Row(
children: [
Text(
productList[0].name.substring(0, 10),
/* style: textStyle.bodyNormal
.copyWith(fontWeight: FontWeight.bold),*/
overflow: TextOverflow.clip,
textAlign: TextAlign.start,
style: AppText.b1b,
),
const SizedBox(
width: 7,
),
Space.x!,
Text(
"and more",
// style: textStyle.bodySmall,
),
],
)),
Column(
children: [
Icon(
CupertinoIcons.number_circle,
// color: colors.blackColor,
size: 20,
),
Text(
"Count : ${productList.length}",
// style: textStyle.bodySmall
// .copyWith(color: colors.blackColor),
style: AppText.h3b
),
],
)
Expand All @@ -182,63 +168,43 @@ class PaymentScreen extends StatelessWidget {
),
),
duplicateContainer(
// colors: colors,
widget: Column(
children: [
duplicateRowItem(
// colors: colors,
prefix: Text(
"Recipient Name",
// style: textStyle.bodyNormal,
),
suffix: Text(
profileController.information.name,
// style: textStyle.bodyNormal
// .copyWith(fontWeight: FontWeight.bold),
)),
duplicateRowItem(
// colors: colors,
prefix: Text(
"Address",
// style: textStyle.bodyNormal,
),
suffix: Text(
addressDetail,
// style: textStyle.bodyNormal
// .copyWith(fontWeight: FontWeight.bold),
)),
duplicateRowItem(
// colors: colors,
prefix: Text(
"Payment Methods",
// style: textStyle.bodyNormal,
),
suffix: Text(
"My E-Wallet",
// style: textStyle.bodyNormal
// .copyWith(fontWeight: FontWeight.bold),
)),
duplicateRowItem(
// colors: colors,
prefix: Text(
"Date",
// style: textStyle.bodyNormal,
),
suffix: Text(
dateTime.toString().substring(0, 16),
// style: textStyle.bodyNormal
// .copyWith(fontWeight: FontWeight.bold),
)),
duplicateRowItem(
// colors: colors,
prefix: Text(
"Total",
// style: textStyle.bodyNormal,
),
suffix: Text(
"€$totalPrice",
// style: textStyle.bodyNormal
// .copyWith(fontWeight: FontWeight.bold),
style: AppText.h3b,
)),
],
)),
Expand All @@ -250,34 +216,28 @@ class PaymentScreen extends StatelessWidget {
}

Widget duplicateContainer(
{required Widget widget/*, required CustomColors colors*/}) {
{required Widget widget}) {
return Container(
width: Get.mediaQuery.size.width,
margin: const EdgeInsets.only(top: 25, bottom: 25),
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
// color: colors.gray,
borderRadius: BorderRadius.circular(15),
),
width: AppDimensions.size?.width,
margin: Space.all(.5,.5),
padding: Space.all(.5,.5),
child: widget);
}

Widget duplicateRowItem(
{required Widget prefix,
required Widget suffix,
/* required CustomColors colors*/}) {
}) {
return Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 10, bottom: 10),
padding: Space.all(.5,.5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [prefix, suffix],
),
),
const SizedBox(
height: 10,
),
Space.y!,
Divider(
thickness: 0.5,
height: 1,
Expand Down
4 changes: 1 addition & 3 deletions lib/view/landing_screen/landing_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,16 @@ class _LandingScreenState extends State<LandingScreen> {
width: AppDimensions.normalize(10),
height: AppDimensions.normalize(3),
decoration: BoxDecoration(
/* color: colors.whiteColor,*/ borderRadius: BorderRadius.circular(12)),
borderRadius: BorderRadius.circular(12)),
child: Icon(
CupertinoIcons.right_chevron,
// color: colors.blackColor,
),
),
renderSkipBtn: Container(
alignment: Alignment.center,
width: 40,
height: 30,
decoration: BoxDecoration(
// color: colors.whiteColor,
borderRadius: BorderRadius.circular(12)),
child: Icon(
Icons.skip_next,
Expand Down
Loading

0 comments on commit 290b945

Please sign in to comment.