Compare commits

..

No commits in common. "dev" and "release/mobdr-v0.0.1" have entirely different histories.

47 changed files with 541 additions and 1110 deletions

View File

@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')

View File

@ -30,15 +30,6 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<provider
android:name="sk.fourq.otaupdate.OtaUpdateFileProvider"
android:authorities="${applicationId}.ota_update_provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
</application>
<!-- Permissions options for the `storage` group -->
@ -48,7 +39,6 @@
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<!-- Permissions options for the `camera` group -->
<uses-permission android:name="android.permission.CAMERA"/>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<files-path name="internal_apk_storage" path="ota_update/"/>
</paths>

View File

@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
task clean(type: Delete) {
delete rootProject.buildDir
}

3
assets/lang/ar.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "مرحبًا ، سيتغير هذا النص وفقًا للغة"
}

View File

@ -1,71 +1,5 @@
{
"i18n_label_ok":"OK",
"i18n_label_yes":"Yes",
"i18n_label_no":"No",
"i18n_label_cancel":"Cancel",
"i18n_label_delete":"Delete",
"i18n_label_hello":"Hello",
"i18n_label_take_photos":"Take photos",
"i18n_menu_settings":"Settings",
"i18n_menu_about":"About",
"i18n_menu_show_logs":"Show logs",
"i18n_menu_check_version":"Check version",
"i18n_menu_account":"Account",
"i18n_menu_notification":"Notification",
"i18n_label_sign_out":"Sign Out",
"i18n_label_photo_quality":"Photo quality",
"i18n_label_photo_resizing":"Photo resizing",
"i18n_label_sound_photo":"Play sound when taking photo",
"i18n_label_language":"Langage",
"i18n_label_copy_to_gallery":"Copy to gallery",
"i18n_label_edit_tag":"Edit tags",
"i18n_label_tags":"Tags",
"i18n_label_notag":"No tag",
"i18n_label_enter_tags":"Enter tag",
"i18n_label_competition":"Competition",
"i18n_label_choose_competitor":"Choose competitor",
"i18n_label_visibility":"Visibility",
"i18n_label_main_visibility":"Main",
"i18n_label_private_visibility":"Private",
"i18n_label_typology":"Typology",
"i18n_label_photo_added_to_gallery":"Photo has been added to gallery",
"i18n_label_image_rotated":"The image has been rotated",
"i18n_label_last_visit_access":"Last visit access",
"i18n_label_today_visits":"Today visits",
"i18n_label_previous_visits":"Previous visits",
"i18n_label_delete_photo":"Delete photo",
"i18n_label_confirm_delete_photo":"Are you sure you want to delete this photo ?",
"i18n_label_deleted_photo":"Photo has been deleted",
"i18n_label_data_synchronization":"Data synchronization",
"i18n_label_backoffice_synchronization":"Backoffice data synchronization",
"i18n_label_photos_synchronization":"Photos synchronization",
"i18n_label_sync_logs":"Sync logs",
"i18n_label_logs_synchronization":"Activity logs synchronization",
"i18n_label_confirmation":"Confirmation",
"i18n_label_confirm_delete_log":"Are you sure you want to delete logs ?",
"i18n_menu_check_update":"Checking for update",
"i18n_label_current_version":"Current version",
"i18n_label_available_version":"Available version",
"i18n_label_latest_version":"You have the latest version",
"i18n_label_release_notes":"Release notes",
"i18n_label_publication_date":"Publication date",
"i18n_label_update":"Update",
"i18n_label_choose_quality":"Choose quality",
"i18n_label_choose_language":"Choose language",
"i18n_label_synchronize":"Synchronize",
"i18n_label_new_version":"New version available",
"i18n_label_new_version_install":"A new version is available. Would you like to install it ?",
"i18n_label_never":"Never",
"i18n_label_no_internet":"No internet connection ...",
"i18n_menu_backoffice":"BackOffice",
"i18n_menu_photos":"Photos",
"i18n_menu_log":"Logs",
"i18n_label_photo_not_found":"Photo not found",
"i18n_label_photo":"Photo",
"i18n_label_save":"Save",
"i18n_label_error":"Error",
"i18n_label_app_version":"App Version",
"i18n_label_synchronization_error": "Synchronization error",
"i18n_label_synchronization_complete": "Synchronization complete",
"i18n_label_error_while_copying": "Error while copying"
"text_description": "Hello, this text will change according to the language",
"i18n_hello" : "Hello",
"i18n_take_pictures" : "Take pictures"
}

View File

@ -1,71 +1,4 @@
{
"i18n_label_ok":"OK",
"i18n_label_yes":"Oui",
"i18n_label_no":"Non",
"i18n_label_cancel":"Annuler",
"i18n_label_delete":"Supprimer",
"i18n_label_hello":"Bonjour",
"i18n_label_take_photos":"Prendre des photos",
"i18n_menu_settings":"Paramètres",
"i18n_menu_about":"A propos",
"i18n_menu_show_logs":"Voir logs",
"i18n_menu_check_version":"Vérifier version",
"i18n_menu_account":"Profil",
"i18n_menu_notification":"Notification",
"i18n_label_sign_out":"Déconnecter",
"i18n_label_photo_quality":"Qualité photo",
"i18n_label_photo_resizing":"Redimensionnement photo",
"i18n_label_sound_photo":"Jouer son quand prise photo",
"i18n_label_language":"Langage",
"i18n_label_copy_to_gallery":"Copier dans galerie",
"i18n_label_edit_tag":"Modifier les tags",
"i18n_label_tags":"Tags",
"i18n_label_notag":"Aucun tag",
"i18n_label_enter_tags":"Saisir tag",
"i18n_label_competition":"Concurrence",
"i18n_label_choose_competitor":"Choisir concurrent",
"i18n_label_visibility":"Visibilité",
"i18n_label_main_visibility":"Principale",
"i18n_label_private_visibility":"Privée",
"i18n_label_typology":"Typologie",
"i18n_label_photo_added_to_gallery":"Photo ajoutée à la galerie",
"i18n_label_image_rotated":"Image retournée",
"i18n_label_last_visit_access":"Dernières visites",
"i18n_label_today_visits":"Visites du jour",
"i18n_label_previous_visits":"Visites précédentes",
"i18n_label_delete_photo":"Supprimer la photo",
"i18n_label_confirm_delete_photo":"Confirmez-vous la suppression de la photo ?",
"i18n_label_deleted_photo":"La photo a été supprimée",
"i18n_label_data_synchronization":"Synchronisation données",
"i18n_label_backoffice_synchronization":"Synchronisation des données du backoffice",
"i18n_label_photos_synchronization":"Synchronisation des photos",
"i18n_label_sync_logs":"Sync logs",
"i18n_label_logs_synchronization":"Synchronisation des journaux d'activité",
"i18n_label_confirmation":"Confirmation",
"i18n_label_confirm_delete_log":"Confirmez-vous la suppression des logs ?",
"i18n_menu_check_update":"Vérification mise à jour",
"i18n_label_current_version":"Version actuelle",
"i18n_label_available_version":"Version disponible",
"i18n_label_latest_version":"Vous avez la dernière version",
"i18n_label_release_notes":"Notes de mise à jour",
"i18n_label_publication_date":"Date de sortie",
"i18n_label_update":"Mettre à jour",
"i18n_label_choose_quality":"Choisir qualité",
"i18n_label_choose_language":"Choisir langage",
"i18n_label_synchronize":"Synchronisation",
"i18n_label_new_version":"Nouvelle version disponible",
"i18n_label_new_version_install": "Une nouvelle version est disponible. Voulez-vous l'installer ?",
"i18n_label_never":"Jamais",
"i18n_label_no_internet":"Aucune connexion internet ...",
"i18n_menu_backoffice":"BackOffice",
"i18n_menu_photos":"Photos",
"i18n_menu_log":"Logs",
"i18n_label_photo_not_found":"Photo introuvable",
"i18n_label_photo":"Photo",
"i18n_label_save":"Sauvegarder",
"i18n_label_error":"Erreur",
"i18n_label_app_version":"App Version",
"i18n_label_synchronization_error": "Erreur de synchronisation",
"i18n_label_synchronization_complete": "Synchronisation terminée",
"i18n_label_error_while_copying": "Erreur lors de la copie"
"i18n_hello": "Bonjour",
"i18n_take_pictures" : "Prendre des photos"
}

