From 88fc5b26144882d557fd23c46409b2a5448b76e8 Mon Sep 17 00:00:00 2001 From: Stephane Date: Sat, 2 Aug 2025 12:42:24 +0300 Subject: [PATCH] mobile --- android/app/src/main/AndroidManifest.xml | 36 +++++++------------ .../main/res/xml/bnetworksecurityconfig.xml | 30 ++++++++++++++++ lib/widgets/mobile_bottom_navigation.dart | 7 +--- pubspec.yaml | 1 + .../flutter/generated_plugin_registrant.cc | 3 ++ windows/flutter/generated_plugins.cmake | 1 + 6 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 android/app/src/main/res/xml/bnetworksecurityconfig.xml diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index cc392e5..ed6a038 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,61 +1,49 @@ - + - - + + + + + + + + android:networkSecurityConfig="@xml/network_security_config" + android:requestLegacyExternalStorage="true" + android:allowBackup="false"> - - + - - - - - - - - - diff --git a/android/app/src/main/res/xml/bnetworksecurityconfig.xml b/android/app/src/main/res/xml/bnetworksecurityconfig.xml new file mode 100644 index 0000000..a3182e9 --- /dev/null +++ b/android/app/src/main/res/xml/bnetworksecurityconfig.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + localhost + 10.0.2.2 + 192.168.1.1 + httpbin.org + + restaurant.careeracademy.mg + + diff --git a/lib/widgets/mobile_bottom_navigation.dart b/lib/widgets/mobile_bottom_navigation.dart index 8330620..fd566bc 100644 --- a/lib/widgets/mobile_bottom_navigation.dart +++ b/lib/widgets/mobile_bottom_navigation.dart @@ -29,11 +29,6 @@ class MobileBottomNavigation extends StatelessWidget { label: 'Commandes', index: 1, ), - _buildBottomNavItem( - icon: Icons.category_outlined, - label: 'Catégories', - index: 2, - ), ], ), ); @@ -69,4 +64,4 @@ class MobileBottomNavigation extends StatelessWidget { ), ); } - } +} diff --git a/pubspec.yaml b/pubspec.yaml index c37eae0..b8fcb30 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,6 +21,7 @@ dependencies: # Pour effectuer des requêtes HTTP http: ^0.13.5 + permission_handler: ^10.4.3 # Dépendances de développement/test dev_dependencies: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..48de52b 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + PermissionHandlerWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..0e69e40 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + permission_handler_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST