build_app
This commit is contained in:
		
							parent
							
								
									656d2cd093
								
							
						
					
					
						commit
						93ce2f5e47
					
				| @ -72,6 +72,9 @@ public class BuilderService { | ||||
| addCustomMenu( "Testf",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Testf",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("dashboard and menu inserted..."); | ||||
| 
 | ||||
|  | ||||
| @ -10,10 +10,9 @@ import com.realnet.config.EmailService; | ||||
| import com.realnet.users.entity1.AppUser; | ||||
| import com.realnet.users.service1.AppUserServiceImpl; | ||||
| import com.fasterxml.jackson.databind.ObjectMapper; | ||||
| import org.springframework.data.domain.Page; | ||||
| import org.springframework.data.domain.PageRequest; | ||||
| import org.springframework.http.ResponseEntity; | ||||
| import org.springframework.data.domain.Pageable; | ||||
| import org.springframework.data.domain.*; | ||||
| import com.realnet.fnd.response.EntityResponse; | ||||
| import org.springframework.http.*; | ||||
| import org.springframework.beans.factory.annotation.*; | ||||
| import com.realnet.basic1.Entity.Testf; | ||||
| import com.realnet.basic1.Services.TestfService ; | ||||
| @ -85,9 +84,10 @@ public class TestfController { | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Testf/{id}") | ||||
| 	public  void delete_by_id(@PathVariable Integer id ) { | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 		 | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -4,7 +4,6 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,17 +1,16 @@ | ||||
| package com.realnet.basic1.Services; | ||||
| import com.realnet.basic1.Repository.TestfRepository; | ||||
| import com.realnet.basic1.Entity.Testf;import java.util.List; | ||||
| import java.util.ArrayList; | ||||
| import com.realnet.basic1.Entity.Testf | ||||
| ;import java.util.*; | ||||
| 
 | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import com.realnet.SequenceGenerator.Service.SequenceService; | ||||
| import com.realnet.Notification.Entity.NotificationService; | ||||
| import org.springframework.data.domain.Page; | ||||
| import com.realnet.realm.Entity.Realm; | ||||
| import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; | ||||
| import org.springframework.http.ResponseEntity; | ||||
| import com.realnet.users.service1.AppUserServiceImpl; | ||||
| import org.springframework.http.HttpStatus; | ||||
| import com.realnet.realm.Services.RealmService; | ||||
| import org.springframework.data.domain.Pageable; | ||||
| import org.springframework.http.*;import com.realnet.users.service1.AppUserServiceImpl; | ||||
| import com.realnet.users.entity1.AppUser; | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -17,7 +17,6 @@ import '../../../../widgets/custom_dropdown_field.dart'; | ||||
| import 'dart:math'; | ||||
| import 'package:qr_flutter/qr_flutter.dart'; | ||||
| import 'package:barcode_widget/barcode_widget.dart'; | ||||
| import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; | ||||
| import 'package:intl/intl.dart'; | ||||
|   | ||||
| import 'package:autocomplete_textfield/autocomplete_textfield.dart'; | ||||
| @ -32,8 +31,16 @@ import 'package:just_audio/just_audio.dart'; | ||||
| import 'package:video_player/video_player.dart'; | ||||
| import 'package:google_fonts/google_fonts.dart'; | ||||
| import 'package:lottie/lottie.dart'; | ||||
| import '../../../../utils/toast_messages/toast_message_util.dart'; | ||||
| import 'dart:io'; | ||||
| import '../../../../Reuseable/reusable_text_field.dart'; | ||||
| import '../../../../Reuseable/reusable_dropdown_field.dart'; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| class testfCreateEntityScreen extends StatefulWidget { | ||||
|   const testfCreateEntityScreen({super.key}); | ||||
| 
 | ||||
| @ -63,6 +70,7 @@ void _toggleSwitchactive(bool value) { | ||||
|  @override | ||||
|   void initState() { | ||||
|     super.initState();  | ||||
|     final provider = Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -75,6 +83,7 @@ void _toggleSwitchactive(bool value) { | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final provider = Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
|     return Scaffold( | ||||
|       appBar: CustomAppBar( | ||||
|           height: getVerticalSize(49), | ||||
| @ -95,9 +104,7 @@ void _toggleSwitchactive(bool value) { | ||||
| 
 | ||||
| 
 | ||||
| ), | ||||
|       body:Consumer<TestfViewModelScreen>( | ||||
|             builder: (context, value, child) { | ||||
|           return SingleChildScrollView( | ||||
|       body: SingleChildScrollView( | ||||
|         child: Padding( | ||||
|           padding: const EdgeInsets.all(16), | ||||
|           child: Form( | ||||
| @ -155,7 +162,7 @@ formData['active'] = active; | ||||
|   | ||||
|                       try { | ||||
|                         print(formData); | ||||
|   Map<String, dynamic> createdEntity =  await value.createEntity(formData);  | ||||
|   Map<String, dynamic> createdEntity =  await provider.createEntity(formData);  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -198,7 +205,7 @@ formData['active'] = active; | ||||
|           ), | ||||
|               ), | ||||
|             ), | ||||
|           ); | ||||
|         })); | ||||
|           ), | ||||
|      ); | ||||
|   } | ||||
| } | ||||
| @ -1,9 +1,9 @@ | ||||
| // ignore_for_file: use_build_context_synchronously | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:intl/intl.dart'; | ||||
| import 'Testf_api_service.dart'; | ||||
| import 'Testf_create_entity_screen.dart'; | ||||
| import 'Testf_update_entity_screen.dart'; | ||||
| import '../Testf_viewModel/Testf_view_model_screen.dart'; | ||||
| import 'package:flutter/services.dart'; | ||||
| import 'package:speech_to_text/speech_to_text.dart' as stt; | ||||
| import '../../../../theme/app_style.dart'; | ||||
| @ -16,6 +16,7 @@ import '../../../../widgets/app_bar/custom_app_bar.dart'; | ||||
| import '../../../../theme/app_decoration.dart'; | ||||
| import 'package:multi_select_flutter/multi_select_flutter.dart'; | ||||
| import '../../../../Reuseable/reusable_text_field.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| import 'package:fluttertoast/fluttertoast.dart'; | ||||
| 
 | ||||
| class testf_entity_list_screen extends StatefulWidget { | ||||
| @ -26,8 +27,6 @@ class testf_entity_list_screen extends StatefulWidget { | ||||
| } | ||||
| 
 | ||||
| class _testf_entity_list_screenState extends State<testf_entity_list_screen> { | ||||
| 
 | ||||
|    final testfApiService apiService = testfApiService(); | ||||
|   List<Map<String, dynamic>> entities = []; | ||||
|   List<Map<String, dynamic>> filteredEntities = []; | ||||
|   List<Map<String, dynamic>> serachEntities = []; | ||||
| @ -58,8 +57,9 @@ class _testf_entity_list_screenState extends State<testf_entity_list_screen> { | ||||
| 
 | ||||
|   Future<void> fetchwithoutpaging() async { | ||||
|     try { | ||||
|         final fetchedEntities = | ||||
|             await apiService.getEntities(); | ||||
|         final provider = | ||||
|           Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
|       final fetchedEntities = await provider.getEntities(); | ||||
|         print('withoutpaging data is $fetchedEntities'); | ||||
|         setState(() { | ||||
|           serachEntities = fetchedEntities; // Update only filteredEntities | ||||
| @ -93,8 +93,10 @@ Future<void> fetchEntities() async { | ||||
| 
 | ||||
|   | ||||
|    | ||||
|  final fetchedEntities = | ||||
|             await apiService.getAllWithPagination( currentPage, pageSize);  | ||||
|     final provider = | ||||
|           Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
|       final fetchedEntities = | ||||
|           await provider.getAllWithPagination(currentPage, pageSize); | ||||
|   print('pagination data is $fetchedEntities'); | ||||
|         setState(() { | ||||
|           entities.addAll(fetchedEntities); // Add new data to the existing list | ||||
| @ -137,7 +139,10 @@ Future<void> fetchEntities() async { | ||||
| 
 | ||||
|   Future<void> deleteEntity(Map<String, dynamic> entity) async { | ||||
|     try { | ||||
|       await apiService.deleteEntity(entity['id']); | ||||
|       final provider = | ||||
|           Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
| 
 | ||||
|       await provider.deleteEntity(entity['id']);; | ||||
|       setState(() { | ||||
|         entities.remove(entity); | ||||
|       }); | ||||
| @ -325,7 +330,10 @@ onTapArrowleft1(BuildContext context) { | ||||
|           Navigator.push( | ||||
|             context, | ||||
|             MaterialPageRoute( | ||||
|               builder: (context) => testfCreateEntityScreen(), | ||||
|               builder: (context) => ChangeNotifierProvider( | ||||
|                 create: (context) => TestfViewModelScreen(), | ||||
|                 child: testfCreateEntityScreen(), | ||||
|               ), | ||||
|             ), | ||||
|           ).then((_) { | ||||
|             fetchEntities(); | ||||
| @ -446,11 +454,13 @@ onTapArrowleft1(BuildContext context) { | ||||
|                     }, | ||||
|                     onSelected: (String value) { | ||||
|                       if (value == 'edit') { | ||||
|                         Navigator.push( | ||||
|                        Navigator.push( | ||||
|                           context, | ||||
|                           MaterialPageRoute( | ||||
|                             builder: (context) => | ||||
|                                 testfUpdateEntityScreen(entity: entity), | ||||
|                             builder: (context) => ChangeNotifierProvider( | ||||
|                               create: (context) => TestfViewModelScreen(), | ||||
|                               child: testfUpdateEntityScreen(entity: entity), | ||||
|                             ), | ||||
|                           ), | ||||
|                         ).then((_) { | ||||
|                           fetchEntities(); | ||||
|  | ||||
| @ -21,6 +21,7 @@ import 'dart:math'; | ||||
| import '../../../../Reuseable/reusable_text_field.dart'; | ||||
| import '../../../../Reuseable/reusable_date_picker_field.dart'; | ||||
| import '../../../../Reuseable/reusable_date_time_picker_field.dart'; | ||||
| import '../../../../Reuseable/reusable_dropdown_field.dart'; | ||||
| import 'package:flutter/services.dart'; | ||||
| class testfUpdateEntityScreen extends StatefulWidget { | ||||
|     final Map<String, dynamic> entity; | ||||
| @ -45,6 +46,7 @@ class _testfUpdateEntityScreenState extends State<testfUpdateEntityScreen> { | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     final provider = Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -56,6 +58,7 @@ isactive = widget.entity['active'] ?? false; // Set initial value | ||||
|   | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final provider = Provider.of<TestfViewModelScreen>(context, listen: false); | ||||
|     return Scaffold( | ||||
|       appBar: CustomAppBar( | ||||
|           height: getVerticalSize(49), | ||||
| @ -78,8 +81,7 @@ isactive = widget.entity['active'] ?? false; // Set initial value | ||||
| 
 | ||||
|         ], | ||||
| ), | ||||
|       body: Consumer<TestfViewModelScreen>(builder: (context, value, child) { | ||||
|           return SingleChildScrollView( | ||||
|       body:  SingleChildScrollView( | ||||
|         child: Padding( | ||||
|           padding: const EdgeInsets.all(16), | ||||
|           child: Form( | ||||
| @ -142,7 +144,7 @@ widget.entity['active'] = isactive; | ||||
| 
 | ||||
|         | ||||
|                         try { | ||||
|                         await value.updateEntity( | ||||
|                         await provider.updateEntity( | ||||
|                               widget.entity[ | ||||
|                                   'id'], // Assuming 'id' is the key in your entity map | ||||
|                               widget.entity);    | ||||
| @ -182,7 +184,7 @@ widget.entity['active'] = isactive; | ||||
|               ), | ||||
|             ), | ||||
|           ), | ||||
|        ), | ||||
|        ); | ||||
|         })); | ||||
|   } | ||||
| } | ||||
| @ -1,3 +1,4 @@ | ||||
| import 'package:dio/dio.dart'; | ||||
| import '../../../../data/network/base_network_service.dart'; | ||||
| import '../../../../data/network/network_api_service.dart'; | ||||
| import '../../../../resources/api_constants.dart'; | ||||
| @ -58,4 +59,10 @@ class TestfRepoScreen { | ||||
|       throw Exception('Failed to delete entity: $e'); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -1,6 +1,11 @@ | ||||
| import 'dart:typed_data'; | ||||
| import 'package:dio/dio.dart'; | ||||
| import 'package:http_parser/http_parser.dart'; | ||||
| import '../../../../utils/toast_messages/toast_message_util.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import '../Testf_Repo/Testf_repo_screen.dart'; | ||||
| 
 | ||||
| class TestfViewModelScreen { | ||||
| class TestfViewModelScreen extends ChangeNotifier{ | ||||
|   final TestfRepoScreen repo = TestfRepoScreen(); | ||||
| 
 | ||||
|   Future<List<Map<String, dynamic>>> getEntities() async { | ||||
| @ -13,40 +18,64 @@ class TestfViewModelScreen { | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|    | ||||
|   Future<List<Map<String, dynamic>>> getAllWithPagination( | ||||
|       int page, int size) async { | ||||
|     try { | ||||
|       final response = repo.getAllWithPagination(page, size); | ||||
|       final response = | ||||
|           await repo.getAllWithPagination(page, size); // ✅ Use await | ||||
| 
 | ||||
|       Map<String, dynamic> responseData = response as Map<String, dynamic>; | ||||
|       print('res - $response'); | ||||
| 
 | ||||
|       final entities = | ||||
|           (responseData['content'] as List).cast<Map<String, dynamic>>(); | ||||
|       // ✅ Ensure response is a Map<String, dynamic> | ||||
|       if (response is! Map<String, dynamic>) { | ||||
|         throw Exception('Unexpected response format: $response'); | ||||
|       } | ||||
| 
 | ||||
|       // ✅ Extract 'content' and ensure it's a list | ||||
|       final entities = (response['content'] as List) | ||||
|           .cast<Map<String, dynamic>>() // ✅ Ensure list of maps | ||||
|           .toList(); | ||||
|       return entities; | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to get all without pagination: $e'); | ||||
|       print(e); | ||||
|       throw Exception('Failed to get all without pagination :- $e'); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|    | ||||
|   Future<Map<String, dynamic>> createEntity(Map<String, dynamic> entity) async { | ||||
|     try { | ||||
|       print("in post api$entity"); | ||||
|       final response = repo.createEntity(entity); | ||||
|       print("in post api - $entity"); | ||||
|       // Wait for API response | ||||
|       final responseData = | ||||
|           await repo.createEntity(entity) as Map<String, dynamic>; | ||||
|       print('after value - $responseData'); | ||||
|       ToastMessageUtil.showToast( | ||||
|           message: "Added Successfully", toastType: ToastType.success); | ||||
| 
 | ||||
|       print(entity); | ||||
|       return responseData; // Return the data AFTER it is received | ||||
|     } catch (error) { | ||||
|       print("error--$error"); | ||||
|       ToastMessageUtil.showToast( | ||||
|           message: "Got Error", toastType: ToastType.error); | ||||
| 
 | ||||
|       // Assuming the response is a Map<String, dynamic> | ||||
|       Map<String, dynamic> responseData = response as Map<String, dynamic>; | ||||
| 
 | ||||
|       return responseData; | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to create entity: $e'); | ||||
|       throw Exception( | ||||
|           'Failed to Create Entity: $error'); // Properly rethrow the error | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   }  | ||||
|   Future<void> updateEntity(int entityId, Map<String, dynamic> entity) async { | ||||
|     try { | ||||
|       repo.updateEntity(entityId, entity); | ||||
|       repo.updateEntity(entityId, entity).then((value) { | ||||
|         ToastMessageUtil.showToast( | ||||
|             message: "Updated Successfully", toastType: ToastType.success); | ||||
|       }).onError( | ||||
|         (error, stackTrace) { | ||||
|           print("error--$error"); | ||||
|           ToastMessageUtil.showToast( | ||||
|               message: "Got Error", toastType: ToastType.error); | ||||
|         }, | ||||
|       ); | ||||
|       print(entity); | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to update entity: $e'); | ||||
| @ -55,9 +84,24 @@ class TestfViewModelScreen { | ||||
| 
 | ||||
|   Future<void> deleteEntity(int entityId) async { | ||||
|     try { | ||||
|       repo.deleteEntity(entityId); | ||||
|       repo.deleteEntity(entityId).then((value) { | ||||
|         ToastMessageUtil.showToast( | ||||
|             message: "Deleted Successfully", toastType: ToastType.success); | ||||
|       }).onError( | ||||
|         (error, stackTrace) { | ||||
|           print("error--$error"); | ||||
|           ToastMessageUtil.showToast( | ||||
|               message: "Got Error", toastType: ToastType.error); | ||||
|         }, | ||||
|       ); | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to delete entity: $e'); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -1,4 +1,5 @@ | ||||
| import '../../Entity/basic1/Testf/TestfView/Testf_entity_list_screen.dart'; | ||||
| 
 | ||||
| import '../../Entity/basic1/Testf/TestfView/Testf_entity_list_screen.dart'; | ||||
| 
 | ||||
| import 'package:base_project/utils/image_constant.dart'; | ||||
| import 'package:base_project/commans/widgets/custome_drawe_item.dart'; | ||||
| @ -11,92 +12,94 @@ import 'package:flutter_svg/svg.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| 
 | ||||
| class MyCustomDrawer extends StatelessWidget { | ||||
|   const MyCustomDrawer({super.key}); | ||||
| const MyCustomDrawer({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final email = UserManager().email; | ||||
|     final userName = UserManager().userName; | ||||
|     final provider = Provider.of<ProfileViewModel>(context, listen: false); | ||||
|     return Drawer( | ||||
|       child: ListView( | ||||
|         padding: EdgeInsets.zero, | ||||
|         children: <Widget>[ | ||||
|           UserAccountsDrawerHeader( | ||||
|             decoration: const BoxDecoration( | ||||
|               color: AppColors.primary, | ||||
|             ), | ||||
|             currentAccountPicture: CircleAvatar( | ||||
|               radius: 60, | ||||
|               backgroundColor: AppColors.primary.withOpacity(0.3), | ||||
|               backgroundImage: provider.profileImageBytes != null | ||||
|                   ? MemoryImage(provider.profileImageBytes!) | ||||
|                   : null, | ||||
|               child: provider.profileImageBytes != null | ||||
|                   ? null // Use backgroundImage for the actual image, so child should be null | ||||
|                   : SvgPicture.asset( | ||||
|                       ImageConstant.userProfileImg, // Placeholder SVG asset | ||||
| @override | ||||
| Widget build(BuildContext context) { | ||||
| final email = UserManager().email; | ||||
| final userName = UserManager().userName; | ||||
| final provider = Provider.of<ProfileViewModel>(context, listen: false); | ||||
| return Drawer( | ||||
| child: ListView( | ||||
| padding: EdgeInsets.zero, | ||||
| children: <Widget>[ | ||||
| UserAccountsDrawerHeader( | ||||
| decoration: const BoxDecoration( | ||||
| color: AppColors.primary, | ||||
| ), | ||||
| currentAccountPicture: CircleAvatar( | ||||
| radius: 60, | ||||
| backgroundColor: AppColors.primary.withOpacity(0.3), | ||||
| backgroundImage: provider.profileImageBytes != null | ||||
| ? MemoryImage(provider.profileImageBytes!) | ||||
| : null, | ||||
| child: provider.profileImageBytes != null | ||||
| ? null // Use backgroundImage for the actual image, so child should be null | ||||
| : SvgPicture.asset( | ||||
| ImageConstant.userProfileImg, // Placeholder SVG asset | ||||
| 
 | ||||
| // AppImages.userProfileImg, // Placeholder SVG asset | ||||
|                       width: 60, // Adjust to fit the CircleAvatar | ||||
|                       height: 60, | ||||
|                     ), | ||||
|             ), | ||||
|             accountName: Text("Hello, $userName"), | ||||
|             accountEmail: Text(email.toString()), | ||||
|           ), | ||||
|           DrawerItem( | ||||
|             color: AppColors.primary, | ||||
|             icon: Icons.person, | ||||
|             title: 'Profile', | ||||
|             onTap: () { | ||||
|               Navigator.pushNamed(context, RouteNames.profileView); | ||||
|             }, | ||||
|           ), | ||||
|           DrawerItem( | ||||
|             color: AppColors.primary, | ||||
|             icon: Icons.system_security_update, | ||||
|             title: 'System Parameters', | ||||
|             onTap: () { | ||||
| width: 60, // Adjust to fit the CircleAvatar | ||||
| height: 60, | ||||
| ), | ||||
| ), | ||||
| accountName: Text("Hello, $userName"), | ||||
| accountEmail: Text(email.toString()), | ||||
| ), | ||||
| DrawerItem( | ||||
| color: AppColors.primary, | ||||
| icon: Icons.person, | ||||
| title: 'Profile', | ||||
| onTap: () { | ||||
| Navigator.pushNamed(context, RouteNames.profileView); | ||||
| }, | ||||
| ), | ||||
| DrawerItem( | ||||
| color: AppColors.primary, | ||||
| icon: Icons.system_security_update, | ||||
| title: 'System Parameters', | ||||
| onTap: () { | ||||
| // Add navigation or other logic here | ||||
|               Navigator.pushNamed(context, RouteNames.systemParamsView); | ||||
|             }, | ||||
|           ), | ||||
|           DrawerItem( | ||||
|             color: AppColors.primary, | ||||
|             icon: Icons.password, | ||||
|             title: 'change password', | ||||
|             onTap: () { | ||||
|               Navigator.pushNamed(context, RouteNames.changePasswordView); | ||||
|             }, | ||||
|           ), | ||||
| Navigator.pushNamed(context, RouteNames.systemParamsView); | ||||
| }, | ||||
| ), | ||||
| DrawerItem( | ||||
| color: AppColors.primary, | ||||
| icon: Icons.password, | ||||
| title: 'change password', | ||||
| onTap: () { | ||||
| Navigator.pushNamed(context, RouteNames.changePasswordView); | ||||
| }, | ||||
| ), | ||||
| 
 | ||||
| // NEW MENU | ||||
| DrawerItem( | ||||
|             color: AppColors.primary, | ||||
|             icon: Icons.chat_bubble, | ||||
|             title: 'Testf', | ||||
|             onTap: () { | ||||
|               Navigator.push( | ||||
|                     context, | ||||
|                     MaterialPageRoute( | ||||
|                       builder: (context) =>  testf_entity_list_screen(), | ||||
|                     ), | ||||
|                   ); | ||||
|             }, | ||||
|           ), | ||||
| 
 | ||||
|           DrawerItem( | ||||
|             icon: Icons.logout, | ||||
|             color: Colors.red, | ||||
|             title: 'Logout', | ||||
|             onTap: () async { | ||||
|               await UserManager().clearUser(); | ||||
|               Navigator.pushReplacementNamed(context, RouteNames.splashView); | ||||
|             }, | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
| DrawerItem( | ||||
| color: AppColors.primary, | ||||
| icon: Icons.chat_bubble, | ||||
| title: 'Testf', | ||||
| onTap: () { | ||||
| Navigator.push( | ||||
| context, | ||||
| MaterialPageRoute( | ||||
| builder: (context) =>  testf_entity_list_screen(), | ||||
| ), | ||||
| ); | ||||
| }, | ||||
| ), | ||||
| 
 | ||||
| DrawerItem( | ||||
| icon: Icons.logout, | ||||
| color: Colors.red, | ||||
| title: 'Logout', | ||||
| onTap: () async { | ||||
| await UserManager().clearUser(); | ||||
| Navigator.pushReplacementNamed(context, RouteNames.splashView); | ||||
| }, | ||||
| ), | ||||
| ], | ||||
| ), | ||||
| ); | ||||
| } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user