fist commit ftc staff app clone

This commit is contained in:
2024-08-01 13:46:46 +05:30
commit bf9064a9c9
515 changed files with 42796 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
import 'package:flutter/material.dart';
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
class CustomMessageDialog extends StatelessWidget {
const CustomMessageDialog({Key? key, required this.dialogMessageText, required this.headingText, required this.dialogMessageTextBold, required this.dialogButtonText}) : super(key: key);
final String headingText;
final String dialogMessageText;
final String dialogMessageTextBold;
final String dialogButtonText;
@override
Widget build(BuildContext context) {
return AlertDialog(
surfaceTintColor: CustomAppColors.kPrimaryColor,
insetPadding: REdgeInsets.all(18),
contentPadding: REdgeInsets.all(15),
shape: LinearBorder.top(side: BorderSide.none),
backgroundColor: CustomAppColors.kWhiteColor,
shadowColor: CustomAppColors.kWhiteColor,
// titlePadding: EdgeInsets.only(top: 20.h),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
CustomTextWidget(
text: headingText,
isExpanded: false,
fontSize: 16.sp,
fontWeight: FontWeight.w700,
),
8.verticalSpace,
Container(
padding: EdgeInsets.all(10.sp),
decoration: BoxDecoration(
border: Border.all(color: CustomAppColors.kLightGreyColor)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomTextWidget(
text: dialogMessageText,
isExpanded: false,
fontSize: 10.sp,
fontWeight: FontWeight.w400,
textAlign: TextAlign.left,
),
12.verticalSpace,
dialogMessageTextBold != ""
? CustomTextWidget(
text: dialogMessageTextBold,
isExpanded: false,
fontSize: 10.sp,
fontWeight: FontWeight.bold,
textAlign: TextAlign.left,
)
: Container(),
],
),
),
12.verticalSpace,
SizedBox(
height: 32.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: Size(double.infinity, 30.h),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
backgroundColor: CustomAppColors.kSecondaryColor),
onPressed: () {
// Add functionality for the "Agree" button.
Navigator.of(context).pop();
},
child: CustomTextWidget(
text: dialogButtonText,
fontColor: CustomAppColors.kPrimaryColor,
fontSize: 14.sp,
fontWeight: FontWeight.w400),
),
),
],
),
);
}
}

View File

@@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
class PrivacyPolicyDialog extends StatelessWidget {
const PrivacyPolicyDialog({Key? key, required this.privacyPolicy, required this.checkBoxOnChange}) : super(key: key);
final String privacyPolicy;
final ValueChanged<bool>? checkBoxOnChange;
@override
Widget build(BuildContext context) {
return AlertDialog(
surfaceTintColor: CustomAppColors.kPrimaryColor,
insetPadding: EdgeInsets.only(right: 18.w,left: 18.w, top:40.h ,bottom: MediaQuery.of(context).size.height/3.h),
contentPadding: EdgeInsets.only(left: 15.w,right: 15.w,top: 11.h,bottom: 0.h),
shape: LinearBorder.top(side: BorderSide.none),
backgroundColor: CustomAppColors.kWhiteColor,
shadowColor: CustomAppColors.kWhiteColor,
titlePadding: EdgeInsets.only(top: 20.h),
title: CustomTextWidget(
text: "New Policy",
isExpanded: false,
fontSize: 16.sp,
fontWeight: FontWeight.w700,
),
content: Column(
children: [
Container(
padding: EdgeInsets.all(10.sp),
decoration: BoxDecoration(
border: Border.all(color: CustomAppColors.kLightGreyColor)),
child: CustomTextWidget(
text: privacyPolicy,
isExpanded: false,
fontSize: 10.sp,
fontWeight: FontWeight.w400,
textAlign: TextAlign.left,
),
),
const Spacer(),
SizedBox(
height: 30.h,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Checkbox(
activeColor: CustomAppColors.kSecondaryColor,
value: true,
onChanged: (value) {
if (checkBoxOnChange != null && value!= null) {
checkBoxOnChange!(value);
}
}),
CustomTextWidget(
text: "Agree to the new policy",
isExpanded: false,
fontSize: 10.sp,
fontWeight: FontWeight.w400,
),
],
),
),
Container(
// padding: EdgeInsets.only(bottom: 50.h),
// height: 25.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: Size(double.infinity, 30.h),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
backgroundColor: CustomAppColors.kSecondaryColor),
onPressed: () {
// Add functionality for the "Agree" button.
Navigator.of(context).pop();
},
child: CustomTextWidget(
text: 'Agree',
fontColor: CustomAppColors.kPrimaryColor,
fontSize: 14.sp,
fontWeight: FontWeight.w400),
),
),
],
),
);
}
}

View File

@@ -0,0 +1,2 @@
export 'custom_privacy_policy_dialog.dart';
export 'custom_message_dialog.dart';