Merge branch 'master' of https://gitlab.com/mirza.shafique/mohem_flutter_app into development_sultan

merge-requests/1/merge
Sultan Khan 3 years ago
commit 26bbff6844

@ -14,6 +14,10 @@ analyzer:
always_use_package_imports: error
camel_case_types: error
always_declare_return_types: error
null_check_on_nullable_type_parameter: error
avoid_annotating_with_dynamic: error
unnecessary_null_checks: error
unnecessary_brace_in_string_interps: error
linter:
@ -36,11 +40,15 @@ linter:
unnecessary_this: true
unnecessary_new: true
camel_case_types: true
null_check_on_nullable_type_parameter: true
sort_child_properties_last: true
camel_case_extensions : true
camel_case_extensions: true
require_trailing_commas: true
avoid_empty_else: true
avoid_annotating_with_dynamic: true
unnecessary_null_checks: true
unnecessary_brace_in_string_interps: true
unnecessary_string_interpolations: true
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

@ -8,6 +8,7 @@ import 'package:http/io_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/exceptions/api_exception.dart';
import 'package:mohem_flutter_app/main.dart';
// ignore_for_file: avoid_annotating_with_dynamic
typedef FactoryConstructor<U> = U Function(dynamic);

@ -8,8 +8,6 @@ import 'package:fluttertoast/fluttertoast.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.dart';
// import 'package:fluttertoast/fluttertoast.dart';
import 'package:mohem_flutter_app/exceptions/api_exception.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
@ -18,7 +16,7 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
import 'package:mohem_flutter_app/widgets/loading_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sizer/sizer.dart';
// ignore_for_file: avoid_annotating_with_dynamic
class Utils {
static bool _isLoadingVisible = false;

@ -327,7 +327,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
),
alignment: Alignment.center,
child: Text(
"${val}",
"$val",
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
@ -358,7 +358,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
),
alignment: Alignment.center,
child: Text(
"${val}",
"$val",
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
@ -384,7 +384,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
),
alignment: Alignment.center,
child: Text(
"${val}",
"$val",
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
@ -408,7 +408,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
),
alignment: Alignment.center,
child: Text(
"${val}",
"$val",
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,

@ -124,7 +124,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
Utils.showLoading(context);
for (int i = 0; i < (structureList.cHILDSEGMENTSDVSplited?.length ?? 0); i++) {
String segmentId = structureList.cHILDSEGMENTSDVSplited![i];
print("segmentId:${segmentId}");
print("segmentId:$segmentId");
print("segmentName:${structureList.sEGMENTNAME}");
GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
List<PARENTSEGMENTSDVSplited> parentRequired = parent.pARENTSEGMENTSDVSplited ?? [];
@ -138,7 +138,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
.toJson())
.toList();
print("values:${values}");
print("values:$values");
ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values);
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);

@ -95,22 +95,22 @@ class _BasicDetailsState extends State<BasicDetails> {
),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.fullName.tr().toText13(color: MyColors.lightGrayColor),
"${fullName}".toText16(isBold: true, color: MyColors.blackColor),
"$fullName".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(
height: 20,
),
LocaleKeys.maritalStatus.tr().toText13(color: MyColors.lightGrayColor),
"${maritalStatus}".toText16(isBold: true, color: MyColors.blackColor),
"$maritalStatus".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(
height: 20,
),
LocaleKeys.dateOfBirth.tr().toText13(color: MyColors.lightGrayColor),
"${birthDate}".toText16(isBold: true, color: MyColors.blackColor),
"$birthDate".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(
height: 20,
),
LocaleKeys.civilIdentityNumber.tr().toText13(color: MyColors.lightGrayColor),
"${civilIdentityNumber}".toText16(isBold: true, color: MyColors.blackColor),
"$civilIdentityNumber".toText16(isBold: true, color: MyColors.blackColor),
]),
),
],

@ -182,7 +182,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!), value: i),
],
onSelected: (int popupIndex) {
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.eSERVICESVS![popupIndex].vALUECOLUMNNAME!;
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.eSERVICESVS![popupIndex].vALUECOLUMNNAME;
setState(() {});
});
}
@ -246,8 +246,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
],
onSelected: (int popupIndex) {
ESERVICESDV eservicesdv =
ESERVICESDV(pIDCOLUMNNAME: model.objectValuesList![popupIndex].mEANING, pRETURNMSG: "null", pRETURNSTATUS: model.oBJECTNAME, pVALUECOLUMNNAME: model.aPPLICATIONCOLUMNNAME);
getBasicDetColsStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.objectValuesList![popupIndex].mEANING!;
ESERVICESDV(pIDCOLUMNNAME: model.objectValuesList![index].dESCRIPTION, pRETURNMSG: "null", pRETURNSTATUS: model.oBJECTNAME, pVALUECOLUMNNAME: model.aPPLICATIONCOLUMNNAME);
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.objectValuesList![popupIndex].dESCRIPTION;
setState(() {});
});
}

@ -95,7 +95,6 @@ class _MowadhafhiHRRequestState extends State<MowadhafhiHRRequest> {
groupValue: selectedServiceType,
selectedColor: MyColors.gradiantStartColor),
).onPress(() {
debugPrint(getTicketTypesList[index].typeName!);
selectedServiceType = getTicketTypesList[index].ticketTypeId!.toString();
setState(() {});
});
@ -314,7 +313,7 @@ class _MowadhafhiHRRequestState extends State<MowadhafhiHRRequest> {
getMowadhafhiProjectsList = await MowadhafhiApiClient().getProjects();
Utils.hideLoading(context);
getProjectDepartments(getMowadhafhiProjectsList[0].projectId!);
projectID = getMowadhafhiProjectsList[0].projectId!;
projectID = getMowadhafhiProjectsList[0].projectId;
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);

@ -76,7 +76,7 @@ class _PendingTransactionsState extends State<PendingTransactions> {
for (int i = 0; i < getPendingTransactionsFunctions!.length; i++) PopupMenuItem<int>(child: Text(getPendingTransactionsFunctions![i].fUNCTIONPROMPT!), value: i),
],
onSelected: (int popupIndex) {
selectedFunction = getPendingTransactionsFunctions![popupIndex];
selectedFunction = getPendingTransactionsFunctions[popupIndex];
setState(() {});
}),
12.height,

@ -485,7 +485,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
"P_APPROVER_INDEX": null,
"P_COMMENTS": "",
"P_FORWARD_TO_USER_NAME": "",
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID!,
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID,
"RespondAttributeList": [
if (notificationNoteInput != null) {notificationNoteInput!.attributeName: note}
],

Loading…
Cancel
Save