marathon updates & DateFormat fixes

merge-requests/152/head
haroon amjad 3 years ago
parent be32b9c4a2
commit 91eb51e42f

@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
@ -33,7 +42,7 @@
<key>NFCReaderUsageDescription</key> <key>NFCReaderUsageDescription</key>
<string>This App requires access to NFC to mark your attendance.</string> <string>This App requires access to NFC to mark your attendance.</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>This app requires camera access to capture &amp; upload pictures.</string> <string>This app requires camera access to capture &amp; upload picture as profile image.</string>
<key>NSFaceIDUsageDescription</key> <key>NSFaceIDUsageDescription</key>
<string>This app requires Face ID to allow biometric authentication for app login.</string> <string>This app requires Face ID to allow biometric authentication for app login.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
@ -46,15 +55,13 @@
<string>This app requires photo library access to select image as document &amp; upload it.</string> <string>This app requires photo library access to select image as document &amp; upload it.</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to for call.</string> <string>This app requires microphone access to for call.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires photo library access to select image as document &amp; upload it.</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>fetch</string> <string>fetch</string>
<string>remote-notification</string> <string>remote-notification</string>
</array> </array>
<key>FirebaseAppDelegateProxyEnabled</key> <key>FirebaseAppDelegateProxyEnabled</key>
<false/> <false/>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
@ -80,14 +87,9 @@
</array> </array>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>com.apple.developer.nfc.readersession.formats</key> <key>com.apple.developer.nfc.readersession.formats</key>
<array> <array>
<string>TAG</string> <string>TAG</string>
</array> </array>
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
<array>
<string>0000</string>
</array>
</dict> </dict>
</plist> </plist>

