Commit 722d6c9c authored by Sai Srinivas's avatar Sai Srinivas
Browse files

27-06-2025 By Sai Srinivas

Common Module Test cases.
parent 2c0d16b2
......@@ -50,6 +50,7 @@ class Accountslistprovider extends ChangeNotifier {
String? altMobError;
String? teleError;
String? mailError;
String? addMoreDetailsError;
List<States> _states = [];
List<Districts> _districts = [];
......@@ -86,6 +87,9 @@ class Accountslistprovider extends ChangeNotifier {
set isVisible(bool value) {
_isVisible = value;
if(value==true){
addMoreDetailsError = null;
}
notifyListeners();
}
......@@ -270,6 +274,7 @@ class Accountslistprovider extends ChangeNotifier {
}
} catch (e, s) {}
}
bool hasFilledAdditionalDetails = false;
bool _submitClicked = false;
bool get submitClickced => _submitClicked;
......@@ -333,6 +338,21 @@ class Accountslistprovider extends ChangeNotifier {
}
}
void checkAdditionalDetailsFilled() {
hasFilledAdditionalDetails = bankNameController.text.trim().isNotEmpty &&
branchNameController.text.trim().isNotEmpty &&
bankIfscCotroller.text.trim().isNotEmpty &&
bankHolderNameController.text.trim().isNotEmpty &&
bankAcNumberController.text.trim().isNotEmpty &&
bankUpiController.text.trim().isNotEmpty &&
contactPersonController.text.trim().isNotEmpty &&
contectPersonDesignationController.text.trim().isNotEmpty &&
contectPersonAltMobController.text.trim().isNotEmpty;
// && contectPersonTeleController.text.trim().isNotEmpty
// && contectPersonMailController.text.trim().isNotEmpty;
notifyListeners();
}
bool validatereceiptForm(BuildContext context) {
accountError = null;
nameError = null;
......@@ -352,6 +372,7 @@ class Accountslistprovider extends ChangeNotifier {
altMobError = null;
teleError = null;
mailError = null;
addMoreDetailsError = null;
bool isValid = true;
if (_selectedAccountType == null || _selectedAccountType!.isEmpty) {
accountError = "Please select an Account";
......@@ -382,37 +403,71 @@ class Accountslistprovider extends ChangeNotifier {
addressError = "Please Enter an Address";
isValid = false;
}
if (bankNameController.text.trim().isEmpty) {
banknameError = "Please Enter a Bank Name";
checkAdditionalDetailsFilled();
if (!_isVisible && !hasFilledAdditionalDetails) {
addMoreDetailsError = "Please Add More Details to Continue";
isValid = false;
}
if(_isVisible) {
if (bankNameController.text
.trim()
.isEmpty) {
banknameError = "Please Enter a Bank Name";
isValid = false;
}
if (branchNameController.text
.trim()
.isEmpty) {
bankBranchError = "Please Enter Branch Name";
isValid = false;
}
if (bankIfscCotroller.text
.trim()
.isEmpty) {
bankIFSCError = "Please Enter Bank IFSC";
isValid = false;
}
if (bankHolderNameController.text
.trim()
.isEmpty) {
bankHolderNameError = "Please Enter Account Holder Name";
isValid = false;
}
if (bankAcNumberController.text
.trim()
.isEmpty) {
bankAcNumberError = "Please Enter Bank Account Number";
isValid = false;
}
if (bankUpiController.text
.trim()
.isEmpty) {
upiError = "Please Enter UPI ID";
isValid = false;
}
if (contactPersonController.text
.trim()
.isEmpty) {
contactPersonError = "Please Enter Contact Person Name";
isValid = false;
}
if (contectPersonDesignationController.text
.trim()
.isEmpty) {
desigantionError = "Please Enter Designation";
isValid = false;
}
if (contectPersonAltMobController.text
.trim()
.isEmpty) {
altMobError = "Please Enter Mobile Number";
isValid = false;
}
if (branchNameController.text.trim().isEmpty) {
bankBranchError = "Please Enter Branch Name";
isValid = false;
}
if (bankIfscCotroller.text.trim().isEmpty) {
bankIFSCError = "Please Enter Bank IFSC";isValid = false;
}
if (bankHolderNameController.text.trim().isEmpty) {
bankHolderNameError = "Please Enter Account Holder Name";isValid = false;
}
if (bankAcNumberController.text.trim().isEmpty) {
bankAcNumberError= "Please Enter Bank Account Number"; isValid = false;
}
if (bankUpiController.text.trim().isEmpty) {
upiError= "Please Enter UPI ID"; isValid = false;
}
if (contactPersonController.text.trim().isEmpty) {
contactPersonError= "Please Enter Contact Person Name"; isValid = false;
}
if (contectPersonDesignationController.text.trim().isEmpty) {
desigantionError= "Please Enter Designation"; isValid = false;
}
if (contectPersonAltMobController.text.trim().isEmpty) {
altMobError= "Please Enter Mobile Number"; isValid = false;
}
// if (contectPersonTeleController.text.trim().isEmpty) {
// teleError= "Please Enter Telephone"; isValid = false;
// }
......@@ -440,54 +495,65 @@ class Accountslistprovider extends ChangeNotifier {
void updateBankName(String value) {
banknameError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateBankBranch(String value) {
bankBranchError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateIFSC(String value) {
bankIFSCError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateHolder(String value) {
bankHolderNameError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateNumber(String value) {
bankAcNumberError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateUPI(String value) {
upiError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateContactPerson(String value){
contactPersonError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateDesignation(String value){
desigantionError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateAltMobile(String value){
altMobError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateTeleMobile(String value){
teleError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
void updateMail(String value){
mailError = null;
checkAdditionalDetailsFilled();
notifyListeners();
}
......@@ -575,6 +641,7 @@ class Accountslistprovider extends ChangeNotifier {
altMobError = null;
teleError = null;
mailError = null;
addMoreDetailsError = null;
ChechkDropdownValues();
notifyListeners();
......
import 'package:flutter/material.dart';
@immutable
class ShakeWidget extends StatelessWidget {
final Duration duration;
final double deltaX;
final Widget child;
final Curve curve;
const ShakeWidget({
required Key key,
this.duration = const Duration(milliseconds: 100),
this.deltaX = 20,
this.curve = Curves.bounceOut,
required this.child,
}) : super(key: key);
/// convert 0-1 to 0-1-0
double shake(double animation) =>
2 * (0.5 - (0.5 - curve.transform(animation)).abs());
@override
Widget build(BuildContext context) {
return TweenAnimationBuilder<double>(
key: key,
tween: Tween(begin: 0.0, end: 1.0),
duration: duration,
builder: (context, animation, child) => Transform.translate(
offset: Offset(deltaX * shake(animation), 0),
child: child,
),
child: child,
);
}
}
......@@ -123,7 +123,10 @@ Widget textControllerWidget(
inputtype,
readonly,
inputFormatters,
[maxLength]
[focusNode,
focusNode2,
textInputAction,
maxLength]
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
......@@ -148,7 +151,21 @@ Widget textControllerWidget(
keyboardType: inputtype,
maxLines: hintText == "Enter Description" ? 60 : 1,
onChanged: onChanged,
focusNode: focusNode,
onTapUpOutside: (event) {
if(focusNode.hasFocus){
focusNode.unfocus();
}
},
textInputAction: textInputAction,
onEditingComplete: () {
focusNode.unfocus();
if(focusNode2!=null){
focusNode2.requestFocus();
}
},
inputFormatters:
inputFormatters != null
? [FilteringTextInputFormatter.digitsOnly]
......
......@@ -16,6 +16,8 @@ class Accountslist extends StatefulWidget {
class _AccountslistState extends State<Accountslist> {
ScrollController scrollController = ScrollController();
FocusNode focusNode1 = FocusNode();
FocusNode focusNode2 = FocusNode();
@override
void initState() {
......@@ -42,197 +44,241 @@ class _AccountslistState extends State<Accountslist> {
return WillPopScope(
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar2(context, "Account List",provider.resetValues,Container(
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
appBar: appbar2(
context,
"Account List",
provider.resetValues,
Container(
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
child: InkResponse(
onTap: () {
_showFilterSheet(context);
},
child: SvgPicture.asset("assets/svg/filter_ic.svg", height: 18),
child: InkResponse(
onTap: () {
_showFilterSheet(context);
},
child: SvgPicture.asset(
"assets/svg/filter_ic.svg",
height: 18,
),
),
),
),),
),
backgroundColor: AppColors.scaffold_bg_color,
body:SafeArea(child: accountList.isNotEmpty? SizedBox(
child: SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
ListView.builder(
itemCount: accountList.length + 1,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
if (accountList.isEmpty) {
return SizedBox(
child: Center(child: Text("No Data Available")),
);
}
if (index == accountList.length &&
!provider.isLoading) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Center(child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue),
)),
);
}
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
body: SafeArea(
child:
accountList.isNotEmpty
? SizedBox(
child: SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFEAF7FF),
borderRadius: BorderRadius.circular(8),
ListView.builder(
itemCount: accountList.length + 1,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
if (accountList.isEmpty) {
return SizedBox(
child: Center(
child: Text("No Data Available"),
),
child: SvgPicture.asset(
"assets/svg/common_ac_list_ic.svg",
);
}
if (index == accountList.length &&
!provider.isLoading) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Center(
child:
CircularProgressIndicator.adaptive(
valueColor:
AlwaysStoppedAnimation<Color>(
AppColors.app_blue,
),
),
),
);
}
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
accountList[index].name!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFEAF7FF),
borderRadius:
BorderRadius.circular(8),
),
child: SvgPicture.asset(
"assets/svg/common_ac_list_ic.svg",
),
),
),
),
Text(
accountList[index].contactName ??
"-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
accountList[index].name!,
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors
.semi_black,
),
),
Text(
accountList[index]
.contactName ??
"-",
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors.app_blue,
),
),
],
),
),
),
),
],
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(4, (j) {
final headings = [
"Mobile Number",
"Email Id",
"Address",
"Date",
];
final subHeadings = [
accountList[index].mob1 ?? "-",
accountList[index].email ?? "-",
accountList[index].address ?? "-",
accountList[index].datetime ?? "-",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
],
),
),
SizedBox(width: 15),
Expanded(
child: Text(
subHeadings[j] ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.grey_thick,
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(4, (j) {
final headings = [
"Mobile Number",
"Email Id",
"Address",
"Date",
];
final subHeadings = [
accountList[index].mob1 ?? "-",
accountList[index].email ?? "-",
accountList[index].address ?? "-",
accountList[index].datetime ?? "-",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors.semi_black,
),
),
),
SizedBox(width: 15),
Expanded(
child: Text(
subHeadings[j] ?? "-",
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors.grey_thick,
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
print(
"length, ${accountList.length}",
);
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Accountslistdetails(
accountID:
accountList[index]
.id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
print("length, ${accountList.length}");
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Accountslistdetails(
accountID: accountList[index].id,
),
],
),
);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
],
),
);
},
),
],
),
),
):Emptywidget(context),)
),
)
: Emptywidget(context),
),
),
onWillPop: () {
provider.pageNum = 1;
......@@ -243,7 +289,6 @@ class _AccountslistState extends State<Accountslist> {
);
}
Future<void> _showFilterSheet(BuildContext context) {
return showModalBottomSheet(
useSafeArea: true,
......@@ -286,12 +331,31 @@ class _AccountslistState extends State<Accountslist> {
),
),
),
textControllerWidget(context, provider.companyNameController, "Company Name", (p0) {
},TextInputType.text,false,null),
textControllerWidget(context, provider.mobileNumberController, "Mobile Number", (p0) {
},TextInputType.number,false,FilteringTextInputFormatter.digitsOnly),
textControllerWidget(
context,
provider.companyNameController,
"Company Name",
(p0) {},
TextInputType.text,
false,
null,
focusNode1,
focusNode2,
TextInputAction.next
),
textControllerWidget(
context,
provider.mobileNumberController,
"Mobile Number",
(p0) {},
TextInputType.number,
false,
FilteringTextInputFormatter.digitsOnly,
focusNode2,
null,
TextInputAction.done,
10
),
InkResponse(
onTap: () {
Navigator.pop(context);
......@@ -302,8 +366,14 @@ class _AccountslistState extends State<Accountslist> {
child: Container(
height: 45,
alignment: Alignment.center,
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 15),
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
......@@ -331,7 +401,6 @@ class _AccountslistState extends State<Accountslist> {
);
}
Future<bool> _onBackPressed(BuildContext context) async {
Provider.of<Accountslistprovider>(context, listen: false).pageNum = 1;
Navigator.pop(context, true);
......
......@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:generp/Notifiers/commonProvider/accountsListProvider.dart';
import 'package:generp/Utils/ShakeWidget.dart';
import 'package:generp/Utils/app_colors.dart';
import 'package:generp/Utils/commonWidgets.dart';
import 'package:generp/Utils/dropdownTheme.dart';
......@@ -19,8 +20,11 @@ class Addcommonpayment extends StatefulWidget {
State<Addcommonpayment> createState() => _AddcommonpaymentState();
}
class _AddcommonpaymentState extends State<Addcommonpayment> {
class _AddcommonpaymentState extends State<Addcommonpayment>{
Dropdowntheme ddtheme = Dropdowntheme();
List<FocusNode> focusNodes = List.generate(20, (index) => FocusNode());
@override
void initState() {
// TODO: implement initState
......@@ -31,18 +35,30 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
});
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Consumer<Accountslistprovider>(
builder: (context, provider, child) {
return WillPopScope(
onWillPop: () async{
onWillPop: () async {
provider.resetValues();
return onBackPressed(context);
},
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar2(context, "Add Common Account",provider.resetValues,SizedBox(width: 0,)),
appBar: appbar2(
context,
"Add Common Account",
provider.resetValues,
SizedBox(width: 0),
),
backgroundColor: AppColors.white,
body: SafeArea(
child: SizedBox(
......@@ -50,591 +66,807 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Account Details",style: TextStyle( color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium"),),
SizedBox(height: 10,),
Text("Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<String>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
'Select Account',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
),
],
),
items:
provider.accountTypes
.map(
(act) => DropdownMenuItem<String>(
value: act,
child: Text(
act,
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
// value: provider.selectedAccountType,
value:provider.accountTypes.contains(provider.selectedAccountType)
? provider.selectedAccountType
: null,
onChanged: (value) {
if (value != null) {
provider.selectedAccountType = value;
print(
"statusId:${provider.selectedAccountType}",
);
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context,provider.accountError),
textControllerWidget(
context,
provider.nameController,
"Enter Name",
(p0) {
provider.updateName(p0);
provider.checkInputsAPI(
context,
"name",
provider.nameController.text,
);
},
TextInputType.text,false,
null
),errorWidget(context,provider.nameError),
textControllerWidget(
context,
provider.mobileController,
"Enter Mobile",
(p0) {
provider.updateMobile(p0);
provider.checkInputsAPI(
context,
"mob1",
provider.mobileController.text,
);
},
TextInputType.phone,false,FilteringTextInputFormatter.digitsOnly,10
),
errorWidget(context,provider.mobileError),
Text("State"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<States>(
isExpanded: true,
hint: Text(
'Select State',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.states
.map(
(states) => DropdownMenuItem<States>(
value: states,
child: Text(
states.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value:provider.states.contains(provider.selectedState)
? provider.selectedState
: null,
// value: provider.selectedState,
onChanged: (States? value) {
if (value != null) {
if (provider.states.isNotEmpty) {
provider.selectedState = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.selectedStateID = value.id!;
print(
"hfjkshfg" +
provider.selectedStateID.toString(),
);
if(provider.selectedDistricts!=null){
provider.selectedDistricts = null;
provider.selectedDistrictId = null;
provider.selectedDistrictValue = null;
}
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Account Details",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium",
),
),
SizedBox(height: 10),
Text("Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<String>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
'Select Account',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
),
],
),
items:
provider.accountTypes
.map(
(act) =>
DropdownMenuItem<String>(
value: act,
child: Text(
act,
style: const TextStyle(
fontSize: 14,
),
overflow:
TextOverflow
.ellipsis,
),
),
)
.toList(),
// value: provider.selectedAccountType,
value:
provider.accountTypes.contains(
provider.selectedAccountType,
)
? provider.selectedAccountType
: null,
onChanged: (value) {
if (value != null) {
provider.selectedAccountType = value;
print(
"statusId:${provider.selectedAccountType}",
);
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context, provider.accountError),
textControllerWidget(
context,
provider.nameController,
"Enter Name",
(p0) {
provider.updateName(p0);
provider.checkInputsAPI(
context,
"name",
provider.nameController.text,
);
},
TextInputType.text,
false,
null,
focusNodes[0],
focusNodes[1],
TextInputAction.next
),
errorWidget(context, provider.nameError),
textControllerWidget(
context,
provider.mobileController,
"Enter Mobile",
(p0) {
provider.updateMobile(p0);
provider.checkInputsAPI(
context,
"mob1",
provider.mobileController.text,
);
},
TextInputType.phone,
false,
FilteringTextInputFormatter.digitsOnly,
focusNodes[1],
focusNodes[2],
TextInputAction.next,
10,
),
errorWidget(context, provider.mobileError),
Text("State"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<States>(
focusNode: focusNodes[2],
autofocus: focusNodes[2].hasFocus?true:false,
isExpanded: true,
hint: Text(
'Select State',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.states
.map(
(states) =>
DropdownMenuItem<States>(
value: states,
child: Text(
states.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow:
TextOverflow
.ellipsis,
),
),
)
.toList(),
value:
provider.states.contains(
provider.selectedState,
)
? provider.selectedState
: null,
// value: provider.selectedState,
onChanged: (States? value) {
if (value != null) {
if (provider.states.isNotEmpty) {
provider.selectedState = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.selectedStateID =
value.id!;
print(
"hfjkshfg" +
provider.selectedStateID
.toString(),
);
if (provider.selectedDistricts !=
null) {
provider.selectedDistricts = null;
provider.selectedDistrictId =
null;
provider.selectedDistrictValue =
null;
}
provider.getDistrictAPI(
context,
provider.selectedStateID,
);
}
}
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController: provider.stateSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider
.stateSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search States...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.stateSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context,provider.stateError),
Text("District"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<Districts>(
isExpanded: true,
hint: Text(
'Select District',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.districts
.map(
(dist) => DropdownMenuItem<Districts>(
value: dist,
child: Text(
dist.district ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value:provider.districts.contains(provider.selectedDistricts)
? provider.selectedDistricts
: null,
// value: provider.selectedDistricts,
onChanged: (Districts? value) {
if (value != null) {
if (provider.districts.isNotEmpty) {
provider.selectedDistricts = value;
print("Selected ID: ${value.id}");
provider.selectedDistrictId = value.id!;
provider.selectedDistrictValue =
value.district!;
print(
"hfjkshfg" +
provider.selectedDistrictId
.toString(),
);
if(provider.selectedSubLocations!=null){
provider.selectedSubLocations = null;
provider.selectedSubLocID = null;
provider.selectedSubLocValue = null;
provider.getDistrictAPI(
context,
provider.selectedStateID,
);
}
}
},
}
provider.getSubLocationAPI(
context,
provider.selectedDistrictId,
);
}
}
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController: provider.districtSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider
.districtSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search Districts...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.district
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.districtSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context,provider.districtError),
Text("Sub Locality"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<SubLocations>(
isExpanded: true,
hint: Text(
'Select Sub Locality',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.subLocations
.map(
(subloc) =>
DropdownMenuItem<SubLocations>(
value: subloc,
child: Text(
subloc.subLocality ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
// value: provider.selectedSubLocations,
value:provider.subLocations.contains(provider.selectedSubLocations)
? provider.selectedSubLocations
: null,
onChanged: (SubLocations? value) {
if (value != null) {
if (provider.subLocations.isNotEmpty) {
provider.selectedSubLocations = value;
print("Selected ID: ${value.id}");
provider.selectedSubLocID = value.id!;
provider.selectedSubLocValue =
value.subLocality!;
print(
"hfjkshfg" +
provider.selectedSubLocID.toString(),
);
}
}
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController: provider.subLocSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider
.subLocSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search Sub Locality...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.subLocality
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.subLocSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context,provider.localityError),
textControllerWidget(
context,
provider.addressController,
"Enter Address",
provider.updateAddress,TextInputType.text,false,null
),
errorWidget(context,provider.addressError),
],
),
),
SizedBox(height: 15,),
Column(
children: [
InkResponse(
onTap: () => provider.isVisible = !provider.isVisible,
child: Center(
child: Text(
provider.isVisible?"- Hide More Details":"+ Add More Details",style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium"
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider.stateSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider.stateSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search States...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.stateSearchController
.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context, provider.stateError),
Text("District"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<Districts>(
focusNode: focusNodes[3],
isExpanded: true,
hint: Text(
'Select District',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.districts
.map(
(dist) =>
DropdownMenuItem<Districts>(
value: dist,
child: Text(
dist.district ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow:
TextOverflow
.ellipsis,
),
),
)
.toList(),
value:
provider.districts.contains(
provider.selectedDistricts,
)
? provider.selectedDistricts
: null,
// value: provider.selectedDistricts,
onChanged: (Districts? value) {
if (value != null) {
if (provider.districts.isNotEmpty) {
provider.selectedDistricts = value;
print("Selected ID: ${value.id}");
provider.selectedDistrictId =
value.id!;
provider.selectedDistrictValue =
value.district!;
print(
"hfjkshfg" +
provider.selectedDistrictId
.toString(),
);
if (provider.selectedSubLocations !=
null) {
provider.selectedSubLocations =
null;
provider.selectedSubLocID = null;
provider.selectedSubLocValue =
null;
}
provider.getSubLocationAPI(
context,
provider.selectedDistrictId,
);
}
}
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider.districtSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider
.districtSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search Districts...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.district
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.districtSearchController
.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
),
),
),
errorWidget(context, provider.districtError),
Text("Sub Locality"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<SubLocations>(
focusNode: focusNodes[4],
isExpanded: true,
hint: Text(
'Select Sub Locality',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.subLocations
.map(
(subloc) => DropdownMenuItem<
SubLocations
>(
value: subloc,
child: Text(
subloc.subLocality ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow:
TextOverflow.ellipsis,
),
),
)
.toList(),
// value: provider.selectedSubLocations,
value:
provider.subLocations.contains(
provider.selectedSubLocations,
)
? provider.selectedSubLocations
: null,
onChanged: (SubLocations? value) {
if (value != null) {
if (provider
.subLocations
.isNotEmpty) {
provider.selectedSubLocations =
value;
print("Selected ID: ${value.id}");
provider.selectedSubLocID =
value.id!;
provider.selectedSubLocValue =
value.subLocality!;
print(
"hfjkshfg" +
provider.selectedSubLocID
.toString(),
);
}
}
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider.subLocSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller:
provider.subLocSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Sub Locality...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.subLocality
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.subLocSearchController
.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
),
),
errorWidget(context, provider.localityError),
textControllerWidget(
context,
provider.addressController,
"Enter Address",
provider.updateAddress,
TextInputType.text,
false,
null,
focusNodes[5],
null,
TextInputAction.done,
),
errorWidget(context, provider.addressError),
],
),
Visibility(
visible: provider.isVisible,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
),
SizedBox(height: 12),
Column(
children: [
InkResponse(
onTap:
() => provider.isVisible = !provider.isVisible,
child: Center(
child: Text(
provider.isVisible
? "- Hide More Details"
: "+ Add More Details",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium",
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Bank Details",style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium"
),),
textControllerWidget(
context,
provider.bankNameController,
"Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context,provider.banknameError),
textControllerWidget(
context,
provider.branchNameController,
"Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context,provider.bankBranchError),
textControllerWidget(
context,
provider.bankIfscCotroller,
"Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
),
errorWidget(context,provider.bankIFSCError),
textControllerWidget(
context,
provider.bankHolderNameController,
"Bank Holder Name",
provider.updateHolder,TextInputType.text,false,null
),
errorWidget(context,provider.bankHolderNameError),
textControllerWidget(
context,
provider.bankAcNumberController,
"Bank Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context,provider.bankAcNumberError),
textControllerWidget(
context,
provider.bankUpiController,
"Bank UPI ID",
provider.updateUPI,TextInputType.text,false,null
),
errorWidget(context,provider.upiError),
],
),
),
),
if(provider.addMoreDetailsError!=null)...[
Center(
child: ShakeWidget(
key: Key("value"),
duration: Duration(milliseconds: 700),
child: Text(
provider.addMoreDetailsError??"",
style: TextStyle(
color: Colors.red,
fontSize: 13,
fontFamily: "JakartaMedium",
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
decoration: BoxDecoration(
),
),
],
Visibility(
visible: provider.isVisible,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Bank Details",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium",
),
),
textControllerWidget(
context,
provider.bankNameController,
"Bank Name",
provider.updateBankName,
TextInputType.text,
false,
null,
focusNodes[6],
focusNodes[7],
TextInputAction.next,
),
errorWidget(
context,
provider.banknameError,
),
textControllerWidget(
context,
provider.branchNameController,
"Bank Branch",
provider.updateBankBranch,
TextInputType.text,
false,
null,
focusNodes[7],focusNodes[8],TextInputAction.next
),
errorWidget(
context,
provider.bankBranchError,
),
textControllerWidget(
context,
provider.bankIfscCotroller,
"Bank IFSC",
provider.updateIFSC,
TextInputType.text,
false,
null,
focusNodes[8],
focusNodes[9],TextInputAction.next
),
errorWidget(
context,
provider.bankIFSCError,
),
textControllerWidget(
context,
provider.bankHolderNameController,
"Bank Holder Name",
provider.updateHolder,
TextInputType.text,
false,
null,
focusNodes[9],
focusNodes[10],TextInputAction.next
),
errorWidget(
context,
provider.bankHolderNameError,
),
textControllerWidget(
context,
provider.bankAcNumberController,
"Bank Account Number",
provider.updateNumber,
TextInputType.number,
false,
FilteringTextInputFormatter.digitsOnly,
focusNodes[10],
focusNodes[11],TextInputAction.next
),
errorWidget(
context,
provider.bankAcNumberError,
),
textControllerWidget(
context,
provider.bankUpiController,
"Bank UPI ID",
provider.updateUPI,
TextInputType.text,
false,
null,
focusNodes[11],
focusNodes[12],
TextInputAction.next
),
errorWidget(context, provider.upiError),
],
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Contact Details",style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium"
),),
textControllerWidget(
context,
provider.contactPersonController,
"Contact Person Name",
provider.updateContactPerson,TextInputType.text,false,null
),
errorWidget(context,provider.contactPersonError),
textControllerWidget(
context,
provider.contectPersonDesignationController,
"Contact Person Designation",
provider.updateDesignation,TextInputType.text,false,null
),
errorWidget(context,provider.desigantionError),
textControllerWidget(
context,
provider.contectPersonAltMobController,
"Alternative Mobile Number",
(p0) {
provider.updateAltMobile(p0);
provider.checkInputsAPI(context, "mob2", provider.contectPersonAltMobController.text);
},TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context,provider.altMobError),
textControllerWidget(
context,
provider.contectPersonTeleController,
"Telephone Number",
provider.updateTeleMobile,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context,provider.teleError),
textControllerWidget(
context,
provider.contectPersonMailController,
"Customer Mail ID",
provider.updateMail,TextInputType.text,false,null
),
errorWidget(context,provider.mailError),
],
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Contact Details",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 16,
fontFamily: "JakartaMedium",
),
),
textControllerWidget(
context,
provider.contactPersonController,
"Contact Person Name",
provider.updateContactPerson,
TextInputType.text,
false,
null,
focusNodes[12],
focusNodes[13],TextInputAction.next
),
errorWidget(
context,
provider.contactPersonError,
),
textControllerWidget(
context,
provider
.contectPersonDesignationController,
"Contact Person Designation",
provider.updateDesignation,
TextInputType.text,
false,
null,
focusNodes[13],
focusNodes[14],TextInputAction.next
),
errorWidget(
context,
provider.desigantionError,
),
textControllerWidget(
context,
provider.contectPersonAltMobController,
"Alternative Mobile Number",
(p0) {
provider.updateAltMobile(p0);
provider.checkInputsAPI(
context,
"mob2",
provider
.contectPersonAltMobController
.text,
);
},
TextInputType.number,
false,
FilteringTextInputFormatter.digitsOnly,
focusNodes[14],
focusNodes[15],TextInputAction.next,
10,
),
errorWidget(
context,
provider.altMobError,
),
textControllerWidget(
context,
provider.contectPersonTeleController,
"Telephone Number",
provider.updateTeleMobile,
TextInputType.number,
false,
FilteringTextInputFormatter.digitsOnly,
focusNodes[15],
focusNodes[16],TextInputAction.next
),
errorWidget(context, provider.teleError),
textControllerWidget(
context,
provider.contectPersonMailController,
"Customer Mail ID",
provider.updateMail,
TextInputType.text,
false,
null,
focusNodes[16],
focusNodes[17],TextInputAction.next
),
errorWidget(context, provider.mailError),
],
),
),
)
],
],
),
),
),
],
)
],
),
],
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
bottomNavigationBar: InkResponse(
onTap:provider.submitClickced?null: () {
provider.submitClickced = true;
provider.submitCommonAccountsAPI(context);
},
onTap:
provider.submitClickced
? null
: () {
provider.submitClickced = true;
provider.submitCommonAccountsAPI(context);
},
child: Container(
height: 45,
alignment: Alignment.center,
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 15),
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 15),
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
),
child:provider.submitClickced?CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation(AppColors.white),
) :Text(
"Submit",
style: TextStyle(
fontSize: 15,
fontFamily: "JakartaMedium",
color: Colors.white,
),
),
child:
provider.submitClickced
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation(AppColors.white),
)
: Text(
"Submit",
style: TextStyle(
fontSize: 15,
fontFamily: "JakartaMedium",
color: Colors.white,
),
),
),
),
),
......@@ -642,5 +874,4 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
},
);
}
}
......@@ -8,6 +8,7 @@ import 'package:provider/provider.dart';
import '../../Utils/app_colors.dart';
import '../../Utils/commonWidgets.dart';
import '../finance/FileViewer.dart';
import 'editOrderAccountDetails.dart';
class Ordersdetailsbymodes extends StatefulWidget {
final pageTitleName;
......@@ -380,7 +381,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
...List.generate(3, (index) {
final assetnames = [
"order_list_svg_1",
"crm_contact_edit",
"order_list_svg_2",
"order_list_svg_3",
"order_list_svg_3",
......@@ -396,14 +397,18 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
switch (index) {
case 0:
Navigator.pop(context);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) =>
// Orderdetailspaymenthistory(),
// ),
// );
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Editorderaccountdetails(
mode: widget.mode,
pageTitleName: "Edit Order (${widget.mode})",
orderID: provider.orderDetails.id,
),
),
);
break;
case 1:
Navigator.pop(context);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment