device management features, settings module and contact sync
Device management: - Activity meter with steps charts and history - Apps usage with daily breakdown and top apps - Health monitoring (heart rate, oxygen, blood pressure) - Scheduled activities with timeline and CRUD - Contacts sync to device via contact-lists - Locate device, rewards refactor Settings (new module): - Block phone - SOS contacts - WiFi networks - Alarm refactor with full CRUD - Settings menu with feature stubs Account: - Personal data and account settings refactor Shared: - 100+ i18n keys in 6 languages - New routes in app_router - WeekDayChips, TimeRangeSelector shared widgets - Legacy dashboard shell simplified
This commit is contained in:
1
.dart_tool/extension_discovery/devtools.json
Normal file
1
.dart_tool/extension_discovery/devtools.json
Normal file
@@ -0,0 +1 @@
|
||||
{"version":2,"entries":[{"package":"sf_app_platform_mono_repo","rootUri":"../","packageUri":"lib/"}]}
|
||||
@@ -3,349 +3,349 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "ansi_styles",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/ansi_styles-0.3.2+1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ansi_styles-0.3.2+1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/args-2.7.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.13.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.4.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/characters-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "charcode",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/charcode-1.4.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/charcode-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "checked_yaml",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/checked_yaml-2.0.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/checked_yaml-2.0.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "cli_launcher",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/cli_launcher-0.3.2+1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cli_launcher-0.3.2+1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "cli_util",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/cli_util-0.4.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cli_util-0.4.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/collection-1.19.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "conventional_commit",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/conventional_commit-0.6.1+1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/conventional_commit-0.6.1+1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "ffi",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/ffi-2.1.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ffi-2.1.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/file-7.0.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage-9.2.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage_linux",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage_macos",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage_web",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_secure_storage_windows",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "flutter_web_plugins",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter_web_plugins",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_web_plugins",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "glob",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/glob-2.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "graphs",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/graphs-2.3.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/graphs-2.3.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "http",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http-1.5.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http-1.5.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "http_parser",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_parser-4.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "io",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/io-1.0.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "js",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.6.7",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/js-0.6.7",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.19"
|
||||
},
|
||||
{
|
||||
"name": "json_annotation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/json_annotation-4.9.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/json_annotation-4.9.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "melos",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/melos-6.3.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/melos-6.3.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/meta-1.16.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "mustache_template",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/mustache_template-2.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/mustache_template-2.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path-1.9.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "path_provider",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.1.5",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider-2.1.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_android",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.2.20",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.20",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_foundation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.4.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_linux",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.19"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_windows",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.3.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "platform",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.6",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/platform-3.1.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "pool",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pool-1.5.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "process",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/process-5.0.5",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/process-5.0.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "prompts",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/prompts-2.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/prompts-2.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "pub_semver",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pub_semver-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "pub_updater",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pub_updater-0.5.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pub_updater-0.5.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "pubspec_parse",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pubspec_parse-1.5.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pubspec_parse-1.5.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/bin/cache/pkg/sky_engine",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/bin/cache/pkg/sky_engine",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "typed_data",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/typed_data-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "web",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web-1.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "win32",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.15.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/win32-5.15.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "xdg_directories",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "yaml",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/yaml-3.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "yaml_edit",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/yaml_edit-2.2.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/yaml_edit-2.2.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
@@ -358,7 +358,7 @@
|
||||
],
|
||||
"generator": "pub",
|
||||
"generatorVersion": "3.9.2",
|
||||
"flutterRoot": "file:///C:/Program%20Files/Flutter",
|
||||
"flutterVersion": "3.35.6",
|
||||
"pubCache": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache"
|
||||
"flutterRoot": "file:///Users/juliandalcalaf/Development/flutter",
|
||||
"flutterVersion": "3.35.7",
|
||||
"pubCache": "file:///Users/juliandalcalaf/.pub-cache"
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.4\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.4\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.20\\\\","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_macos","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_macos-3.1.3\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_linux-1.2.3\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_windows-3.1.2\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_web-1.2.1\\\\","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2026-03-09 09:15:02.914305","version":"3.35.6","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_macos","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2026-03-13 09:52:54.635963","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -17,7 +17,6 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/melos_legacy.iml" filepath="$PROJECT_DIR$/modules/legacy/melos_legacy.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/modules/legacy_auth/melos_legacy_auth.iml" filepath="$PROJECT_DIR$/modules/legacy/modules/legacy_auth/melos_legacy_auth.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/modules/legacy_dashboard_shell/melos_legacy_dashboard_shell.iml" filepath="$PROJECT_DIR$/modules/legacy/modules/legacy_dashboard_shell/melos_legacy_dashboard_shell.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/packages/legacy_design_system/melos_legacy_design_system.iml" filepath="$PROJECT_DIR$/modules/legacy/packages/legacy_design_system/melos_legacy_design_system.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/packages/legacy_shared/melos_legacy_shared.iml" filepath="$PROJECT_DIR$/modules/legacy/packages/legacy_shared/melos_legacy_shared.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/legacy/modules/location/melos_location.iml" filepath="$PROJECT_DIR$/modules/legacy/modules/location/melos_location.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/navigation/melos_navigation.iml" filepath="$PROJECT_DIR$/packages/navigation/melos_navigation.iml" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Run -> 'flutter_treezor_entrust_sdk_bridge_example'" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="filePath" value="$PROJECT_DIR$/packages//flutter_treezor_entrust_sdk_bridge//example/lib/main.dart" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/example/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Run -> 'sf_app_platform'" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="filePath" value="$PROJECT_DIR$/apps//mobile_app/lib/main.dart" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/apps/mobile_app/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- Generated by Melos -->
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Test -> 'design_system'" type="FlutterTestConfigType" factoryName="Flutter Test">
|
||||
<option name="testDir" value="$PROJECT_DIR$/packages\\design_system\test" />
|
||||
<option name="testDir" value="$PROJECT_DIR$/packages/design_system/test" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- Generated by Melos -->
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Test -> 'flutter_treezor_entrust_sdk_bridge'" type="FlutterTestConfigType" factoryName="Flutter Test">
|
||||
<option name="testDir" value="$PROJECT_DIR$/packages\\flutter_treezor_entrust_sdk_bridge\test" />
|
||||
<option name="testDir" value="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/test" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -4,6 +4,7 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
# permission_handler: enable contacts permission
|
||||
PERMISSION_CONTACTS=1
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string>Necesitamos acceso a tus contactos para seleccionar números de teléfono.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Necesitamos la cámara para escanear códigos QR</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
|
||||
@@ -26,7 +26,7 @@ late final GoRouter appRouter;
|
||||
void configureAppRouter() {
|
||||
appRouter = GoRouter(
|
||||
navigatorKey: rootNavigatorKey,
|
||||
initialLocation: AppRoutes.controlPanel,
|
||||
initialLocation: AppRoutes.onboarding,
|
||||
debugLogDiagnostics: true,
|
||||
routes: [
|
||||
GoRoute(
|
||||
@@ -94,10 +94,27 @@ void configureAppRouter() {
|
||||
name: 'device_management',
|
||||
pageBuilder: DeviceManagementBuilder().buildPage,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: 'scheduled_activities',
|
||||
name: 'scheduled_activities',
|
||||
pageBuilder: const ScheduledActivitiesBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'contacts',
|
||||
name: 'contacts',
|
||||
pageBuilder: ContactsBuilder().buildPage,
|
||||
pageBuilder: const ContactsBuilder().buildPage,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: 'edit/:contactId',
|
||||
name: 'edit_contact',
|
||||
pageBuilder: const EditContactBuilder().buildPage,
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
path: 'health',
|
||||
name: 'health',
|
||||
pageBuilder: const HealthBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'remote_connection',
|
||||
@@ -114,6 +131,16 @@ void configureAppRouter() {
|
||||
name: 'rewards',
|
||||
pageBuilder: RewardsBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'activity_meter',
|
||||
name: 'activity_meter',
|
||||
pageBuilder: const ActivityMeterBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'apps_use',
|
||||
name: 'apps_use',
|
||||
pageBuilder: const AppsUseBuilder().buildPage,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -131,7 +158,7 @@ void configureAppRouter() {
|
||||
StatefulShellBranch(
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '${ AppRoutes.legacyDashboard}/chat',
|
||||
path: '${AppRoutes.legacyDashboard}/chat',
|
||||
name: 'legacy_chat',
|
||||
pageBuilder: (context, state) => MaterialPage<void>(
|
||||
key: state.pageKey,
|
||||
@@ -150,80 +177,80 @@ void configureAppRouter() {
|
||||
pageBuilder: SettingsBuilder().buildPage,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.alarm,
|
||||
path: 'alarm',
|
||||
name: 'alarm',
|
||||
pageBuilder: AlarmBuilder().buildPage,
|
||||
),
|
||||
/*GoRoute (
|
||||
path: AppRoutes.appStore,
|
||||
name: 'app_store',
|
||||
// pageBuilder: AppStoreBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.battery,
|
||||
name: 'battery',
|
||||
// pageBuilder: BatteryBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.blockPhone,
|
||||
name: 'block_phone',
|
||||
// pageBuilder: BlockPhoneBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.disableFunctions,
|
||||
name: 'disable_functions',
|
||||
// pageBuilder: DisableFunctionsBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.language,
|
||||
name: 'language',
|
||||
// pageBuilder: LanguageBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.legacyNotifications,
|
||||
name: 'legacy_notifications',
|
||||
// pageBuilder: LegacyNotificationsBuilder().buildPage,
|
||||
),*/
|
||||
GoRoute (
|
||||
path: AppRoutes.remoteManagement,
|
||||
GoRoute(
|
||||
path: 'remote_management',
|
||||
name: 'remote_management',
|
||||
pageBuilder: RemoteManagementBuilder().buildPage,
|
||||
),
|
||||
/*GoRoute (
|
||||
path: AppRoutes.remoteOnOff,
|
||||
name: 'remote_on_off',
|
||||
// pageBuilder: RemoteOnOffBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.smsAlert,
|
||||
name: 'sms_alert',
|
||||
// pageBuilder: SmsAlertBuilder().buildPage,
|
||||
),*/
|
||||
GoRoute (
|
||||
path: AppRoutes.sosContacts,
|
||||
GoRoute(
|
||||
path: 'sos_agenda',
|
||||
name: 'sos_agenda',
|
||||
pageBuilder: SosContactsBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.sound,
|
||||
GoRoute(
|
||||
path: 'sound',
|
||||
name: 'sound',
|
||||
pageBuilder: SoundBuilder().buildPage,
|
||||
),
|
||||
/*GoRoute (
|
||||
path: AppRoutes.syncClock,
|
||||
GoRoute(
|
||||
path: 'sync_clock',
|
||||
name: 'sync_clock',
|
||||
// pageBuilder: SyncClockBuilder().buildPage,
|
||||
pageBuilder: SyncClockBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.timezone,
|
||||
GoRoute(
|
||||
path: 'app_store',
|
||||
name: 'app_store',
|
||||
pageBuilder: AppStoreBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'battery',
|
||||
name: 'battery',
|
||||
pageBuilder: BatteryBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'block_phone',
|
||||
name: 'block_phone',
|
||||
pageBuilder: BlockPhoneBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'disable_functions',
|
||||
name: 'disable_functions',
|
||||
pageBuilder: DisableFunctionsBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'language',
|
||||
name: 'language',
|
||||
pageBuilder: LanguageBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'legacy_notifications',
|
||||
name: 'legacy_notifications',
|
||||
pageBuilder: LegacyNotificationsBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'remote_on_off',
|
||||
name: 'remote_on_off',
|
||||
pageBuilder: RemoteOnOffBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'sms_alert',
|
||||
name: 'sms_alert',
|
||||
pageBuilder: SmsAlertBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'timezone',
|
||||
name: 'timezone',
|
||||
// pageBuilder: TimezoneBuilder().buildPage,
|
||||
pageBuilder: TimezoneBuilder().buildPage,
|
||||
),
|
||||
GoRoute (
|
||||
path: AppRoutes.wifiSettings,
|
||||
GoRoute(
|
||||
path: 'wifi_settings',
|
||||
name: 'wifi_settings',
|
||||
// pageBuilder: WifiSettingsBuilder().buildPage,
|
||||
),*/
|
||||
pageBuilder: WifiSettingsBuilder().buildPage,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -406,6 +406,14 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_contacts:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_contacts
|
||||
sha256: "388d32cd33f16640ee169570128c933b45f3259bddbfae7a100bb49e5ffea9ae"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.9+2"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
||||
@@ -43,7 +43,7 @@ dependency_overrides:
|
||||
sca_treezor:
|
||||
path: ../../packages/sca_treezor
|
||||
settings:
|
||||
path: ..\\..\\modules\\legacy\\modules\\settings
|
||||
path: ../../modules/legacy/modules/settings
|
||||
sf_infrastructure:
|
||||
path: ../../packages/sf_infrastructure
|
||||
sf_localizations:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"version":2,"entries":[{"package":"design_system","rootUri":"../../../packages/design_system/","packageUri":"lib/"},{"package":"flutter_treezor_entrust_sdk_bridge","rootUri":"../../../packages/flutter_treezor_entrust_sdk_bridge/","packageUri":"lib/"},{"package":"fonts","rootUri":"../../../packages/fonts/","packageUri":"lib/"},{"package":"get_it","rootUri":"file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/get_it-9.2.0/","packageUri":"lib/","config":{"name":"get_it","issueTracker":"https://github.com/fluttercommunity/get_it/issues","version":"0.0.1","materialIconCodePoint":"0xe189"}},{"package":"sca_treezor","rootUri":"../../../packages/sca_treezor/","packageUri":"lib/"},{"package":"sf_infrastructure","rootUri":"../../../packages/sf_infrastructure/","packageUri":"lib/"},{"package":"sf_localizations","rootUri":"../../../packages/sf_localizations/","packageUri":"lib/"},{"package":"sf_shared","rootUri":"../../../packages/sf_shared/","packageUri":"lib/"},{"package":"shared_preferences","rootUri":"file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences-2.5.4/","packageUri":"lib/","config":{"name":"shared_preferences","issueTracker":"https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22","version":"1.0.0","materialIconCodePoint":"0xe683"}},{"package":"utils","rootUri":"../../../packages/utils/","packageUri":"lib/"},{"package":"activity","rootUri":"../","packageUri":"lib/"}]}
|
||||
@@ -3,163 +3,163 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "_fe_analyzer_shared",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-85.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-85.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "analyzer",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-7.7.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/analyzer-7.7.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "archive",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/archive-4.0.9",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/archive-4.0.9",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/args-2.7.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.13.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "boolean_selector",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "build",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build-3.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build-3.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "build_config",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build_config-1.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build_config-1.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "build_daemon",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build_daemon-4.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build_daemon-4.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "build_resolvers",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build_resolvers-3.0.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build_resolvers-3.0.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "build_runner",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner-2.7.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build_runner-2.7.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "build_runner_core",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner_core-9.3.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/build_runner_core-9.3.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "built_collection",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/built_collection-5.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/built_collection-5.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "built_value",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/built_value-8.12.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/built_value-8.12.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.4.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/characters-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "checked_yaml",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/checked_yaml-2.0.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/checked_yaml-2.0.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "cli_config",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/cli_config-0.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cli_config-0.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "clock",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/clock-1.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/clock-1.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "code_builder",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/code_builder-4.11.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/code_builder-4.11.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/collection-1.19.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "confetti",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/confetti-0.7.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/confetti-0.7.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "convert",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/convert-3.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "cookie_jar",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/cookie_jar-4.0.8",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cookie_jar-4.0.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.15"
|
||||
},
|
||||
{
|
||||
"name": "country_code_picker",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/country_code_picker-3.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/country_code_picker-3.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "coverage",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.15.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/coverage-1.15.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "crypto",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.7",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/crypto-3.0.7",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "dart_style",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/dart_style-3.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dart_style-3.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
@@ -171,91 +171,91 @@
|
||||
},
|
||||
{
|
||||
"name": "diacritic",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/diacritic-0.1.6",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/diacritic-0.1.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "dio",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/dio-5.9.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio-5.9.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "dio_cookie_manager",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/dio_cookie_manager-3.3.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio_cookie_manager-3.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "dio_web_adapter",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/dio_web_adapter-2.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio_web_adapter-2.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "equatable",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/equatable-2.0.8",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/equatable-2.0.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "fake_async",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/fake_async-1.3.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/fake_async-1.3.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "ffi",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/ffi-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ffi-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/file-7.0.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "fixnum",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/fixnum-1.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/fixnum-1.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "fl_chart",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-1.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/fl_chart-1.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_lints",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_lints-5.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_lints-5.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "flutter_riverpod",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_riverpod-3.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_riverpod-3.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "flutter_svg",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_svg-2.2.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_svg-2.2.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_test",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter_test",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_test",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
@@ -267,7 +267,7 @@
|
||||
},
|
||||
{
|
||||
"name": "flutter_web_plugins",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter_web_plugins",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_web_plugins",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
@@ -279,259 +279,259 @@
|
||||
},
|
||||
{
|
||||
"name": "freezed",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/freezed-3.2.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/freezed-3.2.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "freezed_annotation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/freezed_annotation-3.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/freezed_annotation-3.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "frontend_server_client",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-4.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "get_it",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/get_it-9.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/get_it-9.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "glob",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/glob-2.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "go_router",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/go_router-17.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/go_router-17.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "graphs",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/graphs-2.3.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/graphs-2.3.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "http",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http-1.6.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http-1.6.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "http_multi_server",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_multi_server-3.2.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "http_parser",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_parser-4.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "intl",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.20.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/intl-0.20.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "io",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/io-1.0.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "js",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.7.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/js-0.7.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "json_annotation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/json_annotation-4.9.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/json_annotation-4.9.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "json_serializable",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/json_serializable-6.11.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/json_serializable-6.11.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker-11.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_flutter_testing",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_testing",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_testing-3.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "lints",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/lints-5.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lints-5.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
{
|
||||
"name": "logging",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.3.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/logging-1.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "lottie",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/lottie-3.3.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lottie-3.3.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.17",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/matcher-0.12.17",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/meta-1.16.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "mime",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/mime-2.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/mime-2.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "node_preamble",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/node_preamble-2.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/node_preamble-2.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "package_config",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/package_config-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path-1.9.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "path_parsing",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_parsing-1.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_parsing-1.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "path_provider",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.1.5",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider-2.1.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_android",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.2.22",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_foundation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.5.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_linux",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.19"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "path_provider_windows",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.3.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "petitparser",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/petitparser-7.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/petitparser-7.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "platform",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.6",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/platform-3.1.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "pool",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pool-1.5.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "posix",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/posix-6.5.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/posix-6.5.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "pub_semver",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pub_semver-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "pubspec_parse",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/pubspec_parse-1.5.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pubspec_parse-1.5.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
{
|
||||
"name": "riverpod",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/riverpod-3.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod-3.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
@@ -561,181 +561,181 @@
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences-2.5.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences-2.5.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_android",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_android-2.4.20",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.20",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_foundation",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_foundation-2.5.6",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_linux",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_linux-2.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_platform_interface",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_web",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_web-2.4.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "shared_preferences_windows",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_windows-2.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "shelf",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shelf-1.4.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "shelf_packages_handler",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_packages_handler-3.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "shelf_static",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_static-1.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shelf_static-1.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "shelf_web_socket",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-3.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shelf_web_socket-3.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"rootUri": "file:///C:/Program%20Files/Flutter/bin/cache/pkg/sky_engine",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/bin/cache/pkg/sky_engine",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "source_gen",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_gen-4.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_gen-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "source_helper",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_helper-1.3.8",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_helper-1.3.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.7"
|
||||
},
|
||||
{
|
||||
"name": "source_map_stack_trace",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_map_stack_trace-2.1.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "source_maps",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.13",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_maps-0.10.13",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "state_notifier",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/state_notifier-1.0.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/state_notifier-1.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "stream_channel",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.4",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stream_channel-2.1.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "stream_transform",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/stream_transform-2.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stream_transform-2.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.4.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "test",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.26.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/test-1.26.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "test_api",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.7.6",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/test_api-0.7.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "test_core",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.11",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/test_core-0.6.11",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "timing",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/timing-1.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "top_snackbar_flutter",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/top_snackbar_flutter-3.3.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/top_snackbar_flutter-3.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.15"
|
||||
},
|
||||
{
|
||||
"name": "typed_data",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/typed_data-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "universal_io",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/universal_io-2.3.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/universal_io-2.3.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
@@ -747,79 +747,79 @@
|
||||
},
|
||||
{
|
||||
"name": "vector_graphics",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics-1.1.19",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_graphics-1.1.19",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.6"
|
||||
},
|
||||
{
|
||||
"name": "vector_graphics_codec",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_codec-1.1.13",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_graphics_codec-1.1.13",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "vector_graphics_compiler",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_compiler-1.1.20",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_graphics_compiler-1.1.20",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.9"
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-15.0.2",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vm_service-15.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "watcher",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/watcher-1.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "web",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web-1.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "web_socket",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket-1.0.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web_socket-1.0.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "web_socket_channel",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-3.0.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "webkit_inspection_protocol",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "xdg_directories",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.1.0",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "xml",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/xml-6.6.1",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/xml-6.6.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "yaml",
|
||||
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/yaml-3.1.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
@@ -832,7 +832,7 @@
|
||||
],
|
||||
"generator": "pub",
|
||||
"generatorVersion": "3.9.2",
|
||||
"flutterRoot": "file:///C:/Program%20Files/Flutter",
|
||||
"flutterVersion": "3.35.6",
|
||||
"pubCache": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache"
|
||||
"flutterRoot": "file:///Users/juliandalcalaf/Development/flutter",
|
||||
"flutterVersion": "3.35.7",
|
||||
"pubCache": "file:///Users/juliandalcalaf/.pub-cache"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.35.6
|
||||
3.35.7
|
||||
@@ -1 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.5.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.5.6\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.22\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_android-2.4.20\\\\","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.5.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.5.6\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_linux-2.4.1\\\\","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_windows-2.4.1\\\\","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_web-2.4.3\\\\","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-03-09 10:57:00.990731","version":"3.35.6","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/apps/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/apps/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-03-13 09:49:15.619720","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
3
modules/activity/devtools_options.yaml
Normal file
3
modules/activity/devtools_options.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
@@ -32,7 +32,7 @@ class OnboardingScreen extends ConsumerWidget {
|
||||
|
||||
void goToNext() {
|
||||
if (isLast) {
|
||||
navigationContract.goTo(AppRoutes.login);
|
||||
navigationContract.goTo(AppRoutes.legacyLogin);
|
||||
} else {
|
||||
pageController.nextPage(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
@@ -111,7 +111,7 @@ class OnboardingScreen extends ConsumerWidget {
|
||||
? const SizedBox.shrink()
|
||||
: TextButton(
|
||||
onPressed: () =>
|
||||
navigationContract.goTo(AppRoutes.login),
|
||||
navigationContract.goTo(AppRoutes.legacyLogin),
|
||||
child: Text(
|
||||
context.translate(I18n.skip),
|
||||
style: AppFonts.stolzlStyle(
|
||||
|
||||
3
modules/dashboard_shell/devtools_options.yaml
Normal file
3
modules/dashboard_shell/devtools_options.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
@@ -16,11 +16,11 @@ class UsersRemoteDatasourceImpl implements UsersRemoteDatasource {
|
||||
Future<List<UserEntity>> getUsers({required String userId}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/$userId/devices',
|
||||
'/users/$userId/user-devices',
|
||||
);
|
||||
final data = response.data!['items'];
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception('Empty response from /:userId/devices');
|
||||
throw Exception('Empty response from /users/$userId/user-devices');
|
||||
}
|
||||
|
||||
final model = GetAppUsersResponseModel.fromJson(data);
|
||||
|
||||
@@ -7,9 +7,6 @@ part 'update_user_request_model.g.dart';
|
||||
@freezed
|
||||
abstract class UpdateUserRequestModel with _$UpdateUserRequestModel {
|
||||
const factory UpdateUserRequestModel({
|
||||
required String id,
|
||||
String? email,
|
||||
String? language,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? phone,
|
||||
@@ -21,9 +18,6 @@ abstract class UpdateUserRequestModel with _$UpdateUserRequestModel {
|
||||
|
||||
extension UpdateUserRequestModelMapper on UpdateUserRequestEntity {
|
||||
UpdateUserRequestModel toModel() => UpdateUserRequestModel(
|
||||
id: id,
|
||||
email: email,
|
||||
language: language,
|
||||
firstName: firstName,
|
||||
lastName: lastName,
|
||||
phone: phone,
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$UpdateUserRequestModel {
|
||||
|
||||
String get id; String? get email; String? get language; String? get firstName; String? get lastName; String? get phone;
|
||||
String? get firstName; String? get lastName; String? get phone;
|
||||
/// Create a copy of UpdateUserRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $UpdateUserRequestModelCopyWith<UpdateUserRequestModel> get copyWith => _$Update
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateUserRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.email, email) || other.email == email)&&(identical(other.language, language) || other.language == language)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateUserRequestModel&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,email,language,firstName,lastName,phone);
|
||||
int get hashCode => Object.hash(runtimeType,firstName,lastName,phone);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateUserRequestModel(id: $id, email: $email, language: $language, firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
return 'UpdateUserRequestModel(firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $UpdateUserRequestModelCopyWith<$Res> {
|
||||
factory $UpdateUserRequestModelCopyWith(UpdateUserRequestModel value, $Res Function(UpdateUserRequestModel) _then) = _$UpdateUserRequestModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String? email, String? language, String? firstName, String? lastName, String? phone
|
||||
String? firstName, String? lastName, String? phone
|
||||
});
|
||||
|
||||
|
||||
@@ -65,12 +65,9 @@ class _$UpdateUserRequestModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of UpdateUserRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? email = freezed,Object? language = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String?,language: freezed == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
@@ -158,10 +155,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? email, String? language, String? firstName, String? lastName, String? phone)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? firstName, String? lastName, String? phone)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -179,10 +176,10 @@ return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastNa
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? email, String? language, String? firstName, String? lastName, String? phone) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? firstName, String? lastName, String? phone) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestModel():
|
||||
return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -199,10 +196,10 @@ return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastNa
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? email, String? language, String? firstName, String? lastName, String? phone)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? firstName, String? lastName, String? phone)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -214,12 +211,9 @@ return $default(_that.id,_that.email,_that.language,_that.firstName,_that.lastNa
|
||||
@JsonSerializable()
|
||||
|
||||
class _UpdateUserRequestModel implements UpdateUserRequestModel {
|
||||
const _UpdateUserRequestModel({required this.id, this.email, this.language, this.firstName, this.lastName, this.phone});
|
||||
const _UpdateUserRequestModel({this.firstName, this.lastName, this.phone});
|
||||
factory _UpdateUserRequestModel.fromJson(Map<String, dynamic> json) => _$UpdateUserRequestModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String? email;
|
||||
@override final String? language;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? phone;
|
||||
@@ -237,16 +231,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateUserRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.email, email) || other.email == email)&&(identical(other.language, language) || other.language == language)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateUserRequestModel&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,email,language,firstName,lastName,phone);
|
||||
int get hashCode => Object.hash(runtimeType,firstName,lastName,phone);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateUserRequestModel(id: $id, email: $email, language: $language, firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
return 'UpdateUserRequestModel(firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +251,7 @@ abstract mixin class _$UpdateUserRequestModelCopyWith<$Res> implements $UpdateUs
|
||||
factory _$UpdateUserRequestModelCopyWith(_UpdateUserRequestModel value, $Res Function(_UpdateUserRequestModel) _then) = __$UpdateUserRequestModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String? email, String? language, String? firstName, String? lastName, String? phone
|
||||
String? firstName, String? lastName, String? phone
|
||||
});
|
||||
|
||||
|
||||
@@ -274,12 +268,9 @@ class __$UpdateUserRequestModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of UpdateUserRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? email = freezed,Object? language = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
return _then(_UpdateUserRequestModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String?,language: freezed == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
|
||||
@@ -9,9 +9,6 @@ part of 'update_user_request_model.dart';
|
||||
_UpdateUserRequestModel _$UpdateUserRequestModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _UpdateUserRequestModel(
|
||||
id: json['id'] as String,
|
||||
email: json['email'] as String?,
|
||||
language: json['language'] as String?,
|
||||
firstName: json['firstName'] as String?,
|
||||
lastName: json['lastName'] as String?,
|
||||
phone: json['phone'] as String?,
|
||||
@@ -20,9 +17,6 @@ _UpdateUserRequestModel _$UpdateUserRequestModelFromJson(
|
||||
Map<String, dynamic> _$UpdateUserRequestModelToJson(
|
||||
_UpdateUserRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'email': instance.email,
|
||||
'language': instance.language,
|
||||
'firstName': instance.firstName,
|
||||
'lastName': instance.lastName,
|
||||
'phone': instance.phone,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:account/src/features/account_settings/presentation/state/account_settings_view_model.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:legacy_auth/legacy_auth.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:navigation/navigation.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
@@ -12,163 +12,131 @@ import 'widgets/reg_code_dialog.dart';
|
||||
|
||||
class AccountSettingsScreen extends ConsumerWidget {
|
||||
final NavigationContract navigationContract;
|
||||
static final _privacyUrl = 'https://savefamilygps.com/pages/politica-de-privacidad-reloj-gps-infantil-localizador-savefamily';
|
||||
static final _privacyUrl =
|
||||
'https://savefamilygps.com/pages/politica-de-privacidad-reloj-gps-infantil-localizador-savefamily';
|
||||
|
||||
const AccountSettingsScreen({super.key, required this.navigationContract});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
final color = theme.getColorFor(ThemeCode.legacyPrimary);
|
||||
final selectedDevice = ref.watch(selectedDeviceProvider);
|
||||
final isLoggingOut = ref.watch(
|
||||
accountSettingsViewModelProvider.select((s) => s.isLoggingOut),
|
||||
);
|
||||
|
||||
ref.listen(
|
||||
accountSettingsViewModelProvider.select((s) => s.isLoggingOut),
|
||||
(prev, isLoggingOut) {
|
||||
if (prev == true && !isLoggingOut) {
|
||||
navigationContract.goTo(AppRoutes.legacyLogin);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.accountSettings),
|
||||
body: SingleChildScrollView(child: Container(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 22, vertical: 10),
|
||||
big: EdgeInsets.symmetric(horizontal: 21, vertical: 8)
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.personalData);},
|
||||
icon: SFIcons.account,
|
||||
text: I18n.personalData
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.changePassword);},
|
||||
icon: Icons.lock,
|
||||
text: I18n.changePassword
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => LegacyDeviceSetupScreen(
|
||||
navigationContract: navigationContract,
|
||||
isFirstDevice: false
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 22, vertical: 10),
|
||||
big: EdgeInsets.symmetric(horizontal: 21, vertical: 8),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.personalData), icon: SFIcons.account, text: I18n.personalData, color: color),
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.changePassword), icon: Icons.lock, text: I18n.changePassword, color: color),
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.legacyDeviceSetup), icon: Icons.add_circle_outline, text: I18n.addNewSF, color: color),
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.linkedDevices), icon: Icons.account_circle_outlined, text: I18n.linkedDevices, color: color),
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.appUsers), icon: Icons.groups_outlined, text: I18n.appUsers, color: color),
|
||||
_item(
|
||||
context,
|
||||
onPressed: () async {
|
||||
final Uri url = Uri.parse(_privacyUrl);
|
||||
if (!await launchUrl(url)) {
|
||||
throw Exception('Could not launch $url');
|
||||
}
|
||||
},
|
||||
icon: SFIcons.privacy,
|
||||
text: I18n.privacyPolicy,
|
||||
color: color,
|
||||
),
|
||||
_item(
|
||||
context,
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: RegCodeDialog(
|
||||
regCode: selectedDevice?.id ?? '',
|
||||
deviceId: selectedDevice?.identificator ?? '',
|
||||
name: selectedDevice?.carrierName ?? '',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
icon: Icons.add_circle_outline,
|
||||
text: I18n.addNewSF
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.linkedDevices);},
|
||||
icon: Icons.account_circle_outlined,
|
||||
text: I18n.linkedDevices
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.appUsers);},
|
||||
icon: Icons.groups_outlined,
|
||||
text: I18n.appUsers
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: () async {
|
||||
final Uri url = Uri.parse(_privacyUrl);
|
||||
if (!await launchUrl(url)) {
|
||||
throw Exception('Could not launch $url');
|
||||
}
|
||||
},
|
||||
icon: SFIcons.privacy,
|
||||
text: I18n.privacyPolicy
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){
|
||||
showDialog(context: context, builder: (context)=>Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: RegCodeDialog(
|
||||
regCode: selectedDevice?.id ?? '',
|
||||
deviceId: selectedDevice?.identificator ?? '',
|
||||
name: selectedDevice?.carrierName ?? ''
|
||||
),
|
||||
));
|
||||
},
|
||||
icon: Icons.qr_code,
|
||||
text: I18n.regCode
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.deleteAccount);},
|
||||
icon: Icons.no_accounts,
|
||||
text: I18n.deleteAccount
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
icon: Icons.qr_code,
|
||||
text: I18n.regCode,
|
||||
color: color,
|
||||
),
|
||||
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.deleteAccount), icon: Icons.no_accounts, text: I18n.deleteAccount, color: color),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
footer: Container(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(vertical: 12, horizontal: 30),
|
||||
big: EdgeInsets.symmetric(vertical: 10, horizontal: 28)
|
||||
big: EdgeInsets.symmetric(vertical: 10, horizontal: 28),
|
||||
),
|
||||
child: PrimaryButton(text: context.translate(I18n.logOut), color: theme.getColorFor(ThemeCode.legacyPrimary)),
|
||||
)
|
||||
child: PrimaryButton(
|
||||
text: context.translate(I18n.logOut),
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
leading: isLoggingOut
|
||||
? const SizedBox(
|
||||
height: 18,
|
||||
width: 18,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
onPressed: isLoggingOut
|
||||
? () {}
|
||||
: ref.read(accountSettingsViewModelProvider.notifier).logout,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _item(
|
||||
BuildContext context, {
|
||||
required VoidCallback onPressed,
|
||||
required IconData icon,
|
||||
required String text,
|
||||
required Color color,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
child: SectionButton(
|
||||
onPressed: onPressed,
|
||||
icon: Icon(
|
||||
icon,
|
||||
size: SizeUtils.getByScreen(small: 28, big: 26),
|
||||
color: color,
|
||||
),
|
||||
body: Text(
|
||||
context.translate(text),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 18, big: 19),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppSectionButton extends ConsumerWidget {
|
||||
|
||||
final GestureTapCallback onPressed;
|
||||
final IconData icon;
|
||||
final String text;
|
||||
|
||||
const AppSectionButton({
|
||||
required this.onPressed,
|
||||
required this.icon,
|
||||
required this.text,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Container(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 22, vertical: 20),
|
||||
big: EdgeInsets.symmetric(horizontal: 21, vertical: 18)
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(SizeUtils.getByScreen(small: 12, big: 18))),
|
||||
color: theme.getColorFor(ThemeCode.backgroundSecondary),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
),
|
||||
padding: EdgeInsets.all(SizeUtils.getByScreen(small: 4, big: 12)),
|
||||
child: Icon(icon,
|
||||
size: SizeUtils.getByScreen(small: 40, big: 44),
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
weight: 30,
|
||||
),
|
||||
),
|
||||
SizedBox(width: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
Expanded(
|
||||
child: Text(context.translate(text),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 18, big: 19),
|
||||
fontWeight: FontWeight.w500
|
||||
)
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:account/src/features/account_settings/presentation/state/account_settings_view_state.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:legacy_auth/legacy_auth.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
final accountSettingsViewModelProvider =
|
||||
NotifierProvider.autoDispose<AccountSettingsViewModel, AccountSettingsViewState>(
|
||||
AccountSettingsViewModel.new,
|
||||
);
|
||||
|
||||
class AccountSettingsViewModel extends Notifier<AccountSettingsViewState> {
|
||||
@override
|
||||
AccountSettingsViewState build() {
|
||||
return const AccountSettingsViewState();
|
||||
}
|
||||
|
||||
Future<void> logout() async {
|
||||
if (state.isLoggingOut) return;
|
||||
|
||||
state = state.copyWith(isLoggingOut: true, errorMessage: '');
|
||||
|
||||
try {
|
||||
await ref.read(legacyAuthRepositoryProvider).logout();
|
||||
} catch (_) {}
|
||||
|
||||
await clearSessionData();
|
||||
|
||||
state = state.copyWith(isLoggingOut: false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'account_settings_view_state.freezed.dart';
|
||||
|
||||
@freezed
|
||||
abstract class AccountSettingsViewState with _$AccountSettingsViewState {
|
||||
const factory AccountSettingsViewState({
|
||||
@Default(false) bool isLoggingOut,
|
||||
@Default('') String errorMessage,
|
||||
}) = _AccountSettingsViewState;
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'account_settings_view_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$AccountSettingsViewState {
|
||||
|
||||
bool get isLoggingOut; String get errorMessage;
|
||||
/// Create a copy of AccountSettingsViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccountSettingsViewStateCopyWith<AccountSettingsViewState> get copyWith => _$AccountSettingsViewStateCopyWithImpl<AccountSettingsViewState>(this as AccountSettingsViewState, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AccountSettingsViewState&&(identical(other.isLoggingOut, isLoggingOut) || other.isLoggingOut == isLoggingOut)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoggingOut,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AccountSettingsViewState(isLoggingOut: $isLoggingOut, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $AccountSettingsViewStateCopyWith<$Res> {
|
||||
factory $AccountSettingsViewStateCopyWith(AccountSettingsViewState value, $Res Function(AccountSettingsViewState) _then) = _$AccountSettingsViewStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool isLoggingOut, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$AccountSettingsViewStateCopyWithImpl<$Res>
|
||||
implements $AccountSettingsViewStateCopyWith<$Res> {
|
||||
_$AccountSettingsViewStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final AccountSettingsViewState _self;
|
||||
final $Res Function(AccountSettingsViewState) _then;
|
||||
|
||||
/// Create a copy of AccountSettingsViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isLoggingOut = null,Object? errorMessage = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
isLoggingOut: null == isLoggingOut ? _self.isLoggingOut : isLoggingOut // ignore: cast_nullable_to_non_nullable
|
||||
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [AccountSettingsViewState].
|
||||
extension AccountSettingsViewStatePatterns on AccountSettingsViewState {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AccountSettingsViewState value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AccountSettingsViewState value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AccountSettingsViewState value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoggingOut, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState() when $default != null:
|
||||
return $default(_that.isLoggingOut,_that.errorMessage);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoggingOut, String errorMessage) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState():
|
||||
return $default(_that.isLoggingOut,_that.errorMessage);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoggingOut, String errorMessage)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AccountSettingsViewState() when $default != null:
|
||||
return $default(_that.isLoggingOut,_that.errorMessage);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _AccountSettingsViewState implements AccountSettingsViewState {
|
||||
const _AccountSettingsViewState({this.isLoggingOut = false, this.errorMessage = ''});
|
||||
|
||||
|
||||
@override@JsonKey() final bool isLoggingOut;
|
||||
@override@JsonKey() final String errorMessage;
|
||||
|
||||
/// Create a copy of AccountSettingsViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$AccountSettingsViewStateCopyWith<_AccountSettingsViewState> get copyWith => __$AccountSettingsViewStateCopyWithImpl<_AccountSettingsViewState>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AccountSettingsViewState&&(identical(other.isLoggingOut, isLoggingOut) || other.isLoggingOut == isLoggingOut)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoggingOut,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AccountSettingsViewState(isLoggingOut: $isLoggingOut, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$AccountSettingsViewStateCopyWith<$Res> implements $AccountSettingsViewStateCopyWith<$Res> {
|
||||
factory _$AccountSettingsViewStateCopyWith(_AccountSettingsViewState value, $Res Function(_AccountSettingsViewState) _then) = __$AccountSettingsViewStateCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool isLoggingOut, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$AccountSettingsViewStateCopyWithImpl<$Res>
|
||||
implements _$AccountSettingsViewStateCopyWith<$Res> {
|
||||
__$AccountSettingsViewStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _AccountSettingsViewState _self;
|
||||
final $Res Function(_AccountSettingsViewState) _then;
|
||||
|
||||
/// Create a copy of AccountSettingsViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isLoggingOut = null,Object? errorMessage = null,}) {
|
||||
return _then(_AccountSettingsViewState(
|
||||
isLoggingOut: null == isLoggingOut ? _self.isLoggingOut : isLoggingOut // ignore: cast_nullable_to_non_nullable
|
||||
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -6,7 +6,6 @@ import 'package:sf_localizations/sf_localizations.dart';
|
||||
import 'package:utils/utils.dart';
|
||||
|
||||
class RegCodeDialog extends StatelessWidget {
|
||||
|
||||
final String regCode;
|
||||
final String deviceId;
|
||||
final String name;
|
||||
@@ -18,87 +17,118 @@ class RegCodeDialog extends StatelessWidget {
|
||||
required this.name,
|
||||
});
|
||||
|
||||
static const _iconRadius = 40.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: SizeUtils.getByScreen(small: 330, big: 328),
|
||||
color: Colors.transparent,
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: SizeUtils.getByScreen(small: 300, big: 298),
|
||||
width: SizeUtils.getByScreen(small: 350, big: 348),
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(vertical: 14, horizontal: 18),
|
||||
big: EdgeInsets.symmetric(vertical: 12, horizontal: 16)
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.topCenter,
|
||||
children: [
|
||||
Container(
|
||||
width: SizeUtils.getByScreen(small: 320, big: 340),
|
||||
margin: const EdgeInsets.only(top: _iconRadius),
|
||||
padding: EdgeInsets.only(
|
||||
top: _iconRadius + SizeUtils.getByScreen(small: 12, big: 10),
|
||||
bottom: SizeUtils.getByScreen(small: 20, big: 18),
|
||||
left: SizeUtils.getByScreen(small: 20, big: 18),
|
||||
right: SizeUtils.getByScreen(small: 20, big: 18),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () => Navigator.pop(context),
|
||||
child: const Icon(Icons.close, size: 22, color: Colors.grey),
|
||||
),
|
||||
),
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: IconButton(
|
||||
onPressed: (){Navigator.pop(context);},
|
||||
icon: Icon(Icons.close),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
),
|
||||
Text(name, style: TextStyle()),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(context.translate(I18n.deviceIdLabel,
|
||||
args: {'deviceId': deviceId})),
|
||||
TextButton(
|
||||
onPressed: (){Clipboard.setData(ClipboardData(text: deviceId));},
|
||||
child: Text(context.translate(I18n.copy)),
|
||||
)
|
||||
],
|
||||
),
|
||||
QrImageView(
|
||||
data: regCode,
|
||||
version: QrVersions.auto,
|
||||
size: SizeUtils.getByScreen(small: 100, big: 98),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(context.translate(I18n.regCodeLabel,
|
||||
args: {'regCode': regCode})),
|
||||
TextButton(
|
||||
onPressed: (){Clipboard.setData(ClipboardData(text: regCode));},
|
||||
child: Text(context.translate(I18n.copy))
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_CopyableField(
|
||||
label: context.translate(
|
||||
I18n.deviceIdLabel,
|
||||
args: {'deviceId': deviceId},
|
||||
),
|
||||
value: deviceId,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
QrImageView(
|
||||
data: regCode,
|
||||
version: QrVersions.auto,
|
||||
size: SizeUtils.getByScreen(small: 120, big: 120),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_CopyableField(
|
||||
label: context.translate(
|
||||
I18n.regCodeLabel,
|
||||
args: {'regCode': regCode},
|
||||
),
|
||||
value: regCode,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF00A1C6),
|
||||
),
|
||||
padding: EdgeInsets.all(SizeUtils.getByScreen(small: 16, big: 16)),
|
||||
child: Icon(
|
||||
SFIcons.watch,
|
||||
size: SizeUtils.getByScreen(small: 68, big: 66),
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _CopyableField extends StatelessWidget {
|
||||
final String label;
|
||||
final String value;
|
||||
|
||||
const _CopyableField({required this.label, required this.value});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Clipboard.setData(ClipboardData(text: value)),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.withValues(alpha: 0.08),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF00A1C6),
|
||||
),
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.all(12),
|
||||
big: EdgeInsets.all(12)
|
||||
),
|
||||
child: Icon(
|
||||
SFIcons.watch,
|
||||
size: SizeUtils.getByScreen(small: 68, big: 66),
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
const SizedBox(width: 6),
|
||||
const Icon(Icons.copy, size: 14, color: Colors.grey),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ class ChangePasswordViewModel extends Notifier<ChangePasswordViewState> {
|
||||
isLoading: false,
|
||||
isComplete: true
|
||||
);
|
||||
ref.invalidate(userInfoProvider);
|
||||
} catch (e) {
|
||||
if (!ref.mounted) return;
|
||||
_finishWithError(message: e.toString());
|
||||
|
||||
@@ -19,6 +19,7 @@ class DeleteAccountViewModel extends Notifier<DeleteAccountViewState> {
|
||||
@override
|
||||
DeleteAccountViewState build() {
|
||||
_usersRepository = ref.read(usersRepositoryProvider);
|
||||
_devicesRepository = ref.read(sharedDevicesRepositoryProvider);
|
||||
|
||||
passwordController = TextEditingController();
|
||||
passwordController.addListener(_onPasswordChanged);
|
||||
@@ -104,8 +105,6 @@ class DeleteAccountViewModel extends Notifier<DeleteAccountViewState> {
|
||||
await _usersRepository.deleteUser(userId: state.loggedUser!.id);
|
||||
if (!ref.mounted) return;
|
||||
|
||||
ref.invalidate(userInfoProvider);
|
||||
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
isComplete: true
|
||||
|
||||
@@ -42,7 +42,7 @@ class EditLinkedDeviceScreen extends ConsumerWidget {
|
||||
Stack(
|
||||
children: [
|
||||
DecoratedBox(decoration: BoxDecoration(color: Colors.blueAccent)),
|
||||
Center(child: SvgPicture.asset('assets/images/ui/profile.svg')),
|
||||
Center(child: SvgPicture.asset('assets/shared/images/profile.svg')),
|
||||
Center(child: SizedBox(
|
||||
width: 160,
|
||||
height: 160,
|
||||
|
||||
@@ -5,19 +5,8 @@ part 'update_user_request_entity.freezed.dart';
|
||||
@freezed
|
||||
abstract class UpdateUserRequestEntity with _$UpdateUserRequestEntity {
|
||||
const factory UpdateUserRequestEntity({
|
||||
required String id,
|
||||
String? delegationId,
|
||||
String? email,
|
||||
String? createdAt,
|
||||
String? updatedAt,
|
||||
String? status,
|
||||
String? role,
|
||||
String? lastLogin,
|
||||
String? currentLogin,
|
||||
String? language,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? hasApiKey,
|
||||
String? phone,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? phone,
|
||||
}) = _UpdateUserRequestEntity;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$UpdateUserRequestEntity {
|
||||
|
||||
String get id; String? get delegationId; String? get email; String? get createdAt; String? get updatedAt; String? get status; String? get role; String? get lastLogin; String? get currentLogin; String? get language; String? get firstName; String? get lastName; String? get hasApiKey; String? get phone;
|
||||
String? get firstName; String? get lastName; String? get phone;
|
||||
/// Create a copy of UpdateUserRequestEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -25,16 +25,16 @@ $UpdateUserRequestEntityCopyWith<UpdateUserRequestEntity> get copyWith => _$Upda
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateUserRequestEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.email, email) || other.email == email)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.status, status) || other.status == status)&&(identical(other.role, role) || other.role == role)&&(identical(other.lastLogin, lastLogin) || other.lastLogin == lastLogin)&&(identical(other.currentLogin, currentLogin) || other.currentLogin == currentLogin)&&(identical(other.language, language) || other.language == language)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.hasApiKey, hasApiKey) || other.hasApiKey == hasApiKey)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateUserRequestEntity&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,delegationId,email,createdAt,updatedAt,status,role,lastLogin,currentLogin,language,firstName,lastName,hasApiKey,phone);
|
||||
int get hashCode => Object.hash(runtimeType,firstName,lastName,phone);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateUserRequestEntity(id: $id, delegationId: $delegationId, email: $email, createdAt: $createdAt, updatedAt: $updatedAt, status: $status, role: $role, lastLogin: $lastLogin, currentLogin: $currentLogin, language: $language, firstName: $firstName, lastName: $lastName, hasApiKey: $hasApiKey, phone: $phone)';
|
||||
return 'UpdateUserRequestEntity(firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract mixin class $UpdateUserRequestEntityCopyWith<$Res> {
|
||||
factory $UpdateUserRequestEntityCopyWith(UpdateUserRequestEntity value, $Res Function(UpdateUserRequestEntity) _then) = _$UpdateUserRequestEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String? delegationId, String? email, String? createdAt, String? updatedAt, String? status, String? role, String? lastLogin, String? currentLogin, String? language, String? firstName, String? lastName, String? hasApiKey, String? phone
|
||||
String? firstName, String? lastName, String? phone
|
||||
});
|
||||
|
||||
|
||||
@@ -62,21 +62,10 @@ class _$UpdateUserRequestEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of UpdateUserRequestEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? delegationId = freezed,Object? email = freezed,Object? createdAt = freezed,Object? updatedAt = freezed,Object? status = freezed,Object? role = freezed,Object? lastLogin = freezed,Object? currentLogin = freezed,Object? language = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? hasApiKey = freezed,Object? phone = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastLogin: freezed == lastLogin ? _self.lastLogin : lastLogin // ignore: cast_nullable_to_non_nullable
|
||||
as String?,currentLogin: freezed == currentLogin ? _self.currentLogin : currentLogin // ignore: cast_nullable_to_non_nullable
|
||||
as String?,language: freezed == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,hasApiKey: freezed == hasApiKey ? _self.hasApiKey : hasApiKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
@@ -163,10 +152,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? delegationId, String? email, String? createdAt, String? updatedAt, String? status, String? role, String? lastLogin, String? currentLogin, String? language, String? firstName, String? lastName, String? hasApiKey, String? phone)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? firstName, String? lastName, String? phone)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestEntity() when $default != null:
|
||||
return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.updatedAt,_that.status,_that.role,_that.lastLogin,_that.currentLogin,_that.language,_that.firstName,_that.lastName,_that.hasApiKey,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -184,10 +173,10 @@ return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.up
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? delegationId, String? email, String? createdAt, String? updatedAt, String? status, String? role, String? lastLogin, String? currentLogin, String? language, String? firstName, String? lastName, String? hasApiKey, String? phone) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? firstName, String? lastName, String? phone) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestEntity():
|
||||
return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.updatedAt,_that.status,_that.role,_that.lastLogin,_that.currentLogin,_that.language,_that.firstName,_that.lastName,_that.hasApiKey,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -204,10 +193,10 @@ return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.up
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? delegationId, String? email, String? createdAt, String? updatedAt, String? status, String? role, String? lastLogin, String? currentLogin, String? language, String? firstName, String? lastName, String? hasApiKey, String? phone)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? firstName, String? lastName, String? phone)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateUserRequestEntity() when $default != null:
|
||||
return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.updatedAt,_that.status,_that.role,_that.lastLogin,_that.currentLogin,_that.language,_that.firstName,_that.lastName,_that.hasApiKey,_that.phone);case _:
|
||||
return $default(_that.firstName,_that.lastName,_that.phone);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -219,22 +208,11 @@ return $default(_that.id,_that.delegationId,_that.email,_that.createdAt,_that.up
|
||||
|
||||
|
||||
class _UpdateUserRequestEntity implements UpdateUserRequestEntity {
|
||||
const _UpdateUserRequestEntity({required this.id, this.delegationId, this.email, this.createdAt, this.updatedAt, this.status, this.role, this.lastLogin, this.currentLogin, this.language, this.firstName, this.lastName, this.hasApiKey, this.phone});
|
||||
const _UpdateUserRequestEntity({this.firstName, this.lastName, this.phone});
|
||||
|
||||
|
||||
@override final String id;
|
||||
@override final String? delegationId;
|
||||
@override final String? email;
|
||||
@override final String? createdAt;
|
||||
@override final String? updatedAt;
|
||||
@override final String? status;
|
||||
@override final String? role;
|
||||
@override final String? lastLogin;
|
||||
@override final String? currentLogin;
|
||||
@override final String? language;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? hasApiKey;
|
||||
@override final String? phone;
|
||||
|
||||
/// Create a copy of UpdateUserRequestEntity
|
||||
@@ -247,16 +225,16 @@ _$UpdateUserRequestEntityCopyWith<_UpdateUserRequestEntity> get copyWith => __$U
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateUserRequestEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.email, email) || other.email == email)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.status, status) || other.status == status)&&(identical(other.role, role) || other.role == role)&&(identical(other.lastLogin, lastLogin) || other.lastLogin == lastLogin)&&(identical(other.currentLogin, currentLogin) || other.currentLogin == currentLogin)&&(identical(other.language, language) || other.language == language)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.hasApiKey, hasApiKey) || other.hasApiKey == hasApiKey)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateUserRequestEntity&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phone, phone) || other.phone == phone));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,delegationId,email,createdAt,updatedAt,status,role,lastLogin,currentLogin,language,firstName,lastName,hasApiKey,phone);
|
||||
int get hashCode => Object.hash(runtimeType,firstName,lastName,phone);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateUserRequestEntity(id: $id, delegationId: $delegationId, email: $email, createdAt: $createdAt, updatedAt: $updatedAt, status: $status, role: $role, lastLogin: $lastLogin, currentLogin: $currentLogin, language: $language, firstName: $firstName, lastName: $lastName, hasApiKey: $hasApiKey, phone: $phone)';
|
||||
return 'UpdateUserRequestEntity(firstName: $firstName, lastName: $lastName, phone: $phone)';
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +245,7 @@ abstract mixin class _$UpdateUserRequestEntityCopyWith<$Res> implements $UpdateU
|
||||
factory _$UpdateUserRequestEntityCopyWith(_UpdateUserRequestEntity value, $Res Function(_UpdateUserRequestEntity) _then) = __$UpdateUserRequestEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String? delegationId, String? email, String? createdAt, String? updatedAt, String? status, String? role, String? lastLogin, String? currentLogin, String? language, String? firstName, String? lastName, String? hasApiKey, String? phone
|
||||
String? firstName, String? lastName, String? phone
|
||||
});
|
||||
|
||||
|
||||
@@ -284,21 +262,10 @@ class __$UpdateUserRequestEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of UpdateUserRequestEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? delegationId = freezed,Object? email = freezed,Object? createdAt = freezed,Object? updatedAt = freezed,Object? status = freezed,Object? role = freezed,Object? lastLogin = freezed,Object? currentLogin = freezed,Object? language = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? hasApiKey = freezed,Object? phone = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? firstName = freezed,Object? lastName = freezed,Object? phone = freezed,}) {
|
||||
return _then(_UpdateUserRequestEntity(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastLogin: freezed == lastLogin ? _self.lastLogin : lastLogin // ignore: cast_nullable_to_non_nullable
|
||||
as String?,currentLogin: freezed == currentLogin ? _self.currentLogin : currentLogin // ignore: cast_nullable_to_non_nullable
|
||||
as String?,language: freezed == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,hasApiKey: freezed == hasApiKey ? _self.hasApiKey : hasApiKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
// import 'package:account/src/features/account_settings/presentation/account_settings_screen.dart';
|
||||
import 'package:account/src/features/personal_data/presentation/personal_data_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:navigation/navigation.dart';
|
||||
|
||||
class PersonalDataBuilder {
|
||||
const PersonalDataBuilder();
|
||||
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
final NavigationContract navigationContract = GetIt.I<NavigationContract>();
|
||||
|
||||
return MaterialPage<void>(
|
||||
key: state.pageKey,
|
||||
child: PersonalDataScreen(navigationContract: navigationContract),
|
||||
child: const PersonalDataScreen(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,286 +4,196 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:navigation/navigation.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
import 'package:utils/utils.dart';
|
||||
|
||||
class PersonalDataScreen extends ConsumerWidget {
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
const PersonalDataScreen({super.key, required this.navigationContract});
|
||||
const PersonalDataScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
|
||||
final theme = ref.watch(themePortProvider);
|
||||
final isLoading = ref.watch(
|
||||
personalDataViewModelProvider.select((s) => s.isLoading),
|
||||
);
|
||||
|
||||
ref.listen(personalDataViewModelProvider.select((s) => s.errorMessage), (
|
||||
_,
|
||||
errorMessage,
|
||||
) {
|
||||
if (errorMessage.isNotEmpty) {
|
||||
showTopSnackbar(
|
||||
context,
|
||||
message: errorMessage,
|
||||
type: MessageType.error,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
ref.listen(personalDataViewModelProvider.select((s) => s.isComplete), (
|
||||
_,
|
||||
isComplete,
|
||||
) {
|
||||
if (isComplete) Navigator.pop(context);
|
||||
});
|
||||
|
||||
if (isLoading) {
|
||||
return Scaffold(
|
||||
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
body: const Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
}
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.personalData),
|
||||
body: Container(
|
||||
body: Padding(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 48, vertical: 10),
|
||||
big: EdgeInsets.symmetric(horizontal: 47, vertical: 8)
|
||||
big: EdgeInsets.symmetric(horizontal: 47, vertical: 8),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const _ProfilePicture(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 18, big: 16)),
|
||||
const _EmailLabel(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _FirstNameField(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _LastNameField(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _PhoneField(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
footer: Padding(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 48),
|
||||
big: EdgeInsets.symmetric(horizontal: 47),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(context.translate(I18n.personalDataMessage)),
|
||||
const SizedBox(height: 14),
|
||||
const _SaveButton(),
|
||||
],
|
||||
),
|
||||
child: SingleChildScrollView(child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const _ProfilePictureSection(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 18, big: 16)),
|
||||
const _EmailLabelSection(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _GenderSection(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _NameSection(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _PhoneSection(),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
const _EmailSection(),
|
||||
],
|
||||
))
|
||||
),
|
||||
footer: Column(
|
||||
children: [
|
||||
Text(context.translate(I18n.personalDataMessage)),
|
||||
SizedBox(height: 14),
|
||||
const _SaveSection(),
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ProfilePictureSection extends ConsumerWidget {
|
||||
|
||||
const _ProfilePictureSection();
|
||||
class _ProfilePicture extends StatelessWidget {
|
||||
const _ProfilePicture();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Stack(
|
||||
children: [
|
||||
Center(child: Container(
|
||||
decoration: BoxDecoration(shape: BoxShape.circle),
|
||||
child: SvgPicture.asset('assets/images/ui/profile.svg')),
|
||||
),
|
||||
Center(child: SizedBox(
|
||||
width: 160,
|
||||
height: 160,
|
||||
child: Align(alignment: Alignment.bottomRight,
|
||||
child: IconButton(
|
||||
onPressed: (){},
|
||||
icon: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFCAC9C9)
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Icon(
|
||||
Icons.edit_outlined,
|
||||
color: Colors.white,
|
||||
size: SizeUtils.getByScreen(small: 32, big: 30),
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
))
|
||||
],
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(shape: BoxShape.circle),
|
||||
child: SvgPicture.asset('assets/shared/images/profile.svg'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _EmailLabelSection extends ConsumerWidget {
|
||||
|
||||
const _EmailLabelSection();
|
||||
class _EmailLabel extends ConsumerWidget {
|
||||
const _EmailLabel();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final email = ref.watch(
|
||||
personalDataViewModelProvider.select((s)=>s.user?.email ?? '')
|
||||
personalDataViewModelProvider.select((s) => s.user?.email ?? ''),
|
||||
);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Text(context.translate(I18n.emailLabel),
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 14, big: 13))
|
||||
Text(
|
||||
context.translate(I18n.emailLabel),
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 14, big: 13)),
|
||||
),
|
||||
Text(email,
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 17))
|
||||
Text(
|
||||
email,
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 17)),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _GenderSection extends ConsumerWidget {
|
||||
|
||||
const _GenderSection();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.read(themePortProvider);
|
||||
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
final gender = ref.watch(
|
||||
personalDataViewModelProvider.select((s)=>s.gender)
|
||||
);
|
||||
|
||||
Map<String, String> genderOptions = <String, String>{
|
||||
'M': context.translate(I18n.male),
|
||||
'F': context.translate(I18n.female),
|
||||
'O': context.translate(I18n.ratherNotSay),
|
||||
};
|
||||
|
||||
final setGender = (value){vm.setGender(value.toString());};
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(context.translate(I18n.genderLabel),),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.fromBorderSide(BorderSide(
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
width: 3
|
||||
)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(32)),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
child: RadioGroup(
|
||||
onChanged: setGender,
|
||||
groupValue: gender,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: List<Widget>.generate(genderOptions.length, (int index)=>
|
||||
Row(
|
||||
children: [
|
||||
Radio(
|
||||
value: genderOptions.keys.elementAt(index),
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: (){setGender(genderOptions.keys.elementAt(index));},
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.zero,
|
||||
minimumSize: Size.zero,
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Text(genderOptions.values.elementAt(index),
|
||||
style: TextStyle(fontSize: 10),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _NameSection extends ConsumerWidget {
|
||||
|
||||
const _NameSection();
|
||||
class _FirstNameField extends ConsumerWidget {
|
||||
const _FirstNameField();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
final name = ref.watch(
|
||||
personalDataViewModelProvider.select((s)=>s.user?.firstName ?? '')
|
||||
final hint = ref.watch(
|
||||
personalDataViewModelProvider.select((s) => s.user?.firstName ?? ''),
|
||||
);
|
||||
|
||||
return CustomTextField(
|
||||
controller: vm.nameController,
|
||||
hint: name,
|
||||
controller: vm.firstNameController,
|
||||
hint: hint,
|
||||
label: context.translate(I18n.firstNameLabel),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _PhoneSection extends ConsumerWidget {
|
||||
|
||||
const _PhoneSection();
|
||||
class _LastNameField extends ConsumerWidget {
|
||||
const _LastNameField();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
final phone = ref.watch(
|
||||
personalDataViewModelProvider.select((s)=>s.user?.phone ?? '')
|
||||
final hint = ref.watch(
|
||||
personalDataViewModelProvider.select((s) => s.user?.lastName ?? ''),
|
||||
);
|
||||
|
||||
return CustomTextField(
|
||||
controller: vm.lastNameController,
|
||||
hint: hint,
|
||||
label: context.translate(I18n.lastNameLabel),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _PhoneField extends ConsumerWidget {
|
||||
const _PhoneField();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
final hint = ref.watch(
|
||||
personalDataViewModelProvider.select((s) => s.user?.phone ?? ''),
|
||||
);
|
||||
|
||||
return CustomTextField(
|
||||
controller: vm.phoneController,
|
||||
hint: phone,
|
||||
hint: hint,
|
||||
label: context.translate(I18n.phoneLabel),
|
||||
keyboardType: TextInputType.phone,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _EmailSection extends ConsumerWidget {
|
||||
|
||||
const _EmailSection();
|
||||
class _SaveButton extends ConsumerWidget {
|
||||
const _SaveButton();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
final email = ref.watch(
|
||||
personalDataViewModelProvider.select((s)=>s.user?.email ?? '')
|
||||
);
|
||||
|
||||
return CustomTextField(
|
||||
controller: vm.emailController,
|
||||
hint: email,
|
||||
label: context.translate(I18n.emailLabel),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _SaveSection extends ConsumerWidget {
|
||||
|
||||
const _SaveSection();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.read(themePortProvider);
|
||||
|
||||
final theme = ref.watch(themePortProvider);
|
||||
final vm = ref.read(personalDataViewModelProvider.notifier);
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 10),
|
||||
child: PrimaryButton(
|
||||
onPressed: () async {
|
||||
await vm.updateUser();
|
||||
|
||||
final errorMessage = ref.read(
|
||||
personalDataViewModelProvider.select((s)=>s.errorMessage)
|
||||
);
|
||||
if (errorMessage.isNotEmpty) {
|
||||
showTopSnackbar(context, message: errorMessage, type: MessageType.error);
|
||||
return;
|
||||
}
|
||||
|
||||
final isComplete = ref.read(
|
||||
personalDataViewModelProvider.select((s)=>s.isComplete)
|
||||
);
|
||||
if (isComplete) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
onPressed: vm.updateUser,
|
||||
text: context.translate(I18n.submit),
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary)
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,165 +8,91 @@ import '../../../../core/domain/repositories/users_repository.dart';
|
||||
import '../../../../core/providers/users_repository_provider.dart';
|
||||
|
||||
final personalDataViewModelProvider =
|
||||
NotifierProvider.autoDispose<PersonalDataViewModel, PersonalDataViewState>(
|
||||
PersonalDataViewModel.new,
|
||||
);
|
||||
NotifierProvider.autoDispose<PersonalDataViewModel, PersonalDataViewState>(
|
||||
PersonalDataViewModel.new,
|
||||
);
|
||||
|
||||
class PersonalDataViewModel extends Notifier<PersonalDataViewState> {
|
||||
late final UsersRepository _usersRepository;
|
||||
|
||||
late final TextEditingController nameController;
|
||||
late final TextEditingController emailController;
|
||||
late final TextEditingController firstNameController;
|
||||
late final TextEditingController lastNameController;
|
||||
late final TextEditingController phoneController;
|
||||
late final TextEditingController passwordController;
|
||||
|
||||
@override
|
||||
PersonalDataViewState build() {
|
||||
_usersRepository = ref.read(usersRepositoryProvider);
|
||||
|
||||
nameController = TextEditingController();
|
||||
nameController.addListener(_onNameChanged);
|
||||
|
||||
emailController = TextEditingController();
|
||||
emailController.addListener(_onEmailChanged);
|
||||
|
||||
firstNameController = TextEditingController();
|
||||
lastNameController = TextEditingController();
|
||||
phoneController = TextEditingController();
|
||||
phoneController.addListener(_onPhoneChanged);
|
||||
|
||||
passwordController = TextEditingController();
|
||||
passwordController.addListener(_onPasswordChanged);
|
||||
Future.microtask(_init);
|
||||
|
||||
_init();
|
||||
|
||||
ref.onDispose(disposeControllers);
|
||||
ref.onDispose(_disposeControllers);
|
||||
|
||||
return const PersonalDataViewState();
|
||||
}
|
||||
|
||||
Future<void> _init() async {
|
||||
final user = await ref.read(userInfoProvider.future);
|
||||
setUser(user);
|
||||
state = state.copyWith(user: user, isLoading: false);
|
||||
}
|
||||
|
||||
void setUser(UserEntity user) {
|
||||
state = state.copyWith(user: user);
|
||||
}
|
||||
|
||||
void setGender(String value) {
|
||||
if (value == state.gender) return;
|
||||
|
||||
state = state.copyWith(
|
||||
gender: value,
|
||||
);
|
||||
}
|
||||
|
||||
void _onNameChanged() {
|
||||
final value = nameController.text;
|
||||
|
||||
if (value == state.name) return;
|
||||
|
||||
state = state.copyWith(
|
||||
name: value,
|
||||
);
|
||||
}
|
||||
|
||||
void _onEmailChanged() {
|
||||
final value = emailController.text;
|
||||
|
||||
if (value == state.email) return;
|
||||
|
||||
state = state.copyWith(
|
||||
email: value,
|
||||
);
|
||||
}
|
||||
|
||||
void _onPhoneChanged() {
|
||||
final value = phoneController.text;
|
||||
|
||||
if (value == state.phoneNumber) return;
|
||||
|
||||
state = state.copyWith(
|
||||
phoneNumber: value,
|
||||
);
|
||||
}
|
||||
|
||||
void _onPasswordChanged() {
|
||||
final value = passwordController.text;
|
||||
|
||||
if (value == state.password) return;
|
||||
|
||||
state = state.copyWith(
|
||||
password: value,
|
||||
);
|
||||
}
|
||||
|
||||
bool _validateForm() {
|
||||
if (state.name.trim().isEmpty &&
|
||||
state.email.trim().isEmpty &&
|
||||
state.phoneNumber.trim().isEmpty &&
|
||||
state.password.trim().isEmpty) {
|
||||
state = state.copyWith(errorMessage: 'errorMessageAllFieldsAreEmpty');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool get _hasChanges =>
|
||||
firstNameController.text.trim().isNotEmpty ||
|
||||
lastNameController.text.trim().isNotEmpty ||
|
||||
phoneController.text.trim().isNotEmpty;
|
||||
|
||||
UpdateUserRequestEntity _toRequest() {
|
||||
|
||||
return UpdateUserRequestEntity(
|
||||
id: state.user!.id,
|
||||
//name: state.name.trim(),
|
||||
email: state.email.trim(),
|
||||
phone: /*state.dialCode.trim() + */state.phoneNumber.trim(),
|
||||
firstName: firstNameController.text.trim().isNotEmpty
|
||||
? firstNameController.text.trim()
|
||||
: null,
|
||||
lastName: lastNameController.text.trim().isNotEmpty
|
||||
? lastNameController.text.trim()
|
||||
: null,
|
||||
phone: phoneController.text.trim().isNotEmpty
|
||||
? phoneController.text.trim()
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> updateUser() async {
|
||||
try {
|
||||
state = state.copyWith(
|
||||
isLoading: true,
|
||||
isComplete: false,
|
||||
);
|
||||
if (state.isLoading || !_hasChanges) return;
|
||||
|
||||
if (!_validateForm()) return;
|
||||
try {
|
||||
state = state.copyWith(isLoading: true, isComplete: false, errorMessage: '');
|
||||
|
||||
final request = _toRequest();
|
||||
|
||||
_usersRepository.updateUser(userId: state.user!.id, request: request);
|
||||
ref.invalidate(userInfoProvider);
|
||||
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
isComplete: true,
|
||||
await _usersRepository.updateUser(
|
||||
userId: state.user!.id,
|
||||
request: request,
|
||||
);
|
||||
return;
|
||||
if (!ref.mounted) return;
|
||||
|
||||
final updatedUser = state.user!.copyWith(
|
||||
firstName: request.firstName ?? state.user!.firstName,
|
||||
lastName: request.lastName ?? state.user!.lastName,
|
||||
phone: request.phone ?? state.user!.phone,
|
||||
);
|
||||
ref.read(userInfoProvider.notifier).setUser(updatedUser);
|
||||
|
||||
state = state.copyWith(isLoading: false, isComplete: true);
|
||||
} catch (e) {
|
||||
if (!ref.mounted) return;
|
||||
_finishWithError(message: e.toString());
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
isComplete: false,
|
||||
errorMessage: e.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void _finishWithError({required String message}) {
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
isComplete: false,
|
||||
errorMessage: message,
|
||||
);
|
||||
}
|
||||
|
||||
void disposeControllers() {
|
||||
nameController.removeListener(_onNameChanged);
|
||||
nameController.dispose();
|
||||
|
||||
emailController.removeListener(_onEmailChanged);
|
||||
emailController.dispose();
|
||||
|
||||
phoneController.removeListener(_onPhoneChanged);
|
||||
void _disposeControllers() {
|
||||
firstNameController.dispose();
|
||||
lastNameController.dispose();
|
||||
phoneController.dispose();
|
||||
|
||||
passwordController.removeListener(_onPasswordChanged);
|
||||
passwordController.dispose();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,6 @@ abstract class PersonalDataViewState with _$PersonalDataViewState {
|
||||
@Default(true) bool isLoading,
|
||||
@Default(false) bool isComplete,
|
||||
UserEntity? user,
|
||||
@Default('O') String gender,
|
||||
@Default('') String name,
|
||||
@Default('') String phoneNumber,
|
||||
@Default('') String email,
|
||||
@Default('') String password,
|
||||
@Default(false) bool showPassword,
|
||||
@Default('') String errorMessage
|
||||
@Default('') String errorMessage,
|
||||
}) = _PersonalDataViewState;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$PersonalDataViewState {
|
||||
|
||||
bool get isLoading; bool get isComplete; UserEntity? get user; String get gender; String get name; String get phoneNumber; String get email; String get password; bool get showPassword; String get errorMessage;
|
||||
bool get isLoading; bool get isComplete; UserEntity? get user; String get errorMessage;
|
||||
/// Create a copy of PersonalDataViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -25,16 +25,16 @@ $PersonalDataViewStateCopyWith<PersonalDataViewState> get copyWith => _$Personal
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.user, user) || other.user == user)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.name, name) || other.name == name)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.showPassword, showPassword) || other.showPassword == showPassword)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.user, user) || other.user == user)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,isComplete,user,gender,name,phoneNumber,email,password,showPassword,errorMessage);
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,isComplete,user,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PersonalDataViewState(isLoading: $isLoading, isComplete: $isComplete, user: $user, gender: $gender, name: $name, phoneNumber: $phoneNumber, email: $email, password: $password, showPassword: $showPassword, errorMessage: $errorMessage)';
|
||||
return 'PersonalDataViewState(isLoading: $isLoading, isComplete: $isComplete, user: $user, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract mixin class $PersonalDataViewStateCopyWith<$Res> {
|
||||
factory $PersonalDataViewStateCopyWith(PersonalDataViewState value, $Res Function(PersonalDataViewState) _then) = _$PersonalDataViewStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool isLoading, bool isComplete, UserEntity? user, String gender, String name, String phoneNumber, String email, String password, bool showPassword, String errorMessage
|
||||
bool isLoading, bool isComplete, UserEntity? user, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
@@ -62,18 +62,12 @@ class _$PersonalDataViewStateCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of PersonalDataViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isComplete = null,Object? user = freezed,Object? gender = null,Object? name = null,Object? phoneNumber = null,Object? email = null,Object? password = null,Object? showPassword = null,Object? errorMessage = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isComplete = null,Object? user = freezed,Object? errorMessage = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,isComplete: null == isComplete ? _self.isComplete : isComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String,showPassword: null == showPassword ? _self.showPassword : showPassword // ignore: cast_nullable_to_non_nullable
|
||||
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
@@ -171,10 +165,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, bool isComplete, UserEntity? user, String gender, String name, String phoneNumber, String email, String password, bool showPassword, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, bool isComplete, UserEntity? user, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PersonalDataViewState() when $default != null:
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.name,_that.phoneNumber,_that.email,_that.password,_that.showPassword,_that.errorMessage);case _:
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.errorMessage);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -192,10 +186,10 @@ return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.n
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, bool isComplete, UserEntity? user, String gender, String name, String phoneNumber, String email, String password, bool showPassword, String errorMessage) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, bool isComplete, UserEntity? user, String errorMessage) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PersonalDataViewState():
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.name,_that.phoneNumber,_that.email,_that.password,_that.showPassword,_that.errorMessage);case _:
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.errorMessage);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -212,10 +206,10 @@ return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.n
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, bool isComplete, UserEntity? user, String gender, String name, String phoneNumber, String email, String password, bool showPassword, String errorMessage)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, bool isComplete, UserEntity? user, String errorMessage)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PersonalDataViewState() when $default != null:
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.name,_that.phoneNumber,_that.email,_that.password,_that.showPassword,_that.errorMessage);case _:
|
||||
return $default(_that.isLoading,_that.isComplete,_that.user,_that.errorMessage);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -227,18 +221,12 @@ return $default(_that.isLoading,_that.isComplete,_that.user,_that.gender,_that.n
|
||||
|
||||
|
||||
class _PersonalDataViewState implements PersonalDataViewState {
|
||||
const _PersonalDataViewState({this.isLoading = true, this.isComplete = false, this.user, this.gender = 'O', this.name = '', this.phoneNumber = '', this.email = '', this.password = '', this.showPassword = false, this.errorMessage = ''});
|
||||
const _PersonalDataViewState({this.isLoading = true, this.isComplete = false, this.user, this.errorMessage = ''});
|
||||
|
||||
|
||||
@override@JsonKey() final bool isLoading;
|
||||
@override@JsonKey() final bool isComplete;
|
||||
@override final UserEntity? user;
|
||||
@override@JsonKey() final String gender;
|
||||
@override@JsonKey() final String name;
|
||||
@override@JsonKey() final String phoneNumber;
|
||||
@override@JsonKey() final String email;
|
||||
@override@JsonKey() final String password;
|
||||
@override@JsonKey() final bool showPassword;
|
||||
@override@JsonKey() final String errorMessage;
|
||||
|
||||
/// Create a copy of PersonalDataViewState
|
||||
@@ -251,16 +239,16 @@ _$PersonalDataViewStateCopyWith<_PersonalDataViewState> get copyWith => __$Perso
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.user, user) || other.user == user)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.name, name) || other.name == name)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.showPassword, showPassword) || other.showPassword == showPassword)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.user, user) || other.user == user)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,isComplete,user,gender,name,phoneNumber,email,password,showPassword,errorMessage);
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,isComplete,user,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PersonalDataViewState(isLoading: $isLoading, isComplete: $isComplete, user: $user, gender: $gender, name: $name, phoneNumber: $phoneNumber, email: $email, password: $password, showPassword: $showPassword, errorMessage: $errorMessage)';
|
||||
return 'PersonalDataViewState(isLoading: $isLoading, isComplete: $isComplete, user: $user, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +259,7 @@ abstract mixin class _$PersonalDataViewStateCopyWith<$Res> implements $PersonalD
|
||||
factory _$PersonalDataViewStateCopyWith(_PersonalDataViewState value, $Res Function(_PersonalDataViewState) _then) = __$PersonalDataViewStateCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool isLoading, bool isComplete, UserEntity? user, String gender, String name, String phoneNumber, String email, String password, bool showPassword, String errorMessage
|
||||
bool isLoading, bool isComplete, UserEntity? user, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
@@ -288,18 +276,12 @@ class __$PersonalDataViewStateCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of PersonalDataViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isComplete = null,Object? user = freezed,Object? gender = null,Object? name = null,Object? phoneNumber = null,Object? email = null,Object? password = null,Object? showPassword = null,Object? errorMessage = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isComplete = null,Object? user = freezed,Object? errorMessage = null,}) {
|
||||
return _then(_PersonalDataViewState(
|
||||
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,isComplete: null == isComplete ? _self.isComplete : isComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String,showPassword: null == showPassword ? _self.showPassword : showPassword // ignore: cast_nullable_to_non_nullable
|
||||
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ dependency_overrides:
|
||||
home:
|
||||
path: ../../../home
|
||||
legacy_auth:
|
||||
path: ..\\legacy_auth
|
||||
path: ../legacy_auth
|
||||
legacy_shared:
|
||||
path: ../../packages/legacy_shared
|
||||
navigation:
|
||||
|
||||
@@ -62,7 +62,7 @@ class ControlPanelScreen extends ConsumerWidget {
|
||||
SizedBox(
|
||||
height: SizeUtils.getByScreen(small: 16, big: 22),
|
||||
),
|
||||
_MapSection(),
|
||||
_MapSection(navigationContract: navigationContract),
|
||||
SizedBox(
|
||||
height: SizeUtils.getByScreen(small: 14, big: 13),
|
||||
),
|
||||
@@ -104,12 +104,13 @@ class _Header extends ConsumerWidget {
|
||||
child: CustomDropdown(
|
||||
items: state.devices
|
||||
.map(
|
||||
(DeviceEntity device) => Text(
|
||||
device.carrierName!.length > 10
|
||||
? '${device.carrierName!.substring(0, 10)}...'
|
||||
: device.carrierName!,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
(DeviceEntity device) {
|
||||
final name = device.carrierName ?? '';
|
||||
return Text(
|
||||
name.length > 10 ? '${name.substring(0, 10)}...' : name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
},
|
||||
)
|
||||
.toList(),
|
||||
values: state.devices,
|
||||
@@ -162,7 +163,7 @@ class _MenuSection extends ConsumerWidget {
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
|
||||
_SectionButton(
|
||||
onPressed: () {
|
||||
navigationContract.pushTo(AppRoutes.deviceManagement);
|
||||
navigationContract.goTo(AppRoutes.deviceManagement);
|
||||
},
|
||||
icon: SFIcons.functions,
|
||||
text: I18n.functions,
|
||||
@@ -201,7 +202,7 @@ class _SectionButton extends ConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.read(themePortProvider);
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
return SectionButton(
|
||||
onPressed: onPressed,
|
||||
@@ -224,7 +225,9 @@ class _SectionButton extends ConsumerWidget {
|
||||
}
|
||||
|
||||
class _MapSection extends ConsumerWidget {
|
||||
const _MapSection();
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
const _MapSection({required this.navigationContract});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@@ -232,38 +235,44 @@ class _MapSection extends ConsumerWidget {
|
||||
final state = ref.watch(controlPanelViewModelProvider);
|
||||
final vm = ref.read(controlPanelViewModelProvider.notifier);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.watchesOnMap),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 20, big: 19),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
return GestureDetector(
|
||||
onTap: () => navigationContract.goTo(AppRoutes.legacyLocation),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.watchesOnMap),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 20, big: 19),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: vm.refreshPositions,
|
||||
icon: Icon(
|
||||
Icons.refresh,
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
IconButton(
|
||||
onPressed: vm.refreshPositions,
|
||||
icon: Icon(
|
||||
Icons.refresh,
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 4, big: 8)),
|
||||
SizedBox(
|
||||
height: SizeUtils.getByScreen(small: 200, big: 300),
|
||||
child: DeviceMap(
|
||||
selectedPosition: state.selectedPosition,
|
||||
selectedDevice: state.selectedDevice,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 4, big: 8)),
|
||||
AbsorbPointer(
|
||||
child: SizedBox(
|
||||
height: SizeUtils.getByScreen(small: 200, big: 300),
|
||||
child: DeviceMap(
|
||||
selectedPosition: state.selectedPosition,
|
||||
selectedDevice: state.selectedDevice,
|
||||
markerSize: 40,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,6 @@ class ControlPanelViewModel extends Notifier<ControlPanelViewState> {
|
||||
|
||||
Future<void> _init() async {
|
||||
try {
|
||||
final user = await ref.read(userInfoProvider.future);
|
||||
if (!ref.mounted) return;
|
||||
state = state.copyWith(loggedUser: user);
|
||||
|
||||
final devices = await _devicesRepository.getDevices();
|
||||
if (!ref.mounted) return;
|
||||
|
||||
@@ -39,15 +35,21 @@ class ControlPanelViewModel extends Notifier<ControlPanelViewState> {
|
||||
return;
|
||||
}
|
||||
|
||||
final previouslySelected = ref.read(selectedDeviceProvider);
|
||||
final selected = previouslySelected != null &&
|
||||
devices.any((d) => d.identificator == previouslySelected.identificator)
|
||||
? previouslySelected
|
||||
: devices.first;
|
||||
|
||||
state = state.copyWith(
|
||||
devices: devices,
|
||||
selectedDevice: devices.first,
|
||||
selectedDevice: selected,
|
||||
);
|
||||
_selectedDeviceNotifier.setSelectedDevice(devices.first);
|
||||
_selectedDeviceNotifier.setSelectedDevice(selected);
|
||||
|
||||
final positionLists = await Future.wait(
|
||||
devices.map(
|
||||
(d) => _controlPanelRepository.getLatestPositions(deviceId: d!.identificator),
|
||||
(d) => _controlPanelRepository.getLatestPositions(deviceId: d.identificator),
|
||||
),
|
||||
);
|
||||
if (!ref.mounted) return;
|
||||
@@ -93,7 +95,7 @@ class ControlPanelViewModel extends Notifier<ControlPanelViewState> {
|
||||
try {
|
||||
final positionLists = await Future.wait(
|
||||
state.devices.map(
|
||||
(d) => _controlPanelRepository.getLatestPositions(deviceId: d!.identificator),
|
||||
(d) => _controlPanelRepository.getLatestPositions(deviceId: d.identificator),
|
||||
),
|
||||
);
|
||||
if (!ref.mounted) return;
|
||||
|
||||
@@ -7,7 +7,6 @@ part 'control_panel_view_state.freezed.dart';
|
||||
@freezed
|
||||
abstract class ControlPanelViewState with _$ControlPanelViewState {
|
||||
const factory ControlPanelViewState({
|
||||
UserEntity? loggedUser,
|
||||
@Default([]) List<DeviceEntity> devices,
|
||||
DeviceEntity? selectedDevice,
|
||||
@Default([]) List<PositionEntity> positions,
|
||||
|
||||
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$ControlPanelViewState {
|
||||
|
||||
UserEntity? get loggedUser; List<DeviceEntity> get devices; DeviceEntity? get selectedDevice; List<PositionEntity> get positions; PositionEntity? get selectedPosition; bool get isLoading; String get errorMessage;
|
||||
List<DeviceEntity> get devices; DeviceEntity? get selectedDevice; List<PositionEntity> get positions; PositionEntity? get selectedPosition; bool get isLoading; String get errorMessage;
|
||||
/// Create a copy of ControlPanelViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -25,16 +25,16 @@ $ControlPanelViewStateCopyWith<ControlPanelViewState> get copyWith => _$ControlP
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ControlPanelViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other.devices, devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other.positions, positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ControlPanelViewState&&const DeepCollectionEquality().equals(other.devices, devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other.positions, positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEquality().hash(devices),selectedDevice,const DeepCollectionEquality().hash(positions),selectedPosition,isLoading,errorMessage);
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(devices),selectedDevice,const DeepCollectionEquality().hash(positions),selectedPosition,isLoading,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ControlPanelViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition, isLoading: $isLoading, errorMessage: $errorMessage)';
|
||||
return 'ControlPanelViewState(devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition, isLoading: $isLoading, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ abstract mixin class $ControlPanelViewStateCopyWith<$Res> {
|
||||
factory $ControlPanelViewStateCopyWith(ControlPanelViewState value, $Res Function(ControlPanelViewState) _then) = _$ControlPanelViewStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage
|
||||
List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
$UserEntityCopyWith<$Res>? get loggedUser;$DeviceEntityCopyWith<$Res>? get selectedDevice;$PositionEntityCopyWith<$Res>? get selectedPosition;
|
||||
$DeviceEntityCopyWith<$Res>? get selectedDevice;$PositionEntityCopyWith<$Res>? get selectedPosition;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -62,10 +62,9 @@ class _$ControlPanelViewStateCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of ControlPanelViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,Object? isLoading = null,Object? errorMessage = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,Object? isLoading = null,Object? errorMessage = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,devices: null == devices ? _self.devices : devices // ignore: cast_nullable_to_non_nullable
|
||||
devices: null == devices ? _self.devices : devices // ignore: cast_nullable_to_non_nullable
|
||||
as List<DeviceEntity>,selectedDevice: freezed == selectedDevice ? _self.selectedDevice : selectedDevice // ignore: cast_nullable_to_non_nullable
|
||||
as DeviceEntity?,positions: null == positions ? _self.positions : positions // ignore: cast_nullable_to_non_nullable
|
||||
as List<PositionEntity>,selectedPosition: freezed == selectedPosition ? _self.selectedPosition : selectedPosition // ignore: cast_nullable_to_non_nullable
|
||||
@@ -78,18 +77,6 @@ as String,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserEntityCopyWith<$Res>? get loggedUser {
|
||||
if (_self.loggedUser == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
|
||||
return _then(_self.copyWith(loggedUser: value));
|
||||
});
|
||||
}/// Create a copy of ControlPanelViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$DeviceEntityCopyWith<$Res>? get selectedDevice {
|
||||
if (_self.selectedDevice == null) {
|
||||
return null;
|
||||
@@ -192,10 +179,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ControlPanelViewState() when $default != null:
|
||||
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
return $default(_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -213,10 +200,10 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ControlPanelViewState():
|
||||
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
return $default(_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -233,10 +220,10 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ControlPanelViewState() when $default != null:
|
||||
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
return $default(_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition,_that.isLoading,_that.errorMessage);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -248,10 +235,9 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
|
||||
|
||||
|
||||
class _ControlPanelViewState implements ControlPanelViewState {
|
||||
const _ControlPanelViewState({this.loggedUser, final List<DeviceEntity> devices = const [], this.selectedDevice, final List<PositionEntity> positions = const [], this.selectedPosition, this.isLoading = true, this.errorMessage = ''}): _devices = devices,_positions = positions;
|
||||
const _ControlPanelViewState({final List<DeviceEntity> devices = const [], this.selectedDevice, final List<PositionEntity> positions = const [], this.selectedPosition, this.isLoading = true, this.errorMessage = ''}): _devices = devices,_positions = positions;
|
||||
|
||||
|
||||
@override final UserEntity? loggedUser;
|
||||
final List<DeviceEntity> _devices;
|
||||
@override@JsonKey() List<DeviceEntity> get devices {
|
||||
if (_devices is EqualUnmodifiableListView) return _devices;
|
||||
@@ -281,16 +267,16 @@ _$ControlPanelViewStateCopyWith<_ControlPanelViewState> get copyWith => __$Contr
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ControlPanelViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other._devices, _devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other._positions, _positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ControlPanelViewState&&const DeepCollectionEquality().equals(other._devices, _devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other._positions, _positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEquality().hash(_devices),selectedDevice,const DeepCollectionEquality().hash(_positions),selectedPosition,isLoading,errorMessage);
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_devices),selectedDevice,const DeepCollectionEquality().hash(_positions),selectedPosition,isLoading,errorMessage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ControlPanelViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition, isLoading: $isLoading, errorMessage: $errorMessage)';
|
||||
return 'ControlPanelViewState(devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition, isLoading: $isLoading, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -301,11 +287,11 @@ abstract mixin class _$ControlPanelViewStateCopyWith<$Res> implements $ControlPa
|
||||
factory _$ControlPanelViewStateCopyWith(_ControlPanelViewState value, $Res Function(_ControlPanelViewState) _then) = __$ControlPanelViewStateCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage
|
||||
List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition, bool isLoading, String errorMessage
|
||||
});
|
||||
|
||||
|
||||
@override $UserEntityCopyWith<$Res>? get loggedUser;@override $DeviceEntityCopyWith<$Res>? get selectedDevice;@override $PositionEntityCopyWith<$Res>? get selectedPosition;
|
||||
@override $DeviceEntityCopyWith<$Res>? get selectedDevice;@override $PositionEntityCopyWith<$Res>? get selectedPosition;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -318,10 +304,9 @@ class __$ControlPanelViewStateCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of ControlPanelViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,Object? isLoading = null,Object? errorMessage = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,Object? isLoading = null,Object? errorMessage = null,}) {
|
||||
return _then(_ControlPanelViewState(
|
||||
loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
|
||||
as UserEntity?,devices: null == devices ? _self._devices : devices // ignore: cast_nullable_to_non_nullable
|
||||
devices: null == devices ? _self._devices : devices // ignore: cast_nullable_to_non_nullable
|
||||
as List<DeviceEntity>,selectedDevice: freezed == selectedDevice ? _self.selectedDevice : selectedDevice // ignore: cast_nullable_to_non_nullable
|
||||
as DeviceEntity?,positions: null == positions ? _self._positions : positions // ignore: cast_nullable_to_non_nullable
|
||||
as List<PositionEntity>,selectedPosition: freezed == selectedPosition ? _self.selectedPosition : selectedPosition // ignore: cast_nullable_to_non_nullable
|
||||
@@ -335,18 +320,6 @@ as String,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserEntityCopyWith<$Res>? get loggedUser {
|
||||
if (_self.loggedUser == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
|
||||
return _then(_self.copyWith(loggedUser: value));
|
||||
});
|
||||
}/// Create a copy of ControlPanelViewState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$DeviceEntityCopyWith<$Res>? get selectedDevice {
|
||||
if (_self.selectedDevice == null) {
|
||||
return null;
|
||||
|
||||
@@ -17,11 +17,13 @@ const _tileServerUrl = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
class DeviceMap extends ConsumerStatefulWidget {
|
||||
final PositionEntity? selectedPosition;
|
||||
final DeviceEntity? selectedDevice;
|
||||
final double markerSize;
|
||||
|
||||
const DeviceMap({
|
||||
super.key,
|
||||
required this.selectedPosition,
|
||||
required this.selectedDevice,
|
||||
this.markerSize = 80,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -34,7 +36,7 @@ class _DeviceMapState extends ConsumerState<DeviceMap> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_mapController = MapControllerImpl();
|
||||
_mapController = MapController();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -87,13 +89,13 @@ class _DeviceMapState extends ConsumerState<DeviceMap> {
|
||||
widget.selectedPosition!.latitude,
|
||||
widget.selectedPosition!.longitude,
|
||||
),
|
||||
width: 200,
|
||||
height: 145,
|
||||
width: widget.markerSize * 2.5,
|
||||
height: widget.markerSize * 1.8,
|
||||
child: Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SvgPicture.asset(
|
||||
'assets/shared/images/location.svg',
|
||||
height: 80,
|
||||
height: widget.markerSize,
|
||||
),
|
||||
),
|
||||
rotate: true,
|
||||
@@ -154,42 +156,44 @@ class LocationBanner extends ConsumerWidget {
|
||||
size: SizeUtils.getByScreen(small: 40, big: 38),
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: SizeUtils.getByScreen(small: 250, big: 248),
|
||||
child: Text(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
addressText,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
dateText,
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
dateText,
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (position.networks.isNotEmpty)
|
||||
if (position.networks.isNotEmpty)
|
||||
Text(
|
||||
' | ${position.networks.first.signal}',
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
),
|
||||
),
|
||||
Icon(batteryIcon),
|
||||
Text(
|
||||
' | ${position.networks.first.signal}',
|
||||
'$battery%',
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
),
|
||||
),
|
||||
Icon(batteryIcon),
|
||||
Text(
|
||||
'$battery%',
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -2,6 +2,11 @@ library functions;
|
||||
|
||||
export 'src/features/device_management/device_management_builder.dart';
|
||||
export 'src/features/contacts/contacts_builder.dart';
|
||||
export 'src/features/contacts/edit_contact_builder.dart';
|
||||
export 'src/features/scheduled_activities/scheduled_activities_builder.dart';
|
||||
export 'src/features/remote_connection/remote_connection_builder.dart';
|
||||
export 'src/features/locate_device/locate_device_builder.dart';
|
||||
export 'src/features/rewards/rewards_builder.dart';
|
||||
export 'src/features/health/health_builder.dart';
|
||||
export 'src/features/rewards/rewards_builder.dart';
|
||||
export 'src/features/activity_meter/activity_meter_builder.dart';
|
||||
export 'src/features/apps_use/apps_use_builder.dart';
|
||||
@@ -0,0 +1,8 @@
|
||||
import '../models/get_app_usage_times_response_model.dart';
|
||||
|
||||
abstract class AppUsageTimesRemoteDatasource {
|
||||
Future<GetAppUsageTimesResponseModel> getAppUsageTimes({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
import '../models/get_app_usage_times_response_model.dart';
|
||||
import 'app_usage_times_remote_datasource.dart';
|
||||
|
||||
class AppUsageTimesRemoteDatasourceImpl
|
||||
implements AppUsageTimesRemoteDatasource {
|
||||
AppUsageTimesRemoteDatasourceImpl(this._repository);
|
||||
|
||||
final QuestiaRepository _repository;
|
||||
|
||||
@override
|
||||
Future<GetAppUsageTimesResponseModel> getAppUsageTimes({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/identificator/$identificator/app-usage-times',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/identificator/$identificator/app-usage-times',
|
||||
);
|
||||
}
|
||||
|
||||
return GetAppUsageTimesResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(
|
||||
error,
|
||||
defaultMessage: 'Error getting app usage times',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
import 'package:device_management/src/core/data/models/create_contact_request_model.dart';
|
||||
import 'package:device_management/src/core/data/models/get_contacts_response_model.dart';
|
||||
|
||||
import '../models/create_contact_request_model.dart';
|
||||
import '../models/get_contacts_response_model.dart';
|
||||
import '../models/update_contact_request_model.dart';
|
||||
|
||||
abstract class ContactsRemoteDatasource {
|
||||
Future<GetContactsResponseModel> getContacts({required String userId});
|
||||
|
||||
Future<void> updateContact({required String userId, required UpdateContactRequestModel request});
|
||||
Future<void> updateContact({required UpdateContactRequestModel request});
|
||||
|
||||
Future<void> createContact({required ContactRequestModel request});
|
||||
Future<void> createContact({required CreateContactRequestModel request});
|
||||
|
||||
Future<void> deleteContact({required String contactId});
|
||||
|
||||
Future<void> syncContactsToDevice({
|
||||
required String userId,
|
||||
required String deviceId,
|
||||
required List<Map<String, String>> contacts,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:device_management/src/core/data/models/create_contact_request_model.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
import '../models/create_contact_request_model.dart';
|
||||
import '../models/get_contacts_response_model.dart';
|
||||
import '../models/update_contact_request_model.dart';
|
||||
import 'contacts_remote_datasource.dart';
|
||||
@@ -24,45 +24,61 @@ class ContactsRemoteDatasourceImpl implements ContactsRemoteDatasource {
|
||||
throw Exception('Empty response from /users/:userId/contacts');
|
||||
}
|
||||
|
||||
final model = GetContactsResponseModel.fromJson(data);
|
||||
return model;
|
||||
return GetContactsResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(error, defaultMessage: 'Error to get contacts');
|
||||
throw mapDioError(error, defaultMessage: 'Error getting contacts');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateContact({required String userId, required UpdateContactRequestModel request}) async {
|
||||
final body = request.toJson();
|
||||
await safeCall(
|
||||
() => _repository.put<dynamic>(
|
||||
'/contacts/$userId',
|
||||
body: body,
|
||||
),
|
||||
'Error in /contacts',
|
||||
);
|
||||
Future<void> updateContact({required UpdateContactRequestModel request}) async {
|
||||
await safeCall(
|
||||
() => _repository.put<dynamic>(
|
||||
'/contacts/${request.id}',
|
||||
body: request.toJson(),
|
||||
),
|
||||
'Error updating contact',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createContact({required ContactRequestModel request}) async {
|
||||
final body = request.toJson();
|
||||
|
||||
Future<void> createContact({required CreateContactRequestModel request}) async {
|
||||
await safeCall(
|
||||
() => _repository.post<dynamic>(
|
||||
'/contacts',
|
||||
body: body,
|
||||
body: request.toJson(),
|
||||
),
|
||||
'Error in /contacts',
|
||||
'Error creating contact',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteContact({required String contactId}) async {
|
||||
await safeCall(
|
||||
() => _repository.delete<dynamic>(
|
||||
'/contacts/$contactId',
|
||||
),
|
||||
'Error in /contacts',
|
||||
() => _repository.delete<dynamic>(
|
||||
'/contacts/$contactId',
|
||||
),
|
||||
'Error deleting contact',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> syncContactsToDevice({
|
||||
required String userId,
|
||||
required String deviceId,
|
||||
required List<Map<String, String>> contacts,
|
||||
}) async {
|
||||
await safeCall(
|
||||
() => _repository.post<dynamic>(
|
||||
'/contact-lists',
|
||||
body: {
|
||||
'userId': userId,
|
||||
'deviceId': deviceId,
|
||||
'type': 'secondary',
|
||||
'contacts': contacts,
|
||||
},
|
||||
),
|
||||
'Error syncing contacts to device',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import 'dart:convert';
|
||||
|
||||
enum OrderDirection {
|
||||
asc('ASC'),
|
||||
desc('DESC');
|
||||
|
||||
final String value;
|
||||
const OrderDirection(this.value);
|
||||
}
|
||||
|
||||
class HealthQueryBuilder {
|
||||
const HealthQueryBuilder._();
|
||||
|
||||
static Map<String, dynamic> build({
|
||||
required OrderDirection orderDirection,
|
||||
int? page,
|
||||
int? pageSize,
|
||||
List<HealthFilter>? filters,
|
||||
String orderField = 'occurredAt',
|
||||
}) {
|
||||
final orderBy = base64Encode(
|
||||
utf8.encode('[{"field":"$orderField","order":"${orderDirection.value}"}]'),
|
||||
);
|
||||
|
||||
final params = <String, dynamic>{'orderBy': orderBy};
|
||||
if (pageSize != null) params['pageSize'] = pageSize;
|
||||
if (page != null) params['page'] = page;
|
||||
|
||||
if (filters != null && filters.isNotEmpty) {
|
||||
final json = filters
|
||||
.map((f) => {
|
||||
'field': f.field,
|
||||
'operator': f.operator,
|
||||
'value': f.value,
|
||||
})
|
||||
.toList();
|
||||
params['filters'] = base64Encode(utf8.encode(jsonEncode(json)));
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
static List<HealthFilter> timeRangeFilters({
|
||||
required DateTime start,
|
||||
required DateTime end,
|
||||
String field = 'occurredAt',
|
||||
}) {
|
||||
return [
|
||||
HealthFilter(
|
||||
field: field,
|
||||
operator: 'gte',
|
||||
value: start.millisecondsSinceEpoch.toString(),
|
||||
),
|
||||
HealthFilter(
|
||||
field: field,
|
||||
operator: 'lte',
|
||||
value: end.millisecondsSinceEpoch.toString(),
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
class HealthFilter {
|
||||
final String field;
|
||||
final String operator;
|
||||
final String value;
|
||||
|
||||
const HealthFilter({
|
||||
required this.field,
|
||||
required this.operator,
|
||||
required this.value,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import '../models/get_heartbeats_response_model.dart';
|
||||
import '../models/get_oxygens_response_model.dart';
|
||||
|
||||
abstract class HealthRemoteDatasource {
|
||||
Future<GetHeartbeatsResponseModel> getHeartbeats({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
|
||||
Future<GetOxygensResponseModel> getOxygens({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
import '../models/get_heartbeats_response_model.dart';
|
||||
import '../models/get_oxygens_response_model.dart';
|
||||
import 'health_remote_datasource.dart';
|
||||
|
||||
class HealthRemoteDatasourceImpl implements HealthRemoteDatasource {
|
||||
HealthRemoteDatasourceImpl(this._repository);
|
||||
|
||||
final QuestiaRepository _repository;
|
||||
|
||||
@override
|
||||
Future<GetHeartbeatsResponseModel> getHeartbeats({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/identificator/$identificator/heartbeats',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/identificator/$identificator/heartbeats',
|
||||
);
|
||||
}
|
||||
|
||||
return GetHeartbeatsResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(error, defaultMessage: 'Error getting heartbeats');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<GetOxygensResponseModel> getOxygens({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/identificator/$identificator/oxygens',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/identificator/$identificator/oxygens',
|
||||
);
|
||||
}
|
||||
|
||||
return GetOxygensResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(error, defaultMessage: 'Error getting oxygens');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import '../models/create_scheduled_activity_request_model.dart';
|
||||
import '../models/get_scheduled_activities_response_model.dart';
|
||||
import '../models/update_scheduled_activity_request_model.dart';
|
||||
|
||||
abstract class ScheduledActivitiesRemoteDatasource {
|
||||
Future<GetScheduledActivitiesResponseModel> getActivities({
|
||||
required String deviceId,
|
||||
});
|
||||
|
||||
Future<void> createActivity({
|
||||
required CreateScheduledActivityRequestModel request,
|
||||
});
|
||||
|
||||
Future<void> updateActivity({
|
||||
required String activityId,
|
||||
required UpdateScheduledActivityRequestModel request,
|
||||
});
|
||||
|
||||
Future<void> deleteActivity({required String activityId});
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
import '../models/create_scheduled_activity_request_model.dart';
|
||||
import '../models/get_scheduled_activities_response_model.dart';
|
||||
import '../models/update_scheduled_activity_request_model.dart';
|
||||
import 'scheduled_activities_remote_datasource.dart';
|
||||
|
||||
class ScheduledActivitiesRemoteDatasourceImpl
|
||||
implements ScheduledActivitiesRemoteDatasource {
|
||||
ScheduledActivitiesRemoteDatasourceImpl(this._repository);
|
||||
|
||||
final QuestiaRepository _repository;
|
||||
|
||||
@override
|
||||
Future<GetScheduledActivitiesResponseModel> getActivities({
|
||||
required String deviceId,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/$deviceId/scheduled-activities',
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/$deviceId/scheduled-activities',
|
||||
);
|
||||
}
|
||||
|
||||
return GetScheduledActivitiesResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(
|
||||
error,
|
||||
defaultMessage: 'Error getting scheduled activities',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createActivity({
|
||||
required CreateScheduledActivityRequestModel request,
|
||||
}) async {
|
||||
await safeCall(
|
||||
() => _repository.post<dynamic>(
|
||||
'/scheduled-activities',
|
||||
body: request.toJson(),
|
||||
),
|
||||
'Error creating scheduled activity',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateActivity({
|
||||
required String activityId,
|
||||
required UpdateScheduledActivityRequestModel request,
|
||||
}) async {
|
||||
await safeCall(
|
||||
() => _repository.put<dynamic>(
|
||||
'/scheduled-activities/$activityId',
|
||||
body: request.toJson(),
|
||||
),
|
||||
'Error updating scheduled activity',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteActivity({required String activityId}) async {
|
||||
await safeCall(
|
||||
() => _repository.delete<dynamic>(
|
||||
'/scheduled-activities/$activityId',
|
||||
),
|
||||
'Error deleting scheduled activity',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import '../models/get_steps_response_model.dart';
|
||||
|
||||
abstract class StepsRemoteDatasource {
|
||||
Future<GetStepsResponseModel> getSteps({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_shared/legacy_shared.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
|
||||
import '../models/get_steps_response_model.dart';
|
||||
import 'steps_remote_datasource.dart';
|
||||
|
||||
class StepsRemoteDatasourceImpl implements StepsRemoteDatasource {
|
||||
StepsRemoteDatasourceImpl(this._repository);
|
||||
|
||||
final QuestiaRepository _repository;
|
||||
|
||||
@override
|
||||
Future<GetStepsResponseModel> getSteps({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/identificator/$identificator/steps',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/identificator/$identificator/steps',
|
||||
);
|
||||
}
|
||||
|
||||
return GetStepsResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw mapDioError(error, defaultMessage: 'Error getting steps');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,14 @@ part 'create_contact_request_model.freezed.dart';
|
||||
part 'create_contact_request_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class ContactRequestModel with _$ContactRequestModel {
|
||||
const factory ContactRequestModel({
|
||||
abstract class CreateContactRequestModel with _$CreateContactRequestModel {
|
||||
const factory CreateContactRequestModel({
|
||||
required String id,
|
||||
required String name,
|
||||
required String phone,
|
||||
String? userId,
|
||||
}) = _ContactRequestModel;
|
||||
}) = _CreateContactRequestModel;
|
||||
|
||||
factory ContactRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ContactRequestModelFromJson(json);
|
||||
factory CreateContactRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateContactRequestModelFromJson(json);
|
||||
}
|
||||
@@ -13,22 +13,22 @@ part of 'create_contact_request_model.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ContactRequestModel {
|
||||
mixin _$CreateContactRequestModel {
|
||||
|
||||
String get id; String get name; String get phone; String? get userId;
|
||||
/// Create a copy of ContactRequestModel
|
||||
/// Create a copy of CreateContactRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ContactRequestModelCopyWith<ContactRequestModel> get copyWith => _$ContactRequestModelCopyWithImpl<ContactRequestModel>(this as ContactRequestModel, _$identity);
|
||||
$CreateContactRequestModelCopyWith<CreateContactRequestModel> get copyWith => _$CreateContactRequestModelCopyWithImpl<CreateContactRequestModel>(this as CreateContactRequestModel, _$identity);
|
||||
|
||||
/// Serializes this ContactRequestModel to a JSON map.
|
||||
/// Serializes this CreateContactRequestModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ContactRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.userId, userId) || other.userId == userId));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateContactRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.userId, userId) || other.userId == userId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -37,15 +37,15 @@ int get hashCode => Object.hash(runtimeType,id,name,phone,userId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ContactRequestModel(id: $id, name: $name, phone: $phone, userId: $userId)';
|
||||
return 'CreateContactRequestModel(id: $id, name: $name, phone: $phone, userId: $userId)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ContactRequestModelCopyWith<$Res> {
|
||||
factory $ContactRequestModelCopyWith(ContactRequestModel value, $Res Function(ContactRequestModel) _then) = _$ContactRequestModelCopyWithImpl;
|
||||
abstract mixin class $CreateContactRequestModelCopyWith<$Res> {
|
||||
factory $CreateContactRequestModelCopyWith(CreateContactRequestModel value, $Res Function(CreateContactRequestModel) _then) = _$CreateContactRequestModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String name, String phone, String? userId
|
||||
@@ -56,14 +56,14 @@ $Res call({
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ContactRequestModelCopyWithImpl<$Res>
|
||||
implements $ContactRequestModelCopyWith<$Res> {
|
||||
_$ContactRequestModelCopyWithImpl(this._self, this._then);
|
||||
class _$CreateContactRequestModelCopyWithImpl<$Res>
|
||||
implements $CreateContactRequestModelCopyWith<$Res> {
|
||||
_$CreateContactRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ContactRequestModel _self;
|
||||
final $Res Function(ContactRequestModel) _then;
|
||||
final CreateContactRequestModel _self;
|
||||
final $Res Function(CreateContactRequestModel) _then;
|
||||
|
||||
/// Create a copy of ContactRequestModel
|
||||
/// Create a copy of CreateContactRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? phone = null,Object? userId = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
@@ -78,8 +78,8 @@ as String?,
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [ContactRequestModel].
|
||||
extension ContactRequestModelPatterns on ContactRequestModel {
|
||||
/// Adds pattern-matching-related methods to [CreateContactRequestModel].
|
||||
extension CreateContactRequestModelPatterns on CreateContactRequestModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
@@ -92,10 +92,10 @@ extension ContactRequestModelPatterns on ContactRequestModel {
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ContactRequestModel value)? $default,{required TResult orElse(),}){
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CreateContactRequestModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel() when $default != null:
|
||||
case _CreateContactRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
@@ -114,10 +114,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ContactRequestModel value) $default,){
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CreateContactRequestModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel():
|
||||
case _CreateContactRequestModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
@@ -135,10 +135,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ContactRequestModel value)? $default,){
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CreateContactRequestModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel() when $default != null:
|
||||
case _CreateContactRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
@@ -158,7 +158,7 @@ return $default(_that);case _:
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String phone, String? userId)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel() when $default != null:
|
||||
case _CreateContactRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
return orElse();
|
||||
|
||||
@@ -179,7 +179,7 @@ return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String phone, String? userId) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel():
|
||||
case _CreateContactRequestModel():
|
||||
return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
@@ -199,7 +199,7 @@ return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String phone, String? userId)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ContactRequestModel() when $default != null:
|
||||
case _CreateContactRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
return null;
|
||||
|
||||
@@ -211,29 +211,29 @@ return $default(_that.id,_that.name,_that.phone,_that.userId);case _:
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ContactRequestModel implements ContactRequestModel {
|
||||
const _ContactRequestModel({required this.id, required this.name, required this.phone, this.userId});
|
||||
factory _ContactRequestModel.fromJson(Map<String, dynamic> json) => _$ContactRequestModelFromJson(json);
|
||||
class _CreateContactRequestModel implements CreateContactRequestModel {
|
||||
const _CreateContactRequestModel({required this.id, required this.name, required this.phone, this.userId});
|
||||
factory _CreateContactRequestModel.fromJson(Map<String, dynamic> json) => _$CreateContactRequestModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String name;
|
||||
@override final String phone;
|
||||
@override final String? userId;
|
||||
|
||||
/// Create a copy of ContactRequestModel
|
||||
/// Create a copy of CreateContactRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ContactRequestModelCopyWith<_ContactRequestModel> get copyWith => __$ContactRequestModelCopyWithImpl<_ContactRequestModel>(this, _$identity);
|
||||
_$CreateContactRequestModelCopyWith<_CreateContactRequestModel> get copyWith => __$CreateContactRequestModelCopyWithImpl<_CreateContactRequestModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ContactRequestModelToJson(this, );
|
||||
return _$CreateContactRequestModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ContactRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.userId, userId) || other.userId == userId));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateContactRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.userId, userId) || other.userId == userId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -242,15 +242,15 @@ int get hashCode => Object.hash(runtimeType,id,name,phone,userId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ContactRequestModel(id: $id, name: $name, phone: $phone, userId: $userId)';
|
||||
return 'CreateContactRequestModel(id: $id, name: $name, phone: $phone, userId: $userId)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ContactRequestModelCopyWith<$Res> implements $ContactRequestModelCopyWith<$Res> {
|
||||
factory _$ContactRequestModelCopyWith(_ContactRequestModel value, $Res Function(_ContactRequestModel) _then) = __$ContactRequestModelCopyWithImpl;
|
||||
abstract mixin class _$CreateContactRequestModelCopyWith<$Res> implements $CreateContactRequestModelCopyWith<$Res> {
|
||||
factory _$CreateContactRequestModelCopyWith(_CreateContactRequestModel value, $Res Function(_CreateContactRequestModel) _then) = __$CreateContactRequestModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String name, String phone, String? userId
|
||||
@@ -261,17 +261,17 @@ $Res call({
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ContactRequestModelCopyWithImpl<$Res>
|
||||
implements _$ContactRequestModelCopyWith<$Res> {
|
||||
__$ContactRequestModelCopyWithImpl(this._self, this._then);
|
||||
class __$CreateContactRequestModelCopyWithImpl<$Res>
|
||||
implements _$CreateContactRequestModelCopyWith<$Res> {
|
||||
__$CreateContactRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ContactRequestModel _self;
|
||||
final $Res Function(_ContactRequestModel) _then;
|
||||
final _CreateContactRequestModel _self;
|
||||
final $Res Function(_CreateContactRequestModel) _then;
|
||||
|
||||
/// Create a copy of ContactRequestModel
|
||||
/// Create a copy of CreateContactRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? phone = null,Object? userId = freezed,}) {
|
||||
return _then(_ContactRequestModel(
|
||||
return _then(_CreateContactRequestModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,phone: null == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
||||
|
||||
@@ -6,16 +6,17 @@ part of 'create_contact_request_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_ContactRequestModel _$ContactRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_ContactRequestModel(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
phone: json['phone'] as String,
|
||||
userId: json['userId'] as String?,
|
||||
);
|
||||
_CreateContactRequestModel _$CreateContactRequestModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _CreateContactRequestModel(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
phone: json['phone'] as String,
|
||||
userId: json['userId'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ContactRequestModelToJson(
|
||||
_ContactRequestModel instance,
|
||||
Map<String, dynamic> _$CreateContactRequestModelToJson(
|
||||
_CreateContactRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'create_scheduled_activity_request_model.freezed.dart';
|
||||
part 'create_scheduled_activity_request_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class CreateScheduledActivityRequestModel
|
||||
with _$CreateScheduledActivityRequestModel {
|
||||
const factory CreateScheduledActivityRequestModel({
|
||||
required String id,
|
||||
required String deviceId,
|
||||
required int weekDay,
|
||||
required String name,
|
||||
required String period,
|
||||
}) = _CreateScheduledActivityRequestModel;
|
||||
|
||||
factory CreateScheduledActivityRequestModel.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CreateScheduledActivityRequestModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'create_scheduled_activity_request_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CreateScheduledActivityRequestModel {
|
||||
|
||||
String get id; String get deviceId; int get weekDay; String get name; String get period;
|
||||
/// Create a copy of CreateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$CreateScheduledActivityRequestModelCopyWith<CreateScheduledActivityRequestModel> get copyWith => _$CreateScheduledActivityRequestModelCopyWithImpl<CreateScheduledActivityRequestModel>(this as CreateScheduledActivityRequestModel, _$identity);
|
||||
|
||||
/// Serializes this CreateScheduledActivityRequestModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateScheduledActivityRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.weekDay, weekDay) || other.weekDay == weekDay)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,weekDay,name,period);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateScheduledActivityRequestModel(id: $id, deviceId: $deviceId, weekDay: $weekDay, name: $name, period: $period)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $CreateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
factory $CreateScheduledActivityRequestModelCopyWith(CreateScheduledActivityRequestModel value, $Res Function(CreateScheduledActivityRequestModel) _then) = _$CreateScheduledActivityRequestModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceId, int weekDay, String name, String period
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$CreateScheduledActivityRequestModelCopyWithImpl<$Res>
|
||||
implements $CreateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
_$CreateScheduledActivityRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final CreateScheduledActivityRequestModel _self;
|
||||
final $Res Function(CreateScheduledActivityRequestModel) _then;
|
||||
|
||||
/// Create a copy of CreateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? weekDay = null,Object? name = null,Object? period = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,weekDay: null == weekDay ? _self.weekDay : weekDay // ignore: cast_nullable_to_non_nullable
|
||||
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [CreateScheduledActivityRequestModel].
|
||||
extension CreateScheduledActivityRequestModelPatterns on CreateScheduledActivityRequestModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CreateScheduledActivityRequestModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CreateScheduledActivityRequestModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CreateScheduledActivityRequestModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, int weekDay, String name, String period)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, int weekDay, String name, String period) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel():
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, int weekDay, String name, String period)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _CreateScheduledActivityRequestModel implements CreateScheduledActivityRequestModel {
|
||||
const _CreateScheduledActivityRequestModel({required this.id, required this.deviceId, required this.weekDay, required this.name, required this.period});
|
||||
factory _CreateScheduledActivityRequestModel.fromJson(Map<String, dynamic> json) => _$CreateScheduledActivityRequestModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceId;
|
||||
@override final int weekDay;
|
||||
@override final String name;
|
||||
@override final String period;
|
||||
|
||||
/// Create a copy of CreateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$CreateScheduledActivityRequestModelCopyWith<_CreateScheduledActivityRequestModel> get copyWith => __$CreateScheduledActivityRequestModelCopyWithImpl<_CreateScheduledActivityRequestModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$CreateScheduledActivityRequestModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateScheduledActivityRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.weekDay, weekDay) || other.weekDay == weekDay)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,weekDay,name,period);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateScheduledActivityRequestModel(id: $id, deviceId: $deviceId, weekDay: $weekDay, name: $name, period: $period)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$CreateScheduledActivityRequestModelCopyWith<$Res> implements $CreateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
factory _$CreateScheduledActivityRequestModelCopyWith(_CreateScheduledActivityRequestModel value, $Res Function(_CreateScheduledActivityRequestModel) _then) = __$CreateScheduledActivityRequestModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceId, int weekDay, String name, String period
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$CreateScheduledActivityRequestModelCopyWithImpl<$Res>
|
||||
implements _$CreateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
__$CreateScheduledActivityRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _CreateScheduledActivityRequestModel _self;
|
||||
final $Res Function(_CreateScheduledActivityRequestModel) _then;
|
||||
|
||||
/// Create a copy of CreateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? weekDay = null,Object? name = null,Object? period = null,}) {
|
||||
return _then(_CreateScheduledActivityRequestModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,weekDay: null == weekDay ? _self.weekDay : weekDay // ignore: cast_nullable_to_non_nullable
|
||||
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,27 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'create_scheduled_activity_request_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_CreateScheduledActivityRequestModel
|
||||
_$CreateScheduledActivityRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_CreateScheduledActivityRequestModel(
|
||||
id: json['id'] as String,
|
||||
deviceId: json['deviceId'] as String,
|
||||
weekDay: (json['weekDay'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
period: json['period'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateScheduledActivityRequestModelToJson(
|
||||
_CreateScheduledActivityRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'deviceId': instance.deviceId,
|
||||
'weekDay': instance.weekDay,
|
||||
'name': instance.name,
|
||||
'period': instance.period,
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../domain/entities/app_usage_time_entity.dart';
|
||||
|
||||
part 'get_app_usage_times_response_model.freezed.dart';
|
||||
part 'get_app_usage_times_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GetAppUsageTimesResponseModel
|
||||
with _$GetAppUsageTimesResponseModel {
|
||||
const factory GetAppUsageTimesResponseModel({
|
||||
required int total,
|
||||
required List<AppUsageTimeItemResponseModel> items,
|
||||
required int page,
|
||||
required int pages,
|
||||
}) = _GetAppUsageTimesResponseModel;
|
||||
|
||||
factory GetAppUsageTimesResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetAppUsageTimesResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class AppUsageTimeItemResponseModel
|
||||
with _$AppUsageTimeItemResponseModel {
|
||||
const factory AppUsageTimeItemResponseModel({
|
||||
required String id,
|
||||
required String uid,
|
||||
required String deviceIdentificator,
|
||||
required String name,
|
||||
required String startAt,
|
||||
required int duration,
|
||||
required int createdAt,
|
||||
}) = _AppUsageTimeItemResponseModel;
|
||||
|
||||
factory AppUsageTimeItemResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AppUsageTimeItemResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension AppUsageTimesResponseMapper on GetAppUsageTimesResponseModel {
|
||||
List<AppUsageTimeEntity> toEntity() {
|
||||
return items
|
||||
.map(
|
||||
(item) => AppUsageTimeEntity(
|
||||
id: item.id,
|
||||
uid: item.uid,
|
||||
deviceIdentificator: item.deviceIdentificator,
|
||||
name: item.name,
|
||||
startAt: item.startAt,
|
||||
duration: item.duration,
|
||||
createdAt: item.createdAt,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,573 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'get_app_usage_times_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GetAppUsageTimesResponseModel {
|
||||
|
||||
int get total; List<AppUsageTimeItemResponseModel> get items; int get page; int get pages;
|
||||
/// Create a copy of GetAppUsageTimesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GetAppUsageTimesResponseModelCopyWith<GetAppUsageTimesResponseModel> get copyWith => _$GetAppUsageTimesResponseModelCopyWithImpl<GetAppUsageTimesResponseModel>(this as GetAppUsageTimesResponseModel, _$identity);
|
||||
|
||||
/// Serializes this GetAppUsageTimesResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetAppUsageTimesResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetAppUsageTimesResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GetAppUsageTimesResponseModelCopyWith<$Res> {
|
||||
factory $GetAppUsageTimesResponseModelCopyWith(GetAppUsageTimesResponseModel value, $Res Function(GetAppUsageTimesResponseModel) _then) = _$GetAppUsageTimesResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, List<AppUsageTimeItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GetAppUsageTimesResponseModelCopyWithImpl<$Res>
|
||||
implements $GetAppUsageTimesResponseModelCopyWith<$Res> {
|
||||
_$GetAppUsageTimesResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GetAppUsageTimesResponseModel _self;
|
||||
final $Res Function(GetAppUsageTimesResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetAppUsageTimesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<AppUsageTimeItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GetAppUsageTimesResponseModel].
|
||||
extension GetAppUsageTimesResponseModelPatterns on GetAppUsageTimesResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetAppUsageTimesResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetAppUsageTimesResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetAppUsageTimesResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, List<AppUsageTimeItemResponseModel> items, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, List<AppUsageTimeItemResponseModel> items, int page, int pages) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel():
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, List<AppUsageTimeItemResponseModel> items, int page, int pages)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetAppUsageTimesResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GetAppUsageTimesResponseModel implements GetAppUsageTimesResponseModel {
|
||||
const _GetAppUsageTimesResponseModel({required this.total, required final List<AppUsageTimeItemResponseModel> items, required this.page, required this.pages}): _items = items;
|
||||
factory _GetAppUsageTimesResponseModel.fromJson(Map<String, dynamic> json) => _$GetAppUsageTimesResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
final List<AppUsageTimeItemResponseModel> _items;
|
||||
@override List<AppUsageTimeItemResponseModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
|
||||
/// Create a copy of GetAppUsageTimesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GetAppUsageTimesResponseModelCopyWith<_GetAppUsageTimesResponseModel> get copyWith => __$GetAppUsageTimesResponseModelCopyWithImpl<_GetAppUsageTimesResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GetAppUsageTimesResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetAppUsageTimesResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(_items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetAppUsageTimesResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GetAppUsageTimesResponseModelCopyWith<$Res> implements $GetAppUsageTimesResponseModelCopyWith<$Res> {
|
||||
factory _$GetAppUsageTimesResponseModelCopyWith(_GetAppUsageTimesResponseModel value, $Res Function(_GetAppUsageTimesResponseModel) _then) = __$GetAppUsageTimesResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, List<AppUsageTimeItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GetAppUsageTimesResponseModelCopyWithImpl<$Res>
|
||||
implements _$GetAppUsageTimesResponseModelCopyWith<$Res> {
|
||||
__$GetAppUsageTimesResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GetAppUsageTimesResponseModel _self;
|
||||
final $Res Function(_GetAppUsageTimesResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetAppUsageTimesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_GetAppUsageTimesResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<AppUsageTimeItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AppUsageTimeItemResponseModel {
|
||||
|
||||
String get id; String get uid; String get deviceIdentificator; String get name; String get startAt; int get duration; int get createdAt;
|
||||
/// Create a copy of AppUsageTimeItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$AppUsageTimeItemResponseModelCopyWith<AppUsageTimeItemResponseModel> get copyWith => _$AppUsageTimeItemResponseModelCopyWithImpl<AppUsageTimeItemResponseModel>(this as AppUsageTimeItemResponseModel, _$identity);
|
||||
|
||||
/// Serializes this AppUsageTimeItemResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppUsageTimeItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.name, name) || other.name == name)&&(identical(other.startAt, startAt) || other.startAt == startAt)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,uid,deviceIdentificator,name,startAt,duration,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AppUsageTimeItemResponseModel(id: $id, uid: $uid, deviceIdentificator: $deviceIdentificator, name: $name, startAt: $startAt, duration: $duration, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $AppUsageTimeItemResponseModelCopyWith<$Res> {
|
||||
factory $AppUsageTimeItemResponseModelCopyWith(AppUsageTimeItemResponseModel value, $Res Function(AppUsageTimeItemResponseModel) _then) = _$AppUsageTimeItemResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$AppUsageTimeItemResponseModelCopyWithImpl<$Res>
|
||||
implements $AppUsageTimeItemResponseModelCopyWith<$Res> {
|
||||
_$AppUsageTimeItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final AppUsageTimeItemResponseModel _self;
|
||||
final $Res Function(AppUsageTimeItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of AppUsageTimeItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? uid = null,Object? deviceIdentificator = null,Object? name = null,Object? startAt = null,Object? duration = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,uid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,startAt: null == startAt ? _self.startAt : startAt // ignore: cast_nullable_to_non_nullable
|
||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [AppUsageTimeItemResponseModel].
|
||||
extension AppUsageTimeItemResponseModelPatterns on AppUsageTimeItemResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppUsageTimeItemResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppUsageTimeItemResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppUsageTimeItemResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel():
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _AppUsageTimeItemResponseModel implements AppUsageTimeItemResponseModel {
|
||||
const _AppUsageTimeItemResponseModel({required this.id, required this.uid, required this.deviceIdentificator, required this.name, required this.startAt, required this.duration, required this.createdAt});
|
||||
factory _AppUsageTimeItemResponseModel.fromJson(Map<String, dynamic> json) => _$AppUsageTimeItemResponseModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String uid;
|
||||
@override final String deviceIdentificator;
|
||||
@override final String name;
|
||||
@override final String startAt;
|
||||
@override final int duration;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of AppUsageTimeItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$AppUsageTimeItemResponseModelCopyWith<_AppUsageTimeItemResponseModel> get copyWith => __$AppUsageTimeItemResponseModelCopyWithImpl<_AppUsageTimeItemResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$AppUsageTimeItemResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppUsageTimeItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.name, name) || other.name == name)&&(identical(other.startAt, startAt) || other.startAt == startAt)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,uid,deviceIdentificator,name,startAt,duration,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AppUsageTimeItemResponseModel(id: $id, uid: $uid, deviceIdentificator: $deviceIdentificator, name: $name, startAt: $startAt, duration: $duration, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$AppUsageTimeItemResponseModelCopyWith<$Res> implements $AppUsageTimeItemResponseModelCopyWith<$Res> {
|
||||
factory _$AppUsageTimeItemResponseModelCopyWith(_AppUsageTimeItemResponseModel value, $Res Function(_AppUsageTimeItemResponseModel) _then) = __$AppUsageTimeItemResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$AppUsageTimeItemResponseModelCopyWithImpl<$Res>
|
||||
implements _$AppUsageTimeItemResponseModelCopyWith<$Res> {
|
||||
__$AppUsageTimeItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _AppUsageTimeItemResponseModel _self;
|
||||
final $Res Function(_AppUsageTimeItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of AppUsageTimeItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? uid = null,Object? deviceIdentificator = null,Object? name = null,Object? startAt = null,Object? duration = null,Object? createdAt = null,}) {
|
||||
return _then(_AppUsageTimeItemResponseModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,uid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,startAt: null == startAt ? _self.startAt : startAt // ignore: cast_nullable_to_non_nullable
|
||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,54 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_app_usage_times_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GetAppUsageTimesResponseModel _$GetAppUsageTimesResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GetAppUsageTimesResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map(
|
||||
(e) =>
|
||||
AppUsageTimeItemResponseModel.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetAppUsageTimesResponseModelToJson(
|
||||
_GetAppUsageTimesResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'items': instance.items,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
};
|
||||
|
||||
_AppUsageTimeItemResponseModel _$AppUsageTimeItemResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _AppUsageTimeItemResponseModel(
|
||||
id: json['id'] as String,
|
||||
uid: json['uid'] as String,
|
||||
deviceIdentificator: json['deviceIdentificator'] as String,
|
||||
name: json['name'] as String,
|
||||
startAt: json['startAt'] as String,
|
||||
duration: (json['duration'] as num).toInt(),
|
||||
createdAt: (json['createdAt'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AppUsageTimeItemResponseModelToJson(
|
||||
_AppUsageTimeItemResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uid': instance.uid,
|
||||
'deviceIdentificator': instance.deviceIdentificator,
|
||||
'name': instance.name,
|
||||
'startAt': instance.startAt,
|
||||
'duration': instance.duration,
|
||||
'createdAt': instance.createdAt,
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../../features/health/domain/entities/heartbeat_entity.dart';
|
||||
|
||||
part 'get_heartbeats_response_model.freezed.dart';
|
||||
part 'get_heartbeats_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GetHeartbeatsResponseModel with _$GetHeartbeatsResponseModel {
|
||||
const factory GetHeartbeatsResponseModel({
|
||||
required int total,
|
||||
required List<HeartbeatItemResponseModel> items,
|
||||
required int page,
|
||||
required int pages,
|
||||
}) = _GetHeartbeatsResponseModel;
|
||||
|
||||
factory GetHeartbeatsResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetHeartbeatsResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class HeartbeatItemResponseModel with _$HeartbeatItemResponseModel {
|
||||
const factory HeartbeatItemResponseModel({
|
||||
required String id,
|
||||
required String deviceIdentificator,
|
||||
required int heartbeats,
|
||||
int? lowBloodPressure,
|
||||
int? highBloodPressure,
|
||||
required int occurredAt,
|
||||
required int createdAt,
|
||||
}) = _HeartbeatItemResponseModel;
|
||||
|
||||
factory HeartbeatItemResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$HeartbeatItemResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension HeartbeatsResponseMapper on GetHeartbeatsResponseModel {
|
||||
List<HeartbeatEntity> toEntity() {
|
||||
return items
|
||||
.map(
|
||||
(item) => HeartbeatEntity(
|
||||
id: item.id,
|
||||
deviceIdentificator: item.deviceIdentificator,
|
||||
heartbeats: item.heartbeats,
|
||||
lowBloodPressure: item.lowBloodPressure,
|
||||
highBloodPressure: item.highBloodPressure,
|
||||
occurredAt: item.occurredAt,
|
||||
createdAt: item.createdAt,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,573 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'get_heartbeats_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GetHeartbeatsResponseModel {
|
||||
|
||||
int get total; List<HeartbeatItemResponseModel> get items; int get page; int get pages;
|
||||
/// Create a copy of GetHeartbeatsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GetHeartbeatsResponseModelCopyWith<GetHeartbeatsResponseModel> get copyWith => _$GetHeartbeatsResponseModelCopyWithImpl<GetHeartbeatsResponseModel>(this as GetHeartbeatsResponseModel, _$identity);
|
||||
|
||||
/// Serializes this GetHeartbeatsResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetHeartbeatsResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetHeartbeatsResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GetHeartbeatsResponseModelCopyWith<$Res> {
|
||||
factory $GetHeartbeatsResponseModelCopyWith(GetHeartbeatsResponseModel value, $Res Function(GetHeartbeatsResponseModel) _then) = _$GetHeartbeatsResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, List<HeartbeatItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GetHeartbeatsResponseModelCopyWithImpl<$Res>
|
||||
implements $GetHeartbeatsResponseModelCopyWith<$Res> {
|
||||
_$GetHeartbeatsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GetHeartbeatsResponseModel _self;
|
||||
final $Res Function(GetHeartbeatsResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetHeartbeatsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<HeartbeatItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GetHeartbeatsResponseModel].
|
||||
extension GetHeartbeatsResponseModelPatterns on GetHeartbeatsResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetHeartbeatsResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetHeartbeatsResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetHeartbeatsResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, List<HeartbeatItemResponseModel> items, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, List<HeartbeatItemResponseModel> items, int page, int pages) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel():
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, List<HeartbeatItemResponseModel> items, int page, int pages)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetHeartbeatsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GetHeartbeatsResponseModel implements GetHeartbeatsResponseModel {
|
||||
const _GetHeartbeatsResponseModel({required this.total, required final List<HeartbeatItemResponseModel> items, required this.page, required this.pages}): _items = items;
|
||||
factory _GetHeartbeatsResponseModel.fromJson(Map<String, dynamic> json) => _$GetHeartbeatsResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
final List<HeartbeatItemResponseModel> _items;
|
||||
@override List<HeartbeatItemResponseModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
|
||||
/// Create a copy of GetHeartbeatsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GetHeartbeatsResponseModelCopyWith<_GetHeartbeatsResponseModel> get copyWith => __$GetHeartbeatsResponseModelCopyWithImpl<_GetHeartbeatsResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GetHeartbeatsResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetHeartbeatsResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(_items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetHeartbeatsResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GetHeartbeatsResponseModelCopyWith<$Res> implements $GetHeartbeatsResponseModelCopyWith<$Res> {
|
||||
factory _$GetHeartbeatsResponseModelCopyWith(_GetHeartbeatsResponseModel value, $Res Function(_GetHeartbeatsResponseModel) _then) = __$GetHeartbeatsResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, List<HeartbeatItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GetHeartbeatsResponseModelCopyWithImpl<$Res>
|
||||
implements _$GetHeartbeatsResponseModelCopyWith<$Res> {
|
||||
__$GetHeartbeatsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GetHeartbeatsResponseModel _self;
|
||||
final $Res Function(_GetHeartbeatsResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetHeartbeatsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_GetHeartbeatsResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<HeartbeatItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$HeartbeatItemResponseModel {
|
||||
|
||||
String get id; String get deviceIdentificator; int get heartbeats; int? get lowBloodPressure; int? get highBloodPressure; int get occurredAt; int get createdAt;
|
||||
/// Create a copy of HeartbeatItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$HeartbeatItemResponseModelCopyWith<HeartbeatItemResponseModel> get copyWith => _$HeartbeatItemResponseModelCopyWithImpl<HeartbeatItemResponseModel>(this as HeartbeatItemResponseModel, _$identity);
|
||||
|
||||
/// Serializes this HeartbeatItemResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is HeartbeatItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.lowBloodPressure, lowBloodPressure) || other.lowBloodPressure == lowBloodPressure)&&(identical(other.highBloodPressure, highBloodPressure) || other.highBloodPressure == highBloodPressure)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,heartbeats,lowBloodPressure,highBloodPressure,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HeartbeatItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, heartbeats: $heartbeats, lowBloodPressure: $lowBloodPressure, highBloodPressure: $highBloodPressure, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $HeartbeatItemResponseModelCopyWith<$Res> {
|
||||
factory $HeartbeatItemResponseModelCopyWith(HeartbeatItemResponseModel value, $Res Function(HeartbeatItemResponseModel) _then) = _$HeartbeatItemResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int heartbeats, int? lowBloodPressure, int? highBloodPressure, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$HeartbeatItemResponseModelCopyWithImpl<$Res>
|
||||
implements $HeartbeatItemResponseModelCopyWith<$Res> {
|
||||
_$HeartbeatItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final HeartbeatItemResponseModel _self;
|
||||
final $Res Function(HeartbeatItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of HeartbeatItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceIdentificator = null,Object? heartbeats = null,Object? lowBloodPressure = freezed,Object? highBloodPressure = freezed,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,heartbeats: null == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
|
||||
as int,lowBloodPressure: freezed == lowBloodPressure ? _self.lowBloodPressure : lowBloodPressure // ignore: cast_nullable_to_non_nullable
|
||||
as int?,highBloodPressure: freezed == highBloodPressure ? _self.highBloodPressure : highBloodPressure // ignore: cast_nullable_to_non_nullable
|
||||
as int?,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [HeartbeatItemResponseModel].
|
||||
extension HeartbeatItemResponseModelPatterns on HeartbeatItemResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _HeartbeatItemResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _HeartbeatItemResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _HeartbeatItemResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int heartbeats, int? lowBloodPressure, int? highBloodPressure, int occurredAt, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.heartbeats,_that.lowBloodPressure,_that.highBloodPressure,_that.occurredAt,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int heartbeats, int? lowBloodPressure, int? highBloodPressure, int occurredAt, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel():
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.heartbeats,_that.lowBloodPressure,_that.highBloodPressure,_that.occurredAt,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceIdentificator, int heartbeats, int? lowBloodPressure, int? highBloodPressure, int occurredAt, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _HeartbeatItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.heartbeats,_that.lowBloodPressure,_that.highBloodPressure,_that.occurredAt,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _HeartbeatItemResponseModel implements HeartbeatItemResponseModel {
|
||||
const _HeartbeatItemResponseModel({required this.id, required this.deviceIdentificator, required this.heartbeats, this.lowBloodPressure, this.highBloodPressure, required this.occurredAt, required this.createdAt});
|
||||
factory _HeartbeatItemResponseModel.fromJson(Map<String, dynamic> json) => _$HeartbeatItemResponseModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceIdentificator;
|
||||
@override final int heartbeats;
|
||||
@override final int? lowBloodPressure;
|
||||
@override final int? highBloodPressure;
|
||||
@override final int occurredAt;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of HeartbeatItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$HeartbeatItemResponseModelCopyWith<_HeartbeatItemResponseModel> get copyWith => __$HeartbeatItemResponseModelCopyWithImpl<_HeartbeatItemResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$HeartbeatItemResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HeartbeatItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.lowBloodPressure, lowBloodPressure) || other.lowBloodPressure == lowBloodPressure)&&(identical(other.highBloodPressure, highBloodPressure) || other.highBloodPressure == highBloodPressure)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,heartbeats,lowBloodPressure,highBloodPressure,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HeartbeatItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, heartbeats: $heartbeats, lowBloodPressure: $lowBloodPressure, highBloodPressure: $highBloodPressure, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$HeartbeatItemResponseModelCopyWith<$Res> implements $HeartbeatItemResponseModelCopyWith<$Res> {
|
||||
factory _$HeartbeatItemResponseModelCopyWith(_HeartbeatItemResponseModel value, $Res Function(_HeartbeatItemResponseModel) _then) = __$HeartbeatItemResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int heartbeats, int? lowBloodPressure, int? highBloodPressure, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$HeartbeatItemResponseModelCopyWithImpl<$Res>
|
||||
implements _$HeartbeatItemResponseModelCopyWith<$Res> {
|
||||
__$HeartbeatItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _HeartbeatItemResponseModel _self;
|
||||
final $Res Function(_HeartbeatItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of HeartbeatItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceIdentificator = null,Object? heartbeats = null,Object? lowBloodPressure = freezed,Object? highBloodPressure = freezed,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_HeartbeatItemResponseModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,heartbeats: null == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
|
||||
as int,lowBloodPressure: freezed == lowBloodPressure ? _self.lowBloodPressure : lowBloodPressure // ignore: cast_nullable_to_non_nullable
|
||||
as int?,highBloodPressure: freezed == highBloodPressure ? _self.highBloodPressure : highBloodPressure // ignore: cast_nullable_to_non_nullable
|
||||
as int?,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,53 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_heartbeats_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GetHeartbeatsResponseModel _$GetHeartbeatsResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GetHeartbeatsResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map(
|
||||
(e) => HeartbeatItemResponseModel.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetHeartbeatsResponseModelToJson(
|
||||
_GetHeartbeatsResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'items': instance.items,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
};
|
||||
|
||||
_HeartbeatItemResponseModel _$HeartbeatItemResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _HeartbeatItemResponseModel(
|
||||
id: json['id'] as String,
|
||||
deviceIdentificator: json['deviceIdentificator'] as String,
|
||||
heartbeats: (json['heartbeats'] as num).toInt(),
|
||||
lowBloodPressure: (json['lowBloodPressure'] as num?)?.toInt(),
|
||||
highBloodPressure: (json['highBloodPressure'] as num?)?.toInt(),
|
||||
occurredAt: (json['occurredAt'] as num).toInt(),
|
||||
createdAt: (json['createdAt'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HeartbeatItemResponseModelToJson(
|
||||
_HeartbeatItemResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'deviceIdentificator': instance.deviceIdentificator,
|
||||
'heartbeats': instance.heartbeats,
|
||||
'lowBloodPressure': instance.lowBloodPressure,
|
||||
'highBloodPressure': instance.highBloodPressure,
|
||||
'occurredAt': instance.occurredAt,
|
||||
'createdAt': instance.createdAt,
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../../features/health/domain/entities/oxygen_entity.dart';
|
||||
|
||||
part 'get_oxygens_response_model.freezed.dart';
|
||||
part 'get_oxygens_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GetOxygensResponseModel with _$GetOxygensResponseModel {
|
||||
const factory GetOxygensResponseModel({
|
||||
required int total,
|
||||
required List<OxygenItemResponseModel> items,
|
||||
required int page,
|
||||
required int pages,
|
||||
}) = _GetOxygensResponseModel;
|
||||
|
||||
factory GetOxygensResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetOxygensResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OxygenItemResponseModel with _$OxygenItemResponseModel {
|
||||
const factory OxygenItemResponseModel({
|
||||
required String id,
|
||||
required String deviceIdentificator,
|
||||
required int oxygen,
|
||||
required int occurredAt,
|
||||
required int createdAt,
|
||||
}) = _OxygenItemResponseModel;
|
||||
|
||||
factory OxygenItemResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OxygenItemResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension OxygensResponseMapper on GetOxygensResponseModel {
|
||||
List<OxygenEntity> toEntity() {
|
||||
return items
|
||||
.map(
|
||||
(item) => OxygenEntity(
|
||||
id: item.id,
|
||||
deviceIdentificator: item.deviceIdentificator,
|
||||
oxygen: item.oxygen,
|
||||
occurredAt: item.occurredAt,
|
||||
createdAt: item.createdAt,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,567 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'get_oxygens_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GetOxygensResponseModel {
|
||||
|
||||
int get total; List<OxygenItemResponseModel> get items; int get page; int get pages;
|
||||
/// Create a copy of GetOxygensResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GetOxygensResponseModelCopyWith<GetOxygensResponseModel> get copyWith => _$GetOxygensResponseModelCopyWithImpl<GetOxygensResponseModel>(this as GetOxygensResponseModel, _$identity);
|
||||
|
||||
/// Serializes this GetOxygensResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetOxygensResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetOxygensResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GetOxygensResponseModelCopyWith<$Res> {
|
||||
factory $GetOxygensResponseModelCopyWith(GetOxygensResponseModel value, $Res Function(GetOxygensResponseModel) _then) = _$GetOxygensResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, List<OxygenItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GetOxygensResponseModelCopyWithImpl<$Res>
|
||||
implements $GetOxygensResponseModelCopyWith<$Res> {
|
||||
_$GetOxygensResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GetOxygensResponseModel _self;
|
||||
final $Res Function(GetOxygensResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetOxygensResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<OxygenItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GetOxygensResponseModel].
|
||||
extension GetOxygensResponseModelPatterns on GetOxygensResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetOxygensResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetOxygensResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetOxygensResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, List<OxygenItemResponseModel> items, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, List<OxygenItemResponseModel> items, int page, int pages) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel():
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, List<OxygenItemResponseModel> items, int page, int pages)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetOxygensResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GetOxygensResponseModel implements GetOxygensResponseModel {
|
||||
const _GetOxygensResponseModel({required this.total, required final List<OxygenItemResponseModel> items, required this.page, required this.pages}): _items = items;
|
||||
factory _GetOxygensResponseModel.fromJson(Map<String, dynamic> json) => _$GetOxygensResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
final List<OxygenItemResponseModel> _items;
|
||||
@override List<OxygenItemResponseModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
|
||||
/// Create a copy of GetOxygensResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GetOxygensResponseModelCopyWith<_GetOxygensResponseModel> get copyWith => __$GetOxygensResponseModelCopyWithImpl<_GetOxygensResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GetOxygensResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetOxygensResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(_items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetOxygensResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GetOxygensResponseModelCopyWith<$Res> implements $GetOxygensResponseModelCopyWith<$Res> {
|
||||
factory _$GetOxygensResponseModelCopyWith(_GetOxygensResponseModel value, $Res Function(_GetOxygensResponseModel) _then) = __$GetOxygensResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, List<OxygenItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GetOxygensResponseModelCopyWithImpl<$Res>
|
||||
implements _$GetOxygensResponseModelCopyWith<$Res> {
|
||||
__$GetOxygensResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GetOxygensResponseModel _self;
|
||||
final $Res Function(_GetOxygensResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetOxygensResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_GetOxygensResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<OxygenItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$OxygenItemResponseModel {
|
||||
|
||||
String get id; String get deviceIdentificator; int get oxygen; int get occurredAt; int get createdAt;
|
||||
/// Create a copy of OxygenItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$OxygenItemResponseModelCopyWith<OxygenItemResponseModel> get copyWith => _$OxygenItemResponseModelCopyWithImpl<OxygenItemResponseModel>(this as OxygenItemResponseModel, _$identity);
|
||||
|
||||
/// Serializes this OxygenItemResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is OxygenItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.oxygen, oxygen) || other.oxygen == oxygen)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,oxygen,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OxygenItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, oxygen: $oxygen, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $OxygenItemResponseModelCopyWith<$Res> {
|
||||
factory $OxygenItemResponseModelCopyWith(OxygenItemResponseModel value, $Res Function(OxygenItemResponseModel) _then) = _$OxygenItemResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int oxygen, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$OxygenItemResponseModelCopyWithImpl<$Res>
|
||||
implements $OxygenItemResponseModelCopyWith<$Res> {
|
||||
_$OxygenItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final OxygenItemResponseModel _self;
|
||||
final $Res Function(OxygenItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of OxygenItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceIdentificator = null,Object? oxygen = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,oxygen: null == oxygen ? _self.oxygen : oxygen // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [OxygenItemResponseModel].
|
||||
extension OxygenItemResponseModelPatterns on OxygenItemResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _OxygenItemResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _OxygenItemResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _OxygenItemResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int oxygen, int occurredAt, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.oxygen,_that.occurredAt,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int oxygen, int occurredAt, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel():
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.oxygen,_that.occurredAt,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceIdentificator, int oxygen, int occurredAt, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _OxygenItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.oxygen,_that.occurredAt,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _OxygenItemResponseModel implements OxygenItemResponseModel {
|
||||
const _OxygenItemResponseModel({required this.id, required this.deviceIdentificator, required this.oxygen, required this.occurredAt, required this.createdAt});
|
||||
factory _OxygenItemResponseModel.fromJson(Map<String, dynamic> json) => _$OxygenItemResponseModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceIdentificator;
|
||||
@override final int oxygen;
|
||||
@override final int occurredAt;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of OxygenItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$OxygenItemResponseModelCopyWith<_OxygenItemResponseModel> get copyWith => __$OxygenItemResponseModelCopyWithImpl<_OxygenItemResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$OxygenItemResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _OxygenItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.oxygen, oxygen) || other.oxygen == oxygen)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,oxygen,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OxygenItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, oxygen: $oxygen, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$OxygenItemResponseModelCopyWith<$Res> implements $OxygenItemResponseModelCopyWith<$Res> {
|
||||
factory _$OxygenItemResponseModelCopyWith(_OxygenItemResponseModel value, $Res Function(_OxygenItemResponseModel) _then) = __$OxygenItemResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int oxygen, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$OxygenItemResponseModelCopyWithImpl<$Res>
|
||||
implements _$OxygenItemResponseModelCopyWith<$Res> {
|
||||
__$OxygenItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _OxygenItemResponseModel _self;
|
||||
final $Res Function(_OxygenItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of OxygenItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceIdentificator = null,Object? oxygen = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_OxygenItemResponseModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,oxygen: null == oxygen ? _self.oxygen : oxygen // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_oxygens_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GetOxygensResponseModel _$GetOxygensResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GetOxygensResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => OxygenItemResponseModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetOxygensResponseModelToJson(
|
||||
_GetOxygensResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'items': instance.items,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
};
|
||||
|
||||
_OxygenItemResponseModel _$OxygenItemResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _OxygenItemResponseModel(
|
||||
id: json['id'] as String,
|
||||
deviceIdentificator: json['deviceIdentificator'] as String,
|
||||
oxygen: (json['oxygen'] as num).toInt(),
|
||||
occurredAt: (json['occurredAt'] as num).toInt(),
|
||||
createdAt: (json['createdAt'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OxygenItemResponseModelToJson(
|
||||
_OxygenItemResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'deviceIdentificator': instance.deviceIdentificator,
|
||||
'oxygen': instance.oxygen,
|
||||
'occurredAt': instance.occurredAt,
|
||||
'createdAt': instance.createdAt,
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
import 'package:device_management/src/features/scheduled_activities/domain/entities/scheduled_activity_entity.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'get_scheduled_activities_response_model.freezed.dart';
|
||||
part 'get_scheduled_activities_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GetScheduledActivitiesResponseModel
|
||||
with _$GetScheduledActivitiesResponseModel {
|
||||
const factory GetScheduledActivitiesResponseModel({
|
||||
required int total,
|
||||
required List<ScheduledActivityItemResponseModel> items,
|
||||
required int page,
|
||||
required int pages,
|
||||
}) = _GetScheduledActivitiesResponseModel;
|
||||
|
||||
factory GetScheduledActivitiesResponseModel.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$GetScheduledActivitiesResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ScheduledActivityItemResponseModel
|
||||
with _$ScheduledActivityItemResponseModel {
|
||||
const factory ScheduledActivityItemResponseModel({
|
||||
required String id,
|
||||
required String deviceId,
|
||||
required int weekDay,
|
||||
required String name,
|
||||
required String period,
|
||||
required int createdAt,
|
||||
int? updatedAt,
|
||||
}) = _ScheduledActivityItemResponseModel;
|
||||
|
||||
factory ScheduledActivityItemResponseModel.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ScheduledActivityItemResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension ScheduledActivitiesResponseMapper
|
||||
on GetScheduledActivitiesResponseModel {
|
||||
List<ScheduledActivityEntity> toEntity() {
|
||||
return items
|
||||
.map((item) => ScheduledActivityEntity(
|
||||
id: item.id,
|
||||
deviceId: item.deviceId,
|
||||
weekDay: item.weekDay,
|
||||
name: item.name,
|
||||
period: item.period,
|
||||
createdAt: item.createdAt,
|
||||
updatedAt: item.updatedAt,
|
||||
))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,573 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'get_scheduled_activities_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GetScheduledActivitiesResponseModel {
|
||||
|
||||
int get total; List<ScheduledActivityItemResponseModel> get items; int get page; int get pages;
|
||||
/// Create a copy of GetScheduledActivitiesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GetScheduledActivitiesResponseModelCopyWith<GetScheduledActivitiesResponseModel> get copyWith => _$GetScheduledActivitiesResponseModelCopyWithImpl<GetScheduledActivitiesResponseModel>(this as GetScheduledActivitiesResponseModel, _$identity);
|
||||
|
||||
/// Serializes this GetScheduledActivitiesResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetScheduledActivitiesResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetScheduledActivitiesResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GetScheduledActivitiesResponseModelCopyWith<$Res> {
|
||||
factory $GetScheduledActivitiesResponseModelCopyWith(GetScheduledActivitiesResponseModel value, $Res Function(GetScheduledActivitiesResponseModel) _then) = _$GetScheduledActivitiesResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, List<ScheduledActivityItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GetScheduledActivitiesResponseModelCopyWithImpl<$Res>
|
||||
implements $GetScheduledActivitiesResponseModelCopyWith<$Res> {
|
||||
_$GetScheduledActivitiesResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GetScheduledActivitiesResponseModel _self;
|
||||
final $Res Function(GetScheduledActivitiesResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetScheduledActivitiesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<ScheduledActivityItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GetScheduledActivitiesResponseModel].
|
||||
extension GetScheduledActivitiesResponseModelPatterns on GetScheduledActivitiesResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetScheduledActivitiesResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetScheduledActivitiesResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetScheduledActivitiesResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, List<ScheduledActivityItemResponseModel> items, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, List<ScheduledActivityItemResponseModel> items, int page, int pages) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel():
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, List<ScheduledActivityItemResponseModel> items, int page, int pages)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetScheduledActivitiesResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GetScheduledActivitiesResponseModel implements GetScheduledActivitiesResponseModel {
|
||||
const _GetScheduledActivitiesResponseModel({required this.total, required final List<ScheduledActivityItemResponseModel> items, required this.page, required this.pages}): _items = items;
|
||||
factory _GetScheduledActivitiesResponseModel.fromJson(Map<String, dynamic> json) => _$GetScheduledActivitiesResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
final List<ScheduledActivityItemResponseModel> _items;
|
||||
@override List<ScheduledActivityItemResponseModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
|
||||
/// Create a copy of GetScheduledActivitiesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GetScheduledActivitiesResponseModelCopyWith<_GetScheduledActivitiesResponseModel> get copyWith => __$GetScheduledActivitiesResponseModelCopyWithImpl<_GetScheduledActivitiesResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GetScheduledActivitiesResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetScheduledActivitiesResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(_items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetScheduledActivitiesResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GetScheduledActivitiesResponseModelCopyWith<$Res> implements $GetScheduledActivitiesResponseModelCopyWith<$Res> {
|
||||
factory _$GetScheduledActivitiesResponseModelCopyWith(_GetScheduledActivitiesResponseModel value, $Res Function(_GetScheduledActivitiesResponseModel) _then) = __$GetScheduledActivitiesResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, List<ScheduledActivityItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GetScheduledActivitiesResponseModelCopyWithImpl<$Res>
|
||||
implements _$GetScheduledActivitiesResponseModelCopyWith<$Res> {
|
||||
__$GetScheduledActivitiesResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GetScheduledActivitiesResponseModel _self;
|
||||
final $Res Function(_GetScheduledActivitiesResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetScheduledActivitiesResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_GetScheduledActivitiesResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<ScheduledActivityItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ScheduledActivityItemResponseModel {
|
||||
|
||||
String get id; String get deviceId; int get weekDay; String get name; String get period; int get createdAt; int? get updatedAt;
|
||||
/// Create a copy of ScheduledActivityItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ScheduledActivityItemResponseModelCopyWith<ScheduledActivityItemResponseModel> get copyWith => _$ScheduledActivityItemResponseModelCopyWithImpl<ScheduledActivityItemResponseModel>(this as ScheduledActivityItemResponseModel, _$identity);
|
||||
|
||||
/// Serializes this ScheduledActivityItemResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ScheduledActivityItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.weekDay, weekDay) || other.weekDay == weekDay)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,weekDay,name,period,createdAt,updatedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ScheduledActivityItemResponseModel(id: $id, deviceId: $deviceId, weekDay: $weekDay, name: $name, period: $period, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ScheduledActivityItemResponseModelCopyWith<$Res> {
|
||||
factory $ScheduledActivityItemResponseModelCopyWith(ScheduledActivityItemResponseModel value, $Res Function(ScheduledActivityItemResponseModel) _then) = _$ScheduledActivityItemResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceId, int weekDay, String name, String period, int createdAt, int? updatedAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ScheduledActivityItemResponseModelCopyWithImpl<$Res>
|
||||
implements $ScheduledActivityItemResponseModelCopyWith<$Res> {
|
||||
_$ScheduledActivityItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ScheduledActivityItemResponseModel _self;
|
||||
final $Res Function(ScheduledActivityItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of ScheduledActivityItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? weekDay = null,Object? name = null,Object? period = null,Object? createdAt = null,Object? updatedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,weekDay: null == weekDay ? _self.weekDay : weekDay // ignore: cast_nullable_to_non_nullable
|
||||
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [ScheduledActivityItemResponseModel].
|
||||
extension ScheduledActivityItemResponseModelPatterns on ScheduledActivityItemResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ScheduledActivityItemResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ScheduledActivityItemResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ScheduledActivityItemResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, int weekDay, String name, String period, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period,_that.createdAt,_that.updatedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, int weekDay, String name, String period, int createdAt, int? updatedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel():
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period,_that.createdAt,_that.updatedAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, int weekDay, String name, String period, int createdAt, int? updatedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ScheduledActivityItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.weekDay,_that.name,_that.period,_that.createdAt,_that.updatedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ScheduledActivityItemResponseModel implements ScheduledActivityItemResponseModel {
|
||||
const _ScheduledActivityItemResponseModel({required this.id, required this.deviceId, required this.weekDay, required this.name, required this.period, required this.createdAt, this.updatedAt});
|
||||
factory _ScheduledActivityItemResponseModel.fromJson(Map<String, dynamic> json) => _$ScheduledActivityItemResponseModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceId;
|
||||
@override final int weekDay;
|
||||
@override final String name;
|
||||
@override final String period;
|
||||
@override final int createdAt;
|
||||
@override final int? updatedAt;
|
||||
|
||||
/// Create a copy of ScheduledActivityItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ScheduledActivityItemResponseModelCopyWith<_ScheduledActivityItemResponseModel> get copyWith => __$ScheduledActivityItemResponseModelCopyWithImpl<_ScheduledActivityItemResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ScheduledActivityItemResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScheduledActivityItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.weekDay, weekDay) || other.weekDay == weekDay)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,weekDay,name,period,createdAt,updatedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ScheduledActivityItemResponseModel(id: $id, deviceId: $deviceId, weekDay: $weekDay, name: $name, period: $period, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ScheduledActivityItemResponseModelCopyWith<$Res> implements $ScheduledActivityItemResponseModelCopyWith<$Res> {
|
||||
factory _$ScheduledActivityItemResponseModelCopyWith(_ScheduledActivityItemResponseModel value, $Res Function(_ScheduledActivityItemResponseModel) _then) = __$ScheduledActivityItemResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceId, int weekDay, String name, String period, int createdAt, int? updatedAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ScheduledActivityItemResponseModelCopyWithImpl<$Res>
|
||||
implements _$ScheduledActivityItemResponseModelCopyWith<$Res> {
|
||||
__$ScheduledActivityItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ScheduledActivityItemResponseModel _self;
|
||||
final $Res Function(_ScheduledActivityItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of ScheduledActivityItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? weekDay = null,Object? name = null,Object? period = null,Object? createdAt = null,Object? updatedAt = freezed,}) {
|
||||
return _then(_ScheduledActivityItemResponseModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,weekDay: null == weekDay ? _self.weekDay : weekDay // ignore: cast_nullable_to_non_nullable
|
||||
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,55 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_scheduled_activities_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GetScheduledActivitiesResponseModel
|
||||
_$GetScheduledActivitiesResponseModelFromJson(Map<String, dynamic> json) =>
|
||||
_GetScheduledActivitiesResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map(
|
||||
(e) => ScheduledActivityItemResponseModel.fromJson(
|
||||
e as Map<String, dynamic>,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetScheduledActivitiesResponseModelToJson(
|
||||
_GetScheduledActivitiesResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'items': instance.items,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
};
|
||||
|
||||
_ScheduledActivityItemResponseModel
|
||||
_$ScheduledActivityItemResponseModelFromJson(Map<String, dynamic> json) =>
|
||||
_ScheduledActivityItemResponseModel(
|
||||
id: json['id'] as String,
|
||||
deviceId: json['deviceId'] as String,
|
||||
weekDay: (json['weekDay'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
period: json['period'] as String,
|
||||
createdAt: (json['createdAt'] as num).toInt(),
|
||||
updatedAt: (json['updatedAt'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ScheduledActivityItemResponseModelToJson(
|
||||
_ScheduledActivityItemResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'deviceId': instance.deviceId,
|
||||
'weekDay': instance.weekDay,
|
||||
'name': instance.name,
|
||||
'period': instance.period,
|
||||
'createdAt': instance.createdAt,
|
||||
'updatedAt': instance.updatedAt,
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../domain/entities/steps_entity.dart';
|
||||
|
||||
part 'get_steps_response_model.freezed.dart';
|
||||
part 'get_steps_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GetStepsResponseModel with _$GetStepsResponseModel {
|
||||
const factory GetStepsResponseModel({
|
||||
required int total,
|
||||
required List<StepsItemResponseModel> items,
|
||||
required int page,
|
||||
required int pages,
|
||||
}) = _GetStepsResponseModel;
|
||||
|
||||
factory GetStepsResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetStepsResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class StepsItemResponseModel with _$StepsItemResponseModel {
|
||||
const factory StepsItemResponseModel({
|
||||
required String id,
|
||||
required String deviceIdentificator,
|
||||
required int steps,
|
||||
required int occurredAt,
|
||||
required int createdAt,
|
||||
}) = _StepsItemResponseModel;
|
||||
|
||||
factory StepsItemResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$StepsItemResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension StepsResponseMapper on GetStepsResponseModel {
|
||||
List<StepsEntity> toEntity() {
|
||||
return items
|
||||
.map(
|
||||
(item) => StepsEntity(
|
||||
id: item.id,
|
||||
deviceIdentificator: item.deviceIdentificator,
|
||||
steps: item.steps,
|
||||
occurredAt: item.occurredAt,
|
||||
createdAt: item.createdAt,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,567 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'get_steps_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GetStepsResponseModel {
|
||||
|
||||
int get total; List<StepsItemResponseModel> get items; int get page; int get pages;
|
||||
/// Create a copy of GetStepsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GetStepsResponseModelCopyWith<GetStepsResponseModel> get copyWith => _$GetStepsResponseModelCopyWithImpl<GetStepsResponseModel>(this as GetStepsResponseModel, _$identity);
|
||||
|
||||
/// Serializes this GetStepsResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetStepsResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetStepsResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GetStepsResponseModelCopyWith<$Res> {
|
||||
factory $GetStepsResponseModelCopyWith(GetStepsResponseModel value, $Res Function(GetStepsResponseModel) _then) = _$GetStepsResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, List<StepsItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GetStepsResponseModelCopyWithImpl<$Res>
|
||||
implements $GetStepsResponseModelCopyWith<$Res> {
|
||||
_$GetStepsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GetStepsResponseModel _self;
|
||||
final $Res Function(GetStepsResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetStepsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepsItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GetStepsResponseModel].
|
||||
extension GetStepsResponseModelPatterns on GetStepsResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetStepsResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetStepsResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetStepsResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, List<StepsItemResponseModel> items, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, List<StepsItemResponseModel> items, int page, int pages) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel():
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, List<StepsItemResponseModel> items, int page, int pages)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GetStepsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.items,_that.page,_that.pages);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GetStepsResponseModel implements GetStepsResponseModel {
|
||||
const _GetStepsResponseModel({required this.total, required final List<StepsItemResponseModel> items, required this.page, required this.pages}): _items = items;
|
||||
factory _GetStepsResponseModel.fromJson(Map<String, dynamic> json) => _$GetStepsResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
final List<StepsItemResponseModel> _items;
|
||||
@override List<StepsItemResponseModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
|
||||
/// Create a copy of GetStepsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GetStepsResponseModelCopyWith<_GetStepsResponseModel> get copyWith => __$GetStepsResponseModelCopyWithImpl<_GetStepsResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GetStepsResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetStepsResponseModel&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,const DeepCollectionEquality().hash(_items),page,pages);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GetStepsResponseModel(total: $total, items: $items, page: $page, pages: $pages)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GetStepsResponseModelCopyWith<$Res> implements $GetStepsResponseModelCopyWith<$Res> {
|
||||
factory _$GetStepsResponseModelCopyWith(_GetStepsResponseModel value, $Res Function(_GetStepsResponseModel) _then) = __$GetStepsResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, List<StepsItemResponseModel> items, int page, int pages
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GetStepsResponseModelCopyWithImpl<$Res>
|
||||
implements _$GetStepsResponseModelCopyWith<$Res> {
|
||||
__$GetStepsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GetStepsResponseModel _self;
|
||||
final $Res Function(_GetStepsResponseModel) _then;
|
||||
|
||||
/// Create a copy of GetStepsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? items = null,Object? page = null,Object? pages = null,}) {
|
||||
return _then(_GetStepsResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepsItemResponseModel>,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$StepsItemResponseModel {
|
||||
|
||||
String get id; String get deviceIdentificator; int get steps; int get occurredAt; int get createdAt;
|
||||
/// Create a copy of StepsItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$StepsItemResponseModelCopyWith<StepsItemResponseModel> get copyWith => _$StepsItemResponseModelCopyWithImpl<StepsItemResponseModel>(this as StepsItemResponseModel, _$identity);
|
||||
|
||||
/// Serializes this StepsItemResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StepsItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.steps, steps) || other.steps == steps)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,steps,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StepsItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, steps: $steps, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $StepsItemResponseModelCopyWith<$Res> {
|
||||
factory $StepsItemResponseModelCopyWith(StepsItemResponseModel value, $Res Function(StepsItemResponseModel) _then) = _$StepsItemResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int steps, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$StepsItemResponseModelCopyWithImpl<$Res>
|
||||
implements $StepsItemResponseModelCopyWith<$Res> {
|
||||
_$StepsItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final StepsItemResponseModel _self;
|
||||
final $Res Function(StepsItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of StepsItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceIdentificator = null,Object? steps = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,steps: null == steps ? _self.steps : steps // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [StepsItemResponseModel].
|
||||
extension StepsItemResponseModelPatterns on StepsItemResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _StepsItemResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _StepsItemResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _StepsItemResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel():
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsItemResponseModel() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _StepsItemResponseModel implements StepsItemResponseModel {
|
||||
const _StepsItemResponseModel({required this.id, required this.deviceIdentificator, required this.steps, required this.occurredAt, required this.createdAt});
|
||||
factory _StepsItemResponseModel.fromJson(Map<String, dynamic> json) => _$StepsItemResponseModelFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceIdentificator;
|
||||
@override final int steps;
|
||||
@override final int occurredAt;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of StepsItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$StepsItemResponseModelCopyWith<_StepsItemResponseModel> get copyWith => __$StepsItemResponseModelCopyWithImpl<_StepsItemResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$StepsItemResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StepsItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.steps, steps) || other.steps == steps)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,steps,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StepsItemResponseModel(id: $id, deviceIdentificator: $deviceIdentificator, steps: $steps, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$StepsItemResponseModelCopyWith<$Res> implements $StepsItemResponseModelCopyWith<$Res> {
|
||||
factory _$StepsItemResponseModelCopyWith(_StepsItemResponseModel value, $Res Function(_StepsItemResponseModel) _then) = __$StepsItemResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int steps, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$StepsItemResponseModelCopyWithImpl<$Res>
|
||||
implements _$StepsItemResponseModelCopyWith<$Res> {
|
||||
__$StepsItemResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _StepsItemResponseModel _self;
|
||||
final $Res Function(_StepsItemResponseModel) _then;
|
||||
|
||||
/// Create a copy of StepsItemResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceIdentificator = null,Object? steps = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_StepsItemResponseModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,steps: null == steps ? _self.steps : steps // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_steps_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GetStepsResponseModel _$GetStepsResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GetStepsResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => StepsItemResponseModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetStepsResponseModelToJson(
|
||||
_GetStepsResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'items': instance.items,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
};
|
||||
|
||||
_StepsItemResponseModel _$StepsItemResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _StepsItemResponseModel(
|
||||
id: json['id'] as String,
|
||||
deviceIdentificator: json['deviceIdentificator'] as String,
|
||||
steps: (json['steps'] as num).toInt(),
|
||||
occurredAt: (json['occurredAt'] as num).toInt(),
|
||||
createdAt: (json['createdAt'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StepsItemResponseModelToJson(
|
||||
_StepsItemResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'deviceIdentificator': instance.deviceIdentificator,
|
||||
'steps': instance.steps,
|
||||
'occurredAt': instance.occurredAt,
|
||||
'createdAt': instance.createdAt,
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'update_scheduled_activity_request_model.freezed.dart';
|
||||
part 'update_scheduled_activity_request_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class UpdateScheduledActivityRequestModel
|
||||
with _$UpdateScheduledActivityRequestModel {
|
||||
const factory UpdateScheduledActivityRequestModel({
|
||||
required String deviceId,
|
||||
required String name,
|
||||
required String period,
|
||||
}) = _UpdateScheduledActivityRequestModel;
|
||||
|
||||
factory UpdateScheduledActivityRequestModel.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UpdateScheduledActivityRequestModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'update_scheduled_activity_request_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UpdateScheduledActivityRequestModel {
|
||||
|
||||
String get deviceId; String get name; String get period;
|
||||
/// Create a copy of UpdateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UpdateScheduledActivityRequestModelCopyWith<UpdateScheduledActivityRequestModel> get copyWith => _$UpdateScheduledActivityRequestModelCopyWithImpl<UpdateScheduledActivityRequestModel>(this as UpdateScheduledActivityRequestModel, _$identity);
|
||||
|
||||
/// Serializes this UpdateScheduledActivityRequestModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateScheduledActivityRequestModel&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,deviceId,name,period);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateScheduledActivityRequestModel(deviceId: $deviceId, name: $name, period: $period)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UpdateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
factory $UpdateScheduledActivityRequestModelCopyWith(UpdateScheduledActivityRequestModel value, $Res Function(UpdateScheduledActivityRequestModel) _then) = _$UpdateScheduledActivityRequestModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String deviceId, String name, String period
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UpdateScheduledActivityRequestModelCopyWithImpl<$Res>
|
||||
implements $UpdateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
_$UpdateScheduledActivityRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UpdateScheduledActivityRequestModel _self;
|
||||
final $Res Function(UpdateScheduledActivityRequestModel) _then;
|
||||
|
||||
/// Create a copy of UpdateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? deviceId = null,Object? name = null,Object? period = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [UpdateScheduledActivityRequestModel].
|
||||
extension UpdateScheduledActivityRequestModelPatterns on UpdateScheduledActivityRequestModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UpdateScheduledActivityRequestModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UpdateScheduledActivityRequestModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UpdateScheduledActivityRequestModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String deviceId, String name, String period)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that.deviceId,_that.name,_that.period);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String deviceId, String name, String period) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel():
|
||||
return $default(_that.deviceId,_that.name,_that.period);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String deviceId, String name, String period)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UpdateScheduledActivityRequestModel() when $default != null:
|
||||
return $default(_that.deviceId,_that.name,_that.period);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _UpdateScheduledActivityRequestModel implements UpdateScheduledActivityRequestModel {
|
||||
const _UpdateScheduledActivityRequestModel({required this.deviceId, required this.name, required this.period});
|
||||
factory _UpdateScheduledActivityRequestModel.fromJson(Map<String, dynamic> json) => _$UpdateScheduledActivityRequestModelFromJson(json);
|
||||
|
||||
@override final String deviceId;
|
||||
@override final String name;
|
||||
@override final String period;
|
||||
|
||||
/// Create a copy of UpdateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UpdateScheduledActivityRequestModelCopyWith<_UpdateScheduledActivityRequestModel> get copyWith => __$UpdateScheduledActivityRequestModelCopyWithImpl<_UpdateScheduledActivityRequestModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UpdateScheduledActivityRequestModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateScheduledActivityRequestModel&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.name, name) || other.name == name)&&(identical(other.period, period) || other.period == period));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,deviceId,name,period);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateScheduledActivityRequestModel(deviceId: $deviceId, name: $name, period: $period)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UpdateScheduledActivityRequestModelCopyWith<$Res> implements $UpdateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
factory _$UpdateScheduledActivityRequestModelCopyWith(_UpdateScheduledActivityRequestModel value, $Res Function(_UpdateScheduledActivityRequestModel) _then) = __$UpdateScheduledActivityRequestModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String deviceId, String name, String period
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UpdateScheduledActivityRequestModelCopyWithImpl<$Res>
|
||||
implements _$UpdateScheduledActivityRequestModelCopyWith<$Res> {
|
||||
__$UpdateScheduledActivityRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UpdateScheduledActivityRequestModel _self;
|
||||
final $Res Function(_UpdateScheduledActivityRequestModel) _then;
|
||||
|
||||
/// Create a copy of UpdateScheduledActivityRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? deviceId = null,Object? name = null,Object? period = null,}) {
|
||||
return _then(_UpdateScheduledActivityRequestModel(
|
||||
deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,period: null == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'update_scheduled_activity_request_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_UpdateScheduledActivityRequestModel
|
||||
_$UpdateScheduledActivityRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_UpdateScheduledActivityRequestModel(
|
||||
deviceId: json['deviceId'] as String,
|
||||
name: json['name'] as String,
|
||||
period: json['period'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UpdateScheduledActivityRequestModelToJson(
|
||||
_UpdateScheduledActivityRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'deviceId': instance.deviceId,
|
||||
'name': instance.name,
|
||||
'period': instance.period,
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import '../../domain/entities/app_usage_time_entity.dart';
|
||||
import '../../domain/repositories/app_usage_times_repository.dart';
|
||||
import '../datasources/app_usage_times_remote_datasource.dart';
|
||||
import '../models/get_app_usage_times_response_model.dart';
|
||||
|
||||
class AppUsageTimesRepositoryImpl implements AppUsageTimesRepository {
|
||||
const AppUsageTimesRepositoryImpl(this._remote);
|
||||
|
||||
final AppUsageTimesRemoteDatasource _remote;
|
||||
|
||||
@override
|
||||
Future<List<AppUsageTimeEntity>> getAppUsageTimes({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
final model = await _remote.getAppUsageTimes(
|
||||
identificator: identificator,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
import 'package:device_management/src/core/data/models/get_contacts_response_model.dart';
|
||||
import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
|
||||
|
||||
import '../../../features/contacts/domain/entities/contact_entity.dart';
|
||||
import '../../domain/repositories/contacts_repository.dart';
|
||||
import '../datasources/contacts_remote_datasource.dart';
|
||||
import '../models/create_contact_request_model.dart';
|
||||
import '../models/get_contacts_response_model.dart';
|
||||
import '../models/update_contact_request_model.dart';
|
||||
|
||||
class ContactsRepositoryImpl implements ContactsRepository {
|
||||
@@ -18,12 +17,12 @@ class ContactsRepositoryImpl implements ContactsRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateContact({required String userId, required UpdateContactRequestModel request}) {
|
||||
return _remote.updateContact(userId: userId, request: request);
|
||||
Future<void> updateContact({required UpdateContactRequestModel request}) {
|
||||
return _remote.updateContact(request: request);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createContact({required ContactRequestModel request}) {
|
||||
Future<void> createContact({required CreateContactRequestModel request}) {
|
||||
return _remote.createContact(request: request);
|
||||
}
|
||||
|
||||
@@ -31,4 +30,19 @@ class ContactsRepositoryImpl implements ContactsRepository {
|
||||
Future<void> deleteContact({required String contactId}) {
|
||||
return _remote.deleteContact(contactId: contactId);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> syncContactsToDevice({
|
||||
required String userId,
|
||||
required String deviceId,
|
||||
required List<ContactEntity> contacts,
|
||||
}) {
|
||||
return _remote.syncContactsToDevice(
|
||||
userId: userId,
|
||||
deviceId: deviceId,
|
||||
contacts: contacts
|
||||
.map((c) => {'name': c.name, 'phone': c.phone})
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import '../../../features/health/domain/entities/heartbeat_entity.dart';
|
||||
import '../../../features/health/domain/entities/oxygen_entity.dart';
|
||||
import '../../domain/repositories/health_repository.dart';
|
||||
import '../datasources/health_remote_datasource.dart';
|
||||
import '../models/get_heartbeats_response_model.dart';
|
||||
import '../models/get_oxygens_response_model.dart';
|
||||
|
||||
class HealthRepositoryImpl implements HealthRepository {
|
||||
const HealthRepositoryImpl(this._remote);
|
||||
|
||||
final HealthRemoteDatasource _remote;
|
||||
|
||||
@override
|
||||
Future<List<HeartbeatEntity>> getHeartbeats({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
final model = await _remote.getHeartbeats(
|
||||
identificator: identificator,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<OxygenEntity>> getOxygens({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
final model = await _remote.getOxygens(
|
||||
identificator: identificator,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import '../../../features/scheduled_activities/domain/entities/scheduled_activity_entity.dart';
|
||||
import '../../domain/repositories/scheduled_activities_repository.dart';
|
||||
import '../datasources/scheduled_activities_remote_datasource.dart';
|
||||
import '../models/create_scheduled_activity_request_model.dart';
|
||||
import '../models/get_scheduled_activities_response_model.dart';
|
||||
import '../models/update_scheduled_activity_request_model.dart';
|
||||
|
||||
class ScheduledActivitiesRepositoryImpl
|
||||
implements ScheduledActivitiesRepository {
|
||||
const ScheduledActivitiesRepositoryImpl(this._remote);
|
||||
|
||||
final ScheduledActivitiesRemoteDatasource _remote;
|
||||
|
||||
@override
|
||||
Future<List<ScheduledActivityEntity>> getActivities({
|
||||
required String deviceId,
|
||||
}) async {
|
||||
final model = await _remote.getActivities(deviceId: deviceId);
|
||||
return model.toEntity();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createActivity({
|
||||
required CreateScheduledActivityRequestModel request,
|
||||
}) {
|
||||
return _remote.createActivity(request: request);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateActivity({
|
||||
required String activityId,
|
||||
required UpdateScheduledActivityRequestModel request,
|
||||
}) {
|
||||
return _remote.updateActivity(activityId: activityId, request: request);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteActivity({required String activityId}) {
|
||||
return _remote.deleteActivity(activityId: activityId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import '../../domain/entities/steps_entity.dart';
|
||||
import '../../domain/repositories/steps_repository.dart';
|
||||
import '../datasources/steps_remote_datasource.dart';
|
||||
import '../models/get_steps_response_model.dart';
|
||||
|
||||
class StepsRepositoryImpl implements StepsRepository {
|
||||
const StepsRepositoryImpl(this._remote);
|
||||
|
||||
final StepsRemoteDatasource _remote;
|
||||
|
||||
@override
|
||||
Future<List<StepsEntity>> getSteps({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
}) async {
|
||||
final model = await _remote.getSteps(
|
||||
identificator: identificator,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'app_usage_time_entity.freezed.dart';
|
||||
|
||||
@freezed
|
||||
abstract class AppUsageTimeEntity with _$AppUsageTimeEntity {
|
||||
const factory AppUsageTimeEntity({
|
||||
required String id,
|
||||
required String uid,
|
||||
required String deviceIdentificator,
|
||||
required String name,
|
||||
required String startAt,
|
||||
required int duration,
|
||||
required int createdAt,
|
||||
}) = _AppUsageTimeEntity;
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'app_usage_time_entity.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$AppUsageTimeEntity {
|
||||
|
||||
String get id; String get uid; String get deviceIdentificator; String get name; String get startAt; int get duration; int get createdAt;
|
||||
/// Create a copy of AppUsageTimeEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$AppUsageTimeEntityCopyWith<AppUsageTimeEntity> get copyWith => _$AppUsageTimeEntityCopyWithImpl<AppUsageTimeEntity>(this as AppUsageTimeEntity, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppUsageTimeEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.name, name) || other.name == name)&&(identical(other.startAt, startAt) || other.startAt == startAt)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,uid,deviceIdentificator,name,startAt,duration,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AppUsageTimeEntity(id: $id, uid: $uid, deviceIdentificator: $deviceIdentificator, name: $name, startAt: $startAt, duration: $duration, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $AppUsageTimeEntityCopyWith<$Res> {
|
||||
factory $AppUsageTimeEntityCopyWith(AppUsageTimeEntity value, $Res Function(AppUsageTimeEntity) _then) = _$AppUsageTimeEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$AppUsageTimeEntityCopyWithImpl<$Res>
|
||||
implements $AppUsageTimeEntityCopyWith<$Res> {
|
||||
_$AppUsageTimeEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final AppUsageTimeEntity _self;
|
||||
final $Res Function(AppUsageTimeEntity) _then;
|
||||
|
||||
/// Create a copy of AppUsageTimeEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? uid = null,Object? deviceIdentificator = null,Object? name = null,Object? startAt = null,Object? duration = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,uid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,startAt: null == startAt ? _self.startAt : startAt // ignore: cast_nullable_to_non_nullable
|
||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [AppUsageTimeEntity].
|
||||
extension AppUsageTimeEntityPatterns on AppUsageTimeEntity {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppUsageTimeEntity value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppUsageTimeEntity value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppUsageTimeEntity value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity() when $default != null:
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity():
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AppUsageTimeEntity() when $default != null:
|
||||
return $default(_that.id,_that.uid,_that.deviceIdentificator,_that.name,_that.startAt,_that.duration,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _AppUsageTimeEntity implements AppUsageTimeEntity {
|
||||
const _AppUsageTimeEntity({required this.id, required this.uid, required this.deviceIdentificator, required this.name, required this.startAt, required this.duration, required this.createdAt});
|
||||
|
||||
|
||||
@override final String id;
|
||||
@override final String uid;
|
||||
@override final String deviceIdentificator;
|
||||
@override final String name;
|
||||
@override final String startAt;
|
||||
@override final int duration;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of AppUsageTimeEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$AppUsageTimeEntityCopyWith<_AppUsageTimeEntity> get copyWith => __$AppUsageTimeEntityCopyWithImpl<_AppUsageTimeEntity>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppUsageTimeEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.name, name) || other.name == name)&&(identical(other.startAt, startAt) || other.startAt == startAt)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,uid,deviceIdentificator,name,startAt,duration,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AppUsageTimeEntity(id: $id, uid: $uid, deviceIdentificator: $deviceIdentificator, name: $name, startAt: $startAt, duration: $duration, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$AppUsageTimeEntityCopyWith<$Res> implements $AppUsageTimeEntityCopyWith<$Res> {
|
||||
factory _$AppUsageTimeEntityCopyWith(_AppUsageTimeEntity value, $Res Function(_AppUsageTimeEntity) _then) = __$AppUsageTimeEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String uid, String deviceIdentificator, String name, String startAt, int duration, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$AppUsageTimeEntityCopyWithImpl<$Res>
|
||||
implements _$AppUsageTimeEntityCopyWith<$Res> {
|
||||
__$AppUsageTimeEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _AppUsageTimeEntity _self;
|
||||
final $Res Function(_AppUsageTimeEntity) _then;
|
||||
|
||||
/// Create a copy of AppUsageTimeEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? uid = null,Object? deviceIdentificator = null,Object? name = null,Object? startAt = null,Object? duration = null,Object? createdAt = null,}) {
|
||||
return _then(_AppUsageTimeEntity(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,uid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,startAt: null == startAt ? _self.startAt : startAt // ignore: cast_nullable_to_non_nullable
|
||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,14 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'steps_entity.freezed.dart';
|
||||
|
||||
@freezed
|
||||
abstract class StepsEntity with _$StepsEntity {
|
||||
const factory StepsEntity({
|
||||
required String id,
|
||||
required String deviceIdentificator,
|
||||
required int steps,
|
||||
required int occurredAt,
|
||||
required int createdAt,
|
||||
}) = _StepsEntity;
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'steps_entity.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$StepsEntity {
|
||||
|
||||
String get id; String get deviceIdentificator; int get steps; int get occurredAt; int get createdAt;
|
||||
/// Create a copy of StepsEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$StepsEntityCopyWith<StepsEntity> get copyWith => _$StepsEntityCopyWithImpl<StepsEntity>(this as StepsEntity, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StepsEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.steps, steps) || other.steps == steps)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,steps,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StepsEntity(id: $id, deviceIdentificator: $deviceIdentificator, steps: $steps, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $StepsEntityCopyWith<$Res> {
|
||||
factory $StepsEntityCopyWith(StepsEntity value, $Res Function(StepsEntity) _then) = _$StepsEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int steps, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$StepsEntityCopyWithImpl<$Res>
|
||||
implements $StepsEntityCopyWith<$Res> {
|
||||
_$StepsEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final StepsEntity _self;
|
||||
final $Res Function(StepsEntity) _then;
|
||||
|
||||
/// Create a copy of StepsEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceIdentificator = null,Object? steps = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,steps: null == steps ? _self.steps : steps // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [StepsEntity].
|
||||
extension StepsEntityPatterns on StepsEntity {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _StepsEntity value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _StepsEntity value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _StepsEntity value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity():
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceIdentificator, int steps, int occurredAt, int createdAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StepsEntity() when $default != null:
|
||||
return $default(_that.id,_that.deviceIdentificator,_that.steps,_that.occurredAt,_that.createdAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _StepsEntity implements StepsEntity {
|
||||
const _StepsEntity({required this.id, required this.deviceIdentificator, required this.steps, required this.occurredAt, required this.createdAt});
|
||||
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceIdentificator;
|
||||
@override final int steps;
|
||||
@override final int occurredAt;
|
||||
@override final int createdAt;
|
||||
|
||||
/// Create a copy of StepsEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$StepsEntityCopyWith<_StepsEntity> get copyWith => __$StepsEntityCopyWithImpl<_StepsEntity>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StepsEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceIdentificator, deviceIdentificator) || other.deviceIdentificator == deviceIdentificator)&&(identical(other.steps, steps) || other.steps == steps)&&(identical(other.occurredAt, occurredAt) || other.occurredAt == occurredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceIdentificator,steps,occurredAt,createdAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StepsEntity(id: $id, deviceIdentificator: $deviceIdentificator, steps: $steps, occurredAt: $occurredAt, createdAt: $createdAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$StepsEntityCopyWith<$Res> implements $StepsEntityCopyWith<$Res> {
|
||||
factory _$StepsEntityCopyWith(_StepsEntity value, $Res Function(_StepsEntity) _then) = __$StepsEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceIdentificator, int steps, int occurredAt, int createdAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$StepsEntityCopyWithImpl<$Res>
|
||||
implements _$StepsEntityCopyWith<$Res> {
|
||||
__$StepsEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _StepsEntity _self;
|
||||
final $Res Function(_StepsEntity) _then;
|
||||
|
||||
/// Create a copy of StepsEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceIdentificator = null,Object? steps = null,Object? occurredAt = null,Object? createdAt = null,}) {
|
||||
return _then(_StepsEntity(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceIdentificator: null == deviceIdentificator ? _self.deviceIdentificator : deviceIdentificator // ignore: cast_nullable_to_non_nullable
|
||||
as String,steps: null == steps ? _self.steps : steps // ignore: cast_nullable_to_non_nullable
|
||||
as int,occurredAt: null == occurredAt ? _self.occurredAt : occurredAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,8 @@
|
||||
import '../entities/app_usage_time_entity.dart';
|
||||
|
||||
abstract class AppUsageTimesRepository {
|
||||
Future<List<AppUsageTimeEntity>> getAppUsageTimes({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
import 'package:device_management/src/core/data/models/create_contact_request_model.dart';
|
||||
|
||||
import '../../../features/contacts/domain/entities/contact_entity.dart';
|
||||
import '../../data/models/create_contact_request_model.dart';
|
||||
import '../../data/models/update_contact_request_model.dart';
|
||||
import '../../../features/contacts/domain/entities/contact_entity.dart';
|
||||
|
||||
abstract class ContactsRepository {
|
||||
Future<List<ContactEntity>> getContacts({required String userId});
|
||||
|
||||
Future<void> updateContact({required String userId, required UpdateContactRequestModel request});
|
||||
Future<void> updateContact({required UpdateContactRequestModel request});
|
||||
|
||||
Future<void> createContact({required ContactRequestModel request});
|
||||
Future<void> createContact({required CreateContactRequestModel request});
|
||||
|
||||
Future<void> deleteContact({required String contactId});
|
||||
|
||||
Future<void> syncContactsToDevice({
|
||||
required String userId,
|
||||
required String deviceId,
|
||||
required List<ContactEntity> contacts,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import '../../../features/health/domain/entities/heartbeat_entity.dart';
|
||||
import '../../../features/health/domain/entities/oxygen_entity.dart';
|
||||
|
||||
abstract class HealthRepository {
|
||||
Future<List<HeartbeatEntity>> getHeartbeats({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
|
||||
Future<List<OxygenEntity>> getOxygens({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import '../../../features/scheduled_activities/domain/entities/scheduled_activity_entity.dart';
|
||||
import '../../data/models/create_scheduled_activity_request_model.dart';
|
||||
import '../../data/models/update_scheduled_activity_request_model.dart';
|
||||
|
||||
abstract class ScheduledActivitiesRepository {
|
||||
Future<List<ScheduledActivityEntity>> getActivities({
|
||||
required String deviceId,
|
||||
});
|
||||
|
||||
Future<void> createActivity({
|
||||
required CreateScheduledActivityRequestModel request,
|
||||
});
|
||||
|
||||
Future<void> updateActivity({
|
||||
required String activityId,
|
||||
required UpdateScheduledActivityRequestModel request,
|
||||
});
|
||||
|
||||
Future<void> deleteActivity({required String activityId});
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import '../entities/steps_entity.dart';
|
||||
|
||||
abstract class StepsRepository {
|
||||
Future<List<StepsEntity>> getSteps({
|
||||
required String identificator,
|
||||
Map<String, dynamic> queryParameters = const {},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
|
||||
String formatTime(int timestampMs) {
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(timestampMs);
|
||||
final hour = date.hour.toString().padLeft(2, '0');
|
||||
final minute = date.minute.toString().padLeft(2, '0');
|
||||
return '$hour:$minute';
|
||||
}
|
||||
|
||||
String formatDate(int timestampMs) {
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(timestampMs);
|
||||
final day = date.day.toString().padLeft(2, '0');
|
||||
final month = date.month.toString().padLeft(2, '0');
|
||||
return '$day/$month/${date.year}';
|
||||
}
|
||||
|
||||
String formatDayHeader(BuildContext context, DateTime date) {
|
||||
final now = DateTime.now();
|
||||
final today = DateTime(now.year, now.month, now.day);
|
||||
final day = DateTime(date.year, date.month, date.day);
|
||||
|
||||
if (day == today) return context.translate(I18n.today);
|
||||
if (day == today.subtract(const Duration(days: 1))) {
|
||||
return context.translate(I18n.yesterday);
|
||||
}
|
||||
|
||||
final d = date.day.toString().padLeft(2, '0');
|
||||
final m = date.month.toString().padLeft(2, '0');
|
||||
return '$d/$m/${date.year}';
|
||||
}
|
||||
|
||||
String formatTimeAgo(BuildContext context, int timestampMs) {
|
||||
final now = DateTime.now();
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(timestampMs);
|
||||
final diff = now.difference(date);
|
||||
|
||||
final String time;
|
||||
if (diff.inMinutes < 1) {
|
||||
time = '<1 min';
|
||||
} else if (diff.inMinutes < 60) {
|
||||
time = '${diff.inMinutes} min';
|
||||
} else if (diff.inHours < 24) {
|
||||
time = '${diff.inHours}h';
|
||||
} else {
|
||||
time = '${diff.inDays}d';
|
||||
}
|
||||
|
||||
return context.translate(I18n.timeAgo, args: {'time': time});
|
||||
}
|
||||
|
||||
List<(DateTime, List<T>)> groupByDay<T>(
|
||||
List<T> items,
|
||||
int Function(T) getTimestamp,
|
||||
) {
|
||||
final Map<DateTime, List<T>> groups = {};
|
||||
|
||||
for (final item in items) {
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(getTimestamp(item));
|
||||
final dayKey = DateTime(date.year, date.month, date.day);
|
||||
groups.putIfAbsent(dayKey, () => []).add(item);
|
||||
}
|
||||
|
||||
final sorted = groups.entries.toList()
|
||||
..sort((a, b) => b.key.compareTo(a.key));
|
||||
|
||||
return sorted.map((e) => (e.key, e.value)).toList();
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
enum TimeRange { today, sevenDays, thirtyDays, custom }
|
||||
@@ -0,0 +1,106 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
import 'package:utils/utils.dart';
|
||||
|
||||
import '../time_range.dart';
|
||||
|
||||
class TimeRangeSelector extends StatelessWidget {
|
||||
final TimeRange selected;
|
||||
final ValueChanged<TimeRange> onSelected;
|
||||
final VoidCallback onCustomTap;
|
||||
final ThemePort theme;
|
||||
|
||||
const TimeRangeSelector({
|
||||
super.key,
|
||||
required this.selected,
|
||||
required this.onSelected,
|
||||
required this.onCustomTap,
|
||||
required this.theme,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final chips = [
|
||||
(TimeRange.today, context.translate(I18n.today)),
|
||||
(TimeRange.sevenDays, context.translate(I18n.sevenDays)),
|
||||
(TimeRange.thirtyDays, context.translate(I18n.thirtyDays)),
|
||||
(TimeRange.custom, context.translate(I18n.custom)),
|
||||
];
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: SizeUtils.getByScreen(small: 16, big: 14),
|
||||
vertical: SizeUtils.getByScreen(small: 8, big: 6),
|
||||
),
|
||||
child: Row(
|
||||
children: chips
|
||||
.map((chip) {
|
||||
final (range, label) = chip;
|
||||
final isCustom = range == TimeRange.custom;
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
right: range != chips.last.$1
|
||||
? SizeUtils.getByScreen(small: 8, big: 6)
|
||||
: 0,
|
||||
),
|
||||
child: _Chip(
|
||||
label: label,
|
||||
isSelected: selected == range,
|
||||
onTap: isCustom ? onCustomTap : () => onSelected(range),
|
||||
theme: theme,
|
||||
),
|
||||
);
|
||||
})
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Chip extends StatelessWidget {
|
||||
final String label;
|
||||
final bool isSelected;
|
||||
final VoidCallback onTap;
|
||||
final ThemePort theme;
|
||||
|
||||
const _Chip({
|
||||
required this.label,
|
||||
required this.isSelected,
|
||||
required this.onTap,
|
||||
required this.theme,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: SizeUtils.getByScreen(small: 14, big: 12),
|
||||
vertical: SizeUtils.getByScreen(small: 8, big: 6),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? theme.getColorFor(ThemeCode.legacyPrimary)
|
||||
: theme.getColorFor(ThemeCode.backgroundSecondary),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(SizeUtils.getByScreen(small: 20, big: 18)),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 13, big: 12),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isSelected
|
||||
? Colors.white
|
||||
: theme
|
||||
.getColorFor(ThemeCode.textPrimary)
|
||||
.withValues(alpha: 0.6),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user