3
assets/lang/hi.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "नमस्कार, यह पाठ भाषा के अनुसार बदल जाएगा"
}

3
assets/lang/id.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "Halo, teks ini akan berubah menurut bahasanya"
}

3
assets/lang/th.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "สวัสดีข้อความนี้จะเปลี่ยนไปตามภาษา"
}

3
assets/lang/tk.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "Merhaba, bu yazı dile göre değişecek"
}

3
assets/lang/zh.json Normal file
View File

@ -0,0 +1,3 @@
{
"text_description": "您好,该文字会根据语言而变化"
}

View File

@ -20,7 +20,7 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- image_gallery_saver (2.0.2):
- image_gallery_saver (2.0.1):
- Flutter
- image_picker_ios (0.0.1):
- Flutter
@ -36,16 +36,16 @@ PODS:
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- ObjectBox (1.9.0)
- ObjectBox (1.8.1)
- objectbox_flutter_libs (0.0.1):
- Flutter
- ObjectBox (= 1.9.0)
- ObjectBox (= 1.8.1)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- permission_handler_apple (9.1.0):
- Flutter
- ReachabilitySwift (5.0.0)
- SDWebImage (5.16.0):
@ -57,11 +57,11 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- Toast (4.0.0)
- wakelock_plus (0.0.1):
- wakelock (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
@ -78,11 +78,11 @@ DEPENDENCIES:
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS:
@ -120,45 +120,45 @@ EXTERNAL SOURCES:
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
:path: ".symlinks/plugins/path_provider_foundation/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_gallery_saver: 6eb11e5a866e9ac2c8a98c74ef99a04fc62878b2
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
ObjectBox: e7ff611291a0663380e0736b46786bcd077294ff
objectbox_flutter_libs: 0948d6feb7de4f7edaebc7a898b9e85b7fc2bc89
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ObjectBox: a7900d5335218cd437cbc080b7ccc38a5211f7b4
objectbox_flutter_libs: 61d74196d924fbc773da5f5757d1e9fab7b3cc78
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
permission_handler_apple: 8f116445eff3c0e7c65ad60f5fef5490aa94b4e4
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
PODFILE CHECKSUM: b634fd49380cdd3837626153fb977533b1916433
COCOAPODS: 1.14.3
COCOAPODS: 1.11.3

View File

@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -227,7 +227,6 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -45,7 +45,3 @@ const String LOGIN_API = 'https://mp4.ikksgroup.com' + "/authentication/login";
const String PRODUCT_API = 'https://mp4.ikksgroup.com' + "/example/getProduct";
const String SERVLET_API =
'https://mp4.ikksgroup.com' + "/MobilePortal4_external/UploadPhotoServlet";
// https://blogit.q2ii.fr
// https://mp4.ikksgroup.com
const String DOMAIN_CHECK_VERSION = 'https://mp4.ikksgroup.com';

View File

@ -9,7 +9,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mobdr/service/shared_prefs.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AppLocalizations {
final Locale locale;
@ -36,9 +36,8 @@ class AppLocalizations {
}
// This method will be called from every widget which needs a localized text
String translate(String key) {
final translatedString = _localizedStrings[key];
return translatedString ?? 'I18N:' + key;
String? translate(String key) {
return _localizedStrings[key];
}
}
@ -48,17 +47,24 @@ class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
@override
bool isSupported(Locale locale) {
// Include all of your supported language codes here
return ['fr', 'en'].contains(locale.languageCode);
return ['fr', 'en', 'id', 'ar', 'zh', 'hi', 'th', 'tk']
.contains(locale.languageCode);
}
@override
Future<AppLocalizations> load(Locale locale) async {
locale = SharedPrefs().language;
final SharedPreferences _pref = await SharedPreferences.getInstance();
String? lCode = _pref.getString('lCode');
String? cCode = _pref.getString('cCode');
if (lCode == null || cCode == null) {
await _pref.setString('lCode', locale.languageCode);
await _pref.setString('cCode', locale.countryCode!);
} else {
locale = Locale(lCode, cCode);
}
AppLocalizations localizations = new AppLocalizations(locale);
await localizations.load();
return localizations;
}

View File

@ -1,7 +1,6 @@
import 'package:objectbox/objectbox.dart';
import 'package:mobdr/objectbox.g.dart';
import 'package:xml/xml.dart';
import 'package:mobdr/service/shared_prefs.dart';
// ignore_for_file: public_member_api_docs
@ -29,25 +28,17 @@ class PhotoTypology {
}
String getI18nLabel(String label) {
final langage = SharedPrefs().langage;
try {
String translatedText = '';
final document = XmlDocument.parse(label);
try {
for (var noeud in document.children[0].children) {
if (noeud is XmlElement) {
if (noeud.name.local == langage) {
return noeud.innerText;
}
}
translatedText = document.children[0].getElement('fr')!.text;
if (translatedText == '') {
translatedText = document.children[0].getElement('fr')!.text;
}
for (var noeud in document.children[0].children) {
if (noeud is XmlElement && noeud.name.local == 'fr') {
return '(fr) ${noeud.innerText}';
}
}
return label;
return translatedText;
} catch (e) {}
return label;
}

View File

@ -36,12 +36,3 @@ class SynchronizationEvent extends AppEvent {
@override
List<Object?> get props => [isRunning];
}
class ChangeLocaleEvent extends AppEvent {
ChangeLocaleEvent(this.language);
final String language;
@override
List<Object?> get props => [language];
}

View File

@ -5,7 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'objectbox.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
import 'package:wakelock/wakelock.dart';
import 'package:event_bus_plus/event_bus_plus.dart';
import 'package:mobdr/service/logger_util.dart';
@ -60,10 +60,8 @@ Future<void> main() async {
await package_info_plus().initPackageInfo();
// set device screenWidth/height
SharedPrefs().screenWidth =
PlatformDispatcher.instance.views.first.physicalSize.width;
SharedPrefs().screenHeight =
PlatformDispatcher.instance.views.first.physicalSize.height;
SharedPrefs().screenWidth = window.physicalSize.width;
SharedPrefs().screenHeight = window.physicalSize.height;
// initialize directories
await directories().initDirectories();
@ -86,7 +84,7 @@ Future<void> main() async {
.then((_) {
/// pour wakelock
WidgetsFlutterBinding.ensureInitialized();
WakelockPlus.enable();
Wakelock.enable();
eventBus.on().listen((event) {
if (!(event is EmptyEvent)) {
@ -165,7 +163,16 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
}),
),
// below is used for language feature
supportedLocales: [Locale('fr', 'FR'), Locale('en', 'US')],
supportedLocales: [
Locale('fr', 'FR'),
Locale('en', 'US'),
Locale('id', 'ID'),
Locale('ar', 'DZ'),
Locale('zh', 'HK'),
Locale('hi', 'IN'),
Locale('th', 'TH'),
Locale('tk', 'TK'),
],
// These delegates make sure that the localization data for the proper language is loaded
localizationsDelegates: [
AppLocalizationsDelegate(),

View File

@ -1,6 +1,5 @@
import 'package:intl/intl.dart';
import 'package:mobdr/main.dart';
import 'package:mobdr/service/shared_prefs.dart';
class VisitModel {
late int id;
@ -32,6 +31,7 @@ class VisitModel {
static Future<List<VisitModel>> getTodayVisits() async {
// Retrieve all today visits from the database
final visits = await objectbox.getTodayVisit();
// Map each retrieved visit to VisiteModel
final visitModelList = visits
.map((visite) => VisitModel(
@ -41,7 +41,7 @@ class VisitModel {
id_visite: visite.id_visite,
name: visite.id_etab.toString() + ' - ' + visite.title,
photoCount: objectbox.getVisitPhotoTaken(visite.id_visite),
date: DateFormat('EEEE d MMMM HH:mm', SharedPrefs().locale)
date: DateFormat('EEEE d MMMM HH:mm', 'fr_FR')
.format(visite.date_visite),
image: visite.url_photo_principale,
type_visite: visite.type_visite,
@ -66,7 +66,7 @@ class VisitModel {
id_visite: visite.id_visite,
name: visite.id_etab.toString() + ' - ' + visite.title,
photoCount: objectbox.getVisitPhotoTaken(visite.id_visite),
date: DateFormat('EEEE d MMMM HH:mm', SharedPrefs().locale)
date: DateFormat('EEEE d MMMM HH:mm', 'fr_FR')
.format(visite.date_visite),
image: visite.url_photo_principale,
type_visite: visite.type_visite,
@ -91,7 +91,7 @@ class VisitModel {
id_visite: visite.id_visite,
name: visite.id_etab.toString() + ' - ' + visite.title,
photoCount: objectbox.getVisitPhotoTaken(visite.id_visite),
date: DateFormat('EEEE d MMMM HH:mm', SharedPrefs().locale)
date: DateFormat('EEEE d MMMM HH:mm', 'fr_FR')
.format(visite.date_visite),
image: visite.url_photo_principale,
type_visite: visite.type_visite,

View File

@ -10,7 +10,6 @@ import 'package:intl/intl.dart';
import 'package:mobdr/config/constant.dart';
import 'package:mobdr/main.dart';
import 'package:mobdr/service/shared_prefs.dart';
import 'package:mobdr/service/logger_util.dart';
class ApiProvider {
final Dio _dio;
@ -34,9 +33,9 @@ class ApiProvider {
}
return await _dio.get(url);
} on DioException catch (e) {
} on DioError catch (e) {
//print(e.toString()+' | '+url.toString());
if (e.type == DioExceptionType.badResponse) {
if (e.type == DioErrorType.badResponse) {
int? statusCode = e.response!.statusCode;
if (statusCode == STATUS_NOT_FOUND) {
throw "Api not found";
@ -45,9 +44,9 @@ class ApiProvider {
} else {
throw e.error.toString();
}
} else if (e.type == DioExceptionType.connectionTimeout) {
} else if (e.type == DioErrorType.connectionTimeout) {
throw e.message.toString();
} else if (e.type == DioExceptionType.cancel) {
} else if (e.type == DioErrorType.cancel) {
throw 'cancel';
}
throw connErr;
@ -63,9 +62,9 @@ class ApiProvider {
_dio.options.receiveTimeout = Duration(seconds: 4);
return await _dio.post(url, cancelToken: apiToken);
} on DioException catch (e) {
} on DioError catch (e) {
//print(e.toString()+' | '+url.toString());
if (e.type == DioExceptionType.badResponse) {
if (e.type == DioErrorType.badResponse) {
int? statusCode = e.response!.statusCode;
if (statusCode == STATUS_NOT_FOUND) {
throw "Api not found";
@ -74,9 +73,9 @@ class ApiProvider {
} else {
throw e.error.toString();
}
} else if (e.type == DioExceptionType.connectionTimeout) {
} else if (e.type == DioErrorType.connectionTimeout) {
throw e.message.toString();
} else if (e.type == DioExceptionType.cancel) {
} else if (e.type == DioErrorType.cancel) {
throw 'cancel';
}
throw connErr;
@ -93,9 +92,9 @@ class ApiProvider {
_dio.options.receiveTimeout = Duration(seconds: 4);
return await _dio.post(url, data: data, cancelToken: apiToken);
} on DioException catch (e) {
} on DioError catch (e) {
//print(e.toString()+' | '+url.toString());
if (e.type == DioExceptionType.badResponse) {
if (e.type == DioErrorType.badResponse) {
int? statusCode = e.response!.statusCode;
if (statusCode == STATUS_NOT_FOUND) {
throw "Api not found";
@ -104,9 +103,9 @@ class ApiProvider {
} else {
throw e.error.toString();
}
} else if (e.type == DioExceptionType.connectionTimeout) {
} else if (e.type == DioErrorType.connectionTimeout) {
throw e.message.toString();
} else if (e.type == DioExceptionType.cancel) {
} else if (e.type == DioErrorType.cancel) {
throw 'cancel';
}
throw connErr;
@ -200,30 +199,6 @@ class ApiProvider {
}
}
Future<bool> guidActif() async {
final url =
'${ApiConstants.baseUrl}${ApiConstants.mp4Endpoint}${ApiConstants.restEndpoint}/login/${SharedPrefs().login}/guidactif';
final headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json',
'Cookie': 'pguid=${SharedPrefs().guid};',
};
final response = await http.get(Uri.parse(url), headers: headers);
if (response.statusCode == 200) {
final jsonResponse = json.decode(response.body);
if (jsonResponse.containsKey('general') &&
jsonResponse['general']['actif'] == true) {
return true;
}
}
return false;
}
/// Synchronize all informations about store, competitor, calendar
Future<String> SyncCalendar() async {
DateTime now = DateTime.now();
@ -506,27 +481,4 @@ class ApiProvider {
void close() {
_dio.close();
}
Future<bool> checkAppVersion() async {
try {
final response = await http
.get(Uri.parse(DOMAIN_CHECK_VERSION + '/deploy/mobdr/version.json'));
final data = jsonDecode(response.body);
if (data.containsKey('latest_version')) {
if (data['latest_version'] != SharedPrefs().appVersion) {
LoggerUtil.logNStackInfo(
'A new version is available : ${data['latest_version']}');
// The versions differ
return true;
}
}
} catch (e) {
print('Error verifying the version : $e');
}
// If an error has occurred or if the versions are identical
return false;
}
}

View File

@ -1,5 +1,4 @@
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart';
class SharedPrefs {
static late SharedPreferences _sharedPrefs;
@ -242,24 +241,4 @@ class SharedPrefs {
set systemVersion(String value) {
_sharedPrefs.setString('key_system_version', value);
}
/// get/set language code
String get lCode => _sharedPrefs.getString('lcode') ?? "fr";
set lCode(String value) {
_sharedPrefs.setString('lcode', value);
}
/// get/set language country code
String get cCode => _sharedPrefs.getString('ccode') ?? "FR";
set cCode(String value) {
_sharedPrefs.setString('ccode', value);
}
/// get language object
Locale get language => Locale(lCode, cCode);
/// get locale object
String get locale => lCode + "_" + cCode;
}

View File

@ -1,4 +1,3 @@
import 'package:mobdr/cubit/language/app_localizations.dart';
import 'package:mobdr/config/constant.dart';
import 'package:mobdr/config/global_style.dart';
import 'package:mobdr/service/shared_prefs.dart';
@ -28,7 +27,7 @@ class _AboutPageState extends State<AboutPage> {
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_menu_about'),
'About',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -45,7 +44,7 @@ class _AboutPageState extends State<AboutPage> {
height: 50,
),
Text(
AppLocalizations.of(context)!.translate('i18n_label_app_version'),
'App Version',
style: TextStyle(fontSize: 14, color: CHARCOAL),
),
SizedBox(

View File

@ -6,7 +6,6 @@ import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/db/box_log.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class LogPage extends StatefulWidget {
@override
@ -90,19 +89,17 @@ class _LogPageState extends State<LogPage> {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(
AppLocalizations.of(context)!.translate('i18n_label_confirmation')),
content: Text(
AppLocalizations.of(context)!.translate('i18n_label_confirm_delete_log')),
title: Text('Confirmation'),
content: Text('Are you sure you want to delete these logs ?'),
actions: [
TextButton(
child: Text(AppLocalizations.of(context)!.translate('i18n_label_cancel')),
child: Text('Cancel'),
onPressed: () {
Navigator.of(context).pop();
},
),
TextButton(
child: Text(AppLocalizations.of(context)!.translate('i18n_label_delete')),
child: Text('Delete'),
onPressed: () {
// remove all log from db
objectbox.logBox.removeAll();
@ -126,7 +123,7 @@ class _LogPageState extends State<LogPage> {
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_menu_show_logs'),
'Show logs',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,

View File

@ -2,13 +2,10 @@ import 'package:flutter/material.dart';
import 'package:mobdr/config/constant.dart';
import 'package:mobdr/config/global_style.dart';
import 'package:mobdr/main.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/service/shared_prefs.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/events.dart';
class SettingsPage extends StatefulWidget {
@override
@ -66,7 +63,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_menu_settings'),
'Settings',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -103,9 +100,7 @@ class _SettingsPageState extends State<SettingsPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_photo_quality'),
Text('Photo quality',
style: TextStyle(fontSize: 15, color: CHARCOAL)),
Row(
children: [
@ -132,8 +127,7 @@ class _SettingsPageState extends State<SettingsPage> {
child: SwitchListTile(
contentPadding: EdgeInsets.zero,
title: Text(
AppLocalizations.of(context)!
.translate('i18n_label_photo_resizing'),
'Photo resizing',
style: TextStyle(fontSize: 15, color: CHARCOAL),
),
value: _photoResizing,
@ -152,8 +146,7 @@ class _SettingsPageState extends State<SettingsPage> {
child: SwitchListTile(
contentPadding: EdgeInsets.zero,
title: Text(
AppLocalizations.of(context)!
.translate('i18n_label_sound_photo'),
'Play sound when taking a photo',
style: TextStyle(fontSize: 15, color: CHARCOAL),
),
value: _photoSound,
@ -190,10 +183,7 @@ class _SettingsPageState extends State<SettingsPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_language'),
style: TextStyle(fontSize: 15, color: CHARCOAL)),
Text('Language', style: TextStyle(fontSize: 15, color: CHARCOAL)),
Row(
children: [
Text(
@ -245,8 +235,7 @@ class _SettingsPageState extends State<SettingsPage> {
Container(
margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_choose_quality'),
'Choose Quality',
style: GlobalStyle.chooseCourier,
),
),
@ -264,8 +253,7 @@ class _SettingsPageState extends State<SettingsPage> {
onChanged: (String? value) {
setState(() {
_photoQuality = value!;
SharedPrefs().photoQuality =
value; // TODO : Passer par un numéro plutot qu'une chaine qui sera traduite ...
SharedPrefs().photoQuality = value;
});
Navigator.pop(context);
},
@ -301,8 +289,7 @@ class _SettingsPageState extends State<SettingsPage> {
Container(
margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_choose_language'),
'Choose Language',
style: GlobalStyle.chooseCourier,
),
),
@ -322,15 +309,12 @@ class _SettingsPageState extends State<SettingsPage> {
onChanged: (String? value) {
setState(() {
_language = value!;
switch (value) {
case 'English':
SharedPrefs().langage = 'en';
eventBus.fire(ChangeLocaleEvent('en'));
break;
case 'French':
SharedPrefs().langage = 'fr';
eventBus.fire(ChangeLocaleEvent('fr'));
break;
default:
_language = 'French';

View File

@ -11,12 +11,10 @@ import 'package:mobdr/ui/account/settings.dart';
import 'package:mobdr/ui/account/log.dart';
import 'package:mobdr/ui/general/notification.dart';
import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/ui/appstore/updatecheck.dart';
import 'package:flutter/material.dart';
import 'package:mobdr/ui/authentication/signin.dart';
import 'dart:convert';
import 'package:mobdr/main.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class TabAccountPage extends StatefulWidget {
@override
@ -52,7 +50,7 @@ class _TabAccountPageState extends State<TabAccountPage>
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_menu_account'),
'Account',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -74,22 +72,11 @@ class _TabAccountPageState extends State<TabAccountPage>
padding: EdgeInsets.all(16),
children: [
_createAccountInformation(),
_createListMenu(
AppLocalizations.of(context)!.translate('i18n_menu_settings'),
SettingsPage()),
_createListMenu('Settings', SettingsPage()),
_reusableWidget.divider1(),
_createListMenu(
AppLocalizations.of(context)!.translate('i18n_menu_about'),
AboutPage()),
_createListMenu('About', AboutPage()),
_reusableWidget.divider1(),
_createListMenu(
AppLocalizations.of(context)!.translate('i18n_menu_show_logs'),
LogPage()),
_reusableWidget.divider1(),
_createListMenu(
AppLocalizations.of(context)!
.translate('i18n_menu_check_version'),
UpdateCheckPage()),
_createListMenu('Show logs', LogPage()),
_reusableWidget.divider1(),
Container(
margin: EdgeInsets.fromLTRB(0, 18, 0, 0),
@ -121,9 +108,7 @@ class _TabAccountPageState extends State<TabAccountPage>
Icon(Icons.power_settings_new,
size: 20, color: ASSENT_COLOR),
SizedBox(width: 8),
Text(
AppLocalizations.of(context)!
.translate('i18n_label_sign_out'),
Text('Sign Out',
style: TextStyle(fontSize: 15, color: ASSENT_COLOR)),
],
),

View File

@ -1,182 +0,0 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:ota_update/ota_update.dart';
import 'package:http/http.dart' as http;
import 'package:mobdr/service/shared_prefs.dart';
import 'package:mobdr/config/constant.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class UpdateCheckPage extends StatefulWidget {
@override
_UpdateCheckPageState createState() => _UpdateCheckPageState();
}
class _UpdateCheckPageState extends State<UpdateCheckPage> {
OtaEvent? currentEvent = null;
String _currentVersion = SharedPrefs().appVersion;
String _latestVersion = '';
String _releaseDate = '';
List<String> _releaseNotes = [];
String _downloadLink = '';
String _checksum = '';
@override
void initState() {
super.initState();
_fetchLatestVersion();
}
Future<void> _fetchLatestVersion() async {
try {
final response = await http
.get(Uri.parse(DOMAIN_CHECK_VERSION + '/deploy/mobdr/version.json'));
final data = jsonDecode(response.body);
setState(() {
_latestVersion = data['latest_version'];
_releaseDate = data['release_date'];
_releaseNotes = List<String>.from(data['release_notes']);
_downloadLink = data['download_link'];
_checksum = data['checksum'];
});
} catch (e) {
print('Error retrieving latest version : $e');
}
}
Future<void> _doUpdate() async {
try {
OtaUpdate()
.execute(
_downloadLink,
// OPTIONAL
destinationFilename: 'app_release.apk',
//OPTIONAL, ANDROID ONLY - ABILITY TO VALIDATE CHECKSUM OF FILE:
sha256checksum: _checksum,
)
.listen(
(OtaEvent event) {
setState(() => currentEvent = event);
},
);
} catch (e) {
print('Failed to make OTA update. Details: $e');
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context)!
.translate('i18n_menu_check_update')),
),
body: Center(
child: currentEvent == null
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_current_version'),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
Text(
_currentVersion,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
color: Colors.red,
),
),
SizedBox(height: 16),
Text(
AppLocalizations.of(context)!
.translate('i18n_label_available_version'),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
_latestVersion,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
color: Colors.green,
),
),
if (_currentVersion != _latestVersion) ...[
SizedBox(height: 16),
Text(
'${AppLocalizations.of(context)!.translate('i18n_label_publication_date')} : $_releaseDate',
style: TextStyle(fontWeight: FontWeight.bold),
),
SizedBox(height: 8),
Text(
AppLocalizations.of(context)!
.translate('i18n_label_release_notes') + ' :',
style: TextStyle(fontWeight: FontWeight.bold),
),
for (String note in _releaseNotes) ...[
SizedBox(height: 4),
Text('- $note'),
],
SizedBox(height: 16),
ElevatedButton(
onPressed: _doUpdate,
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_update'),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.blue,
),
),
] else ...[
SizedBox(height: 32),
Text(
AppLocalizations.of(context)!
.translate('i18n_label_latest_version'),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
],
],
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'OTA status',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
),
),
SizedBox(height: 32),
Text('${currentEvent!.status}'),
SizedBox(height: 16),
Text(
'${currentEvent!.value}',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
)
],
)),
);
}
}

View File

@ -6,7 +6,6 @@ import 'package:mobdr/config/global_style.dart';
import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class NotificationPage extends StatefulWidget {
@override
@ -40,7 +39,8 @@ class _NotificationPageState extends State<NotificationPage> {
color: GlobalStyle.appBarIconThemeColor,
),
elevation: GlobalStyle.appBarElevation,
title: Text(AppLocalizations.of(context)!.translate('i18n_menu_notification'),
title: Text(
'Notification',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,

View File

@ -11,7 +11,6 @@ import 'package:mobdr/config/constant.dart';
import 'package:mobdr/events.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class HomePage extends StatefulWidget {
@override
@ -145,7 +144,7 @@ class _HomePageState extends State<HomePage>
icon: Icon(Icons.web),
),
BottomNavigationBarItem(
label: AppLocalizations.of(context)!.translate('i18n_menu_account'),
label: 'Account',
icon: Icon(Icons.person_outline),
),
],

View File

@ -8,6 +8,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:badges/badges.dart' as badges;
import 'package:mobdr/main.dart';
@ -38,12 +39,13 @@ class _TabHomePageState extends State<TabHomePage>
late StreamSubscription subVisitPhotoCountEvent;
late StreamSubscription subRefreshCalendarEvent;
late StreamSubscription subChangeLocaleEvent;
// keep the state to do not refresh when switch navbar
@override
bool get wantKeepAlive => true;
String defaultLang = 'en';
DateTime _todayDate = DateTime.now();
late LanguageCubit _languageCubit;
@ -58,6 +60,12 @@ class _TabHomePageState extends State<TabHomePage>
_languageCubit = BlocProvider.of<LanguageCubit>(context);
_getLocale().then((val) {
setState(() {
defaultLang = val!;
});
});
loadData().then((_) {
setState(() {
// Listen refresh photo count event
@ -89,26 +97,6 @@ class _TabHomePageState extends State<TabHomePage>
loadData();
});
});
// Listen change locale event
subChangeLocaleEvent = eventBus.on<ChangeLocaleEvent>().listen((e) {
setState(() {
switch (e.language) {
case 'en':
SharedPrefs().lCode = 'en';
SharedPrefs().cCode = 'US';
_languageCubit.changeLanguage(SharedPrefs().language);
break;
case 'fr':
SharedPrefs().lCode = 'fr';
SharedPrefs().cCode = 'FR';
_languageCubit.changeLanguage(SharedPrefs().language);
break;
}
loadData();
});
});
});
}
@ -116,17 +104,30 @@ class _TabHomePageState extends State<TabHomePage>
void dispose() {
subRefreshCalendarEvent.cancel();
subVisitPhotoCountEvent.cancel();
subChangeLocaleEvent.cancel();
super.dispose();
}
Future<String?> _getLocale() async {
final SharedPreferences _pref = await SharedPreferences.getInstance();
String? lCode = _pref.getString('lCode');
return lCode;
}
void changeLocale(Locale locale) async {
final SharedPreferences _pref = await SharedPreferences.getInstance();
await _pref.setString('lCode', locale.languageCode);
await _pref.setString('cCode', locale.countryCode!);
_languageCubit.changeLanguage(locale);
defaultLang = locale.languageCode;
}
@override
Widget build(BuildContext context) {
// if we used AutomaticKeepAliveClientMixin, we must call super.build(context);
super.build(context);
final double boxImageSize = (MediaQuery.of(context).size.width / 3);
final formattedDate =
DateFormat('EEEE d MMMM y', SharedPrefs().locale).format(_todayDate);
DateFormat('EEEE d MMMM y', 'fr_FR').format(_todayDate);
return Scaffold(
appBar: AppBar(
@ -135,7 +136,7 @@ class _TabHomePageState extends State<TabHomePage>
title: Align(
alignment: Alignment.centerLeft,
child: Text(
AppLocalizations.of(context)!.translate('i18n_label_hello') +
AppLocalizations.of(context)!.translate('i18n_hello')! +
', ${SharedPrefs().prenom}',
style: GlobalStyle.appBarTitle,
),
@ -193,9 +194,7 @@ class _TabHomePageState extends State<TabHomePage>
padding: EdgeInsets.fromLTRB(16, 8, 0, 0),
child: Row(
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_last_visit_access'), style: GlobalStyle.horizontalTitle),
Text('Last visit access', style: GlobalStyle.horizontalTitle),
],
),
),
@ -216,9 +215,7 @@ class _TabHomePageState extends State<TabHomePage>
padding: EdgeInsets.fromLTRB(16, 16, 16, 0),
child: Row(
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_today_visits'), style: GlobalStyle.horizontalTitle),
Text('Today Visits', style: GlobalStyle.horizontalTitle),
Container(
child: Padding(
padding: const EdgeInsets.symmetric(
@ -251,8 +248,7 @@ class _TabHomePageState extends State<TabHomePage>
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_synchronize'),
'Synchronize',
style: TextStyle(
color: Colors.blue,
fontSize: 16,
@ -294,7 +290,7 @@ class _TabHomePageState extends State<TabHomePage>
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(AppLocalizations.of(context)!.translate('i18n_label_previous_visits'), style: GlobalStyle.horizontalTitle),
Text('Previous Visits', style: GlobalStyle.horizontalTitle),
],
),
),

View File

@ -34,8 +34,8 @@ class _OnBoardingPageState extends State<OnBoardingPage> {
PageModel(
color: Colors.white,
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-synchro.png',
title: 'MP4 synchronization',
body: 'Synchronize your data quickly and easily with MP4 :)',
title: 'MP4 synchronisation',
body: 'Synchronise your data quickly and easily with MP4 :)',
doAnimateImage: true),
PageModel(
color: Colors.white,

View File

@ -7,13 +7,10 @@ import 'package:mobdr/config/global_style.dart';
import 'package:mobdr/main.dart';
import 'package:mobdr/events.dart';
import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/ui/appstore/updatecheck.dart';
import 'package:mobdr/ui/authentication/signin.dart';
import 'package:mobdr/service/shared_prefs.dart';
import 'package:mobdr/network/api_provider.dart';
import 'package:mobdr/db/box_visit_photo.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class SynchronizationPage extends StatefulWidget {
@override
@ -42,6 +39,7 @@ class _SynchronizationPageState extends State<SynchronizationPage>
super.initState();
_apiProvider = ApiProvider();
_animationController = AnimationController(
vsync: this,
duration: Duration(seconds: 2),
@ -72,50 +70,8 @@ class _SynchronizationPageState extends State<SynchronizationPage>
} else {
_isInternetConnexion = true;
// check if the guid is valid
if (await _apiProvider.guidActif() == true) {
// synchronization start
await startSync();
// check is new version is available
if (await _apiProvider.checkAppVersion()) {
// Display the update message
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(AppLocalizations.of(context)!.translate('i18n_label_new_version')),
content: Text(AppLocalizations.of(context)!.translate('i18n_label_new_version_install')),
actions: [
TextButton(
child: Text(AppLocalizations.of(context)!.translate('i18n_label_no')),
onPressed: () {
Navigator.pop(context); // Closes the dialog box
},
),
TextButton(
child: Text(AppLocalizations.of(context)!
.translate('i18n_label_yes')),
onPressed: () {
Navigator.pop(context); // Closes the dialog box
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => UpdateCheckPage()),
);
},
),
],
);
},
);
}
} else {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SigninPage()),
);
}
startSync();
}
}
@ -244,7 +200,7 @@ class _SynchronizationPageState extends State<SynchronizationPage>
}
}
Future<void> startSync() async {
void startSync() async {
// disable navigation bar buttons
eventBus.fire(SynchronizationEvent(true));
@ -331,7 +287,7 @@ class _SynchronizationPageState extends State<SynchronizationPage>
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_label_data_synchronization'),
'Data synchronization',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -379,11 +335,10 @@ class _SynchronizationPageState extends State<SynchronizationPage>
SizedBox(height: 10),
Text(
!_isInternetConnexion
? AppLocalizations.of(context)!
.translate('i18n_label_no_internet')
? "No internet connection ..."
: (SharedPrefs().lastCalendarRefresh.isNotEmpty
? SharedPrefs().lastCalendarRefresh
: AppLocalizations.of(context)!.translate('i18n_label_never')),
: "Never"),
style: TextStyle(
fontSize: 16,
color: !_isInternetConnexion
@ -399,7 +354,7 @@ class _SynchronizationPageState extends State<SynchronizationPage>
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
AppLocalizations.of(context)!.translate('i18n_label_sync_logs'),
'Sync Logs',
style: TextStyle(fontSize: 16),
),
Switch(
@ -415,9 +370,8 @@ class _SynchronizationPageState extends State<SynchronizationPage>
SizedBox(height: 20),
SyncItem(
icon: Icons.business,
title: AppLocalizations.of(context)!.translate('i18n_menu_backoffice'),
description: AppLocalizations.of(context)!
.translate('i18n_label_backoffice_synchronization'),
title: 'Backoffice',
description: 'Synchronisation des données du backoffice',
isSyncing: _isSyncing,
syncCompleted: _syncCompleted,
isError: _syncCompleted && !_backofficeSyncCompleted,
@ -425,9 +379,8 @@ class _SynchronizationPageState extends State<SynchronizationPage>
SizedBox(height: 20),
SyncItem(
icon: Icons.photo,
title: AppLocalizations.of(context)!.translate('i18n_menu_photos'),
description: AppLocalizations.of(context)!
.translate('i18n_label_photos_synchronization'),
title: 'Photos',
description: 'Synchronisation des photos',
isSyncing: _isSyncing,
syncCompleted: _syncCompleted,
isError: _syncCompleted && !_photosSyncCompleted,
@ -435,9 +388,8 @@ class _SynchronizationPageState extends State<SynchronizationPage>
SizedBox(height: 20),
SyncItem(
icon: Icons.warning,
title: AppLocalizations.of(context)!.translate('i18n_menu_log'),
description: AppLocalizations.of(context)!
.translate('i18n_label_logs_synchronization'),
title: 'Log',
description: 'Synchronisation des journaux d\'activité',
isSyncing: _isSyncing,
syncCompleted: _syncCompleted,
isError: _syncCompleted && !_logSyncCompleted,
@ -505,10 +457,8 @@ class SyncItem extends StatelessWidget {
SizedBox(width: 10),
Text(
isError
? AppLocalizations.of(context)!
.translate('i18n_label_synchronization_error')
: AppLocalizations.of(context)!
.translate('i18n_label_synchronization_complete'),
? 'Erreur de synchronisation'
: 'Synchronisation terminée',
style: TextStyle(
color: isError ? Colors.red : Colors.green,
fontWeight: FontWeight.bold,

View File

@ -7,7 +7,6 @@ import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:super_tag_editor/tag_editor.dart';
import 'package:super_tag_editor/widgets/rich_text_widget.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class PhotoTagPage extends StatefulWidget {
// variables corresponding to the data parameters
@ -71,8 +70,7 @@ class _PhotoTagPageState extends State<PhotoTagPage> {
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_label_edit_tag') +
' ...',
'Edit tags ...',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -98,9 +96,9 @@ class _PhotoTagPageState extends State<PhotoTagPage> {
_selectedTags.add(outstandingValue);
});
},
inputDecoration: InputDecoration(
inputDecoration: const InputDecoration(
border: InputBorder.none,
hintText: AppLocalizations.of(context)!.translate('i18n_label_enter_tags') + ' ...',
hintText: 'Enter tag ...',
),
onTagChanged: (newValue) {
setState(() {
@ -206,8 +204,7 @@ class _PhotoTagPageState extends State<PhotoTagPage> {
Navigator.pop(
context, _selectedTags.map((tag) => tag).toList());
},
child: new Text(
AppLocalizations.of(context)!.translate('i18n_label_save')),
child: const Text('Save'),
),
],
),

View File

@ -19,7 +19,6 @@ import 'package:mobdr/db/box_photo_competitor.dart';
import 'package:mobdr/model/visit_model.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
class VisitPhotoTypologyDetailPage extends StatefulWidget {
final VisitModel pp_visitModel;
@ -125,11 +124,11 @@ class _VisitPhotoTypologyDetailPageState
} else if (_errorMessage.isNotEmpty) {
return Center(
child: AlertDialog(
title: Text(AppLocalizations.of(context)!.translate('i18n_label_error')),
content: Text(AppLocalizations.of(context)!.translate('i18n_label_photo_not_found')),
title: Text("Erreur"),
content: Text("La photo est introuvable"),
actions: <Widget>[
TextButton(
child: Text(AppLocalizations.of(context)!.translate('i18n_label_ok')),
child: Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
@ -145,7 +144,7 @@ class _VisitPhotoTypologyDetailPageState
),
elevation: GlobalStyle.appBarElevation,
title: Text(
AppLocalizations.of(context)!.translate('i18n_label_photo'),
'Photo',
style: GlobalStyle.appBarTitle,
),
backgroundColor: GlobalStyle.appBarBackgroundColor,
@ -212,7 +211,7 @@ class _VisitPhotoTypologyDetailPageState
'LOG', 'MOBDR', 'Copier dans galerie', 0);
Fluttertoast.showToast(
msg: AppLocalizations.of(context)!.translate('i18n_label_photo_added_to_gallery'),
msg: 'Photo has been added to gallery',
toastLength: Toast.LENGTH_LONG);
} else {
// log tracker
@ -220,7 +219,7 @@ class _VisitPhotoTypologyDetailPageState
'Erreur copier dans galerie', 0);
Fluttertoast.showToast(
msg: AppLocalizations.of(context)!.translate('i18n_label_error_while_copying'),
msg: 'Error while copying!',
toastLength: Toast.LENGTH_LONG);
}
},
@ -234,9 +233,7 @@ class _VisitPhotoTypologyDetailPageState
borderRadius: BorderRadius.all(Radius.circular(
10) // <--- border radius here
)),
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_copy_to_gallery'),
child: Text('Copier dans galerie',
style: TextStyle(
color: SOFT_BLUE,
fontWeight: FontWeight.bold)),
@ -298,9 +295,7 @@ class _VisitPhotoTypologyDetailPageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_typology'), style: GlobalStyle.sectionTitle),
Text('Typologie', style: GlobalStyle.sectionTitle),
SizedBox(
height: 16,
),
@ -407,18 +402,16 @@ class _VisitPhotoTypologyDetailPageState
children: [
Row(
children: [
Text(AppLocalizations.of(context)!.translate('i18n_label_visibility'), style: GlobalStyle.sectionTitle),
Text('Visibility', style: GlobalStyle.sectionTitle),
],
),
SizedBox(height: 16),
_checkboxVisibility(value: 'private', primaryText: AppLocalizations.of(context)!
.translate('i18n_label_private_visibility')),
_checkboxVisibility(value: 'private', primaryText: 'Privée'),
Divider(
height: 32,
color: Colors.grey[400],
),
_checkboxVisibility(value: 'principal', primaryText: AppLocalizations.of(context)!
.translate('i18n_label_main_visibility'))
_checkboxVisibility(value: 'principal', primaryText: 'Principale')
],
),
);
@ -455,8 +448,7 @@ class _VisitPhotoTypologyDetailPageState
children: [
Row(
children: [
Text(AppLocalizations.of(context)!
.translate('i18n_label_tags'), style: GlobalStyle.sectionTitle),
Text('Tags', style: GlobalStyle.sectionTitle),
],
),
Wrap(
@ -484,9 +476,7 @@ class _VisitPhotoTypologyDetailPageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppLocalizations.of(context)!
.translate('i18n_label_competition'),
Text('Competitor',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
SizedBox(
height: 16,
@ -519,8 +509,7 @@ class _VisitPhotoTypologyDetailPageState
children: [
Icon(Icons.thumb_down, color: SOFT_BLUE),
SizedBox(width: 12),
Text(AppLocalizations.of(context)!
.translate('i18n_label_choose_competitor'),
Text('Choose Competitor',
style: TextStyle(
color: CHARCOAL,
fontWeight: FontWeight.bold)),
@ -568,8 +557,7 @@ class _VisitPhotoTypologyDetailPageState
),
Container(
margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
child: Text(AppLocalizations.of(context)!
.translate('i18n_label_choose_competitor'), style: GlobalStyle.chooseCourier),
child: Text('Choose Competitor', style: GlobalStyle.chooseCourier),
),
Flexible(
child: ListView.builder(

View File

@ -24,7 +24,6 @@ import 'package:mobdr/ui/reusable/reusable_widget.dart';
import 'package:mobdr/events.dart';
import 'package:mobdr/service/plausible.dart';
import 'package:mobdr/service/logger_util.dart';
import 'package:mobdr/cubit/language/app_localizations.dart';
extension FileNameExtension on File {
String getFileName() {
@ -183,8 +182,7 @@ class _VisitPhotoTypologyListPageState
borderRadius: BorderRadius.all(Radius.circular(
10) // <--- border radius here
)),
child: Text(
AppLocalizations.of(context)!.translate('i18n_label_take_photos'),
child: Text('Prendre des photos',
style: TextStyle(
color: SOFT_BLUE, fontWeight: FontWeight.bold)),
),
@ -271,8 +269,7 @@ class _VisitPhotoTypologyListPageState
),
Container(height: 8),
Text(
AppLocalizations.of(context)!.translate('i18n_label_private_visibility') + " : ${photoData.photo_privee == 1 ?
AppLocalizations.of(context)!.translate('i18n_label_yes') : AppLocalizations.of(context)!.translate('i18n_label_no')}",
"Private : ${photoData.photo_privee == 1 ? 'Yes' : 'No'}",
style: TextStyle(fontSize: 13, color: _color2),
maxLines: 3,
overflow: TextOverflow.ellipsis,
@ -280,7 +277,7 @@ class _VisitPhotoTypologyListPageState
Container(
margin: EdgeInsets.only(top: 5),
child: Text(
'${photoData.tags.isNotEmpty ? (photoData.tags.length > 53 ? '${photoData.tags.substring(0, 50)}...' : photoData.tags) : AppLocalizations.of(context)!.translate('i18n_label_notag')}',
'${photoData.tags.isNotEmpty ? (photoData.tags.length > 53 ? '${photoData.tags.substring(0, 50)}...' : photoData.tags) : "notag"}',
style: TextStyle(
fontSize: 13, fontWeight: FontWeight.bold),
),
@ -331,7 +328,7 @@ class _VisitPhotoTypologyListPageState
});
Fluttertoast.showToast(
msg: AppLocalizations.of(context)!.translate('i18n_label_image_rotated'));
msg: 'The image has been rotated');
},
child: Container(
padding: EdgeInsets.fromLTRB(5, 0, 5, 0),
@ -367,7 +364,7 @@ class _VisitPhotoTypologyListPageState
});
Fluttertoast.showToast(
msg: AppLocalizations.of(context)!.translate('i18n_label_image_rotated'));
msg: 'The image has been rotated');
},
child: Container(
padding: EdgeInsets.fromLTRB(5, 0, 5, 0),
@ -475,9 +472,7 @@ class _VisitPhotoTypologyListPageState
onPressed: () {
Navigator.pop(context);
},
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_no'), style: TextStyle(color: SOFT_BLUE)));
child: Text('No', style: TextStyle(color: SOFT_BLUE)));
Widget continueButton = TextButton(
onPressed: () {
int removeIndex = index;
@ -513,13 +508,10 @@ class _VisitPhotoTypologyListPageState
LoggerUtil.dblog('LOG', 'MOBDR', 'Suppression photo', 0);
Fluttertoast.showToast(
msg: AppLocalizations.of(context)!
.translate('i18n_label_deleted_photo'),
msg: 'Photo has been deleted from your visit',
toastLength: Toast.LENGTH_SHORT);
},
child: Text(
AppLocalizations.of(context)!
.translate('i18n_label_yes'), style: TextStyle(color: SOFT_BLUE)));
child: Text('Yes', style: TextStyle(color: SOFT_BLUE)));
// set up the AlertDialog
AlertDialog alert = AlertDialog(
@ -527,11 +519,10 @@ class _VisitPhotoTypologyListPageState
borderRadius: BorderRadius.circular(10),
),
title: Text(
AppLocalizations.of(context)!.translate('i18n_label_delete_photo'),
'Delete Photo',
style: TextStyle(fontSize: 18),
),
content: Text(
AppLocalizations.of(context)!.translate('i18n_label_confirm_delete_photo'),
content: Text('Are you sure to delete this photo from your visit ?',
style: TextStyle(fontSize: 13, color: _color1)),
actions: [
cancelButton,

View File

@ -7,16 +7,12 @@
#include "generated_plugin_registrant.h"
#include <audioplayers_linux/audioplayers_linux_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) objectbox_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ObjectboxFlutterLibsPlugin");
objectbox_flutter_libs_plugin_register_with_registrar(objectbox_flutter_libs_registrar);

View File

@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_linux
file_selector_linux
objectbox_flutter_libs
)

View File

@ -8,23 +8,21 @@ import Foundation
import audioplayers_darwin
import connectivity_plus
import device_info_plus
import file_selector_macos
import objectbox_flutter_libs
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
import sqflite
import wakelock_plus
import wakelock_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
ObjectboxFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "ObjectboxFlutterLibsPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
}

View File

@ -1,6 +1,4 @@
PODS:
- audioplayers_darwin (0.0.1):
- FlutterMacOS
- connectivity_plus (0.0.1):
- FlutterMacOS
- ReachabilitySwift
@ -30,14 +28,13 @@ PODS:
- FlutterMacOS
DEPENDENCIES:
- audioplayers_darwin (from `Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos`)
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`)
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- objectbox_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
- wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`)
@ -48,8 +45,6 @@ SPEC REPOS:
- ReachabilitySwift
EXTERNAL SOURCES:
audioplayers_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos
connectivity_plus:
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos
device_info_plus:
@ -61,16 +56,15 @@ EXTERNAL SOURCES:
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
sqflite:
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos
wakelock_macos:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos
SPEC CHECKSUMS:
audioplayers_darwin: dcad41de4fbd0099cb3749f7ab3b0cb8f70b810c
connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24

View File

@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.2.3+1
version: 0.0.1+1
environment:
sdk: '>=2.19.0 <3.0.0'
@ -32,7 +32,7 @@ dependencies:
sdk: flutter
# https://pub.dev/packages/dio
dio: ^5.3.3
dio: 5.1.1
# https://pub.dev/packages/objectbox
objectbox: ^2.0.0
@ -40,34 +40,34 @@ dependencies:
# https://pub.dev/packages
objectbox_flutter_libs: any
# https://pub.dev/packages/pin_code_fields
pin_code_fields: ^8.0.1
# https://pub.dev/packages
pin_code_fields: 7.4.0
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: 1.0.6
fluttertoast: 8.2.2
cupertino_icons: 1.0.5
fluttertoast: 8.1.3
# https://pub.dev/packages/package_info_plus
package_info_plus: ^4.2.0
package_info_plus: ^3.0.3
# https://pub.dev/packages/flutter_bloc
flutter_bloc: ^8.1.3
flutter_bloc: 8.1.2
# https://pub.dev/packages/wakelock_plus
wakelock_plus: ^1.1.3
# https://pub.dev/packages/wakelock
wakelock: ^0.6.2
# https://pub.dev/packages/image_picker
image_picker: ^1.0.4
image_picker: ^0.8.7+4
# https://pub.dev/packages/camera
camera: ^0.10.5+2
# https://pub.dev/packages/audioplayers
audioplayers: ^5.2.0
audioplayers: ^4.1.0
# https://pub.dev/packages/image
image: ^4.0.17
@ -76,13 +76,13 @@ dependencies:
flutter_image_compress: ^2.0.3
# https://pub.dev/packages/super_tag_editor
super_tag_editor: ^0.2.0
super_tag_editor: ^0.1.1
# https://pub.dev/packages/cached_network_image
cached_network_image: 3.3.0
cached_network_image: 3.2.3
# https://pub.dev/packages/intl
intl: 0.18.1
intl: 0.17.0
# https://pub.dev/packages/carousel_slider
carousel_slider: 4.2.1
@ -91,15 +91,15 @@ dependencies:
shared_preferences: ^2.1.0
# https://pub.dev/packages/universal_io/
universal_io: ^2.2.2
universal_io: 2.2.0
# https://pub.dev/packages/xml
xml: ^6.3.0
xml: ^6.2.2
# https://pub.dev/packages/device_info_plus/
device_info_plus: ^9.1.0
device_info_plus: ^8.2.0
# https://pub.dev/packages/webview_flutter/
# https://pwebview_flutterub.dev/packages/webview_flutter/
# MP4
webview_flutter: ^4.2.1
@ -107,22 +107,19 @@ dependencies:
event_bus_plus: ^0.6.1
# https://pub.dev/packages/badges
badges: ^3.1.2
badges: ^3.1.1
# https://pub.dev/packages/connectivity_plus
connectivity_plus: ^5.0.1
connectivity_plus: ^4.0.1
# https://pub.dev/packages/logger
logger: ^1.4.0
logger: ^1.3.0
# https://pub.dev/packages/image_gallery_saver
image_gallery_saver: ^2.0.1
# https://pub.dev/packages/permission_handler
permission_handler: ^11.0.1
# https://pub.dev/packages/ota_update
ota_update: ^5.1.0
permission_handler: 10.3.0
# hhttps://pub.dev/packages/timelines
#timelines: ^0.1.0
@ -206,5 +203,11 @@ flutter:
- assets/lang/fr.json
- assets/lang/en.json
- assets/lang/id.json
- assets/lang/ar.json
- assets/lang/zh.json
- assets/lang/hi.json
- assets/lang/th.json
- assets/lang/tk.json
- assets/sounds/camera-shutter-click.mp3

View File

@ -1,11 +0,0 @@
# To-Do List
## Frontend Developer
- [ ] voir si des print() sont inutiles
- [ ] Dans les typologies pouvoir filtrer que les catégories avec prise de photos effectives
- [ ] vérifier si dblog tous en francais ou en anglais
## Backend Developer
- [ ]

View File

@ -8,7 +8,6 @@
#include <audioplayers_windows/audioplayers_windows_plugin.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <file_selector_windows/file_selector_windows.h>
#include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
@ -17,8 +16,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
ObjectboxFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ObjectboxFlutterLibsPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(

View File

@ -5,7 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_windows
connectivity_plus
file_selector_windows
objectbox_flutter_libs
permission_handler_windows
)