diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/lib/configuration/app_keys.dart b/lib/configuration/app_keys.dart index d2aa13d..cc2093d 100644 --- a/lib/configuration/app_keys.dart +++ b/lib/configuration/app_keys.dart @@ -13,4 +13,6 @@ class ApplicationKeys { static const taskSaveScreen = Key('__taskSaveScreen__'); static const taskListScreen = Key('__taskListScreen__'); static const taskDetailScreen = Key('__taskDetailScreen__'); + static const languageScreen = Key('__languageScreen__'); + } diff --git a/lib/configuration/routes.dart b/lib/configuration/routes.dart index 421e6f5..fa8db33 100644 --- a/lib/configuration/routes.dart +++ b/lib/configuration/routes.dart @@ -13,6 +13,7 @@ class ApplicationRoutes { static final account = '/account'; static final users = '/users'; static final tasks = '/tasks'; + static final language = '/language'; // static final tasksDetail = '/tasks/:id'; // static final taskNew = '/tasks/new'; // static final taskEdit = '/tasks/:id/edit'; diff --git a/lib/data/models/menu.dart b/lib/data/models/menu.dart index b1d131a..6befa69 100644 --- a/lib/data/models/menu.dart +++ b/lib/data/models/menu.dart @@ -1,17 +1,11 @@ import 'package:dart_json_mapper/dart_json_mapper.dart'; import 'package:equatable/equatable.dart'; -/// menu object -/// example: -/// id name description url icon order_priority active parent_id level -// 1 home home / icon 0 1 0 -// 2 account account branch icon 4 1 1 1 -// 3 logout logout /logout icon 1 1 2 2 -// 4 login login /login icon 2 1 2 2 -// 5 settings settings branch icon 3 1 1 1 +import 'package:dart_json_mapper/dart_json_mapper.dart'; @jsonSerializable class Menu extends Equatable { + @JsonProperty(name: 'id') final int id; @@ -33,37 +27,26 @@ class Menu extends Equatable { @JsonProperty(name: 'active') final bool active; - @JsonProperty(name: 'parentId') - final int? parentId; + @JsonProperty(name: 'parent') + final Menu? parent; @JsonProperty(name: 'level') final int level; + // salesPersonCode and salesPersonName + const Menu({ - this.id = 1, + this.id = 0, this.name = '', this.description = '', this.url = '', this.icon = '', this.orderPriority = 0, this.active = false, - this.parentId, + this.parent, this.level = 0, }); - @override - List get props => [ - id, - name, - description, - url, - icon, - orderPriority, - active, - parentId, - level, - ]; - Menu copyWith({ int? id, String? name, @@ -72,7 +55,7 @@ class Menu extends Equatable { String? icon, int? orderPriority, bool? active, - int? parentId, + Menu? parent, int? level, }) { return Menu( @@ -83,8 +66,24 @@ class Menu extends Equatable { icon: icon ?? this.icon, orderPriority: orderPriority ?? this.orderPriority, active: active ?? this.active, - parentId: parentId ?? this.parentId, + parent: parent ?? this.parent, level: level ?? this.level, ); } + + @override + List get props => [ + id, + name, + description, + url, + icon, + orderPriority, + active, + parent, + level, + ]; + + @override + bool get stringify => true; } diff --git a/lib/data/repository/menu_repository.dart b/lib/data/repository/menu_repository.dart new file mode 100644 index 0000000..a2250b0 --- /dev/null +++ b/lib/data/repository/menu_repository.dart @@ -0,0 +1,256 @@ +import 'dart:convert'; + +import 'package:dart_json_mapper/dart_json_mapper.dart'; + +import '../models/menu.dart'; + +class MenuRepository { + MenuRepository(); + + Future> getMenus() async { + var obj = [ + { + "id": 2, + "name": "account", + "description": "account", + "url": "/account", + "icon": "account", + "orderPriority": 1, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 3, + "name": "logout", + "description": "logout", + "url": "/logout", + "icon": "logout", + "orderPriority": 2, + "active": true, + "parent": { + "id": 2, + "name": "account", + "description": "account", + "url": "/account", + "icon": "account", + "orderPriority": 1, + "active": true, + "level": 1 + }, + "level": 2 + }, + { + "id": 5, + "name": "settings", + "description": "settings", + "url": "/settings", + "icon": "cog-outline", + "orderPriority": 6, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 25, + "name": "language", + "description": "language", + "url": "/language", + "icon": "web", + "orderPriority": 1, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 8, + "name": "register", + "description": "register", + "url": "/register", + "icon": "account-tie", + "orderPriority": 2, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, { + "id": 20, + "name": " New account", + "description": "New account", + "url": "/account", + "icon": "account-tie", + "orderPriority": 2, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 9, + "name": "createOffer", + "description": "createOffer", + "url": "/salesPerson/createOffer", + "icon": "account-multiple-plus-outline", + "orderPriority": 1, + "active": true, + "parent": { + "id": 8, + "name": "salesPerson", + "description": "salesPerson", + "url": "/salesPerson", + "icon": "account-tie", + "orderPriority": 2, + "active": true, + "level": 1 + }, + "level": 2 + }, + { + "id": 10, + "name": "editOffer", + "description": "editOffer", + "url": "/salesPerson/editOffer", + "icon": "account-edit-outline", + "orderPriority": 2, + "active": true, + "parent": { + "id": 8, + "name": "salesPerson", + "description": "salesPerson", + "url": "/salesPerson", + "icon": "account-tie", + "orderPriority": 2, + "active": true, + "level": 1 + }, + "level": 2 + }, + { + "id": 11, + "name": "customer", + "description": "customer", + "url": "/customer", + "icon": "account-group-outline", + "orderPriority": 3, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 14, + "name": "dashboard", + "description": "dashboard", + "url": "/dashboard", + "icon": "finance", + "orderPriority": 5, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 20, + "name": "tasks", + "description": "tasks", + "url": "/tasks", + "icon": "file-chart", + "orderPriority": 4, + "active": true, + "parent": { + "id": 1, + "name": "home", + "description": "home", + "url": "/", + "icon": "icon", + "orderPriority": 0, + "active": true, + "level": 0 + }, + "level": 1 + }, + { + "id": 22, + "name": "login", + "description": "login", + "url": "/login", + "icon": "information", + "orderPriority": 1, + "active": true, + "parent": { + "id": 2, + "name": "account", + "description": "account", + "url": "/account", + "icon": "account", + "orderPriority": 1, + "active": true, + "level": 1 + }, + "level": 2 + } + ]; + List menus = JsonMapper.deserialize>(obj)!; + + return menus; + } +} diff --git a/lib/generated/intl/messages_all.dart b/lib/generated/intl/messages_all.dart index d86064c..3ddd679 100644 --- a/lib/generated/intl/messages_all.dart +++ b/lib/generated/intl/messages_all.dart @@ -11,6 +11,7 @@ import 'dart:async'; +import 'package:flutter/foundation.dart'; import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; import 'package:intl/src/intl_helpers.dart'; @@ -21,9 +22,9 @@ import 'messages_tr.dart' as messages_tr; typedef Future LibraryLoader(); Map _deferredLibraries = { - 'en': () => new Future.value(null), - 'fr': () => new Future.value(null), - 'tr': () => new Future.value(null), + 'en': () => new SynchronousFuture(null), + 'fr': () => new SynchronousFuture(null), + 'tr': () => new SynchronousFuture(null), }; MessageLookupByLibrary? _findExact(String localeName) { @@ -40,19 +41,18 @@ MessageLookupByLibrary? _findExact(String localeName) { } /// User programs should call this before using [localeName] for messages. -Future initializeMessages(String localeName) async { +Future initializeMessages(String localeName) { var availableLocale = Intl.verifiedLocale( - localeName, - (locale) => _deferredLibraries[locale] != null, - onFailure: (_) => null); + localeName, (locale) => _deferredLibraries[locale] != null, + onFailure: (_) => null); if (availableLocale == null) { - return new Future.value(false); + return new SynchronousFuture(false); } var lib = _deferredLibraries[availableLocale]; - await (lib == null ? new Future.value(false) : lib()); + lib == null ? new SynchronousFuture(false) : lib(); initializeInternalMessageLookup(() => new CompositeMessageLookup()); messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); - return new Future.value(true); + return new SynchronousFuture(true); } bool _messagesExistFor(String locale) { @@ -64,8 +64,8 @@ bool _messagesExistFor(String locale) { } MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { - var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, - onFailure: (_) => null); + var actualLocale = + Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); if (actualLocale == null) return null; return _findExact(actualLocale); } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 769f171..4d35f58 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,24 +20,46 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en'; + static String m0(translate) => "${Intl.select(translate, { + 'customer': 'Customers', + 'tasks': 'Tasks', + 'account': 'Account', + 'settings': 'Settings', + 'dashboard': 'Dashboard', + 'reports': 'Reports', + 'logout': 'Logout', + 'info': 'Info', + 'language': 'Language', + 'theme': 'Theme', + 'createOffer': 'Create Offer', + 'editOffer': 'List/Edit', + 'other': 'Other', + })}"; + final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "accountScreenTitle" : MessageLookupByLibrary.simpleMessage("Account"), - "drawerLogoutTitle" : MessageLookupByLibrary.simpleMessage("Logout"), - "drawerMenuHome" : MessageLookupByLibrary.simpleMessage("Home"), - "drawerSettingsTitle" : MessageLookupByLibrary.simpleMessage("Settings"), - "drawerTasks" : MessageLookupByLibrary.simpleMessage("Tasks"), - "firstName" : MessageLookupByLibrary.simpleMessage("First Name"), - "homeScreenTitle" : MessageLookupByLibrary.simpleMessage("Home"), - "locale" : MessageLookupByLibrary.simpleMessage("en"), - "loginScreenTitle" : MessageLookupByLibrary.simpleMessage("Login"), - "pageSettingsTitle" : MessageLookupByLibrary.simpleMessage("Settings"), - "save" : MessageLookupByLibrary.simpleMessage("Save"), - "settingsScreenTitle" : MessageLookupByLibrary.simpleMessage("Settings"), - "taskName" : MessageLookupByLibrary.simpleMessage("Task Name"), - "taskPrice" : MessageLookupByLibrary.simpleMessage("Task Price"), - "taskSaveScreenTitle" : MessageLookupByLibrary.simpleMessage("Save or Update Task"), - "tasksScreenTitle" : MessageLookupByLibrary.simpleMessage("Tasks"), - "title" : MessageLookupByLibrary.simpleMessage("Task Management App") - }; + static Map _notInlinedMessages(_) => { + "accountScreenTitle": MessageLookupByLibrary.simpleMessage("Account"), + "drawerLogoutTitle": MessageLookupByLibrary.simpleMessage("Logout"), + "drawerMenuHome": MessageLookupByLibrary.simpleMessage("Home"), + "drawerSettingsTitle": MessageLookupByLibrary.simpleMessage("Settings"), + "drawerTasks": MessageLookupByLibrary.simpleMessage("Tasks"), + "english": MessageLookupByLibrary.simpleMessage("English"), + "firstName": MessageLookupByLibrary.simpleMessage("First Name"), + "homeScreenTitle": MessageLookupByLibrary.simpleMessage("Home"), + "language_select": + MessageLookupByLibrary.simpleMessage("Select Language"), + "locale": MessageLookupByLibrary.simpleMessage("en"), + "loginScreenTitle": MessageLookupByLibrary.simpleMessage("Login"), + "pageSettingsTitle": MessageLookupByLibrary.simpleMessage("Settings"), + "save": MessageLookupByLibrary.simpleMessage("Save"), + "settingsScreenTitle": MessageLookupByLibrary.simpleMessage("Settings"), + "taskName": MessageLookupByLibrary.simpleMessage("Task Name"), + "taskPrice": MessageLookupByLibrary.simpleMessage("Task Price"), + "taskSaveScreenTitle": + MessageLookupByLibrary.simpleMessage("Save or Update Task"), + "tasksScreenTitle": MessageLookupByLibrary.simpleMessage("Tasks"), + "title": MessageLookupByLibrary.simpleMessage("Task Management App"), + "translate_menu_title": m0, + "turkish": MessageLookupByLibrary.simpleMessage("Turkish") + }; } diff --git a/lib/generated/intl/messages_fr.dart b/lib/generated/intl/messages_fr.dart index 8520b6a..2d8f054 100644 --- a/lib/generated/intl/messages_fr.dart +++ b/lib/generated/intl/messages_fr.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,24 +20,50 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'fr'; + static String m0(translate) => "${Intl.select(translate, { + 'customer': 'Customers', + 'tasks': 'Tasks', + 'account': 'Account', + 'settings': 'Settings', + 'dashboard': 'Dashboard', + 'reports': 'Reports', + 'logout': 'Logout', + 'info': 'Info', + 'language': 'Language', + 'theme': 'Theme', + 'createOffer': 'Create Offer', + 'editOffer': 'List/Edit', + 'other': 'Other', + })}"; + final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "accountScreenTitle" : MessageLookupByLibrary.simpleMessage("Compte"), - "drawerLogoutTitle" : MessageLookupByLibrary.simpleMessage("Déconnexion"), - "drawerMenuHome" : MessageLookupByLibrary.simpleMessage("Accueil"), - "drawerSettingsTitle" : MessageLookupByLibrary.simpleMessage("Paramètres"), - "drawerTasks" : MessageLookupByLibrary.simpleMessage("Tâches"), - "firstName" : MessageLookupByLibrary.simpleMessage(""), - "homeScreenTitle" : MessageLookupByLibrary.simpleMessage("Tâches"), - "locale" : MessageLookupByLibrary.simpleMessage("fr"), - "loginScreenTitle" : MessageLookupByLibrary.simpleMessage("Connexion"), - "pageSettingsTitle" : MessageLookupByLibrary.simpleMessage(""), - "save" : MessageLookupByLibrary.simpleMessage(""), - "settingsScreenTitle" : MessageLookupByLibrary.simpleMessage("Paramètres"), - "taskName" : MessageLookupByLibrary.simpleMessage(""), - "taskPrice" : MessageLookupByLibrary.simpleMessage(""), - "taskSaveScreenTitle" : MessageLookupByLibrary.simpleMessage("Enregistrer une tâche"), - "tasksScreenTitle" : MessageLookupByLibrary.simpleMessage("Tâches"), - "title" : MessageLookupByLibrary.simpleMessage("Application de gestion des tâches") - }; + static Map _notInlinedMessages(_) => { + "accountScreenTitle": MessageLookupByLibrary.simpleMessage("Compte"), + "drawerLogoutTitle": + MessageLookupByLibrary.simpleMessage("Déconnexion"), + "drawerMenuHome": MessageLookupByLibrary.simpleMessage("Accueil"), + "drawerSettingsTitle": + MessageLookupByLibrary.simpleMessage("Paramètres"), + "drawerTasks": MessageLookupByLibrary.simpleMessage("Tâches"), + "english": MessageLookupByLibrary.simpleMessage("English"), + "firstName": MessageLookupByLibrary.simpleMessage(""), + "homeScreenTitle": MessageLookupByLibrary.simpleMessage("Tâches"), + "language_select": + MessageLookupByLibrary.simpleMessage("Select Language"), + "locale": MessageLookupByLibrary.simpleMessage("fr"), + "loginScreenTitle": MessageLookupByLibrary.simpleMessage("Connexion"), + "pageSettingsTitle": MessageLookupByLibrary.simpleMessage(""), + "save": MessageLookupByLibrary.simpleMessage(""), + "settingsScreenTitle": + MessageLookupByLibrary.simpleMessage("Paramètres"), + "taskName": MessageLookupByLibrary.simpleMessage(""), + "taskPrice": MessageLookupByLibrary.simpleMessage(""), + "taskSaveScreenTitle": + MessageLookupByLibrary.simpleMessage("Enregistrer une tâche"), + "tasksScreenTitle": MessageLookupByLibrary.simpleMessage("Tâches"), + "title": MessageLookupByLibrary.simpleMessage( + "Application de gestion des tâches"), + "translate_menu_title": m0, + "turkish": MessageLookupByLibrary.simpleMessage("Turkish") + }; } diff --git a/lib/generated/intl/messages_tr.dart b/lib/generated/intl/messages_tr.dart index 2c4e055..2db3721 100644 --- a/lib/generated/intl/messages_tr.dart +++ b/lib/generated/intl/messages_tr.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,24 +20,46 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'tr'; + static String m0(translate) => "${Intl.select(translate, { + 'customer': 'Müşteriler', + 'tasks': 'Tasklar', + 'account': 'Hesabım', + 'settings': 'Ayarlar', + 'dashboard': 'Grafikler', + 'reports': 'Raporlar', + 'logout': 'Çıkış', + 'info': 'Bilgiler', + 'language': 'Diller', + 'theme': 'Tema', + 'createOffer': 'Temsilci Oluştur', + 'editOffer': 'Listele/Düzenle ', + 'other': 'Diğer', + })}"; + final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "accountScreenTitle" : MessageLookupByLibrary.simpleMessage("Hesapım"), - "drawerLogoutTitle" : MessageLookupByLibrary.simpleMessage("Çıkış Yap"), - "drawerMenuHome" : MessageLookupByLibrary.simpleMessage("Ana Sayfa"), - "drawerSettingsTitle" : MessageLookupByLibrary.simpleMessage("Ayarlar"), - "drawerTasks" : MessageLookupByLibrary.simpleMessage("Görevler"), - "firstName" : MessageLookupByLibrary.simpleMessage("Adı"), - "homeScreenTitle" : MessageLookupByLibrary.simpleMessage("Ana Sayfa"), - "locale" : MessageLookupByLibrary.simpleMessage("tr"), - "loginScreenTitle" : MessageLookupByLibrary.simpleMessage("Giriş Sayfası"), - "pageSettingsTitle" : MessageLookupByLibrary.simpleMessage("Settings"), - "save" : MessageLookupByLibrary.simpleMessage("Kaydet"), - "settingsScreenTitle" : MessageLookupByLibrary.simpleMessage("Ayarlar"), - "taskName" : MessageLookupByLibrary.simpleMessage("Adı"), - "taskPrice" : MessageLookupByLibrary.simpleMessage("Fiyat"), - "taskSaveScreenTitle" : MessageLookupByLibrary.simpleMessage("Görev Kaydet/Güncelle"), - "tasksScreenTitle" : MessageLookupByLibrary.simpleMessage("Görevler"), - "title" : MessageLookupByLibrary.simpleMessage("Görev Yönetim Sistemi") - }; + static Map _notInlinedMessages(_) => { + "accountScreenTitle": MessageLookupByLibrary.simpleMessage("Hesapım"), + "drawerLogoutTitle": MessageLookupByLibrary.simpleMessage("Çıkış Yap"), + "drawerMenuHome": MessageLookupByLibrary.simpleMessage("Ana Sayfa"), + "drawerSettingsTitle": MessageLookupByLibrary.simpleMessage("Ayarlar"), + "drawerTasks": MessageLookupByLibrary.simpleMessage("Görevler"), + "english": MessageLookupByLibrary.simpleMessage("İngilizce"), + "firstName": MessageLookupByLibrary.simpleMessage("Adı"), + "homeScreenTitle": MessageLookupByLibrary.simpleMessage("Ana Sayfa"), + "language_select": MessageLookupByLibrary.simpleMessage("Dil Seçimi"), + "locale": MessageLookupByLibrary.simpleMessage("tr"), + "loginScreenTitle": + MessageLookupByLibrary.simpleMessage("Giriş Sayfası"), + "pageSettingsTitle": MessageLookupByLibrary.simpleMessage("Settings"), + "save": MessageLookupByLibrary.simpleMessage("Kaydet"), + "settingsScreenTitle": MessageLookupByLibrary.simpleMessage("Ayarlar"), + "taskName": MessageLookupByLibrary.simpleMessage("Adı"), + "taskPrice": MessageLookupByLibrary.simpleMessage("Fiyat"), + "taskSaveScreenTitle": + MessageLookupByLibrary.simpleMessage("Görev Kaydet/Güncelle"), + "tasksScreenTitle": MessageLookupByLibrary.simpleMessage("Görevler"), + "title": MessageLookupByLibrary.simpleMessage("Görev Yönetim Sistemi"), + "translate_menu_title": m0, + "turkish": MessageLookupByLibrary.simpleMessage("Türkçe") + }; } diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 3622c29..d0f9b49 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -10,7 +10,7 @@ import 'intl/messages_all.dart'; // ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars // ignore_for_file: join_return_with_assignment, prefer_final_in_for_each -// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes class S { S(); @@ -18,28 +18,31 @@ class S { static S? _current; static S get current { - assert(_current != null, 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.'); + assert(_current != null, + 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.'); return _current!; } - static const AppLocalizationDelegate delegate = - AppLocalizationDelegate(); + static const AppLocalizationDelegate delegate = AppLocalizationDelegate(); static Future load(Locale locale) { - final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString(); - final localeName = Intl.canonicalizedLocale(name); + final name = (locale.countryCode?.isEmpty ?? false) + ? locale.languageCode + : locale.toString(); + final localeName = Intl.canonicalizedLocale(name); return initializeMessages(localeName).then((_) { Intl.defaultLocale = localeName; final instance = S(); S._current = instance; - + return instance; }); - } + } static S of(BuildContext context) { final instance = S.maybeOf(context); - assert(instance != null, 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?'); + assert(instance != null, + 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?'); return instance!; } @@ -216,6 +219,61 @@ class S { args: [], ); } + + /// `{translate, select, customer{Customers} tasks{Tasks} account{Account} settings{Settings} dashboard{Dashboard}reports{Reports} logout{Logout} info{Info} language{Language} theme{Theme} createOffer{Create Offer} editOffer{List/Edit} other{Other}}` + String translate_menu_title(Object translate) { + return Intl.select( + translate, + { + 'customer': 'Customers', + 'tasks': 'Tasks', + 'account': 'Account', + 'settings': 'Settings', + 'dashboard': 'Dashboard', + 'reports': 'Reports', + 'logout': 'Logout', + 'info': 'Info', + 'language': 'Language', + 'theme': 'Theme', + 'createOffer': 'Create Offer', + 'editOffer': 'List/Edit', + 'other': 'Other', + }, + name: 'translate_menu_title', + desc: '', + args: [translate], + ); + } + + /// `Select Language` + String get language_select { + return Intl.message( + 'Select Language', + name: 'language_select', + desc: '', + args: [], + ); + } + + /// `Turkish` + String get turkish { + return Intl.message( + 'Turkish', + name: 'turkish', + desc: '', + args: [], + ); + } + + /// `English` + String get english { + return Intl.message( + 'English', + name: 'english', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { @@ -244,4 +302,4 @@ class AppLocalizationDelegate extends LocalizationsDelegate { } return false; } -} \ No newline at end of file +} diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index c335ccc..655f256 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -16,7 +16,9 @@ "firstName": "First Name", "taskPrice": "Task Price", "taskName": "Task Name", - "save": "Save" - - + "save": "Save", + "translate_menu_title": "{translate, select, customer{Customers} tasks{Tasks} account{Account} settings{Settings} dashboard{Dashboard}reports{Reports} logout{Logout} info{Info} language{Language} theme{Theme} createOffer{Create Offer} editOffer{List/Edit} other{Other}}", + "language_select": "Select Language", + "turkish": "Turkish", + "english": "English" } \ No newline at end of file diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 9236651..3d7274d 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -16,6 +16,9 @@ "firstName": "", "taskPrice": "", "taskName" : "", - "save": "" - + "save": "", + "translate_menu_title": "{translate, select, customer{Customers} tasks{Tasks} account{Account} settings{Settings} dashboard{Dashboard}reports{Reports} logout{Logout} info{Info} language{Language} theme{Theme} createOffer{Create Offer} editOffer{List/Edit} other{Other}}", + "language_select": "Select Language", + "turkish": "Turkish", + "english": "English" } \ No newline at end of file diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index 1d19511..396faf9 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -16,5 +16,9 @@ "firstName": "Adı", "taskPrice": "Fiyat", "taskName": "Adı", - "save": "Kaydet" + "save": "Kaydet", + "translate_menu_title": "{translate, select,customer{Müşteriler} tasks{Tasklar} account{Hesabım} settings{Ayarlar} dashboard{Grafikler} reports{Raporlar} logout{Çıkış} info{Bilgiler} language{Diller} theme{Tema} createOffer{Temsilci Oluştur} editOffer{Listele/Düzenle } other{Diğer}}", + "language_select": "Dil Seçimi", + "turkish": "Türkçe", + "english": "İngilizce" } \ No newline at end of file diff --git a/lib/main/app.dart b/lib/main/app.dart index dd95181..cc1a5ec 100644 --- a/lib/main/app.dart +++ b/lib/main/app.dart @@ -2,6 +2,7 @@ import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc_advance/data/repository/task_repository.dart'; +import 'package:flutter_bloc_advance/presentation/screen/settings/language_widget.dart'; import 'package:flutter_bloc_advance/presentation/screen/task/list/bloc/task_list.dart'; import 'package:flutter_bloc_advance/presentation/screen/task/list/task_list_screen.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -94,6 +95,10 @@ class App extends StatelessWidget { ApplicationRoutes.tasks: (context) { return BlocProvider(create: (context) => TaskListBloc(taskRepository: TaskRepository()), child: TaskListScreen()); }, + ApplicationRoutes.language: (context) { + return BlocProvider(create: (context) => TaskListBloc(taskRepository: TaskRepository()), child: LanguageScreen()); + }, + // ApplicationRoutes.taskNew: (context) { // return BlocProvider(create: (context) => TaskSaveBloc(taskRepository: TaskRepository()), child: TaskSaveScreen()); // }, diff --git a/lib/main/main_local.mapper.g.dart b/lib/main/main_local.mapper.g.dart index 0df25c2..7a28572 100644 --- a/lib/main/main_local.mapper.g.dart +++ b/lib/main/main_local.mapper.g.dart @@ -2,25 +2,28 @@ // https://github.com/k-paxian/dart-json-mapper // @dart = 2.12 import 'package:dart_json_mapper/dart_json_mapper.dart' show JsonMapper, JsonMapperAdapter, SerializationOptions, DeserializationOptions, typeOf; -import 'package:flutter_bloc_advance/configuration/environment.dart' as x4 show Environment; -import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as x2 show JWTToken; +import 'package:flutter_bloc_advance/configuration/environment.dart' as x6 show Environment; +import 'package:flutter_bloc_advance/data/models/change_password.dart' as x2 show PasswordChangeDTO; +import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as x4 show JWTToken; +import 'package:flutter_bloc_advance/data/models/menu.dart' as x3 show Menu; import 'package:flutter_bloc_advance/data/models/task.dart' as x0 show Task; import 'package:flutter_bloc_advance/data/models/user.dart' as x1 show User; -import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as x3 show UserJWT; -import 'package:flutter_bloc_advance/presentation/common_blocs/account/account_bloc.dart' as x7 show AccountStatus; -import 'package:flutter_bloc_advance/presentation/screen/login/bloc/login_bloc.dart' as x8 show LoginStatus; -import 'package:flutter_bloc_advance/presentation/screen/settings/bloc/settings_bloc.dart' as x9 show SettingsStatus; -import 'package:flutter_bloc_advance/presentation/screen/task/list/bloc/task_list_bloc.dart' as x5 show TaskListStatus; -import 'package:flutter_bloc_advance/presentation/screen/task/save/bloc/task_save_bloc.dart' as x6 show TaskSaveStatus; +import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as x5 show UserJWT; +import 'package:flutter_bloc_advance/presentation/common_blocs/account/account_bloc.dart' as x8 show AccountStatus; +import 'package:flutter_bloc_advance/presentation/screen/login/bloc/login_bloc.dart' as x9 show LoginStatus; +import 'package:flutter_bloc_advance/presentation/screen/settings/bloc/settings_bloc.dart' as x10 show SettingsStatus; +import 'package:flutter_bloc_advance/presentation/screen/task/list/bloc/task_list_bloc.dart' as x7 show TaskListStatus; // This file has been generated by the reflectable package. // https://github.com/dart-lang/reflectable. import 'dart:core'; import 'package:dart_json_mapper/src/model/annotations.dart' as prefix0; -import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as prefix3; +import 'package:flutter_bloc_advance/data/models/change_password.dart' as prefix3; +import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as prefix5; +import 'package:flutter_bloc_advance/data/models/menu.dart' as prefix4; import 'package:flutter_bloc_advance/data/models/task.dart' as prefix1; import 'package:flutter_bloc_advance/data/models/user.dart' as prefix2; -import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as prefix4; +import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as prefix6; // ignore_for_file: camel_case_types // ignore_for_file: implementation_imports @@ -35,7 +38,7 @@ import 'package:reflectable/src/reflectable_builder_based.dart' as r; // ignore:unused_import import 'package:reflectable/reflectable.dart' as r show Reflectable; -final _data = {const prefix0.JsonSerializable(): r.ReflectorData([r.NonGenericClassMirrorImpl(r'Task', r'.Task', 134217735, 0, const prefix0.JsonSerializable(), const [0, 1, 2, 14, 18], const [19, 20, 21, 22, 23, 14, 15, 16, 17], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', price = 0}) => b ? prefix1.Task(id: id, name: name, price: price) : null}, -1, 0, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'User', r'.User', 134217735, 1, const prefix0.JsonSerializable(), const [3, 4, 5, 6, 7, 8, 9, 10, 24, 33, 34, 35], const [36, 37, 21, 38, 23, 34, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, login = '', firstName = '', lastName = '', email = '', langKey = 'en', activated = false, imageUrl = ''}) => b ? prefix2.User(activated: activated, email: email, firstName: firstName, id: id, imageUrl: imageUrl, langKey: langKey, lastName: lastName, login: login) : null}, -1, 1, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'JWTToken', r'.JWTToken', 134217735, 2, const prefix0.JsonSerializable(), const [11, 39, 40, 43, 44], const [40, 39, 21, 43, 23, 41, 42], const [], -1, {}, {}, {r'': (bool b) => () => b ? prefix3.JWTToken() : null}, -1, 2, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'UserJWT', r'.UserJWT', 134217735, 3, const prefix0.JsonSerializable(), const [12, 13, 45, 46, 51, 52], const [46, 45, 21, 51, 23, 47, 48, 49, 50], const [], -1, {}, {}, {r'': (bool b) => (username, password) => b ? prefix4.UserJWT(username, password) : null}, -1, 3, const [], const [prefix0.jsonSerializable], null)], [r.VariableMirrorImpl(r'id', 67240965, 0, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 67240965, 0, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'price', 67240965, 0, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'price')]), r.VariableMirrorImpl(r'id', 67240965, 1, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'login', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'login')]), r.VariableMirrorImpl(r'firstName', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'firstName')]), r.VariableMirrorImpl(r'lastName', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'lastName')]), r.VariableMirrorImpl(r'email', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'email')]), r.VariableMirrorImpl(r'langKey', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'langKey')]), r.VariableMirrorImpl(r'activated', 67240965, 1, const prefix0.JsonSerializable(), -1, 6, 6, const [], const []), r.VariableMirrorImpl(r'imageUrl', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const []), r.VariableMirrorImpl(r'idToken', 67239941, 2, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'id_token')]), r.VariableMirrorImpl(r'username', 67239941, 3, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'username')]), r.VariableMirrorImpl(r'password', 67239941, 3, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'password')]), r.MethodMirrorImpl(r'copyWith', 2097154, 0, 0, 0, 0, const [], const [0, 1, 2], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 0, 15), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 1, 16), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 2, 17), r.MethodMirrorImpl(r'', 0, 0, -1, 0, 0, const [], const [3, 4, 5], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 7, 7, const [], const [6], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'noSuchMethod', 524290, -1, -1, -1, -1, const [], const [7], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'runtimeType', 2097155, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 1, 1, 1, 1, const [], const [8, 9, 10, 11, 12, 13, 14, 15], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 3, 25), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 4, 26), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 5, 27), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 6, 28), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 7, 29), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 8, 30), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 9, 31), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 10, 32), r.MethodMirrorImpl(r'props', 35651587, 1, -1, 12, 13, const [11], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 1, -1, 7, 7, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 1, -1, 1, 1, const [], const [16, 17, 18, 19, 20, 21, 22, 23], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 7, 7, const [], const [24], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, 2, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 2, -1, 7, 7, const [], const [25], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 11, 41), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 11, 42), r.MethodMirrorImpl(r'hashCode', 2097155, 2, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 64, 2, -1, 2, 2, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 3, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 3, -1, 7, 7, const [], const [27], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 12, 47), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 12, 48), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 13, 49), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 13, 50), r.MethodMirrorImpl(r'hashCode', 2097155, 3, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 0, 3, -1, 3, 3, const [], const [28, 29], const prefix0.JsonSerializable(), const [])], [r.ParameterMirrorImpl(r'id', 67252230, 14, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 14, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #name), r.ParameterMirrorImpl(r'price', 67252230, 14, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #price), r.ParameterMirrorImpl(r'id', 67255302, 18, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 67255302, 18, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #name), r.ParameterMirrorImpl(r'price', 67255302, 18, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #price), r.ParameterMirrorImpl(r'other', 134348806, 19, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'invocation', 134348806, 21, const prefix0.JsonSerializable(), -1, 15, 15, const [], const [], null, null), r.ParameterMirrorImpl(r'id', 67252230, 24, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #id), r.ParameterMirrorImpl(r'login', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #login), r.ParameterMirrorImpl(r'firstName', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #firstName), r.ParameterMirrorImpl(r'lastName', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #lastName), r.ParameterMirrorImpl(r'email', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #email), r.ParameterMirrorImpl(r'langKey', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #langKey), r.ParameterMirrorImpl(r'activated', 67252230, 24, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #activated), r.ParameterMirrorImpl(r'imageUrl', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #imageUrl), r.ParameterMirrorImpl(r'id', 67255302, 35, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #id), r.ParameterMirrorImpl(r'login', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #login), r.ParameterMirrorImpl(r'firstName', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #firstName), r.ParameterMirrorImpl(r'lastName', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #lastName), r.ParameterMirrorImpl(r'email', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #email), r.ParameterMirrorImpl(r'langKey', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], 'en', #langKey), r.ParameterMirrorImpl(r'activated', 67255302, 35, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], false, #activated), r.ParameterMirrorImpl(r'imageUrl', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #imageUrl), r.ParameterMirrorImpl(r'other', 134348806, 36, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 40, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'_idToken', 67240038, 42, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 46, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'username', 67240966, 52, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'password', 67240966, 52, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'_username', 67240038, 48, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'_password', 67240038, 50, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null)], [prefix1.Task, prefix2.User, prefix3.JWTToken, prefix4.UserJWT, int, String, bool, bool, String, int, Type, Object, const m.TypeValue().type, List, Object, Invocation], 4, {r'==': (dynamic instance) => (x) => instance == x, r'toString': (dynamic instance) => instance.toString, r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, r'hashCode': (dynamic instance) => instance.hashCode, r'runtimeType': (dynamic instance) => instance.runtimeType, r'copyWith': (dynamic instance) => instance.copyWith, r'id': (dynamic instance) => instance.id, r'name': (dynamic instance) => instance.name, r'price': (dynamic instance) => instance.price, r'stringify': (dynamic instance) => instance.stringify, r'login': (dynamic instance) => instance.login, r'firstName': (dynamic instance) => instance.firstName, r'lastName': (dynamic instance) => instance.lastName, r'email': (dynamic instance) => instance.email, r'langKey': (dynamic instance) => instance.langKey, r'activated': (dynamic instance) => instance.activated, r'imageUrl': (dynamic instance) => instance.imageUrl, r'props': (dynamic instance) => instance.props, r'idToken': (dynamic instance) => instance.idToken, r'username': (dynamic instance) => instance.username, r'password': (dynamic instance) => instance.password}, {r'idToken=': (dynamic instance, value) => instance.idToken = value, r'username=': (dynamic instance, value) => instance.username = value, r'password=': (dynamic instance, value) => instance.password = value}, null, [])}; +final _data = {const prefix0.JsonSerializable(): r.ReflectorData([r.NonGenericClassMirrorImpl(r'Task', r'.Task', 134217735, 0, const prefix0.JsonSerializable(), const [0, 1, 2, 25, 29], const [30, 31, 32, 33, 34, 25, 26, 27, 28], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', price = 0}) => b ? prefix1.Task(id: id, name: name, price: price) : null}, -1, 0, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'User', r'.User', 134217735, 1, const prefix0.JsonSerializable(), const [3, 4, 5, 6, 7, 8, 9, 10, 35, 44, 45, 46], const [47, 48, 32, 49, 34, 45, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, login = '', firstName = '', lastName = '', email = '', langKey = 'en', activated = false, imageUrl = ''}) => b ? prefix2.User(activated: activated, email: email, firstName: firstName, id: id, imageUrl: imageUrl, langKey: langKey, lastName: lastName, login: login) : null}, -1, 1, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'PasswordChangeDTO', r'.PasswordChangeDTO', 134217735, 2, const prefix0.JsonSerializable(), const [11, 12, 50, 51, 54, 55], const [51, 50, 32, 54, 34, 52, 53], const [], -1, {}, {}, {r'': (bool b) => ({currentPassword = '', newPassword = ''}) => b ? prefix3.PasswordChangeDTO(currentPassword: currentPassword, newPassword: newPassword) : null}, -1, 2, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'Menu', r'.Menu', 134217735, 3, const prefix0.JsonSerializable(), const [13, 14, 15, 16, 17, 18, 19, 20, 21, 56, 66, 67, 68], const [47, 48, 32, 49, 34, 67, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', description = '', url = '', icon = '', orderPriority = 0, active = false, parent, level = 0}) => b ? prefix4.Menu(active: active, description: description, icon: icon, id: id, level: level, name: name, orderPriority: orderPriority, parent: parent, url: url) : null}, -1, 3, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'JWTToken', r'.JWTToken', 134217735, 4, const prefix0.JsonSerializable(), const [22, 69, 70, 73, 74], const [70, 69, 32, 73, 34, 71, 72], const [], -1, {}, {}, {r'': (bool b) => () => b ? prefix5.JWTToken() : null}, -1, 4, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'UserJWT', r'.UserJWT', 134217735, 5, const prefix0.JsonSerializable(), const [23, 24, 75, 76, 81, 82], const [76, 75, 32, 81, 34, 77, 78, 79, 80], const [], -1, {}, {}, {r'': (bool b) => (username, password) => b ? prefix6.UserJWT(username, password) : null}, -1, 5, const [], const [prefix0.jsonSerializable], null)], [r.VariableMirrorImpl(r'id', 67240965, 0, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 67240965, 0, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'price', 67240965, 0, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'price')]), r.VariableMirrorImpl(r'id', 67240965, 1, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'login', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'login')]), r.VariableMirrorImpl(r'firstName', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'firstName')]), r.VariableMirrorImpl(r'lastName', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'lastName')]), r.VariableMirrorImpl(r'email', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'email')]), r.VariableMirrorImpl(r'langKey', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'langKey')]), r.VariableMirrorImpl(r'activated', 67240965, 1, const prefix0.JsonSerializable(), -1, 8, 8, const [], const []), r.VariableMirrorImpl(r'imageUrl', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const []), r.VariableMirrorImpl(r'currentPassword', 67240965, 2, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'currentPassword')]), r.VariableMirrorImpl(r'newPassword', 67240965, 2, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'newPassword')]), r.VariableMirrorImpl(r'id', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'description', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'description')]), r.VariableMirrorImpl(r'url', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'url')]), r.VariableMirrorImpl(r'icon', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'icon')]), r.VariableMirrorImpl(r'orderPriority', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'orderPriority')]), r.VariableMirrorImpl(r'active', 134349829, 3, const prefix0.JsonSerializable(), -1, 11, 11, const [], const [const prefix0.JsonProperty(name: 'active')]), r.VariableMirrorImpl(r'parent', 67240965, 3, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [const prefix0.JsonProperty(name: 'parent')]), r.VariableMirrorImpl(r'level', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'level')]), r.VariableMirrorImpl(r'idToken', 67239941, 4, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'id_token')]), r.VariableMirrorImpl(r'username', 67239941, 5, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'username')]), r.VariableMirrorImpl(r'password', 67239941, 5, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'password')]), r.MethodMirrorImpl(r'copyWith', 2097154, 0, 0, 0, 0, const [], const [0, 1, 2], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 0, 26), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 1, 27), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 2, 28), r.MethodMirrorImpl(r'', 0, 0, -1, 0, 0, const [], const [3, 4, 5], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 11, 11, const [], const [6], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'noSuchMethod', 524290, -1, -1, -1, -1, const [], const [7], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'runtimeType', 2097155, -1, -1, 12, 12, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 1, 1, 1, 1, const [], const [8, 9, 10, 11, 12, 13, 14, 15], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 3, 36), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 4, 37), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 5, 38), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 6, 39), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 7, 40), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 8, 41), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 9, 42), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 10, 43), r.MethodMirrorImpl(r'props', 35651587, 1, -1, 14, 15, const [13], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 1, -1, 11, 11, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 1, -1, 1, 1, const [], const [16, 17, 18, 19, 20, 21, 22, 23], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 11, 11, const [], const [24], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, 2, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 2, -1, 11, 11, const [], const [25], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 11, 52), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 12, 53), r.MethodMirrorImpl(r'hashCode', 2097155, 2, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 2, -1, 2, 2, const [], const [26, 27], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 3, 3, 3, 3, const [], const [28, 29, 30, 31, 32, 33, 34, 35, 36], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 13, 57), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 14, 58), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 15, 59), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 16, 60), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 17, 61), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 18, 62), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 19, 63), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 20, 64), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 21, 65), r.MethodMirrorImpl(r'props', 35651587, 3, -1, 14, 15, const [13], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 3, -1, 11, 11, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 3, -1, 3, 3, const [], const [37, 38, 39, 40, 41, 42, 43, 44, 45], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 4, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 4, -1, 11, 11, const [], const [46], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 22, 71), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 22, 72), r.MethodMirrorImpl(r'hashCode', 2097155, 4, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 64, 4, -1, 4, 4, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 5, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 5, -1, 11, 11, const [], const [48], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 23, 77), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 23, 78), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 24, 79), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 24, 80), r.MethodMirrorImpl(r'hashCode', 2097155, 5, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 0, 5, -1, 5, 5, const [], const [49, 50], const prefix0.JsonSerializable(), const [])], [r.ParameterMirrorImpl(r'id', 67252230, 25, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 25, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #name), r.ParameterMirrorImpl(r'price', 67252230, 25, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #price), r.ParameterMirrorImpl(r'id', 67255302, 29, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 67255302, 29, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #name), r.ParameterMirrorImpl(r'price', 67255302, 29, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #price), r.ParameterMirrorImpl(r'other', 134348806, 30, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'invocation', 134348806, 32, const prefix0.JsonSerializable(), -1, 17, 17, const [], const [], null, null), r.ParameterMirrorImpl(r'id', 67252230, 35, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'login', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #login), r.ParameterMirrorImpl(r'firstName', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #firstName), r.ParameterMirrorImpl(r'lastName', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #lastName), r.ParameterMirrorImpl(r'email', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #email), r.ParameterMirrorImpl(r'langKey', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #langKey), r.ParameterMirrorImpl(r'activated', 67252230, 35, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], null, #activated), r.ParameterMirrorImpl(r'imageUrl', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #imageUrl), r.ParameterMirrorImpl(r'id', 67255302, 46, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #id), r.ParameterMirrorImpl(r'login', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #login), r.ParameterMirrorImpl(r'firstName', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #firstName), r.ParameterMirrorImpl(r'lastName', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #lastName), r.ParameterMirrorImpl(r'email', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #email), r.ParameterMirrorImpl(r'langKey', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], 'en', #langKey), r.ParameterMirrorImpl(r'activated', 67255302, 46, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], false, #activated), r.ParameterMirrorImpl(r'imageUrl', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #imageUrl), r.ParameterMirrorImpl(r'other', 134348806, 47, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 51, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'currentPassword', 67255302, 55, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #currentPassword), r.ParameterMirrorImpl(r'newPassword', 67255302, 55, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #newPassword), r.ParameterMirrorImpl(r'id', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #name), r.ParameterMirrorImpl(r'description', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #description), r.ParameterMirrorImpl(r'url', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #url), r.ParameterMirrorImpl(r'icon', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #icon), r.ParameterMirrorImpl(r'orderPriority', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #orderPriority), r.ParameterMirrorImpl(r'active', 67252230, 56, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], null, #active), r.ParameterMirrorImpl(r'parent', 67252230, 56, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [], null, #parent), r.ParameterMirrorImpl(r'level', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #level), r.ParameterMirrorImpl(r'id', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #name), r.ParameterMirrorImpl(r'description', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #description), r.ParameterMirrorImpl(r'url', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #url), r.ParameterMirrorImpl(r'icon', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #icon), r.ParameterMirrorImpl(r'orderPriority', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #orderPriority), r.ParameterMirrorImpl(r'active', 134364166, 68, const prefix0.JsonSerializable(), -1, 11, 11, const [], const [], false, #active), r.ParameterMirrorImpl(r'parent', 67253254, 68, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [], null, #parent), r.ParameterMirrorImpl(r'level', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #level), r.ParameterMirrorImpl(r'other', 134348806, 70, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'_idToken', 67240038, 72, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 76, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'username', 67240966, 82, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'password', 67240966, 82, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'_username', 67240038, 78, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'_password', 67240038, 80, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null)], [prefix1.Task, prefix2.User, prefix3.PasswordChangeDTO, prefix4.Menu, prefix5.JWTToken, prefix6.UserJWT, int, String, bool, int, String, bool, Type, Object, const m.TypeValue().type, List, Object, Invocation], 6, {r'==': (dynamic instance) => (x) => instance == x, r'toString': (dynamic instance) => instance.toString, r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, r'hashCode': (dynamic instance) => instance.hashCode, r'runtimeType': (dynamic instance) => instance.runtimeType, r'copyWith': (dynamic instance) => instance.copyWith, r'id': (dynamic instance) => instance.id, r'name': (dynamic instance) => instance.name, r'price': (dynamic instance) => instance.price, r'stringify': (dynamic instance) => instance.stringify, r'login': (dynamic instance) => instance.login, r'firstName': (dynamic instance) => instance.firstName, r'lastName': (dynamic instance) => instance.lastName, r'email': (dynamic instance) => instance.email, r'langKey': (dynamic instance) => instance.langKey, r'activated': (dynamic instance) => instance.activated, r'imageUrl': (dynamic instance) => instance.imageUrl, r'props': (dynamic instance) => instance.props, r'currentPassword': (dynamic instance) => instance.currentPassword, r'newPassword': (dynamic instance) => instance.newPassword, r'description': (dynamic instance) => instance.description, r'url': (dynamic instance) => instance.url, r'icon': (dynamic instance) => instance.icon, r'orderPriority': (dynamic instance) => instance.orderPriority, r'active': (dynamic instance) => instance.active, r'parent': (dynamic instance) => instance.parent, r'level': (dynamic instance) => instance.level, r'idToken': (dynamic instance) => instance.idToken, r'username': (dynamic instance) => instance.username, r'password': (dynamic instance) => instance.password}, {r'idToken=': (dynamic instance, value) => instance.idToken = value, r'username=': (dynamic instance, value) => instance.username = value, r'password=': (dynamic instance, value) => instance.password = value}, null, [])}; final _memberSymbolMap = null; @@ -58,30 +61,31 @@ final mainLocalGeneratedAdapter = JsonMapperAdapter( typeOf>(): (value) => value.cast(), typeOf>(): (value) => value.cast(), typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast() + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast() }, enumValues: { - x4.Environment: x4.Environment.values, - x5.TaskListStatus: x5.TaskListStatus.values, - x6.TaskSaveStatus: x6.TaskSaveStatus.values, - x7.AccountStatus: x7.AccountStatus.values, - x8.LoginStatus: x8.LoginStatus.values, - x9.SettingsStatus: x9.SettingsStatus.values + x6.Environment: x6.Environment.values, + x7.TaskListStatus: x7.TaskListStatus.values, + x8.AccountStatus: x8.AccountStatus.values, + x9.LoginStatus: x9.LoginStatus.values, + x10.SettingsStatus: x10.SettingsStatus.values }); Future initializeJsonMapperAsync({Iterable adapters = const [], SerializationOptions? serializationOptions, DeserializationOptions? deserializationOptions}) => Future(() => initializeJsonMapper(adapters: adapters, serializationOptions: serializationOptions, deserializationOptions: deserializationOptions)); diff --git a/lib/main/main_prod.mapper.g.dart b/lib/main/main_prod.mapper.g.dart index 5cacd7a..23ba04c 100644 --- a/lib/main/main_prod.mapper.g.dart +++ b/lib/main/main_prod.mapper.g.dart @@ -2,25 +2,28 @@ // https://github.com/k-paxian/dart-json-mapper // @dart = 2.12 import 'package:dart_json_mapper/dart_json_mapper.dart' show JsonMapper, JsonMapperAdapter, SerializationOptions, DeserializationOptions, typeOf; -import 'package:flutter_bloc_advance/configuration/environment.dart' as x4 show Environment; -import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as x2 show JWTToken; +import 'package:flutter_bloc_advance/configuration/environment.dart' as x6 show Environment; +import 'package:flutter_bloc_advance/data/models/change_password.dart' as x2 show PasswordChangeDTO; +import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as x4 show JWTToken; +import 'package:flutter_bloc_advance/data/models/menu.dart' as x3 show Menu; import 'package:flutter_bloc_advance/data/models/task.dart' as x0 show Task; import 'package:flutter_bloc_advance/data/models/user.dart' as x1 show User; -import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as x3 show UserJWT; -import 'package:flutter_bloc_advance/presentation/common_blocs/account/account_bloc.dart' as x7 show AccountStatus; -import 'package:flutter_bloc_advance/presentation/screen/login/bloc/login_bloc.dart' as x8 show LoginStatus; -import 'package:flutter_bloc_advance/presentation/screen/settings/bloc/settings_bloc.dart' as x9 show SettingsStatus; -import 'package:flutter_bloc_advance/presentation/screen/task/list/bloc/task_list_bloc.dart' as x5 show TaskListStatus; -import 'package:flutter_bloc_advance/presentation/screen/task/save/bloc/task_save_bloc.dart' as x6 show TaskSaveStatus; +import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as x5 show UserJWT; +import 'package:flutter_bloc_advance/presentation/common_blocs/account/account_bloc.dart' as x8 show AccountStatus; +import 'package:flutter_bloc_advance/presentation/screen/login/bloc/login_bloc.dart' as x9 show LoginStatus; +import 'package:flutter_bloc_advance/presentation/screen/settings/bloc/settings_bloc.dart' as x10 show SettingsStatus; +import 'package:flutter_bloc_advance/presentation/screen/task/list/bloc/task_list_bloc.dart' as x7 show TaskListStatus; // This file has been generated by the reflectable package. // https://github.com/dart-lang/reflectable. import 'dart:core'; import 'package:dart_json_mapper/src/model/annotations.dart' as prefix0; -import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as prefix3; +import 'package:flutter_bloc_advance/data/models/change_password.dart' as prefix3; +import 'package:flutter_bloc_advance/data/models/jwt_token.dart' as prefix5; +import 'package:flutter_bloc_advance/data/models/menu.dart' as prefix4; import 'package:flutter_bloc_advance/data/models/task.dart' as prefix1; import 'package:flutter_bloc_advance/data/models/user.dart' as prefix2; -import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as prefix4; +import 'package:flutter_bloc_advance/data/models/user_jwt.dart' as prefix6; // ignore_for_file: camel_case_types // ignore_for_file: implementation_imports @@ -35,7 +38,7 @@ import 'package:reflectable/src/reflectable_builder_based.dart' as r; // ignore:unused_import import 'package:reflectable/reflectable.dart' as r show Reflectable; -final _data = {const prefix0.JsonSerializable(): r.ReflectorData([r.NonGenericClassMirrorImpl(r'Task', r'.Task', 134217735, 0, const prefix0.JsonSerializable(), const [0, 1, 2, 14, 18], const [19, 20, 21, 22, 23, 14, 15, 16, 17], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', price = 0}) => b ? prefix1.Task(id: id, name: name, price: price) : null}, -1, 0, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'User', r'.User', 134217735, 1, const prefix0.JsonSerializable(), const [3, 4, 5, 6, 7, 8, 9, 10, 24, 33, 34, 35], const [36, 37, 21, 38, 23, 34, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, login = '', firstName = '', lastName = '', email = '', langKey = 'en', activated = false, imageUrl = ''}) => b ? prefix2.User(activated: activated, email: email, firstName: firstName, id: id, imageUrl: imageUrl, langKey: langKey, lastName: lastName, login: login) : null}, -1, 1, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'JWTToken', r'.JWTToken', 134217735, 2, const prefix0.JsonSerializable(), const [11, 39, 40, 43, 44], const [40, 39, 21, 43, 23, 41, 42], const [], -1, {}, {}, {r'': (bool b) => () => b ? prefix3.JWTToken() : null}, -1, 2, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'UserJWT', r'.UserJWT', 134217735, 3, const prefix0.JsonSerializable(), const [12, 13, 45, 46, 51, 52], const [46, 45, 21, 51, 23, 47, 48, 49, 50], const [], -1, {}, {}, {r'': (bool b) => (username, password) => b ? prefix4.UserJWT(username, password) : null}, -1, 3, const [], const [prefix0.jsonSerializable], null)], [r.VariableMirrorImpl(r'id', 67240965, 0, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 67240965, 0, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'price', 67240965, 0, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'price')]), r.VariableMirrorImpl(r'id', 67240965, 1, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'login', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'login')]), r.VariableMirrorImpl(r'firstName', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'firstName')]), r.VariableMirrorImpl(r'lastName', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'lastName')]), r.VariableMirrorImpl(r'email', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'email')]), r.VariableMirrorImpl(r'langKey', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'langKey')]), r.VariableMirrorImpl(r'activated', 67240965, 1, const prefix0.JsonSerializable(), -1, 6, 6, const [], const []), r.VariableMirrorImpl(r'imageUrl', 67240965, 1, const prefix0.JsonSerializable(), -1, 5, 5, const [], const []), r.VariableMirrorImpl(r'idToken', 67239941, 2, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'id_token')]), r.VariableMirrorImpl(r'username', 67239941, 3, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'username')]), r.VariableMirrorImpl(r'password', 67239941, 3, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [const prefix0.JsonProperty(name: 'password')]), r.MethodMirrorImpl(r'copyWith', 2097154, 0, 0, 0, 0, const [], const [0, 1, 2], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 0, 15), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 1, 16), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 2, 17), r.MethodMirrorImpl(r'', 0, 0, -1, 0, 0, const [], const [3, 4, 5], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 7, 7, const [], const [6], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'noSuchMethod', 524290, -1, -1, -1, -1, const [], const [7], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'runtimeType', 2097155, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 1, 1, 1, 1, const [], const [8, 9, 10, 11, 12, 13, 14, 15], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 3, 25), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 4, 26), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 5, 27), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 6, 28), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 7, 29), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 8, 30), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 9, 31), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 10, 32), r.MethodMirrorImpl(r'props', 35651587, 1, -1, 12, 13, const [11], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 1, -1, 7, 7, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 1, -1, 1, 1, const [], const [16, 17, 18, 19, 20, 21, 22, 23], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 7, 7, const [], const [24], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, 2, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 2, -1, 7, 7, const [], const [25], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 11, 41), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 11, 42), r.MethodMirrorImpl(r'hashCode', 2097155, 2, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 64, 2, -1, 2, 2, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 3, -1, 8, 8, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 3, -1, 7, 7, const [], const [27], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 12, 47), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 12, 48), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 13, 49), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 13, 50), r.MethodMirrorImpl(r'hashCode', 2097155, 3, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 0, 3, -1, 3, 3, const [], const [28, 29], const prefix0.JsonSerializable(), const [])], [r.ParameterMirrorImpl(r'id', 67252230, 14, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 14, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #name), r.ParameterMirrorImpl(r'price', 67252230, 14, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #price), r.ParameterMirrorImpl(r'id', 67255302, 18, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 67255302, 18, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #name), r.ParameterMirrorImpl(r'price', 67255302, 18, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #price), r.ParameterMirrorImpl(r'other', 134348806, 19, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'invocation', 134348806, 21, const prefix0.JsonSerializable(), -1, 15, 15, const [], const [], null, null), r.ParameterMirrorImpl(r'id', 67252230, 24, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], null, #id), r.ParameterMirrorImpl(r'login', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #login), r.ParameterMirrorImpl(r'firstName', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #firstName), r.ParameterMirrorImpl(r'lastName', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #lastName), r.ParameterMirrorImpl(r'email', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #email), r.ParameterMirrorImpl(r'langKey', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #langKey), r.ParameterMirrorImpl(r'activated', 67252230, 24, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #activated), r.ParameterMirrorImpl(r'imageUrl', 67252230, 24, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, #imageUrl), r.ParameterMirrorImpl(r'id', 67255302, 35, const prefix0.JsonSerializable(), -1, 4, 4, const [], const [], 0, #id), r.ParameterMirrorImpl(r'login', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #login), r.ParameterMirrorImpl(r'firstName', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #firstName), r.ParameterMirrorImpl(r'lastName', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #lastName), r.ParameterMirrorImpl(r'email', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #email), r.ParameterMirrorImpl(r'langKey', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], 'en', #langKey), r.ParameterMirrorImpl(r'activated', 67255302, 35, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], false, #activated), r.ParameterMirrorImpl(r'imageUrl', 67255302, 35, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], '', #imageUrl), r.ParameterMirrorImpl(r'other', 134348806, 36, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 40, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'_idToken', 67240038, 42, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 46, const prefix0.JsonSerializable(), -1, 14, 14, const [], const [], null, null), r.ParameterMirrorImpl(r'username', 67240966, 52, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'password', 67240966, 52, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'_username', 67240038, 48, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null), r.ParameterMirrorImpl(r'_password', 67240038, 50, const prefix0.JsonSerializable(), -1, 5, 5, const [], const [], null, null)], [prefix1.Task, prefix2.User, prefix3.JWTToken, prefix4.UserJWT, int, String, bool, bool, String, int, Type, Object, const m.TypeValue().type, List, Object, Invocation], 4, {r'==': (dynamic instance) => (x) => instance == x, r'toString': (dynamic instance) => instance.toString, r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, r'hashCode': (dynamic instance) => instance.hashCode, r'runtimeType': (dynamic instance) => instance.runtimeType, r'copyWith': (dynamic instance) => instance.copyWith, r'id': (dynamic instance) => instance.id, r'name': (dynamic instance) => instance.name, r'price': (dynamic instance) => instance.price, r'stringify': (dynamic instance) => instance.stringify, r'login': (dynamic instance) => instance.login, r'firstName': (dynamic instance) => instance.firstName, r'lastName': (dynamic instance) => instance.lastName, r'email': (dynamic instance) => instance.email, r'langKey': (dynamic instance) => instance.langKey, r'activated': (dynamic instance) => instance.activated, r'imageUrl': (dynamic instance) => instance.imageUrl, r'props': (dynamic instance) => instance.props, r'idToken': (dynamic instance) => instance.idToken, r'username': (dynamic instance) => instance.username, r'password': (dynamic instance) => instance.password}, {r'idToken=': (dynamic instance, value) => instance.idToken = value, r'username=': (dynamic instance, value) => instance.username = value, r'password=': (dynamic instance, value) => instance.password = value}, null, [])}; +final _data = {const prefix0.JsonSerializable(): r.ReflectorData([r.NonGenericClassMirrorImpl(r'Task', r'.Task', 134217735, 0, const prefix0.JsonSerializable(), const [0, 1, 2, 25, 29], const [30, 31, 32, 33, 34, 25, 26, 27, 28], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', price = 0}) => b ? prefix1.Task(id: id, name: name, price: price) : null}, -1, 0, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'User', r'.User', 134217735, 1, const prefix0.JsonSerializable(), const [3, 4, 5, 6, 7, 8, 9, 10, 35, 44, 45, 46], const [47, 48, 32, 49, 34, 45, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, login = '', firstName = '', lastName = '', email = '', langKey = 'en', activated = false, imageUrl = ''}) => b ? prefix2.User(activated: activated, email: email, firstName: firstName, id: id, imageUrl: imageUrl, langKey: langKey, lastName: lastName, login: login) : null}, -1, 1, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'PasswordChangeDTO', r'.PasswordChangeDTO', 134217735, 2, const prefix0.JsonSerializable(), const [11, 12, 50, 51, 54, 55], const [51, 50, 32, 54, 34, 52, 53], const [], -1, {}, {}, {r'': (bool b) => ({currentPassword = '', newPassword = ''}) => b ? prefix3.PasswordChangeDTO(currentPassword: currentPassword, newPassword: newPassword) : null}, -1, 2, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'Menu', r'.Menu', 134217735, 3, const prefix0.JsonSerializable(), const [13, 14, 15, 16, 17, 18, 19, 20, 21, 56, 66, 67, 68], const [47, 48, 32, 49, 34, 67, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66], const [], -1, {}, {}, {r'': (bool b) => ({id = 0, name = '', description = '', url = '', icon = '', orderPriority = 0, active = false, parent, level = 0}) => b ? prefix4.Menu(active: active, description: description, icon: icon, id: id, level: level, name: name, orderPriority: orderPriority, parent: parent, url: url) : null}, -1, 3, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'JWTToken', r'.JWTToken', 134217735, 4, const prefix0.JsonSerializable(), const [22, 69, 70, 73, 74], const [70, 69, 32, 73, 34, 71, 72], const [], -1, {}, {}, {r'': (bool b) => () => b ? prefix5.JWTToken() : null}, -1, 4, const [], const [prefix0.jsonSerializable], null), r.NonGenericClassMirrorImpl(r'UserJWT', r'.UserJWT', 134217735, 5, const prefix0.JsonSerializable(), const [23, 24, 75, 76, 81, 82], const [76, 75, 32, 81, 34, 77, 78, 79, 80], const [], -1, {}, {}, {r'': (bool b) => (username, password) => b ? prefix6.UserJWT(username, password) : null}, -1, 5, const [], const [prefix0.jsonSerializable], null)], [r.VariableMirrorImpl(r'id', 67240965, 0, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 67240965, 0, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'price', 67240965, 0, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'price')]), r.VariableMirrorImpl(r'id', 67240965, 1, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'login', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'login')]), r.VariableMirrorImpl(r'firstName', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'firstName')]), r.VariableMirrorImpl(r'lastName', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'lastName')]), r.VariableMirrorImpl(r'email', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'email')]), r.VariableMirrorImpl(r'langKey', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'langKey')]), r.VariableMirrorImpl(r'activated', 67240965, 1, const prefix0.JsonSerializable(), -1, 8, 8, const [], const []), r.VariableMirrorImpl(r'imageUrl', 67240965, 1, const prefix0.JsonSerializable(), -1, 7, 7, const [], const []), r.VariableMirrorImpl(r'currentPassword', 67240965, 2, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'currentPassword')]), r.VariableMirrorImpl(r'newPassword', 67240965, 2, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'newPassword')]), r.VariableMirrorImpl(r'id', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'id')]), r.VariableMirrorImpl(r'name', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'name')]), r.VariableMirrorImpl(r'description', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'description')]), r.VariableMirrorImpl(r'url', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'url')]), r.VariableMirrorImpl(r'icon', 134349829, 3, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [const prefix0.JsonProperty(name: 'icon')]), r.VariableMirrorImpl(r'orderPriority', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'orderPriority')]), r.VariableMirrorImpl(r'active', 134349829, 3, const prefix0.JsonSerializable(), -1, 11, 11, const [], const [const prefix0.JsonProperty(name: 'active')]), r.VariableMirrorImpl(r'parent', 67240965, 3, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [const prefix0.JsonProperty(name: 'parent')]), r.VariableMirrorImpl(r'level', 134349829, 3, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [const prefix0.JsonProperty(name: 'level')]), r.VariableMirrorImpl(r'idToken', 67239941, 4, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'id_token')]), r.VariableMirrorImpl(r'username', 67239941, 5, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'username')]), r.VariableMirrorImpl(r'password', 67239941, 5, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [const prefix0.JsonProperty(name: 'password')]), r.MethodMirrorImpl(r'copyWith', 2097154, 0, 0, 0, 0, const [], const [0, 1, 2], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 0, 26), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 1, 27), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 2, 28), r.MethodMirrorImpl(r'', 0, 0, -1, 0, 0, const [], const [3, 4, 5], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 11, 11, const [], const [6], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'noSuchMethod', 524290, -1, -1, -1, -1, const [], const [7], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'runtimeType', 2097155, -1, -1, 12, 12, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 1, 1, 1, 1, const [], const [8, 9, 10, 11, 12, 13, 14, 15], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 3, 36), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 4, 37), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 5, 38), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 6, 39), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 7, 40), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 8, 41), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 9, 42), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 10, 43), r.MethodMirrorImpl(r'props', 35651587, 1, -1, 14, 15, const [13], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 1, -1, 11, 11, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 1, -1, 1, 1, const [], const [16, 17, 18, 19, 20, 21, 22, 23], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'==', 2097154, -1, -1, 11, 11, const [], const [24], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, -1, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'hashCode', 2097155, -1, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'toString', 2097154, 2, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 2, -1, 11, 11, const [], const [25], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 11, 52), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 12, 53), r.MethodMirrorImpl(r'hashCode', 2097155, 2, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 2, -1, 2, 2, const [], const [26, 27], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'copyWith', 2097154, 3, 3, 3, 3, const [], const [28, 29, 30, 31, 32, 33, 34, 35, 36], const prefix0.JsonSerializable(), const []), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 13, 57), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 14, 58), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 15, 59), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 16, 60), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 17, 61), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 18, 62), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 19, 63), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 20, 64), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 21, 65), r.MethodMirrorImpl(r'props', 35651587, 3, -1, 14, 15, const [13], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'stringify', 2097155, 3, -1, 11, 11, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 128, 3, -1, 3, 3, const [], const [37, 38, 39, 40, 41, 42, 43, 44, 45], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 4, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 4, -1, 11, 11, const [], const [46], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 22, 71), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 22, 72), r.MethodMirrorImpl(r'hashCode', 2097155, 4, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 64, 4, -1, 4, 4, const [], const [], const prefix0.JsonSerializable(), const []), r.MethodMirrorImpl(r'toString', 2097154, 5, -1, 10, 10, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'==', 2097154, 5, -1, 11, 11, const [], const [48], const prefix0.JsonSerializable(), const [override]), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 23, 77), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 23, 78), r.ImplicitGetterMirrorImpl(const prefix0.JsonSerializable(), 24, 79), r.ImplicitSetterMirrorImpl(const prefix0.JsonSerializable(), 24, 80), r.MethodMirrorImpl(r'hashCode', 2097155, 5, -1, 9, 9, const [], const [], const prefix0.JsonSerializable(), const [override]), r.MethodMirrorImpl(r'', 0, 5, -1, 5, 5, const [], const [49, 50], const prefix0.JsonSerializable(), const [])], [r.ParameterMirrorImpl(r'id', 67252230, 25, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 25, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #name), r.ParameterMirrorImpl(r'price', 67252230, 25, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #price), r.ParameterMirrorImpl(r'id', 67255302, 29, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 67255302, 29, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #name), r.ParameterMirrorImpl(r'price', 67255302, 29, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #price), r.ParameterMirrorImpl(r'other', 134348806, 30, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'invocation', 134348806, 32, const prefix0.JsonSerializable(), -1, 17, 17, const [], const [], null, null), r.ParameterMirrorImpl(r'id', 67252230, 35, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'login', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #login), r.ParameterMirrorImpl(r'firstName', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #firstName), r.ParameterMirrorImpl(r'lastName', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #lastName), r.ParameterMirrorImpl(r'email', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #email), r.ParameterMirrorImpl(r'langKey', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #langKey), r.ParameterMirrorImpl(r'activated', 67252230, 35, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], null, #activated), r.ParameterMirrorImpl(r'imageUrl', 67252230, 35, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #imageUrl), r.ParameterMirrorImpl(r'id', 67255302, 46, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], 0, #id), r.ParameterMirrorImpl(r'login', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #login), r.ParameterMirrorImpl(r'firstName', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #firstName), r.ParameterMirrorImpl(r'lastName', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #lastName), r.ParameterMirrorImpl(r'email', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #email), r.ParameterMirrorImpl(r'langKey', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], 'en', #langKey), r.ParameterMirrorImpl(r'activated', 67255302, 46, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], false, #activated), r.ParameterMirrorImpl(r'imageUrl', 67255302, 46, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #imageUrl), r.ParameterMirrorImpl(r'other', 134348806, 47, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 51, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'currentPassword', 67255302, 55, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #currentPassword), r.ParameterMirrorImpl(r'newPassword', 67255302, 55, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], '', #newPassword), r.ParameterMirrorImpl(r'id', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #id), r.ParameterMirrorImpl(r'name', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #name), r.ParameterMirrorImpl(r'description', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #description), r.ParameterMirrorImpl(r'url', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #url), r.ParameterMirrorImpl(r'icon', 67252230, 56, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, #icon), r.ParameterMirrorImpl(r'orderPriority', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #orderPriority), r.ParameterMirrorImpl(r'active', 67252230, 56, const prefix0.JsonSerializable(), -1, 8, 8, const [], const [], null, #active), r.ParameterMirrorImpl(r'parent', 67252230, 56, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [], null, #parent), r.ParameterMirrorImpl(r'level', 67252230, 56, const prefix0.JsonSerializable(), -1, 6, 6, const [], const [], null, #level), r.ParameterMirrorImpl(r'id', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #id), r.ParameterMirrorImpl(r'name', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #name), r.ParameterMirrorImpl(r'description', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #description), r.ParameterMirrorImpl(r'url', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #url), r.ParameterMirrorImpl(r'icon', 134364166, 68, const prefix0.JsonSerializable(), -1, 10, 10, const [], const [], '', #icon), r.ParameterMirrorImpl(r'orderPriority', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #orderPriority), r.ParameterMirrorImpl(r'active', 134364166, 68, const prefix0.JsonSerializable(), -1, 11, 11, const [], const [], false, #active), r.ParameterMirrorImpl(r'parent', 67253254, 68, const prefix0.JsonSerializable(), 3, 3, 3, const [], const [], null, #parent), r.ParameterMirrorImpl(r'level', 134364166, 68, const prefix0.JsonSerializable(), -1, 9, 9, const [], const [], 0, #level), r.ParameterMirrorImpl(r'other', 134348806, 70, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'_idToken', 67240038, 72, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'other', 134348806, 76, const prefix0.JsonSerializable(), -1, 16, 16, const [], const [], null, null), r.ParameterMirrorImpl(r'username', 67240966, 82, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'password', 67240966, 82, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'_username', 67240038, 78, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null), r.ParameterMirrorImpl(r'_password', 67240038, 80, const prefix0.JsonSerializable(), -1, 7, 7, const [], const [], null, null)], [prefix1.Task, prefix2.User, prefix3.PasswordChangeDTO, prefix4.Menu, prefix5.JWTToken, prefix6.UserJWT, int, String, bool, int, String, bool, Type, Object, const m.TypeValue().type, List, Object, Invocation], 6, {r'==': (dynamic instance) => (x) => instance == x, r'toString': (dynamic instance) => instance.toString, r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, r'hashCode': (dynamic instance) => instance.hashCode, r'runtimeType': (dynamic instance) => instance.runtimeType, r'copyWith': (dynamic instance) => instance.copyWith, r'id': (dynamic instance) => instance.id, r'name': (dynamic instance) => instance.name, r'price': (dynamic instance) => instance.price, r'stringify': (dynamic instance) => instance.stringify, r'login': (dynamic instance) => instance.login, r'firstName': (dynamic instance) => instance.firstName, r'lastName': (dynamic instance) => instance.lastName, r'email': (dynamic instance) => instance.email, r'langKey': (dynamic instance) => instance.langKey, r'activated': (dynamic instance) => instance.activated, r'imageUrl': (dynamic instance) => instance.imageUrl, r'props': (dynamic instance) => instance.props, r'currentPassword': (dynamic instance) => instance.currentPassword, r'newPassword': (dynamic instance) => instance.newPassword, r'description': (dynamic instance) => instance.description, r'url': (dynamic instance) => instance.url, r'icon': (dynamic instance) => instance.icon, r'orderPriority': (dynamic instance) => instance.orderPriority, r'active': (dynamic instance) => instance.active, r'parent': (dynamic instance) => instance.parent, r'level': (dynamic instance) => instance.level, r'idToken': (dynamic instance) => instance.idToken, r'username': (dynamic instance) => instance.username, r'password': (dynamic instance) => instance.password}, {r'idToken=': (dynamic instance, value) => instance.idToken = value, r'username=': (dynamic instance, value) => instance.username = value, r'password=': (dynamic instance, value) => instance.password = value}, null, [])}; final _memberSymbolMap = null; @@ -58,30 +61,31 @@ final mainProdGeneratedAdapter = JsonMapperAdapter( typeOf>(): (value) => value.cast(), typeOf>(): (value) => value.cast(), typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast(), - typeOf>(): (value) => value.cast() + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast(), + typeOf>(): (value) => value.cast() }, enumValues: { - x4.Environment: x4.Environment.values, - x5.TaskListStatus: x5.TaskListStatus.values, - x6.TaskSaveStatus: x6.TaskSaveStatus.values, - x7.AccountStatus: x7.AccountStatus.values, - x8.LoginStatus: x8.LoginStatus.values, - x9.SettingsStatus: x9.SettingsStatus.values + x6.Environment: x6.Environment.values, + x7.TaskListStatus: x7.TaskListStatus.values, + x8.AccountStatus: x8.AccountStatus.values, + x9.LoginStatus: x9.LoginStatus.values, + x10.SettingsStatus: x10.SettingsStatus.values }); Future initializeJsonMapperAsync({Iterable adapters = const [], SerializationOptions? serializationOptions, DeserializationOptions? deserializationOptions}) => Future(() => initializeJsonMapper(adapters: adapters, serializationOptions: serializationOptions, deserializationOptions: deserializationOptions)); diff --git a/lib/presentation/common_widgets/InternalScaffold.dart b/lib/presentation/common_widgets/InternalScaffold.dart index a414d0a..166e577 100644 --- a/lib/presentation/common_widgets/InternalScaffold.dart +++ b/lib/presentation/common_widgets/InternalScaffold.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../../data/repository/login_repository.dart'; +import '../../data/repository/menu_repository.dart'; import 'drawer/bloc/drawer.dart'; import 'drawer/drawer_widget.dart'; @@ -26,6 +27,7 @@ class InternalScaffold extends StatelessWidget { return BlocProvider( create: (context) => DrawerBloc( loginRepository: LoginRepository(), + menuRepository: MenuRepository(), ), child: ApplicationDrawer()); } diff --git a/lib/presentation/common_widgets/drawer/bloc/drawer_bloc.dart b/lib/presentation/common_widgets/drawer/bloc/drawer_bloc.dart index 803c916..bc49568 100644 --- a/lib/presentation/common_widgets/drawer/bloc/drawer_bloc.dart +++ b/lib/presentation/common_widgets/drawer/bloc/drawer_bloc.dart @@ -1,8 +1,12 @@ import 'dart:async'; import 'dart:developer'; +import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; + +import '../../../../data/models/menu.dart'; import '../../../../data/repository/login_repository.dart'; +import '../../../../data/repository/menu_repository.dart'; +import '../../../../utils/menu_list_cache.dart'; part 'drawer_event.dart'; @@ -10,22 +14,62 @@ part 'drawer_state.dart'; class DrawerBloc extends Bloc { final LoginRepository _loginRepository; + final MenuRepository _menuRepository; - DrawerBloc({ - required LoginRepository loginRepository, - }) : _loginRepository = loginRepository, + DrawerBloc({ required LoginRepository loginRepository,required MenuRepository menuRepository,}) : _loginRepository = loginRepository, + _menuRepository = menuRepository, super(const DrawerState()) { + on(_loadMenus); + on(_refreshMenus); on(_onLogout); } + + FutureOr _onLogout(Logout event, Emitter emit) async { log("DrawerBloc start _onLogout"); try { + await _loginRepository.logout(); emit(state.copyWith(isLogout: true)); + + MenuListCache.menus = []; + //TODO clear token + log("DrawerBloc end _onLogout"); } catch (e) { log("DrawerBloc _onLogout error: $e"); } } + + FutureOr _loadMenus(LoadMenus event, Emitter emit) async { + log("DrawerBloc start _loadMenus"); + emit(state.copyWith(menus: [])); + try { + if(MenuListCache.menus.isNotEmpty){ + emit(state.copyWith(menus: MenuListCache.menus)); + log("DrawerBloc end _loadMenus from cache"); + return; + } + final menus = await _menuRepository.getMenus(); + emit(state.copyWith(menus: menus)); + log("DrawerBloc end _loadMenus from api"); + } catch (e) { + emit(state.copyWith(menus: [])); + log("DrawerBloc _loadMenus error: $e"); + } + } + + FutureOr _refreshMenus(RefreshMenus event, Emitter emit) async { + log("DrawerBloc start _refreshMenus"); + try { + final menus = await _menuRepository.getMenus(); + MenuListCache.menus = menus; + emit(state.copyWith(menus: menus)); + log("DrawerBloc end _refreshMenus"); + } catch (e) { + log("DrawerBloc _refreshMenus error: $e"); + } + } + } diff --git a/lib/presentation/common_widgets/drawer/bloc/drawer_state.dart b/lib/presentation/common_widgets/drawer/bloc/drawer_state.dart index a429a85..a9cb8a4 100644 --- a/lib/presentation/common_widgets/drawer/bloc/drawer_state.dart +++ b/lib/presentation/common_widgets/drawer/bloc/drawer_state.dart @@ -1,22 +1,27 @@ + part of 'drawer_bloc.dart'; class DrawerState extends Equatable { + final List menus; final bool isLogout; const DrawerState({ + this.menus = const [], this.isLogout = false, }); DrawerState copyWith({ + List? menus, bool? isLogout, }) { return DrawerState( + menus: menus ?? this.menus, isLogout: isLogout ?? this.isLogout, ); } @override - List get props => [isLogout]; + List get props => [menus, isLogout]; @override bool get stringify => true; diff --git a/lib/presentation/common_widgets/drawer/drawer_widget.dart b/lib/presentation/common_widgets/drawer/drawer_widget.dart index 9cf66cb..3b5512d 100644 --- a/lib/presentation/common_widgets/drawer/drawer_widget.dart +++ b/lib/presentation/common_widgets/drawer/drawer_widget.dart @@ -1,8 +1,10 @@ - +import 'package:expansion_tile_card/expansion_tile_card.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter/material.dart'; +import 'package:string_2_icon/string_2_icon.dart'; import '../../../configuration/routes.dart'; +import '../../../data/models/menu.dart'; import '../../../generated/l10n.dart'; import '../../common_blocs/account/account.dart'; import 'bloc/drawer.dart'; @@ -18,22 +20,101 @@ class ApplicationDrawer extends StatelessWidget { listeners: [ BlocListener( listener: (context, state) { + print("DrawerBloc listener: ${state.isLogout}"); + if (state.isLogout) { - Navigator.popUntil(context, ModalRoute.withName(ApplicationRoutes.login)); + Navigator.popUntil( + context, ModalRoute.withName(ApplicationRoutes.login)); Navigator.pushNamed(context, ApplicationRoutes.login); } }, ), BlocListener(listener: (context, state) { if (state.status == AccountStatus.failure) { - Navigator.popUntil(context, ModalRoute.withName(ApplicationRoutes.login)); + Navigator.popUntil( + context, ModalRoute.withName(ApplicationRoutes.login)); Navigator.pushNamed(context, ApplicationRoutes.login); } }) ], child: BlocBuilder( builder: (context, state) { - return _buildStaticDrawer(context); + var parentMenus = []; + if (state.menus.isEmpty) { + return Text("Empty"); + } + parentMenus = + state.menus.where((element) => element.level == 1).toList(); + parentMenus + .sort((a, b) => a.orderPriority.compareTo(b.orderPriority)); + + return Drawer( + child: SingleChildScrollView( + child: ListView.builder( + itemCount: parentMenus.length, + shrinkWrap: true, + physics: ClampingScrollPhysics(), + itemBuilder: (context, index) { + List sublistMenu = state.menus + .where((element) => + element.parent?.id == parentMenus[index].id) + .toList(); + sublistMenu.sort( + (a, b) => a.orderPriority.compareTo(b.orderPriority)); + return ExpansionTileCard( + elevation: 0, + isThreeLine: false, + initiallyExpanded: false, + leading: Icon( + String2Icon.getIconDataFromString( + parentMenus[index].icon), + ), + title: Text( + S.of(context).translate_menu_title( + parentMenus[index].name), + style: Theme.of(context).textTheme.bodyLarge, + ), + onExpansionChanged: (value) { + print("onExpansionChanged: $value"); + print("parentMenus[index].url: ${parentMenus[index].url}"); + if (index > 0) { + Navigator.pop(context); + Navigator.pushNamed(context, parentMenus[index].url); + } + }, + children: [ + Padding( + padding: EdgeInsets.only(left: 20), + child: ListView.builder( + itemCount: sublistMenu.length, + shrinkWrap: true, + physics: ClampingScrollPhysics(), + itemBuilder: (context, index) { + return ListTile( + leading: Icon( + String2Icon.getIconDataFromString( + sublistMenu[index].icon), + ), + title: Text( + S.of(context).translate_menu_title( + sublistMenu[index].name), + style: Theme.of(context).textTheme.bodyMedium, + ), + onTap: () { + Navigator.pop(context); + Navigator.pushNamed( + context, sublistMenu[index].url); + }, + ); + }, + ), + ), + ], + ); + }, + ), + ), + ); }, ), ); @@ -63,29 +144,40 @@ class ApplicationDrawer extends StatelessWidget { children: [ header(context), ListTile( - leading: Icon(Icons.home, size: iconSize,), + leading: Icon( + Icons.home, + size: iconSize, + ), title: Text(S.of(context).drawerMenuHome), onTap: () => Navigator.pushNamed(context, ApplicationRoutes.home), ), ListTile( - leading: Icon(Icons.task, size: iconSize,), + leading: Icon( + Icons.task, + size: iconSize, + ), title: Text(S.of(context).drawerTasks), onTap: () => Navigator.pushNamed(context, ApplicationRoutes.tasks), ), ListTile( - leading: Icon(Icons.settings, size: iconSize,), + leading: Icon( + Icons.settings, + size: iconSize, + ), title: Text(S.of(context).drawerSettingsTitle), - onTap: () => Navigator.pushNamed(context, ApplicationRoutes.settings), + onTap: () => + Navigator.pushNamed(context, ApplicationRoutes.settings), ), ListTile( - leading: Icon(Icons.exit_to_app, size: iconSize,), + leading: Icon( + Icons.exit_to_app, + size: iconSize, + ), title: Text(S.of(context).drawerLogoutTitle), - onTap: () => context.read().add(Logout()) - ), + onTap: () => context.read().add(Logout())), Divider(thickness: 2), ], ), ); } - } diff --git a/lib/presentation/screen/home/home_screen.dart b/lib/presentation/screen/home/home_screen.dart index 07a70d7..0106ecb 100644 --- a/lib/presentation/screen/home/home_screen.dart +++ b/lib/presentation/screen/home/home_screen.dart @@ -1,8 +1,8 @@ - import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_bloc_advance/data/repository/menu_repository.dart'; import '../../../configuration/routes.dart'; import '../../../data/repository/login_repository.dart'; @@ -32,7 +32,8 @@ class HomeScreen extends StatelessWidget { listener: (context, state) { log("AccountBloc listener: ${state.status}"); if (state.status == AccountStatus.failure) { - Navigator.pushNamedAndRemoveUntil(context, ApplicationRoutes.login, (route) => false); + Navigator.pushNamedAndRemoveUntil( + context, ApplicationRoutes.login, (route) => false); } else {} }, child: BlocBuilder( @@ -58,7 +59,8 @@ class HomeScreen extends StatelessWidget { return BlocProvider( create: (context) => DrawerBloc( loginRepository: LoginRepository(), - ), + menuRepository: MenuRepository(), + )..add(LoadMenus()), child: ApplicationDrawer()); } diff --git a/lib/presentation/screen/settings/language_widget.dart b/lib/presentation/screen/settings/language_widget.dart new file mode 100644 index 0000000..cab7360 --- /dev/null +++ b/lib/presentation/screen/settings/language_widget.dart @@ -0,0 +1,62 @@ + + + + +import 'package:flutter/material.dart'; + +import '../../../configuration/app_keys.dart'; +import '../../../configuration/routes.dart'; +import '../../../generated/l10n.dart'; + +class LanguageScreen extends StatefulWidget { + const LanguageScreen() :super(key: ApplicationKeys.languageScreen); + + @override + State createState() => + _LanguageConfirmationDialogState(); +} + +class _LanguageConfirmationDialogState + extends State { + void setLocale(String value) { + setState(() { + Locale(value); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: AlertDialog( + title: Text(S.of(context).language_select, textAlign: TextAlign.center), + actionsAlignment: MainAxisAlignment.center, + actions: [ + TextButton( + style: TextButton.styleFrom( + backgroundColor: Theme.of(context).colorScheme.primary, + ), + onPressed: () { + setLocale("tr"); + S.load(Locale("tr")); + Navigator.pushNamed(context, ApplicationRoutes.home); + }, + child: Text(S.of(context).turkish, + style: TextStyle(color: Colors.white)), + ), + TextButton( + style: TextButton.styleFrom( + backgroundColor: Theme.of(context).colorScheme.primary, + ), + onPressed: () { + setLocale("en"); + S.load(Locale("en")); + Navigator.pushNamed(context, ApplicationRoutes.home); + }, + child: Text(S.of(context).english, + style: TextStyle(color: Colors.white)), + ), + ], + ), + ); + } +} diff --git a/lib/presentation/screen/settings/settings_screen.dart b/lib/presentation/screen/settings/settings_screen.dart index 5025eee..a20c7ba 100644 --- a/lib/presentation/screen/settings/settings_screen.dart +++ b/lib/presentation/screen/settings/settings_screen.dart @@ -19,16 +19,6 @@ class SettingsScreen extends StatelessWidget { ); } - List> createDropdownLanguageItems(Map languages) { - return languages.keys - .map>( - (String key) => DropdownMenuItem( - value: key, - child: Text(languages[key]!), - ), - ) - .toList(); - } submit(BuildContext context) { return BlocBuilder(builder: (context, state) { @@ -61,7 +51,6 @@ class SettingsScreen extends StatelessWidget { _firstNameField(context), _lastNameNameField(context), _emailField(context), - _languageField(context), _submit(context), ], ), @@ -141,33 +130,6 @@ class SettingsScreen extends StatelessWidget { }); } - Widget _languageField(BuildContext context) { - return BlocBuilder( - buildWhen: (previous, current) => previous.language != current.language, - builder: (context, state) { - return Padding( - padding: const EdgeInsets.only(left: 3.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "S.of(context).pageSettingsFormLanguages", - // style: Theme.of(context).textTheme.bodyLarge, - ), - state.status == SettingsStatus.loaded - ? DropdownButton( - value: state.language, - onChanged: (value) { - context.read().add(SettingsLanguageChanged(language: value!)); - }, - items: createDropdownLanguageItems(LocaleConstants.languages), - ) - : Container(), - ], - ), - ); - }); - } Widget _submit(BuildContext context) { return BlocBuilder( diff --git a/lib/utils/menu_list_cache.dart b/lib/utils/menu_list_cache.dart new file mode 100644 index 0000000..12a2ff2 --- /dev/null +++ b/lib/utils/menu_list_cache.dart @@ -0,0 +1,5 @@ +import '../data/models/menu.dart'; + +class MenuListCache { + static List menus = []; +} \ No newline at end of file diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b..4b81f9b 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index c2efd0b..5caa9d1 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pubspec.lock b/pubspec.lock index 7cabd5e..7b434f1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -233,6 +233,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.5" + expansion_tile_card: + dependency: "direct main" + description: + name: expansion_tile_card + sha256: "27ce4cb518f00e21d0f2309aaa6462b26b148e93cee2029a73088cecf42b1eb0" + url: "https://pub.dev" + source: hosted + version: "3.0.0" fake_async: dependency: transitive description: @@ -461,6 +469,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 + url: "https://pub.dev" + source: hosted + version: "6.7.1" lints: dependency: transitive description: @@ -722,6 +738,22 @@ packages: description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" source_span: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index bcb3267..9c6cb02 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,7 @@ dependencies: form_builder_validators: intl: ^0.18.1 string_2_icon: + expansion_tile_card: dependency_overrides: reflectable: @@ -35,6 +36,7 @@ dependency_overrides: dev_dependencies: flutter_test: sdk: flutter + json_serializable: flutter_lints: