From 6cb6b41383f674904879a299f4506f3f34a44f92 Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Sat, 29 Mar 2025 06:04:24 +0000 Subject: [PATCH] build_app --- .../Builders/Services/BuilderService.java | 3 + .../forma/Controllers/TestmController.java | 56 -- .../java/com/realnet/forma/Entity/Testm.java | 40 -- .../forma/Repository/TestmRepository.java | 14 - .../realnet/forma/Services/TestmService.java | 79 --- .../authsec_mysql/mysql/wf_table/wf_table.sql | 4 +- .../Testm/TestmView/Testm_api_service.dart | 28 - .../TestmView/Testm_create_entity_screen.dart | 535 ------------------ .../TestmView/Testm_entity_list_screen.dart | 189 +------ .../TestmView/Testm_update_entity_screen.dart | 250 -------- .../Testm/Testm_Repo/Testm_repo_screen.dart | 22 - .../Testm_view_model_screen.dart | 29 - .../lib/commans/widgets/custome_drawer.dart | 39 +- 13 files changed, 26 insertions(+), 1262 deletions(-) diff --git a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 6dec798..33a694c 100644 --- a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,9 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Testm", "Transcations"); + + addCustomMenu( "Child", "Transcations"); diff --git a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TestmController.java b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TestmController.java index 7b9354b..3aca5f6 100644 --- a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TestmController.java +++ b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TestmController.java @@ -23,20 +23,6 @@ import com.realnet.forma.Services.TestmService ; - - - - - - - - - - - - - - @@ -61,20 +47,6 @@ public class TestmController { - - - - - - - - - - - - - - @@ -91,20 +63,6 @@ public class TestmController { - - - - - - - - - - - - - - @@ -163,20 +121,6 @@ public class TestmController { - - - - - - - - - - - - - - diff --git a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Testm.java b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Testm.java index 23cf7b8..351c0da 100644 --- a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Testm.java +++ b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Testm.java @@ -18,20 +18,6 @@ import com.realnet.WhoColumn.Entity.Extension; -import com.realnet.forma.Entity.Child; - - - - - - - - - - - - - @Entity @Data public class Testm extends Extension { @@ -60,31 +46,5 @@ private String selectautotypename; private String selectautomul; -@OneToOne( cascade=CascadeType.ALL) - private Child child; - - - - - - - -private String bar_code; - - - - -private String qr_code; - - - -private int numbera; - -private int numberb; - -private String calculatedadd; - - - } diff --git a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TestmRepository.java b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TestmRepository.java index 1394e46..f7008dd 100644 --- a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TestmRepository.java +++ b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TestmRepository.java @@ -18,20 +18,6 @@ import java.util.*; - - - - - - - - - - - - - - diff --git a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TestmService.java b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TestmService.java index 5a100ed..c741041 100644 --- a/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TestmService.java +++ b/testflutter24-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TestmService.java @@ -32,20 +32,6 @@ import com.realnet.forma.Services.TestmService; - - - - - - - - - - - - - - import org.springframework.stereotype.Service; @Service @@ -71,20 +57,6 @@ private TestmRepository Repository; - - - - - - - - - - - - - - public Testm Savedata(Testm data) { @@ -118,20 +90,6 @@ if (data.getSelectauto() != null) { - - - - - - - - - - - - - - data.setUpdatedBy(getUser().getUserId()); data.setCreatedBy(getUser().getUserId()); data.setAccountId(getUser().getAccount().getAccount_id()); @@ -177,29 +135,6 @@ old.setSelectauto(data.getSelectauto()); old.setSelectautomul(data.getSelectautomul()); -old.setChild(data.getChild()); - - - - - -old.setBar_code(data.getBar_code()); - - - -old.setQr_code(data.getQr_code()); - - - - -old.setNumbera(data.getNumbera()); - -old.setNumberb(data.getNumberb()); - -old.setCalculatedadd(data.getCalculatedadd()); - - - final Testm test = Repository.save(old); data.setUpdatedBy(getUser().getUserId()); return test;} @@ -210,20 +145,6 @@ final Testm test = Repository.save(old); - - - - - - - - - - - - - - diff --git a/testflutter24-db-d/authsec_mysql/mysql/wf_table/wf_table.sql b/testflutter24-db-d/authsec_mysql/mysql/wf_table/wf_table.sql index fd583af..5d784c4 100755 --- a/testflutter24-db-d/authsec_mysql/mysql/wf_table/wf_table.sql +++ b/testflutter24-db-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -1,4 +1,2 @@ -CREATE TABLE db.Testm(id BIGINT NOT NULL AUTO_INCREMENT, numberb int, numbera int, calculatedadd VARCHAR(400), selecdya int, selectdyamul VARCHAR(400), onetoone VARCHAR(400), selectmulsta VARCHAR(400), valuell VARCHAR(400), bar_code VARCHAR(400), dataggg VARCHAR(400), selectauto int, selectautomul VARCHAR(400), qr_code VARCHAR(400), namem VARCHAR(400), selectsta VARCHAR(400), PRIMARY KEY (id)); - -CREATE TABLE db.Child(id BIGINT NOT NULL AUTO_INCREMENT, namemmm VARCHAR(400), PRIMARY KEY (id)); +CREATE TABLE db.Testm(id BIGINT NOT NULL AUTO_INCREMENT, selecdya int, selectdyamul VARCHAR(400), selectmulsta VARCHAR(400), selectauto int, selectautomul VARCHAR(400), namem VARCHAR(400), selectsta VARCHAR(400), PRIMARY KEY (id)); diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_api_service.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_api_service.dart index 4f8134e..5cb6848 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_api_service.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_api_service.dart @@ -59,20 +59,6 @@ Future>> getAllWithPagination( - - - - - - - - - - - - - - @@ -104,20 +90,6 @@ Future>> getAllWithPagination( - - - - - - - - - - - - - - diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_create_entity_screen.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_create_entity_screen.dart index ea9cc40..667195f 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_create_entity_screen.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_create_entity_screen.dart @@ -42,20 +42,6 @@ import '../../../../Reuseable/reusable_dropdown_field.dart'; - - - - - - - - - - - - - - @@ -259,254 +245,6 @@ if (element['namem'] != null) } } - Widget buildFormField(String fieldOption) { - return Padding( - padding: const EdgeInsets.only(bottom: 16.0), - child: Card( - elevation: 4, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: TextFormField( - decoration: InputDecoration( - labelText: fieldOption, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - ), - onSaved: (value) { - if (formData['child'] == null) { - formData['child'] = {}; - } - formData['child'][fieldOption] = value; - }, - ), - ), - ), - ); - } - - late Future>> _valuelldataFuture; // Data from fetchData - - Future>> valuellfetchData() async { - - final resp = await apiService.getEntities(); - - if (resp != null) { - return resp; - } else { - throw Exception('Failed to load data: '); - } - - } - - - void showvaluellDialog(BuildContext context) { - showDialog( - context: context, - builder: (BuildContext context) { - return SingleChildScrollView( - child: AlertDialog( - title: const Text('Select a record'), - content: FutureBuilder>>( - future: _valuelldataFuture, - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError) { - return Center(child: Text('Error: ${snapshot.error}')); - } else if (!snapshot.hasData || snapshot.data!.isEmpty) { - return const Center(child: Text('No data available..')); - } else { -final List columnsToShow = [ - - - - - 'namem', - - - ]; - return SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: DataTable( - columnSpacing: 30, - headingRowColor: MaterialStateColor.resolveWith( - (states) => Colors.blue.shade100), - dataRowColor: MaterialStateColor.resolveWith( - (states) => Colors.white), - dividerThickness: 0.5, - columns: columnsToShow - .map( - (key) => DataColumn( - label: Text( - key, - style: const TextStyle( - fontWeight: FontWeight.bold, fontSize: 16), - ), - ), - ) - .toList(), - rows: snapshot.data!.map((item) { - return DataRow( - cells: columnsToShow.map((key) { - return DataCell( - Text( - item[key].toString(), - style: const TextStyle(fontSize: 14), - ), - onTap: () { - setState(() { - - - namemController.text = item['namem'] ?? ''; - - - // Add more fields as needed - }); - Navigator.pop(context); - }, - ); - }).toList()); - }).toList(), - ), - ); - } - }, - ), - actions: [ - TextButton( - child: const Text('Close'), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - ], - ), - ); - }, - ); - } - - - final TextEditingController fieldggController = TextEditingController(); - - - final TextEditingController numberaController = TextEditingController(); - - - final TextEditingController numberbController = TextEditingController(); - - - - - String calculatedaddOperator = '+'; - String calculatedaddresult = ''; - - final List calculatedaddoperators = ['+', '-', '*', '/']; - - void calculatecalculatedaddResult() { - int calculation; - switch (calculatedaddOperator) { - case '+': - calculation = - - -int.parse(numberaController.text) + - - - - -int.parse(numberbController.text) + - - - -0; - - - break; - case '-': - calculation = - - -int.parse(numberaController.text) - - - - -int.parse(numberbController.text) - - - -0; - break; - case '*': - calculation = - - -int.parse(numberaController.text) * - - - -int.parse(numberbController.text) * - - -1; - break; - case '/': - if ( - - -int.parse(numberaController.text)== 0 || - - - -int.parse(numberbController.text)== 0 || - - - - -1 != 1) { - calculatedaddresult = 'Division by zero error'; - return; - } - calculation = ( - - -int.parse(numberaController.text) / - - - -int.parse(numberbController.text) / - - - -1).toInt(); - break; - default: - calculation = 0; - } - setState(() { - calculatedaddresult = 'Result: $calculation'; - }); - } - - late Future>> _datagggdataFuture; // Data from fetchData - - Future>> datagggfetchData() async { - -final provider = - Provider.of(context, listen: false); - final resp = await provider.getdatagggGrid(); - - if (resp != null) { - return resp; - } else { - throw Exception('Failed to load data: '); - } - - } - @override void initState() { super.initState(); @@ -534,22 +272,6 @@ final provider = - - - _valuelldataFuture = valuellfetchData(); // Initialize _dataFuture with the function - - - - - - - - - - - _datagggdataFuture = datagggfetchData(); // Initialize _dataFuture with the function - - } @@ -584,27 +306,6 @@ final provider = - - - actions: [ - IconButton( - icon: const Icon(Icons.grid_on), - onPressed: () { - showvaluellDialog(context); - }, - ), - ], - - - - - - - - - - - ), body: SingleChildScrollView( child: Padding( @@ -932,154 +633,6 @@ final provider = ), ), -Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox( - height: 20, - child: Text( - 'Child', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - const SizedBox(height: 16), // Add space between elements - - - - buildFormField('namemmm'), - - - - ], - ), - ), - - - -Container( - padding: EdgeInsets.all(16.0), - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: BorderRadius.circular(8.0), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.2), - spreadRadius: 2, - blurRadius: 4, - offset: Offset(0, 2), - ), - ], - ), - child: Column( - children: [ - Text( - "Fieldgg", - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: 16), - - -ReusableTextField( - onSaved:(value) => formData['bar_code'] = value , - label:"Enter Bar_code", - // ValidationProperties -), - - SizedBox(height: 16), - - - -ReusableTextField( - onSaved:(value) => formData['qr_code'] = value , - label:"Enter Qr_code", - // ValidationProperties -), - - SizedBox(height: 16), - - - SizedBox(height: 16), - ], - ), -), -const SizedBox(height: 16), - - -ReusableTextField( - controller: numberaController, - - onSaved:(value) => formData['numbera'] = value , - label: "Enter Numbera", - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))), - ], - // ValidationProperties -), - -SizedBox(height: 16), - -ReusableTextField( - controller: numberbController, - - onSaved:(value) => formData['numberb'] = value , - label: "Enter Numberb", - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))), - ], - // ValidationProperties -), - -SizedBox(height: 16), - - - const SizedBox(height: 8.0), - DropdownButtonFormField( - value: calculatedaddOperator, - items: calculatedaddoperators.map((String operator) { - return DropdownMenuItem( - value: operator, - child: Text(operator), - ); - }).toList(), - onChanged: (value) { - setState(() { - calculatedaddOperator = value!; - print(calculatedaddOperator.toString()); - print("value-- $value"); - }); - }, - decoration: const InputDecoration(labelText: 'Operator'), - ), - const SizedBox(height: 20.0), - ElevatedButton( - onPressed: () { - if (_formKey.currentState!.validate()) { - _formKey.currentState?.save(); // Save the form fields - - } - calculatecalculatedaddResult(); - setState(() { - - }); - }, - child: const Text('Calculate'), - ), - const SizedBox(height: 20.0), - Text(calculatedaddresult,style: TextStyle(color: Colors.black),), - - - const SizedBox(width: 8), CustomButton( height: getVerticalSize(50), @@ -1096,20 +649,6 @@ SizedBox(height: 16), - - - - - - - - - - - - - - @@ -1129,20 +668,6 @@ SizedBox(height: 16), - - - - - - - - - - - - - - @@ -1188,66 +713,6 @@ SizedBox(height: 16), - - - - - - - - - - - - - SizedBox(height: 16), - -FutureBuilder>>( - future: _datagggdataFuture, - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError) { - return Center(child: Text('Error: ${snapshot.error}')); - } else if (!snapshot.hasData || snapshot.data!.isEmpty) { - return const Center(child: Text('No data available..')); - } else { - final keys = snapshot.data!.first.keys.toList(); - - return SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: DataTable( - columnSpacing: 30, - headingRowColor: MaterialStateColor.resolveWith((states) => Colors.blue.shade100), - dataRowColor: MaterialStateColor.resolveWith((states) => Colors.white), - dividerThickness: 0.5, - columns: keys.map( - (key) => DataColumn( - label: Text( - key, - style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16), - ), - ), - ) - .toList(), - rows: snapshot.data!.map((item) { - return DataRow(cells: keys.map((key) { - return DataCell( - Text( - item[key].toString(), - style: const TextStyle(fontSize: 14), - ), - ); - }).toList()); - }).toList(), - ), - ); - } - }, - ), - SizedBox(height: 16), - - ], ), ), diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart index a7ca6d6..f638762 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart @@ -56,20 +56,6 @@ class _testm_entity_list_screenState extends State { - - - - - - - - - - - - - - @@ -232,55 +218,7 @@ Future fetchEntities() async { - entity['selectautomul'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - entity['child'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - - - - - entity['bar_code'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - - - - entity['qr_code'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - - - - entity['numbera'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - entity['numberb'].toString().toLowerCase().contains(keyword.toLowerCase()) || - - - - - - - - entity['dataggg'].toString().toLowerCase().contains(keyword.toLowerCase()) + entity['selectautomul'].toString().toLowerCase().contains(keyword.toLowerCase()) ).toList(); @@ -364,20 +302,6 @@ onTapArrowleft1(BuildContext context) { - - - - - - - - - - - - - - @@ -785,117 +709,6 @@ onTapArrowleft1(BuildContext context) { ), ), - - - - - - - - - Padding( - padding: getPadding( - top: 10, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Bar_code : ", - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16, - ), - Text( - entity['bar_code'].toString() ?? 'No Bar_code Available', - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16Bluegray900, - ), - ], - ), - ), - - - - - Padding( - padding: getPadding( - top: 10, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Qr_code : ", - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16, - ), - Text( - entity['qr_code'].toString() ?? 'No Qr_code Available', - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16Bluegray900, - ), - ], - ), - ), - - - - - Padding( - padding: getPadding( - top: 10, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Numbera : ", - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16, - ), - Text( - entity['numbera'].toString() ?? 'No Numbera Available', - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16Bluegray900, - ), - ], - ), - ), - - - Padding( - padding: getPadding( - top: 10, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Numberb : ", - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16, - ), - Text( - entity['numberb'].toString() ?? 'No Numberb Available', - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - style: AppStyle.txtGilroyMedium16Bluegray900, - ), - ], - ), - ), - - - - - ], ), diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_update_entity_screen.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_update_entity_screen.dart index 42f2571..b400297 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_update_entity_screen.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/TestmView/Testm_update_entity_screen.dart @@ -229,52 +229,6 @@ if (element['namem'] != null) } } -Widget buildFormField(String fieldOption) { - return Padding( - padding: const EdgeInsets.only(bottom: 16.0), - child: Card( - elevation: 4, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: TextFormField( - initialValue: widget.entity['child'] != null && - widget.entity['child'][fieldOption] != null - ? widget.entity['child'][fieldOption] - : '', - decoration: InputDecoration( - labelText: fieldOption, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - ), -onSaved: (value) { - if (widget.entity['child'] == null) { - widget.entity['child'] = {}; - } - widget.entity['child'][fieldOption] = value; - }, - ), - ), - ), - ); - } - - - - - - - - - - - - - - @override void initState() { @@ -326,20 +280,6 @@ if (selectautomulString != null) { selectedselectautomulValue = selectautomulString.split(', '); } - - - - - - - - - - - - - - } @@ -367,20 +307,6 @@ selectedselectautomulValue = selectautomulString.split(', '); - - - - - - - - - - - - - - @@ -657,154 +583,6 @@ FutureBuilder>( ), -Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox( - height: 20, - child: Text( - 'Child', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - const SizedBox(height: 16), // Add space between elements - - - - buildFormField('namemmm'), - - - ], - ), - ), - - Padding( - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - - ElevatedButton( - onPressed: () { - // Save changes logic here - - - Navigator.pop(context); - // Implement API call to update data - }, - child: Text('Save'), - ), - ], - ), - ), - -Container( - padding: EdgeInsets.all(16.0), - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: BorderRadius.circular(8.0), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.2), - spreadRadius: 2, - blurRadius: 4, - offset: Offset(0, 2), - ), - ], - ), - child: Column( - children: [ - Text( - "Fieldgg", - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: 16), - - - - SizedBox(height: 16), - TextFormField( - initialValue: widget.entity['bar_code'], - decoration: InputDecoration( - labelText: 'fieldgg bar_code', - ), - onChanged: (value) { - setState(() { - widget.entity['bar_code'] = value; - }); - }, - ), - - - - SizedBox(height: 16), - TextFormField( - initialValue: widget.entity['qr_code'], - decoration: InputDecoration( - labelText: 'fieldgg qr_code', - ), - onChanged: (value) { - setState(() { - widget.entity['qr_code'] = value; - }); - }, - ), - - - SizedBox(height: 16), - ], - ), -), -const SizedBox(height: 16), - - - - ReusableTextField( - initialValue: widget.entity['numbera'].toString(), - onSaved: (value) => widget.entity['numbera']= value, - label: "Enter Numbera", - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))), - ], - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter a number'; - } - return null; - }, - ), - - ReusableTextField( - initialValue: widget.entity['numberb'].toString(), - onSaved: (value) => widget.entity['numberb']= value, - label: "Enter Numberb", - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))), - ], - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter a number'; - } - return null; - }, - ), - - - - - CustomButton( height: getVerticalSize(50), @@ -821,20 +599,6 @@ const SizedBox(height: 16), - - - - - - - - - - - - - - @@ -855,20 +619,6 @@ const SizedBox(height: 16), - - - - - - - - - - - - - - diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_Repo/Testm_repo_screen.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_Repo/Testm_repo_screen.dart index 4ea6edd..877fc9e 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_Repo/Testm_repo_screen.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_Repo/Testm_repo_screen.dart @@ -105,26 +105,4 @@ class TestmRepoScreen { } } - - - - - - - - - - - - - Future getdatagggGrid() async { - try { - String apiUrl = "$baseUrl/Testm"; - final response = await _helper.getGetApiResponse(apiUrl); - return response; - } catch (e) { - throw Exception('Failed to Upload dataggg: $e'); - } - } - } diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart index cd50630..d8540d3 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart @@ -168,33 +168,4 @@ List> selectautomulItems = []; } } - - - - - - - - - - - - - late List> datagggdataFuture = - []; // Data from fetchData - - Future>> getdatagggGrid() async { - - try { - final value = await repo.getdatagggGrid(); - datagggdataFuture = (value as List) - .map((item) => item as Map) - .toList(); - - return datagggdataFuture; - } catch (e) { - throw Exception('Failed to get all: $e'); - } - } - } \ No newline at end of file diff --git a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/commans/widgets/custome_drawer.dart b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/commans/widgets/custome_drawer.dart index 3cda430..e49cecc 100644 --- a/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/commans/widgets/custome_drawer.dart +++ b/testflutter24-front-f/authsec_flutterNewUi/base_project/lib/commans/widgets/custome_drawer.dart @@ -1,5 +1,6 @@ -import '../../Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart'; -import '../../Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart'; + +import '../../Entity/forma/Testm/TestmView/Testm_entity_list_screen.dart'; +import '../../Entity/forma/Testm/Testm_viewModel/Testm_view_model_screen.dart'; import 'package:base_project/utils/image_constant.dart'; import 'package:base_project/commans/widgets/custome_drawe_item.dart'; @@ -73,22 +74,24 @@ Navigator.pushNamed(context, RouteNames.changePasswordView); ), // NEW MENU -DrawerItem( - color: AppColors.primary, - icon: Icons.chat_bubble, - title: 'Testm', - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (context) => TestmViewModelScreen(), - child: testm_entity_list_screen(), - ), - ), - ); - }, - ), + + +DrawerItem( +color: AppColors.primary, +icon: Icons.chat_bubble, +title: 'Testm', +onTap: () { +Navigator.push( +context, +MaterialPageRoute( +builder: (context) => ChangeNotifierProvider( +create: (context) => TestmViewModelScreen(), +child: testm_entity_list_screen(), +), +), +); +}, +), DrawerItem(