@ -77,7 +77,7 @@ class AppState {
bool get getIsDemoMarathon => _isDemoMarathon; bool get getIsDemoMarathon => _isDemoMarathon;
final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 4.0, mobileType: Platform.isAndroid ? "android" : "ios"); final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 4.1, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() { void setPostParamsInitConfig() {
isAuthenticated = false; isAuthenticated = false;

@ -60,13 +60,13 @@ class DateUtil {
} }
} }
date = date + " $hours:$mins:$secs"; date = date + " $hours:$mins:$secs";
DateTime returnDate = DateFormat("MM/dd/yyyy HH:mm:ss").parse(date); DateTime returnDate = DateFormat("MM/dd/yyyy HH:mm:ss", "en_US").parse(date);
return returnDate; return returnDate;
} }
static DateTime convertSimpleStringDateToDateddMMyyyy(String date) { static DateTime convertSimpleStringDateToDateddMMyyyy(String date) {
return DateFormat("MM/dd/yyyy hh:mm:ss").parse(date); return DateFormat("MM/dd/yyyy hh:mm:ss", "en_US").parse(date);
} }
static DateTime convertStringToDateNoTimeZone(String date) { static DateTime convertStringToDateNoTimeZone(String date) {
@ -123,7 +123,7 @@ class DateUtil {
} }
static String formatDateToTime(DateTime date) { static String formatDateToTime(DateTime date) {
return DateFormat('hh:mm a').format(date); return DateFormat('hh:mm a', "en_US").format(date);
} }
static String yearMonthDay(DateTime dateTime) { static String yearMonthDay(DateTime dateTime) {
@ -419,7 +419,7 @@ class DateUtil {
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getDayMonthDateFormatted(DateTime dateTime) { static String getDayMonthDateFormatted(DateTime dateTime) {
if (dateTime != null) if (dateTime != null)
return DateFormat('dd/MM').format(dateTime); return DateFormat('dd/MM', "en_US").format(dateTime);
else else
return ""; return "";
} }
@ -466,7 +466,7 @@ class DateUtil {
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) { static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) {
if (dateTime != null) if (dateTime != null)
return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString() + " " + DateFormat('HH:mm').format(dateTime); return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString() + " " + DateFormat('HH:mm', "en_US").format(dateTime);
else else
return ""; return "";
} }
@ -491,11 +491,11 @@ class DateUtil {
} }
static String getFormattedDate(DateTime dateTime, String formattedString) { static String getFormattedDate(DateTime dateTime, String formattedString) {
return DateFormat(formattedString).format(dateTime); return DateFormat(formattedString, "en_US").format(dateTime);
} }
static String convertISODateToJsonDate(String isoDate) { static String convertISODateToJsonDate(String isoDate) {
return "/Date(" + DateFormat('mm-dd-yyy').parse(isoDate).millisecondsSinceEpoch.toString() + ")/"; return "/Date(" + DateFormat('mm-dd-yyy', "en_US").parse(isoDate).millisecondsSinceEpoch.toString() + ")/";
} }
// static String getDay(DayOfWeek dayOfWeek) { // static String getDay(DayOfWeek dayOfWeek) {

@ -266,7 +266,7 @@ class Utils {
static String getMonthNamedFormat(DateTime date) { static String getMonthNamedFormat(DateTime date) {
/// it will return like "29-Sep-2022" /// it will return like "29-Sep-2022"
return DateFormat('dd-MMM-yyyy').format(date); return DateFormat('dd-MMM-yyyy', "en_US").format(date);
} }
static String reverseFormatDate(String date) { static String reverseFormatDate(String date) {
@ -336,9 +336,9 @@ class Utils {
return date; return date;
} else { } else {
if (date.toLowerCase().split("-")[1].length == 3) { if (date.toLowerCase().split("-")[1].length == 3) {
return DateFormat('dd-MM-yyyy').format(DateFormat('dd-MMM-yyyy').parseLoose(date)); return DateFormat('dd-MM-yyyy', "en_US").format(DateFormat('dd-MMM-yyyy', "en_US").parseLoose(date));
} else { } else {
return DateFormat('dd-MM-yyyy').format(DateFormat('yyyy-MM-dd').parseLoose(date)); return DateFormat('dd-MM-yyyy', "en_US").format(DateFormat('yyyy-MM-dd', "en_US").parseLoose(date));
} }
// return DateFormat('yyyy-MM-dd').format(DateFormat('dd-MM-yyyy').parseLoose(date)); // return DateFormat('yyyy-MM-dd').format(DateFormat('dd-MM-yyyy').parseLoose(date));
} }

@ -221,7 +221,7 @@ extension EmailValidator on String {
String date = this.split("T")[0]; String date = this.split("T")[0];
String time = this.split("T")[1]; String time = this.split("T")[1];
var dates = date.split("-"); var dates = date.split("-");
return "${dates[2]} ${getMonth(int.parse(dates[1]))} ${dates[0]} ${DateFormat('hh:mm a').format(DateFormat('hh:mm:ss').parse(time))}"; return "${dates[2]} ${getMonth(int.parse(dates[1]))} ${dates[0]} ${DateFormat('hh:mm a', "en_US").format(DateFormat('hh:mm:ss', "en_US").parse(time))}";
} }
String getMonth(int month) { String getMonth(int month) {

@ -912,7 +912,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
} }
String dateFormte(DateTime data) { String dateFormte(DateTime data) {
DateFormat f = DateFormat('hh:mm a dd MMM yyyy'); DateFormat f = DateFormat('hh:mm a dd MMM yyyy', "en_US");
f.format(data); f.format(data);
return f.format(data); return f.format(data);
} }

@ -187,7 +187,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
//Leave and Ticket Balance API's & Methods //Leave and Ticket Balance API's & Methods
Future fetchLeaveTicketBalance(context, DateTime date) async { Future fetchLeaveTicketBalance(context, DateTime date) async {
try { try {
accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy").format(date)); accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy", "en_US").format(date));
isLeaveTicketBalanceLoading = false; isLeaveTicketBalanceLoading = false;
leaveBalanceAccrual = accrualList![0]; leaveBalanceAccrual = accrualList![0];
ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + (accrualList![2].accrualNetEntitlement ?? 0.0) + (accrualList![3].accrualNetEntitlement ?? 0.0); ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + (accrualList![2].accrualNetEntitlement ?? 0.0) + (accrualList![3].accrualNetEntitlement ?? 0.0);

@ -432,7 +432,7 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
expand: false, expand: false,
builder: (_, controller) { builder: (_, controller) {
dynamic dmyString = getScheduleShiftsDetailsList!.sCHEDULEDATE; dynamic dmyString = getScheduleShiftsDetailsList!.sCHEDULEDATE;
DateTime dateTime1 = DateFormat("MM/dd/yyyy hh:mm:ss").parse(dmyString); DateTime dateTime1 = DateFormat("MM/dd/yyyy hh:mm:ss", "en_US").parse(dmyString);
return Column( return Column(
children: [ children: [
Container( Container(

@ -140,7 +140,7 @@ class _VacationRuleScreenState extends State<VacationRuleScreen> {
} }
String getParsedTime(String time) { String getParsedTime(String time) {
DateTime date = DateFormat("MM/dd/yyyy").parse(time); DateTime date = DateFormat("MM/dd/yyyy", "en_US").parse(time);
return DateFormat("d MMM yyyy").format(date); return DateFormat("d MMM yyyy", "en_US").format(date);
} }
} }

@ -445,7 +445,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!, tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!,
transitionOnUserGestures: true, transitionOnUserGestures: true,
child: Image.network( child: Image.network(
data.getOffersList[index].bannerImage!, data.getOffersList[index].logo!,
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
), ),

@ -364,7 +364,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Future<void> performDirectApiCall(String _title, String _icon, int _flag, String value, TextEditingController? _pinPutController, {bool isDirectLogin = false}) async { Future<void> performDirectApiCall(String _title, String _icon, int _flag, String value, TextEditingController? _pinPutController, {bool isDirectLogin = false}) async {
try { try {
GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(false, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName); GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(true, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName);
GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW( GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW(
AppState().memberLoginList?.pEMAILADDRESS ?? "", AppState().memberLoginList?.pEMAILADDRESS ?? "",
genericResponseModel?.pSESSIONID ?? 0, genericResponseModel?.pSESSIONID ?? 0,

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:developer';
import 'package:appinio_swiper/appinio_swiper.dart'; import 'package:appinio_swiper/appinio_swiper.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -134,6 +135,7 @@ class MarathonProvider extends ChangeNotifier {
late VideoPlayerController videoController; late VideoPlayerController videoController;
Future<void> initializeVideoPlayer() async { Future<void> initializeVideoPlayer() async {
log("VIDEO PLAYER INITIALIZED!!!");
videoController = VideoPlayerController.network(ApiConsts.marathonBaseUrlServices + marathonDetailModel.sponsors!.first.video!); videoController = VideoPlayerController.network(ApiConsts.marathonBaseUrlServices + marathonDetailModel.sponsors!.first.video!);
await videoController.initialize(); await videoController.initialize();
await videoController.play(); await videoController.play();

@ -179,7 +179,7 @@ class MarathonScreen extends StatelessWidget {
isCentered: true, isCentered: true,
), ),
8.height, 8.height,
AppState().memberInformationList!.eMPLOYEENUMBER!.toText22(color: MyColors.grey57Color), provider.selectedWinners![0].employeeId!.toText22(color: MyColors.grey57Color),
], ],
) )
: ListView.separated( : ListView.separated(

@ -123,10 +123,13 @@ class CountdownTimerForDetailScreen extends StatelessWidget {
Widget buildCountdownTimer(CurrentRemainingTime? time) { Widget buildCountdownTimer(CurrentRemainingTime? time) {
if (provider.marathonDetailModel.startTime != null) { if (provider.marathonDetailModel.startTime != null) {
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes; int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
if (remainingTimeInMinutes <= 30) { if (remainingTimeInMinutes <= 30 && provider.canPlayDemo == true) {
scheduleMicrotask(() { // scheduleMicrotask(() {
// print("Timer TRUE!!!: ${time?.min.toString()}");
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
provider.canPlayDemo = false; provider.canPlayDemo = false;
}); });
// });
} }
} }

@ -347,7 +347,10 @@ class MarathonBanner extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
MarathonProvider provider = context.read<MarathonProvider>(); MarathonProvider provider = context.read<MarathonProvider>();
// if(provider.isUserWaiting) {
// provider.isUserWaiting = false;
// provider.getMarathonDetailsFromApi();
// }
return !provider.isPrivilegedWithMarathon return !provider.isPrivilegedWithMarathon
? getUnPrivilegedMarathon(context) ? getUnPrivilegedMarathon(context)
: provider.isUpComingMarathon : provider.isUpComingMarathon
@ -524,6 +527,8 @@ class MarathonBanner extends StatelessWidget {
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes; int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
if (remainingTimeInMinutes > 5 && provider.marathonDetailModel.sponsors != null && provider.marathonDetailModel.sponsors!.isNotEmpty) { if (remainingTimeInMinutes > 5 && provider.marathonDetailModel.sponsors != null && provider.marathonDetailModel.sponsors!.isNotEmpty) {
log("IF CALLED!!!");
log("Remaining Time: $remainingTimeInMinutes");
Utils.showLoading(context); Utils.showLoading(context);
try { try {
await provider.initializeVideoPlayer().then((_) { await provider.initializeVideoPlayer().then((_) {
@ -532,14 +537,19 @@ class MarathonBanner extends StatelessWidget {
Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen); Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen);
}); });
} catch (e) { } catch (e) {
if (kDebugMode) { // if (kDebugMode) {
log("Error in VideoPlayer: ${e.toString()}"); log("Error in VideoPlayer: ${e.toString()}");
} // }
Utils.hideLoading(context); Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); Navigator.pushNamed(context, AppRoutes.marathonIntroScreen).then((value) {
print("Back to home!!!");
});
} }
} else { } else {
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); log("ELSE CALLED!!!");
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen).then((value) {
print("Back to home!!!");
});
} }
}), }),
) )

@ -66,7 +66,11 @@ class MarathonProgressContainer extends StatelessWidget {
stepper( stepper(
provider.currentQuestionNumber, provider.currentQuestionNumber,
provider.answerStatusesList, provider.answerStatusesList,
AppState().getIsDemoMarathon ? provider.demoMarathonDetailModel.totalQuestions! : provider.marathonDetailModel.totalQuestions!, (provider.demoMarathonDetailModel.totalQuestions != null || provider.marathonDetailModel.totalQuestions != null)
? AppState().getIsDemoMarathon
? provider.demoMarathonDetailModel.totalQuestions!
: provider.marathonDetailModel.totalQuestions!
: 10,
provider.isUserOutOfGame, provider.isUserOutOfGame,
), ),
8.height, 8.height,

@ -67,8 +67,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? ""; tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? "";
if (tempVar.isNotEmpty) { if (tempVar.isNotEmpty) {
if (!tempVar.contains("/")) { if (!tempVar.contains("/")) {
DateTime date = DateFormat('yyyy-MM-dd').parse(tempVar); DateTime date = DateFormat('yyyy-MM-dd', "en_US").parse(tempVar);
tempVar = DateFormat('yyyy/MM/dd HH:mm:ss').format(date); tempVar = DateFormat('yyyy/MM/dd HH:mm:ss', "en_US").format(date);
} }
} }
} }
@ -506,7 +506,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
displayText = displayText.replaceAll(" 00:00:00", ""); displayText = displayText.replaceAll(" 00:00:00", "");
} }
if (displayText.contains("/")) { if (displayText.contains("/")) {
displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText)); displayText = DateFormat('yyyy-MM-dd', "en_US").format(DateFormat("yyyy/MM/dd", "en_US").parse(displayText));
} }
} }
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
@ -517,7 +517,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
onTap: () async { onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) { if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) { if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
selectedDate = DateFormat("yyyy/MM/dd").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", "")); selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
} else { } else {
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!); selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
} }
@ -576,9 +576,9 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
tempDate = tempDate.replaceAll("00:00:00", '').trim(); tempDate = tempDate.replaceAll("00:00:00", '').trim();
} }
if (tempDate.contains("/")) { if (tempDate.contains("/")) {
selectedDate = DateFormat("yyyy/MM/dd").parse(tempDate); selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(tempDate);
} else { } else {
selectedDate = DateFormat("yyyy-MM-dd").parse(tempDate); selectedDate = DateFormat("yyyy-MM-dd", "en_US").parse(tempDate);
} }
} else { } else {
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!); selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
@ -700,7 +700,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
displayText = displayText.replaceAll(" 00:00:00", ""); displayText = displayText.replaceAll(" 00:00:00", "");
} }
if (!displayText.contains("-")) { if (!displayText.contains("-")) {
displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText)); displayText = DateFormat('yyyy-MM-dd', "en_US").format(DateFormat("yyyy/MM/dd", "en_US").parse(displayText));
} }
} }
return DynamicTextFieldWidget( return DynamicTextFieldWidget(

@ -159,7 +159,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
children: [ children: [
Row( Row(
children: [ children: [
"${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor), "${DateFormat("MMMM-yyyy", "en_US").format(formattedDate)}".toText16(color: MyColors.grey3AColor),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor), const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor),
], ],
).onPress( ).onPress(
@ -439,7 +439,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
expand: false, expand: false,
builder: (_, controller) { builder: (_, controller) {
dynamic dmyString = getScheduleShiftsDetailsList!.sCHEDULEDATE; dynamic dmyString = getScheduleShiftsDetailsList!.sCHEDULEDATE;
DateTime dateTime1 = DateFormat("MM/dd/yyyy hh:mm:ss").parse(dmyString); DateTime dateTime1 = DateFormat("MM/dd/yyyy hh:mm:ss", "en_US").parse(dmyString);
return Column( return Column(
children: [ children: [
Container( Container(
@ -468,7 +468,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"${DateFormat("MMMM-dd-yyyy").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white), "${DateFormat("MMMM-dd-yyyy", "en_US").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white),
LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor), LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor),
12.height, 12.height,
CircularStepProgressBar( CircularStepProgressBar(

@ -105,7 +105,7 @@ class _MonthlyPaySlipScreenState extends State<MonthlyPaySlipScreen> {
Container(alignment: Alignment.centerLeft, child: LocaleKeys.month.tr().toText17(isBold: true, color: MyColors.darkIconColor)), Container(alignment: Alignment.centerLeft, child: LocaleKeys.month.tr().toText17(isBold: true, color: MyColors.darkIconColor)),
Row( Row(
children: [ children: [
DateFormat("MMMM-yyyy").format(DateFormat("MM/dd/yyyy").parse(paySlipList[selectedMonthIndex!].pAYMENTDATE!)).toText16(color: MyColors.greyACColor), DateFormat("MMMM-yyyy", "en_US").format(DateFormat("MM/dd/yyyy", "en_US").parse(paySlipList[selectedMonthIndex!].pAYMENTDATE!)).toText16(color: MyColors.greyACColor),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor), const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
], ],
).onPress(() async { ).onPress(() async {

@ -238,7 +238,7 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = (DateFormat('yyyy-MM-dd').format(dateValue)); date = (DateFormat('yyyy-MM-dd', "en_US").format(dateValue));
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
setState(() {}); setState(() {});
}, },
@ -298,7 +298,7 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = (DateFormat('yyyy-MM-dd').format(dateValue)); date = (DateFormat('yyyy-MM-dd', "en_US").format(dateValue));
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
setState(() {}); setState(() {});
}, },
@ -357,7 +357,7 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = (DateFormat('yyyy-MM-dd').format(dateValue)); date = (DateFormat('yyyy-MM-dd', "en_US").format(dateValue));
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
setState(() {}); setState(() {});
}, },

@ -88,8 +88,8 @@ class _DeleteFamilyMemberState extends State<DeleteFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = DateFormat('yyyy/MM/dd').format(dateValue); date = DateFormat('yyyy/MM/dd', "en_US").format(dateValue);
datePar = DateFormat('yyyy/MM/dd hh:mm:ss').format(dateValue); datePar = DateFormat('yyyy/MM/dd hh:mm:ss', "en_US").format(dateValue);
setState(() {}); setState(() {});
}, },
).paddingOnly(bottom: 12), ).paddingOnly(bottom: 12),

@ -242,10 +242,10 @@ class _DynamicInputScreenState extends State<DynamicInputScreenAddress> {
DateTime date1 = DateTime(date.year, date.month, date.day); DateTime date1 = DateTime(date.year, date.month, date.day);
getAddressDffStructureList![index].dESCFLEXCONTEXTNAME = date.toString(); getAddressDffStructureList![index].dESCFLEXCONTEXTNAME = date.toString();
ESERVICESDV eservicesdv = ESERVICESDV( ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: DateFormat('yyyy-MM-dd').format(date1), pIDCOLUMNNAME: DateFormat('yyyy-MM-dd', "en_US").format(date1),
pRETURNMSG: "null", pRETURNMSG: "null",
pRETURNSTATUS: getAddressDffStructureList![index].dEFAULTVALUE, pRETURNSTATUS: getAddressDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
getAddressDffStructureList![index].eSERVICESDV = eservicesdv; getAddressDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {}); setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) { if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
@ -270,8 +270,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreenAddress> {
// for date format type, date format is changed // for date format type, date format is changed
tempVar = e.eSERVICESDV?.pVALUECOLUMNNAME ?? ""; tempVar = e.eSERVICESDV?.pVALUECOLUMNNAME ?? "";
if (tempVar.isNotEmpty) { if (tempVar.isNotEmpty) {
DateTime date = DateFormat('yyyy-MM-dd').parse(tempVar); DateTime date = DateFormat('yyyy-MM-dd', "en_US").parse(tempVar);
tempVar = DateFormat('dd-MMM-yyy').format(date); tempVar = DateFormat('dd-MMM-yyy', "en_US").format(date);
if (e.aPPLICATIONCOLUMNNAME == null) { if (e.aPPLICATIONCOLUMNNAME == null) {
effectiveDate = tempVar; effectiveDate = tempVar;
} }
@ -294,7 +294,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenAddress> {
values, values,
dynamicParams!.correctOrNew, dynamicParams!.correctOrNew,
countryCode, countryCode,
effectiveDate.isEmpty ? DateFormat('dd-MMM-yyy').format(DateTime.now()) : effectiveDate, effectiveDate.isEmpty ? DateFormat('dd-MMM-yyy', "en_US").format(DateTime.now()) : effectiveDate,
); );
Utils.hideLoading(context); Utils.hideLoading(context);

@ -233,10 +233,10 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
DateTime date1 = DateTime(date.year, date.month, date.day); DateTime date1 = DateTime(date.year, date.month, date.day);
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = date.toString(); getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = date.toString();
ESERVICESDV eservicesdv = ESERVICESDV( ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: DateFormat('yyyy-MM-dd').format(date1), pIDCOLUMNNAME: DateFormat('yyyy-MM-dd', "en_US").format(date1),
pRETURNMSG: "null", pRETURNMSG: "null",
pRETURNSTATUS: getBasicDetDffStructureList![index].dEFAULTVALUE, pRETURNSTATUS: getBasicDetDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
getBasicDetDffStructureList![index].eSERVICESDV = eservicesdv; getBasicDetDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {}); setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) { if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
@ -371,8 +371,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
// for date format type, date format is changed // for date format type, date format is changed
tempVar = e.eSERVICESDV?.pVALUECOLUMNNAME ?? ""; tempVar = e.eSERVICESDV?.pVALUECOLUMNNAME ?? "";
if (tempVar.isNotEmpty) { if (tempVar.isNotEmpty) {
DateTime date = DateFormat('yyyy-MM-dd').parse(tempVar); DateTime date = DateFormat('yyyy-MM-dd', "en_US").parse(tempVar);
tempVar = DateFormat('yyyy/MM/dd HH:mm:ss').format(date); tempVar = DateFormat('yyyy/MM/dd HH:mm:ss', "en_US").format(date);
} }
} }
return ValidateEitTransactionModel(dATEVALUE: null, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: tempVar.toString()).toJson(); return ValidateEitTransactionModel(dATEVALUE: null, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: tempVar.toString()).toJson();

@ -189,7 +189,7 @@ class _NewRequestState extends State<NewRequest> {
displayText = displayText.replaceAll(" 00:00:00", ""); displayText = displayText.replaceAll(" 00:00:00", "");
} }
if (!displayText.contains("-")) { if (!displayText.contains("-")) {
displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText)); displayText = DateFormat('yyyy-MM-dd', "en_US").format(DateFormat("yyyy/MM/dd", "en_US").parse(displayText));
} }
} }
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
@ -200,7 +200,7 @@ class _NewRequestState extends State<NewRequest> {
onTap: () async { onTap: () async {
if ((getCCPDFFStructureModelList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) { if ((getCCPDFFStructureModelList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
if (getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS) { if (getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS) {
selectedDate = DateFormat("yyyy/MM/dd").parse(getCCPDFFStructureModelList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", "")); selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getCCPDFFStructureModelList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
} else { } else {
selectedDate = DateTime.parse(getCCPDFFStructureModelList![index].eSERVICESDV!.pVALUECOLUMNNAME!); selectedDate = DateTime.parse(getCCPDFFStructureModelList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
} }
@ -211,16 +211,16 @@ class _NewRequestState extends State<NewRequest> {
ESERVICESDV eservicesdv; ESERVICESDV eservicesdv;
if (getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS) { if (getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS) {
eservicesdv = ESERVICESDV( eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: DateFormat('yyyy/MM/dd HH:MM:SS').format(date1), pIDCOLUMNNAME: DateFormat('yyyy/MM/dd HH:MM:SS', "en_US").format(date1),
pRETURNMSG: "null", pRETURNMSG: "null",
pRETURNSTATUS: getCCPDFFStructureModelList![index].dEFAULTVALUE, pRETURNSTATUS: getCCPDFFStructureModelList![index].dEFAULTVALUE,
pVALUECOLUMNNAME: getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS ? DateFormat('yyyy/MM/dd HH:MM:SS').format(date) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); pVALUECOLUMNNAME: getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS ? DateFormat('yyyy/MM/dd HH:MM:SS', "en_US").format(date) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
} else { } else {
eservicesdv = ESERVICESDV( eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: DateFormat('yyyy-MM-dd').format(date1), pIDCOLUMNNAME: DateFormat('yyyy-MM-dd', "en_US").format(date1),
pRETURNMSG: "null", pRETURNMSG: "null",
pRETURNSTATUS: getCCPDFFStructureModelList![index].dEFAULTVALUE, pRETURNSTATUS: getCCPDFFStructureModelList![index].dEFAULTVALUE,
pVALUECOLUMNNAME: getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS ? DateFormat('yyyy-MM-dd hh:mm:ss').format(date) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); pVALUECOLUMNNAME: getCCPDFFStructureModelList![index].isDefaultTypeIsCDPS ? DateFormat('yyyy-MM-dd hh:mm:ss', "en_US").format(date) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
} }
getCCPDFFStructureModelList![index].eSERVICESDV = eservicesdv; getCCPDFFStructureModelList![index].eSERVICESDV = eservicesdv;
setState(() {}); setState(() {});

@ -85,7 +85,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
getOffersList[0].discount!.toText16(isBold: true), getOffersList[0].discountDescription!.toText16(isBold: true),
InkWell( InkWell(
onTap: () { onTap: () {
_shareOfferAsImage(); _shareOfferAsImage();

@ -107,8 +107,8 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? ""; tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? "";
if (tempVar.isNotEmpty) { if (tempVar.isNotEmpty) {
if (!tempVar.contains("/")) { if (!tempVar.contains("/")) {
DateTime date = DateFormat('yyyy-MM-dd').parse(tempVar); DateTime date = DateFormat('yyyy-MM-dd', "en_US").parse(tempVar);
tempVar = DateFormat('yyyy/MM/dd HH:mm:ss').format(date); tempVar = DateFormat('yyyy/MM/dd HH:mm:ss', "en_US").format(date);
} }
} }
} }

@ -63,7 +63,7 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
void changeAccrualDate(bool showLoading) async { void changeAccrualDate(bool showLoading) async {
try { try {
if (showLoading) Utils.showLoading(context); if (showLoading) Utils.showLoading(context);
List<GetAccrualBalancesList> accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy").format(accrualDateTime), empID: widget.selectedEmp); List<GetAccrualBalancesList> accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy", "en_US").format(accrualDateTime), empID: widget.selectedEmp);
if (accrualList.isNotEmpty) { if (accrualList.isNotEmpty) {
if (widget.isLeaveBalance) { if (widget.isLeaveBalance) {
leaveBalanceAccrual = accrualList[0]; leaveBalanceAccrual = accrualList[0];

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.2.0+300020 version: 3.6.4+2
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ">=2.16.0 <3.0.0"
@ -102,7 +102,7 @@ dependencies:
#Encryption #Encryption
flutter_des: ^2.1.0 flutter_des: ^2.1.0
video_player: ^2.4.7 video_player: ^2.5.1
just_audio: ^0.9.30 just_audio: ^0.9.30
safe_device: ^1.1.2 safe_device: ^1.1.2
flutter_layout_grid: ^2.0.1 flutter_layout_grid: ^2.0.1

Loading…
Cancel
Save