build_app
This commit is contained in:
parent
80256f56d9
commit
8a49c7ed05
@ -75,6 +75,15 @@ addCustomMenu( "Child","Child", "Transcations");
|
||||
addCustomMenu( "Testlist","Testlist", "Transcations");
|
||||
|
||||
|
||||
addCustomMenu( "Testss","Testss", "Transcations");
|
||||
|
||||
|
||||
addCustomMenu( "Child","Child", "Transcations");
|
||||
|
||||
|
||||
addCustomMenu( "Testlist","Testlist", "Transcations");
|
||||
|
||||
|
||||
addCustomMenu( "Testss","Testss", "Transcations");
|
||||
|
||||
|
||||
|
||||
@ -26,8 +26,6 @@ import com.realnet.basicp1.Services.TestssService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Testss")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
@ -48,8 +46,6 @@ public class TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Testss")
|
||||
public Testss Savedata(@RequestBody Testss data) {
|
||||
Testss save = Service.Savedata(data) ;
|
||||
@ -62,8 +58,6 @@ public class TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
@ -118,6 +112,4 @@ public class TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -26,8 +26,6 @@ import com.realnet.basicp1.Services.TestssService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/token/Testss")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
@ -48,8 +46,6 @@ public class tokenFree_TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Testss")
|
||||
public Testss Savedata(@RequestBody Testss data) {
|
||||
Testss save = Service.Savedata(data) ;
|
||||
@ -62,8 +58,6 @@ public class tokenFree_TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
@ -118,6 +112,4 @@ public class tokenFree_TestssController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -14,8 +14,6 @@ import com.realnet.basicp1.Entity.Child;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Testss extends Extension {
|
||||
@ -50,11 +48,5 @@ private String qr_code;
|
||||
|
||||
|
||||
|
||||
private String dependent_dropdown_field;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -18,8 +18,6 @@ import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@ -43,8 +41,6 @@ private TestssRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Testss Savedata(Testss data) {
|
||||
|
||||
|
||||
@ -56,8 +52,6 @@ public Testss Savedata(Testss data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
@ -108,11 +102,6 @@ old.setChild(data.getChild());
|
||||
|
||||
|
||||
|
||||
old.setDependent_dropdown_field(data.getDependent_dropdown_field());
|
||||
|
||||
|
||||
|
||||
|
||||
final Testss test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
@ -126,8 +115,6 @@ final Testss test = Repository.save(old);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE dbs.Testss(id BIGINT NOT NULL AUTO_INCREMENT, onetoone VARCHAR(400), bar_code VARCHAR(400), qr_code VARCHAR(400), value_list_field VARCHAR(400), datagrid_field VARCHAR(400), name VARCHAR(400), dependent_dropdown_field VARCHAR(400), PRIMARY KEY (id));
|
||||
CREATE TABLE dbs.Testss(id BIGINT NOT NULL AUTO_INCREMENT, onetoone VARCHAR(400), bar_code VARCHAR(400), qr_code VARCHAR(400), value_list_field VARCHAR(400), datagrid_field VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id));
|
||||
|
||||
CREATE TABLE dbs.Testlist(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id));
|
||||
|
||||
|
||||
@ -61,8 +61,6 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> updateEntity( int entityId, Map<String, dynamic> entity) async {
|
||||
try {
|
||||
@ -91,33 +89,4 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<List<Map<String, dynamic>>> getfirstName() async {
|
||||
try {
|
||||
final response = await _helper
|
||||
.getGetApiResponse('$baseUrl/Name_ListFilter1/Name_ListFilter1');
|
||||
final entities = (response as List).cast<Map<String, dynamic>>();
|
||||
return entities;
|
||||
} catch (e) {
|
||||
throw Exception('Failed to get first dd: $e');
|
||||
}
|
||||
}
|
||||
Future<List<Map<String, dynamic>>> getsecondName(String name) async {
|
||||
try {
|
||||
final response =
|
||||
await _helper.getGetApiResponse('$baseUrl/Name_ListFilter1/Name_ListFilter11/$name');
|
||||
final entities = (response as List).cast<Map<String, dynamic>>();
|
||||
return entities;
|
||||
} catch (e) {
|
||||
throw Exception('Failed to get first dd: $e');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -45,8 +45,6 @@ import '../../../../Reuseable/reusable_dropdown_field.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class testssCreateEntityScreen extends StatefulWidget {
|
||||
const testssCreateEntityScreen({super.key});
|
||||
|
||||
@ -214,164 +212,6 @@ final provider =
|
||||
|
||||
}
|
||||
|
||||
// first dropdown
|
||||
|
||||
|
||||
|
||||
List<Map<String, dynamic>> dependent_dropdown_fieldItems = [];
|
||||
var selecteddependent_dropdown_fieldValue = ''; // Use nullable type Future<void> _load
|
||||
Future<void> _loaddependent_dropdown_fieldItems() async {
|
||||
try {
|
||||
final selectTdata = await apiService.getfirstName();
|
||||
|
||||
print(' dependent_dropdown_field data is : $selectTdata');
|
||||
// Handle null or empty dropdownData
|
||||
if (selectTdata != null && selectTdata.isNotEmpty) {
|
||||
setState(() {
|
||||
dependent_dropdown_fieldItems = selectTdata;
|
||||
});
|
||||
} else {
|
||||
print(' dependent_dropdown_field data is null or empty');
|
||||
}
|
||||
} catch (e) {
|
||||
print('Failed to load dependent_dropdown_field items: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildDropdownDependent_dropdown_field(
|
||||
String label,
|
||||
List<Map<String, dynamic>> options,
|
||||
String? value,
|
||||
void Function(String?) onChanged,
|
||||
void Function(String?) onSaved,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
decoration: InputDecoration(
|
||||
labelText: label,
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.deepPurple,
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurpleAccent, width: 2),
|
||||
),
|
||||
),
|
||||
value: value!.isEmpty ? null : value,
|
||||
items: [
|
||||
const DropdownMenuItem<String>(
|
||||
value: '',
|
||||
child: Text('Select dependent_dropdown_field'),
|
||||
),
|
||||
...options.map<DropdownMenuItem<String>>(
|
||||
(item) {
|
||||
|
||||
|
||||
return DropdownMenuItem<String>(
|
||||
value: item['name'].toString(),
|
||||
child: Text(
|
||||
item['name'].toString(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
onChanged: onChanged,
|
||||
onSaved: onSaved,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// dependentdropdown
|
||||
List<Map<String, dynamic>> nameItems = [];
|
||||
var selectednameValue = ''; // Use nullable type Future<void> _load
|
||||
Future<void> _loadnameItems(String fieldName) async {
|
||||
try {
|
||||
final selectTdata = await apiService.getsecondName(fieldName);
|
||||
|
||||
print(' name data is : $selectTdata');
|
||||
// Handle null or empty dropdownData
|
||||
if (selectTdata != null && selectTdata.isNotEmpty) {
|
||||
setState(() {
|
||||
nameItems = selectTdata;
|
||||
});
|
||||
} else {
|
||||
print(' name data is null or empty');
|
||||
}
|
||||
} catch (e) {
|
||||
print('Failed to load name items: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildDropdownName(
|
||||
String label,
|
||||
List<Map<String, dynamic>> options,
|
||||
String? value,
|
||||
void Function(String?) onChanged,
|
||||
void Function(String?) onSaved,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
decoration: InputDecoration(
|
||||
labelText: label,
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.deepPurple,
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurpleAccent, width: 2),
|
||||
),
|
||||
),
|
||||
value: value!.isEmpty ? null : value,
|
||||
items: [
|
||||
const DropdownMenuItem<String>(
|
||||
value: '',
|
||||
child: Text('Select Name'),
|
||||
),
|
||||
...options.map<DropdownMenuItem<String>>(
|
||||
(item) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: item.values.elementAt(1).toString(),
|
||||
child: Text(
|
||||
item.values.elementAt(1).toString(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
onChanged: onChanged,
|
||||
onSaved: onSaved,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@ -388,9 +228,6 @@ final provider =
|
||||
_datagrid_fielddataFuture = datagrid_fieldfetchData(); // Initialize _dataFuture with the function
|
||||
|
||||
|
||||
_loaddependent_dropdown_fieldItems();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -456,8 +293,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
@ -562,79 +397,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Select an Dependent_dropdown_field:',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildDropdownDependent_dropdown_field(
|
||||
'Dependent_dropdown_field',
|
||||
dependent_dropdown_fieldItems,
|
||||
selecteddependent_dropdown_fieldValue,
|
||||
(value) {
|
||||
setState(() {
|
||||
selecteddependent_dropdown_fieldValue = value!;
|
||||
_loadnameItems(selecteddependent_dropdown_fieldValue);
|
||||
});
|
||||
},
|
||||
(value) {
|
||||
setState(() {
|
||||
formData['dependent_dropdown_field'] =
|
||||
value?.isEmpty ?? true ? 'no value' : value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Select an Name:',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildDropdownName(
|
||||
'Name',
|
||||
nameItems,
|
||||
selectednameValue,
|
||||
(value) {
|
||||
setState(() {
|
||||
selectednameValue = value!;
|
||||
});
|
||||
},
|
||||
(value) {
|
||||
setState(() {
|
||||
formData['name_list'] =
|
||||
value?.isEmpty ?? true ? 'no value' : value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
const SizedBox(width: 8),
|
||||
CustomButton(
|
||||
height: getVerticalSize(50),
|
||||
@ -653,8 +415,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
print(formData);
|
||||
@ -669,8 +429,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Navigator.pop(context);
|
||||
@ -753,8 +511,6 @@ FutureBuilder<List<Map<String, dynamic>>>(
|
||||
SizedBox(height: 16),
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -60,8 +60,6 @@ class _testss_entity_list_screenState extends State<testss_entity_list_screen> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> fetchwithoutpaging() async {
|
||||
try {
|
||||
final provider =
|
||||
@ -211,17 +209,7 @@ Future<void> fetchEntities() async {
|
||||
|
||||
|
||||
|
||||
entity['datagrid_field'].toString().toLowerCase().contains(keyword.toLowerCase()) ||
|
||||
|
||||
|
||||
|
||||
|
||||
entity['dependent_dropdown_field'].toString().toLowerCase().contains(keyword.toLowerCase()) ||
|
||||
|
||||
|
||||
|
||||
entity['name_list'].toString().toLowerCase().contains(keyword.toLowerCase())
|
||||
|
||||
entity['datagrid_field'].toString().toLowerCase().contains(keyword.toLowerCase())
|
||||
|
||||
|
||||
).toList();
|
||||
@ -308,8 +296,6 @@ onTapArrowleft1(BuildContext context) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
), ],
|
||||
),
|
||||
@ -627,60 +613,6 @@ onTapArrowleft1(BuildContext context) {
|
||||
|
||||
|
||||
|
||||
|
||||
Padding(
|
||||
padding: getPadding(
|
||||
top: 10,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Dependent Dropdown Field : ",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: AppStyle.txtGilroyMedium16,
|
||||
),
|
||||
Text(
|
||||
entity['dependent_dropdown_field'].toString() ?? 'No Dependent Dropdown Field Available',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: AppStyle.txtGilroyMedium16Bluegray900,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Padding(
|
||||
padding: getPadding(
|
||||
top: 10,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Name : ",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: AppStyle.txtGilroyMedium16,
|
||||
),
|
||||
Text(
|
||||
entity['name_list'].toString() ?? 'No Name Available',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: AppStyle.txtGilroyMedium16Bluegray900,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
|
||||
@ -78,164 +78,6 @@ onSaved: (value) {
|
||||
|
||||
|
||||
|
||||
// first dropdown
|
||||
|
||||
|
||||
|
||||
List<Map<String, dynamic>> dependent_dropdown_fieldItems = [];
|
||||
var selecteddependent_dropdown_fieldValue = ''; // Use nullable type Future<void> _load
|
||||
Future<void> _loaddependent_dropdown_fieldItems() async {
|
||||
try {
|
||||
final selectTdata = await apiService.getfirstName();
|
||||
|
||||
print(' dependent_dropdown_field data is : $selectTdata');
|
||||
// Handle null or empty dropdownData
|
||||
if (selectTdata != null && selectTdata.isNotEmpty) {
|
||||
setState(() {
|
||||
dependent_dropdown_fieldItems = selectTdata;
|
||||
});
|
||||
} else {
|
||||
print(' dependent_dropdown_field data is null or empty');
|
||||
}
|
||||
} catch (e) {
|
||||
print('Failed to load dependent_dropdown_field items: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildDropdownDependent_dropdown_field(
|
||||
String label,
|
||||
List<Map<String, dynamic>> options,
|
||||
String? value,
|
||||
void Function(String?) onChanged,
|
||||
void Function(String?) onSaved,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
decoration: InputDecoration(
|
||||
labelText: label,
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.deepPurple,
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurpleAccent, width: 2),
|
||||
),
|
||||
),
|
||||
value: value!.isEmpty ? null : value,
|
||||
items: [
|
||||
const DropdownMenuItem<String>(
|
||||
value: '',
|
||||
child: Text('Select dependent_dropdown_field'),
|
||||
),
|
||||
...options.map<DropdownMenuItem<String>>(
|
||||
(item) {
|
||||
|
||||
|
||||
return DropdownMenuItem<String>(
|
||||
value: item['name'].toString(),
|
||||
child: Text(
|
||||
item['name'].toString(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
onChanged: onChanged,
|
||||
onSaved: onSaved,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// dependentdropdown
|
||||
List<Map<String, dynamic>> nameItems = [];
|
||||
var selectednameValue = ''; // Use nullable type Future<void> _load
|
||||
Future<void> _loadnameItems(String fieldName) async {
|
||||
try {
|
||||
final selectTdata = await apiService.getsecondName(fieldName);
|
||||
|
||||
print(' name data is : $selectTdata');
|
||||
// Handle null or empty dropdownData
|
||||
if (selectTdata != null && selectTdata.isNotEmpty) {
|
||||
setState(() {
|
||||
nameItems = selectTdata;
|
||||
});
|
||||
} else {
|
||||
print(' name data is null or empty');
|
||||
}
|
||||
} catch (e) {
|
||||
print('Failed to load name items: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildDropdownName(
|
||||
String label,
|
||||
List<Map<String, dynamic>> options,
|
||||
String? value,
|
||||
void Function(String?) onChanged,
|
||||
void Function(String?) onSaved,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
decoration: InputDecoration(
|
||||
labelText: label,
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.deepPurple,
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurple, width: 2),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderSide: BorderSide(color: Colors.deepPurpleAccent, width: 2),
|
||||
),
|
||||
),
|
||||
value: value!.isEmpty ? null : value,
|
||||
items: [
|
||||
const DropdownMenuItem<String>(
|
||||
value: '',
|
||||
child: Text('Select Name'),
|
||||
),
|
||||
...options.map<DropdownMenuItem<String>>(
|
||||
(item) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: item.values.elementAt(1).toString(),
|
||||
child: Text(
|
||||
item.values.elementAt(1).toString(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
onChanged: onChanged,
|
||||
onSaved: onSaved,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -251,9 +93,6 @@ onSaved: (value) {
|
||||
|
||||
|
||||
|
||||
_loaddependent_dropdown_fieldItems();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -284,8 +123,6 @@ onSaved: (value) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
@ -403,79 +240,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Select an Dependent_dropdown_field:',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildDropdownDependent_dropdown_field(
|
||||
'Dependent_dropdown_field',
|
||||
dependent_dropdown_fieldItems,
|
||||
selecteddependent_dropdown_fieldValue,
|
||||
(value) {
|
||||
setState(() {
|
||||
selecteddependent_dropdown_fieldValue = value!;
|
||||
_loadnameItems(selecteddependent_dropdown_fieldValue);
|
||||
});
|
||||
},
|
||||
(value) {
|
||||
setState(() {
|
||||
widget.entity['dependent_dropdown_field'] =
|
||||
value?.isEmpty ?? true ? 'no value' : value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Select an Name:',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildDropdownName(
|
||||
'Name',
|
||||
nameItems,
|
||||
selectednameValue,
|
||||
(value) {
|
||||
setState(() {
|
||||
selectednameValue = value!;
|
||||
});
|
||||
},
|
||||
(value) {
|
||||
setState(() {
|
||||
widget.entity['name_list'] =
|
||||
value?.isEmpty ?? true ? 'no value' : value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CustomButton(
|
||||
height: getVerticalSize(50),
|
||||
@ -494,8 +258,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
await provider.updateEntity(
|
||||
@ -511,8 +273,6 @@ Padding(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Navigator.pop(context);
|
||||
|
||||
@ -77,6 +77,4 @@ class TestssRepoScreen {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -123,6 +123,4 @@ class TestssViewModelScreen extends ChangeNotifier{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
import '../../Entity/basicp1/Testlist/TestlistView/Testlist_entity_list_screen.dart';
|
||||
import '../../Entity/basicp1/Testlist/Testlist_viewModel/Testlist_view_model_screen.dart';
|
||||
|
||||
|
||||
import '../../Entity/basicp1/Testlist/TestlistView/Testlist_entity_list_screen.dart';
|
||||
import '../../Entity/basicp1/Testlist/Testlist_viewModel/Testlist_view_model_screen.dart';
|
||||
|
||||
import '../../Entity/basicp1/Testss/TestssView/Testss_entity_list_screen.dart';
|
||||
import '../../Entity/basicp1/Testss/Testss_viewModel/Testss_view_model_screen.dart';
|
||||
@ -76,22 +78,26 @@ Navigator.pushNamed(context, RouteNames.changePasswordView);
|
||||
),
|
||||
|
||||
// NEW MENU
|
||||
DrawerItem(
|
||||
color: AppColors.primary,
|
||||
icon: Icons.chat_bubble,
|
||||
title: 'Testlist',
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChangeNotifierProvider(
|
||||
create: (context) => TestlistViewModelScreen(),
|
||||
child: testlist_entity_list_screen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
DrawerItem(
|
||||
color: AppColors.primary,
|
||||
icon: Icons.chat_bubble,
|
||||
title: 'Testlist',
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChangeNotifierProvider(
|
||||
create: (context) => TestlistViewModelScreen(),
|
||||
child: testlist_entity_list_screen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
DrawerItem(
|
||||
color: AppColors.primary,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user