Compare commits

..

5 Commits

117 changed files with 7599 additions and 2084 deletions

View File

@@ -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"
}

1
.idea/modules.xml generated
View File

@@ -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" />

View File

@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Flutter Run -&gt; '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>

View File

@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Flutter Run -&gt; '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>

View File

@@ -1,7 +1,7 @@
<!-- Generated by Melos -->
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Flutter Test -&gt; '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>

View File

@@ -1,7 +1,7 @@
<!-- Generated by Melos -->
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Flutter Test -&gt; '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>

View File

@@ -1,5 +1,7 @@
PODS:
- Flutter (1.0.0)
- flutter_contacts (0.0.1):
- Flutter
- flutter_native_splash (2.4.3):
- Flutter
- flutter_treezor_entrust_sdk_bridge (0.0.1):
@@ -23,6 +25,7 @@ PODS:
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_contacts (from `.symlinks/plugins/flutter_contacts/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_treezor_entrust_sdk_bridge (from `.symlinks/plugins/flutter_treezor_entrust_sdk_bridge/ios`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
@@ -35,6 +38,8 @@ DEPENDENCIES:
EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_contacts:
:path: ".symlinks/plugins/flutter_contacts/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_treezor_entrust_sdk_bridge:
@@ -54,6 +59,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983
flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29
flutter_treezor_entrust_sdk_bridge: 4c2c94fb74ab57576e8d49f5f2a4b214e41141fe
mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e

View File

@@ -47,8 +47,14 @@
<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>
<string>Usamos tu ubicación para verificar la seguridad de las transacciones.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Usamos tu ubicación para verificar la seguridad de las transacciones.</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSFaceIDUsageDescription</key>

View File

@@ -47,8 +47,14 @@
<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>
<string>Usamos tu ubicación para verificar la seguridad de las transacciones.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Usamos tu ubicación para verificar la seguridad de las transacciones.</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSFaceIDUsageDescription</key>

View File

@@ -386,6 +386,12 @@ void configureAppRouter() {
name: 'home_extract',
pageBuilder: const ExtractBuilder().buildPage,
),
GoRoute(
path: 'edit',
name: 'home_edit_child_profile',
pageBuilder:
const EditChildProfileBuilder().buildPage,
),
],
),
],
@@ -427,6 +433,12 @@ void configureAppRouter() {
name: 'profile_settings',
pageBuilder: const ProfileSettingsBuilder().buildPage,
routes: [
GoRoute(
path: 'edit-personal-data',
name: 'profile_edit_personal_data',
pageBuilder:
const EditPersonalDataBuilder().buildPage,
),
GoRoute(
path: 'payment-methods',
name: 'profile_payment_methods',

View File

@@ -47,12 +47,21 @@ class SaveFamilyAppState extends ConsumerState<SaveFamilyApp>
walletHeartbeat.stop();
legacyHeartbeat.stop();
};
// walletHeartbeat.start();
legacyHeartbeat.start();
appRouter.routerDelegate.addListener(_onRouteChanged);
}
void _onRouteChanged() {
final location = appRouter.routerDelegate.currentConfiguration.uri.path;
if (location.startsWith(AppRoutes.legacyDashboard)) {
legacyHeartbeat.start();
} else {
legacyHeartbeat.stop();
}
}
@override
void dispose() {
appRouter.routerDelegate.removeListener(_onRouteChanged);
walletHeartbeat.stop();
legacyHeartbeat.stop();
WidgetsBinding.instance.removeObserver(this);
@@ -65,7 +74,7 @@ class SaveFamilyAppState extends ConsumerState<SaveFamilyApp>
ref.read(appLifecycleStateProvider.notifier).setState(state);
if (state == AppLifecycleState.resumed) {
// walletHeartbeat.start();
legacyHeartbeat.start();
_onRouteChanged();
ref.read(permissionsProvider.notifier).checkPermissions();
} else if (state == AppLifecycleState.paused) {
// walletHeartbeat.stop();

View File

@@ -1 +1 @@
C:/Users/Aitor Arana/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.2.1/
/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/

View File

@@ -1 +1 @@
C:/Users/Aitor Arana/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/

View File

@@ -1 +1 @@
C:/Users/Aitor Arana/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.2.2/
/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 1.0.0+4
environment:
sdk: ^3.9.2

File diff suppressed because one or more lines are too long

View File

@@ -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"
}

View File

@@ -1 +1 @@
3.35.6
3.35.7

View File

@@ -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-16 09:33:25.098373","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}}

View File

@@ -1,5 +1,6 @@
export 'src/presentation/activity_screen.dart';
export 'src/widgets/activity_list.dart';
export 'src/widgets/pagination_bar.dart';
export 'src/widgets/transaction_tile.dart';
export 'src/activity_builder.dart';
export 'src/providers/activity_providers.dart';

View File

@@ -17,7 +17,7 @@ class GetWalletTransactionsUseCaseImpl implements GetWalletTransactionsUseCase {
required String walletId,
Map<String, dynamic>? queryParameters,
}) {
return _repository.getWalletTransactions(
return _repository.getWalletOperations(
walletId: walletId,
queryParameters: queryParameters,
);

View File

@@ -5,6 +5,7 @@ import 'package:sf_shared/sf_shared.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:activity/src/presentation/state/activity_view_model.dart';
import 'package:activity/src/presentation/state/activity_view_state.dart';
import 'package:activity/src/widgets/pagination_bar.dart';
import 'package:activity/src/widgets/transaction_tile.dart';
class ActivityScreen extends ConsumerStatefulWidget {
@@ -173,7 +174,7 @@ class _ActivityScreenState extends ConsumerState<ActivityScreen> {
return _buildError(context, theme, viewState.errorMessage);
}
if (viewState.transactions.isEmpty) {
if (viewState.transactionPages.isEmpty) {
return Center(
child: Text(
context.translate(I18n.activityNoTransactions),
@@ -185,38 +186,48 @@ class _ActivityScreenState extends ConsumerState<ActivityScreen> {
);
}
final walletId = viewState.selectedTab!.walletId;
final balanceAsync = ref.watch(walletBalanceProvider(walletId));
final currentTransactions = viewState.transactionPages[viewState.currentPage];
return RefreshIndicator(
onRefresh: () =>
ref.read(activityViewModelProvider.notifier).loadTabs(),
child: ListView.builder(
child: ListView(
physics: const AlwaysScrollableScrollPhysics(),
padding: const EdgeInsets.symmetric(horizontal: 24),
itemCount: viewState.transactions.length + 1,
itemBuilder: (context, index) {
if (index == 0) {
return Padding(
padding: const EdgeInsets.only(bottom: 16),
child: balanceAsync.when(
loading: () =>
const Center(child: AppLoadingIndicator(size: 48)),
error: (_, __) => const SizedBox.shrink(),
data: (balance) => WalletBalanceBlock(
availableBalance: balance.availableBalance,
allocatedBalance: balance.allocatedBalance,
totalBalance: balance.totalBalance,
),
),
);
}
final transaction = viewState.transactions[index - 1];
return Padding(
padding: const EdgeInsets.only(bottom: 12),
child: TransactionTile(transaction: transaction),
);
},
children: [
// TODO: WalletBalanceBlock temporarily hidden
// final walletId = viewState.selectedTab!.walletId;
// final balanceAsync = ref.watch(walletBalanceProvider(walletId));
// Padding(
// padding: const EdgeInsets.only(bottom: 16),
// child: balanceAsync.when(
// loading: () =>
// const Center(child: AppLoadingIndicator(size: 48)),
// error: (_, __) => const SizedBox.shrink(),
// data: (balance) => WalletBalanceBlock(
// availableBalance: balance.availableBalance,
// allocatedBalance: balance.allocatedBalance,
// totalBalance: balance.totalBalance,
// ),
// ),
// ),
...currentTransactions.map(
(tx) => Padding(
padding: const EdgeInsets.only(bottom: 12),
child: TransactionTile(transaction: tx),
),
),
PaginationBar(
currentPage: viewState.currentPage,
totalPages: viewState.transactionPages.length,
hasMore: viewState.nextCursor != null,
isLoadingMore: viewState.isLoadingMore,
onPageChanged: (page) =>
ref.read(activityViewModelProvider.notifier).setPage(page),
onLoadMore: () =>
ref.read(activityViewModelProvider.notifier).loadMore(),
),
],
),
);
}

View File

@@ -73,20 +73,27 @@ class ActivityViewModel extends Notifier<ActivityViewState> {
final tab = state.selectedTab;
if (tab == null) return;
state = state.copyWith(isLoadingTransactions: true, errorMessage: '');
state = state.copyWith(
isLoadingTransactions: true,
errorMessage: '',
transactionPages: [],
nextCursor: null,
currentPage: 0,
);
try {
final query = TransactionsQuery(
walletId: tab.walletId,
dateFilter: state.selectedDateFilter,
);
final transactions =
final response =
await ref.read(walletTransactionsProvider(query).future);
if (!ref.mounted) return;
state = state.copyWith(
isLoadingTransactions: false,
transactions: transactions,
transactionPages: [response.items],
nextCursor: response.nextCursor,
);
} catch (e) {
if (!ref.mounted) return;
@@ -97,6 +104,38 @@ class ActivityViewModel extends Notifier<ActivityViewState> {
}
}
Future<void> loadMore() async {
final tab = state.selectedTab;
if (tab == null || state.isLoadingMore || state.nextCursor == null) return;
state = state.copyWith(isLoadingMore: true);
try {
final query = TransactionsQuery(
walletId: tab.walletId,
dateFilter: state.selectedDateFilter,
cursor: state.nextCursor,
);
final response =
await ref.read(walletTransactionsProvider(query).future);
if (!ref.mounted) return;
state = state.copyWith(
isLoadingMore: false,
transactionPages: [...state.transactionPages, response.items],
nextCursor: response.nextCursor,
currentPage: state.transactionPages.length,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(isLoadingMore: false);
}
}
void setPage(int page) {
state = state.copyWith(currentPage: page);
}
void selectWallet(int index) {
if (index == state.selectedWalletIndex) return;
state = state.copyWith(selectedWalletIndex: index);

View File

@@ -14,7 +14,10 @@ abstract class ActivityViewState with _$ActivityViewState {
@Default([]) List<WalletTab> tabs,
@Default(0) int selectedWalletIndex,
@Default(DateFilter.today) DateFilter selectedDateFilter,
@Default([]) List<WalletTransactionEntity> transactions,
@Default([]) List<List<WalletTransactionEntity>> transactionPages,
String? nextCursor,
@Default(false) bool isLoadingMore,
@Default(0) int currentPage,
@Default('') String errorMessage,
}) = _ActivityViewState;

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ActivityViewState {
bool get isLoading; bool get isLoadingTransactions; List<WalletTab> get tabs; int get selectedWalletIndex; DateFilter get selectedDateFilter; List<WalletTransactionEntity> get transactions; String get errorMessage;
bool get isLoading; bool get isLoadingTransactions; List<WalletTab> get tabs; int get selectedWalletIndex; DateFilter get selectedDateFilter; List<List<WalletTransactionEntity>> get transactionPages; String? get nextCursor; bool get isLoadingMore; int get currentPage; String get errorMessage;
/// Create a copy of ActivityViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $ActivityViewStateCopyWith<ActivityViewState> get copyWith => _$ActivityViewStat
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ActivityViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other.tabs, tabs)&&(identical(other.selectedWalletIndex, selectedWalletIndex) || other.selectedWalletIndex == selectedWalletIndex)&&(identical(other.selectedDateFilter, selectedDateFilter) || other.selectedDateFilter == selectedDateFilter)&&const DeepCollectionEquality().equals(other.transactions, transactions)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is ActivityViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other.tabs, tabs)&&(identical(other.selectedWalletIndex, selectedWalletIndex) || other.selectedWalletIndex == selectedWalletIndex)&&(identical(other.selectedDateFilter, selectedDateFilter) || other.selectedDateFilter == selectedDateFilter)&&const DeepCollectionEquality().equals(other.transactionPages, transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isLoadingTransactions,const DeepCollectionEquality().hash(tabs),selectedWalletIndex,selectedDateFilter,const DeepCollectionEquality().hash(transactions),errorMessage);
int get hashCode => Object.hash(runtimeType,isLoading,isLoadingTransactions,const DeepCollectionEquality().hash(tabs),selectedWalletIndex,selectedDateFilter,const DeepCollectionEquality().hash(transactionPages),nextCursor,isLoadingMore,currentPage,errorMessage);
@override
String toString() {
return 'ActivityViewState(isLoading: $isLoading, isLoadingTransactions: $isLoadingTransactions, tabs: $tabs, selectedWalletIndex: $selectedWalletIndex, selectedDateFilter: $selectedDateFilter, transactions: $transactions, errorMessage: $errorMessage)';
return 'ActivityViewState(isLoading: $isLoading, isLoadingTransactions: $isLoadingTransactions, tabs: $tabs, selectedWalletIndex: $selectedWalletIndex, selectedDateFilter: $selectedDateFilter, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage, errorMessage: $errorMessage)';
}
@@ -45,7 +45,7 @@ abstract mixin class $ActivityViewStateCopyWith<$Res> {
factory $ActivityViewStateCopyWith(ActivityViewState value, $Res Function(ActivityViewState) _then) = _$ActivityViewStateCopyWithImpl;
@useResult
$Res call({
bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<WalletTransactionEntity> transactions, String errorMessage
bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage
});
@@ -62,15 +62,18 @@ class _$ActivityViewStateCopyWithImpl<$Res>
/// Create a copy of ActivityViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isLoadingTransactions = null,Object? tabs = null,Object? selectedWalletIndex = null,Object? selectedDateFilter = null,Object? transactions = null,Object? errorMessage = null,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isLoadingTransactions = null,Object? tabs = null,Object? selectedWalletIndex = null,Object? selectedDateFilter = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,Object? errorMessage = null,}) {
return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isLoadingTransactions: null == isLoadingTransactions ? _self.isLoadingTransactions : isLoadingTransactions // ignore: cast_nullable_to_non_nullable
as bool,tabs: null == tabs ? _self.tabs : tabs // ignore: cast_nullable_to_non_nullable
as List<WalletTab>,selectedWalletIndex: null == selectedWalletIndex ? _self.selectedWalletIndex : selectedWalletIndex // ignore: cast_nullable_to_non_nullable
as int,selectedDateFilter: null == selectedDateFilter ? _self.selectedDateFilter : selectedDateFilter // ignore: cast_nullable_to_non_nullable
as DateFilter,transactions: null == transactions ? _self.transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as DateFilter,transactionPages: null == transactionPages ? _self.transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}
@@ -156,10 +159,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<WalletTransactionEntity> transactions, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ActivityViewState() when $default != null:
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
return orElse();
}
@@ -177,10 +180,10 @@ return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.sel
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<WalletTransactionEntity> transactions, String errorMessage) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage) $default,) {final _that = this;
switch (_that) {
case _ActivityViewState():
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
throw StateError('Unexpected subclass');
}
@@ -197,10 +200,10 @@ return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.sel
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<WalletTransactionEntity> transactions, String errorMessage)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage)? $default,) {final _that = this;
switch (_that) {
case _ActivityViewState() when $default != null:
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.selectedWalletIndex,_that.selectedDateFilter,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
return null;
}
@@ -212,7 +215,7 @@ return $default(_that.isLoading,_that.isLoadingTransactions,_that.tabs,_that.sel
class _ActivityViewState extends ActivityViewState {
const _ActivityViewState({this.isLoading = false, this.isLoadingTransactions = false, final List<WalletTab> tabs = const [], this.selectedWalletIndex = 0, this.selectedDateFilter = DateFilter.today, final List<WalletTransactionEntity> transactions = const [], this.errorMessage = ''}): _tabs = tabs,_transactions = transactions,super._();
const _ActivityViewState({this.isLoading = false, this.isLoadingTransactions = false, final List<WalletTab> tabs = const [], this.selectedWalletIndex = 0, this.selectedDateFilter = DateFilter.today, final List<List<WalletTransactionEntity>> transactionPages = const [], this.nextCursor, this.isLoadingMore = false, this.currentPage = 0, this.errorMessage = ''}): _tabs = tabs,_transactionPages = transactionPages,super._();
@override@JsonKey() final bool isLoading;
@@ -226,13 +229,16 @@ class _ActivityViewState extends ActivityViewState {
@override@JsonKey() final int selectedWalletIndex;
@override@JsonKey() final DateFilter selectedDateFilter;
final List<WalletTransactionEntity> _transactions;
@override@JsonKey() List<WalletTransactionEntity> get transactions {
if (_transactions is EqualUnmodifiableListView) return _transactions;
final List<List<WalletTransactionEntity>> _transactionPages;
@override@JsonKey() List<List<WalletTransactionEntity>> get transactionPages {
if (_transactionPages is EqualUnmodifiableListView) return _transactionPages;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_transactions);
return EqualUnmodifiableListView(_transactionPages);
}
@override final String? nextCursor;
@override@JsonKey() final bool isLoadingMore;
@override@JsonKey() final int currentPage;
@override@JsonKey() final String errorMessage;
/// Create a copy of ActivityViewState
@@ -245,16 +251,16 @@ _$ActivityViewStateCopyWith<_ActivityViewState> get copyWith => __$ActivityViewS
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ActivityViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other._tabs, _tabs)&&(identical(other.selectedWalletIndex, selectedWalletIndex) || other.selectedWalletIndex == selectedWalletIndex)&&(identical(other.selectedDateFilter, selectedDateFilter) || other.selectedDateFilter == selectedDateFilter)&&const DeepCollectionEquality().equals(other._transactions, _transactions)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ActivityViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other._tabs, _tabs)&&(identical(other.selectedWalletIndex, selectedWalletIndex) || other.selectedWalletIndex == selectedWalletIndex)&&(identical(other.selectedDateFilter, selectedDateFilter) || other.selectedDateFilter == selectedDateFilter)&&const DeepCollectionEquality().equals(other._transactionPages, _transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isLoadingTransactions,const DeepCollectionEquality().hash(_tabs),selectedWalletIndex,selectedDateFilter,const DeepCollectionEquality().hash(_transactions),errorMessage);
int get hashCode => Object.hash(runtimeType,isLoading,isLoadingTransactions,const DeepCollectionEquality().hash(_tabs),selectedWalletIndex,selectedDateFilter,const DeepCollectionEquality().hash(_transactionPages),nextCursor,isLoadingMore,currentPage,errorMessage);
@override
String toString() {
return 'ActivityViewState(isLoading: $isLoading, isLoadingTransactions: $isLoadingTransactions, tabs: $tabs, selectedWalletIndex: $selectedWalletIndex, selectedDateFilter: $selectedDateFilter, transactions: $transactions, errorMessage: $errorMessage)';
return 'ActivityViewState(isLoading: $isLoading, isLoadingTransactions: $isLoadingTransactions, tabs: $tabs, selectedWalletIndex: $selectedWalletIndex, selectedDateFilter: $selectedDateFilter, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage, errorMessage: $errorMessage)';
}
@@ -265,7 +271,7 @@ abstract mixin class _$ActivityViewStateCopyWith<$Res> implements $ActivityViewS
factory _$ActivityViewStateCopyWith(_ActivityViewState value, $Res Function(_ActivityViewState) _then) = __$ActivityViewStateCopyWithImpl;
@override @useResult
$Res call({
bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<WalletTransactionEntity> transactions, String errorMessage
bool isLoading, bool isLoadingTransactions, List<WalletTab> tabs, int selectedWalletIndex, DateFilter selectedDateFilter, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage
});
@@ -282,15 +288,18 @@ class __$ActivityViewStateCopyWithImpl<$Res>
/// Create a copy of ActivityViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isLoadingTransactions = null,Object? tabs = null,Object? selectedWalletIndex = null,Object? selectedDateFilter = null,Object? transactions = null,Object? errorMessage = null,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isLoadingTransactions = null,Object? tabs = null,Object? selectedWalletIndex = null,Object? selectedDateFilter = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,Object? errorMessage = null,}) {
return _then(_ActivityViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isLoadingTransactions: null == isLoadingTransactions ? _self.isLoadingTransactions : isLoadingTransactions // ignore: cast_nullable_to_non_nullable
as bool,tabs: null == tabs ? _self._tabs : tabs // ignore: cast_nullable_to_non_nullable
as List<WalletTab>,selectedWalletIndex: null == selectedWalletIndex ? _self.selectedWalletIndex : selectedWalletIndex // ignore: cast_nullable_to_non_nullable
as int,selectedDateFilter: null == selectedDateFilter ? _self.selectedDateFilter : selectedDateFilter // ignore: cast_nullable_to_non_nullable
as DateFilter,transactions: null == transactions ? _self._transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as DateFilter,transactionPages: null == transactionPages ? _self._transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}

View File

@@ -0,0 +1,103 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class PaginationBar extends ConsumerWidget {
final int currentPage;
final int totalPages;
final bool hasMore;
final bool isLoadingMore;
final ValueChanged<int> onPageChanged;
final VoidCallback onLoadMore;
const PaginationBar({
super.key,
required this.currentPage,
required this.totalPages,
required this.hasMore,
required this.isLoadingMore,
required this.onPageChanged,
required this.onLoadMore,
});
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
final textColor = theme.getColorFor(ThemeCode.textPrimary);
final primaryColor = theme.getColorFor(ThemeCode.buttonPrimary);
return Padding(
padding: const EdgeInsets.symmetric(vertical: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
onPressed: currentPage > 0
? () => onPageChanged(currentPage - 1)
: null,
icon: Icon(Icons.chevron_left, color: currentPage > 0 ? primaryColor : Colors.grey),
iconSize: 28,
constraints: const BoxConstraints(minWidth: 36, minHeight: 36),
padding: EdgeInsets.zero,
),
Flexible(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisSize: MainAxisSize.min,
children: List.generate(totalPages, (index) {
final isSelected = index == currentPage;
return GestureDetector(
onTap: () => onPageChanged(index),
child: Container(
width: 32,
height: 32,
margin: const EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
color: isSelected ? primaryColor : Colors.transparent,
borderRadius: BorderRadius.circular(8),
border: isSelected ? null : Border.all(color: Colors.grey.shade300),
),
alignment: Alignment.center,
child: Text(
'${index + 1}',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: isSelected ? Colors.white : textColor,
),
),
),
);
}),
),
),
),
if (hasMore)
isLoadingMore
? const Padding(
padding: EdgeInsets.only(left: 8),
child: AppLoadingIndicator(size: 20),
)
: IconButton(
onPressed: onLoadMore,
icon: Icon(Icons.add_circle_outline, color: primaryColor),
iconSize: 28,
constraints: const BoxConstraints(minWidth: 36, minHeight: 36),
padding: EdgeInsets.zero,
tooltip: 'Load more',
),
IconButton(
onPressed: currentPage < totalPages - 1
? () => onPageChanged(currentPage + 1)
: null,
icon: Icon(Icons.chevron_right, color: currentPage < totalPages - 1 ? primaryColor : Colors.grey),
iconSize: 28,
constraints: const BoxConstraints(minWidth: 36, minHeight: 36),
padding: EdgeInsets.zero,
),
],
),
);
}
}

View File

@@ -1,6 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:intl/intl.dart';
import 'package:sf_shared/sf_shared.dart';
import 'package:sf_localizations/sf_localizations.dart';
@@ -12,9 +13,18 @@ class TransactionTile extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
final color = _color(transaction.transactionType);
final icon = _icon(transaction.transactionType);
final label = context.translate(_i18nKey(transaction.transactionType));
final isDeclined = transaction.status == 'DECLINED';
final isCredit = transaction.direction == 'CREDIT';
final color = isDeclined ? Colors.grey : _color(transaction.operationType);
final icon = _icon(transaction.operationType);
final label = transaction.merchantName ??
context.translate(_i18nKey(transaction.operationType));
final amountPrefix = isCredit ? '+' : '-';
final amountColor = isDeclined
? Colors.grey
: isCredit
? Colors.green
: Colors.red;
return Container(
padding: const EdgeInsets.all(16),
@@ -41,19 +51,27 @@ class TransactionTile extends ConsumerWidget {
),
),
Text(
'${transaction.amount} ${transaction.currency}',
'$amountPrefix${transaction.amount.toStringAsFixed(2)} ${transaction.currency}',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: theme.getColorFor(ThemeCode.textPrimary),
color: amountColor,
decoration: isDeclined ? TextDecoration.lineThrough : null,
),
),
],
),
if (transaction.name.isNotEmpty) ...[
if (transaction.messageToUser != null &&
transaction.messageToUser!.isNotEmpty) ...[
const SizedBox(height: 8),
Text(
transaction.name,
transaction.messageToUser!,
style: const TextStyle(fontSize: 13, color: Colors.red),
),
] else if (transaction.label.isNotEmpty) ...[
const SizedBox(height: 8),
Text(
transaction.label,
style: TextStyle(
fontSize: 14,
color: theme.getColorFor(ThemeCode.textPrimary),
@@ -61,12 +79,65 @@ class TransactionTile extends ConsumerWidget {
),
],
const SizedBox(height: 4),
Text(
transaction.executionDate,
style: TextStyle(
fontSize: 12,
color: theme.getColorFor(ThemeCode.textPrimary),
),
Wrap(
spacing: 8,
runSpacing: 4,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text(
_formatDate(transaction.createdDate, context),
style: TextStyle(
fontSize: 12,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
if (transaction.merchantCity != null &&
transaction.merchantCity!.isNotEmpty)
Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.location_on, size: 12,
color: theme.getColorFor(ThemeCode.textPrimary),
),
const SizedBox(width: 2),
Text(
transaction.merchantCity!,
style: TextStyle(
fontSize: 12,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
],
),
if (transaction.maskedPan != null &&
transaction.maskedPan!.isNotEmpty)
Text(
transaction.maskedPan!,
style: TextStyle(
fontSize: 12,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
if (isDeclined)
Container(
padding: const EdgeInsets.symmetric(
horizontal: 6,
vertical: 2,
),
decoration: BoxDecoration(
color: Colors.red.withAlpha(0x1A),
borderRadius: BorderRadius.circular(4),
),
child: Text(
transaction.status,
style: const TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: Colors.red,
),
),
),
],
),
],
),
@@ -74,82 +145,51 @@ class TransactionTile extends ConsumerWidget {
}
static IconData _icon(TransactionType type) => switch (type) {
TransactionType.payin ||
TransactionType.payinAcquiring ||
TransactionType.checkPayin => Icons.arrow_downward,
TransactionType.payout ||
TransactionType.payoutSctInstantEmit => Icons.arrow_upward,
TransactionType.payinRefund ||
TransactionType.payoutRefund ||
TransactionType.payinRefundAcquiring ||
TransactionType.checkRefund => Icons.replay,
TransactionType.transfer ||
TransactionType.sctr ||
TransactionType.sctrInst ||
TransactionType.creditInternationalTransfer => Icons.swap_horiz,
TransactionType.cardTopup => Icons.arrow_downward,
TransactionType.cardTransaction => Icons.credit_card,
TransactionType.sdde || TransactionType.sddr => Icons.account_balance,
TransactionType.creditTransferReturned ||
TransactionType.payinSctInstantRecall ||
TransactionType.payinSctInstantEmitRecall ||
TransactionType.sctrRecall ||
TransactionType.sddrReversal => Icons.undo,
TransactionType.bankTransfer ||
TransactionType.instantBankTransfer => Icons.account_balance,
TransactionType.walletTransfer => Icons.swap_horiz,
TransactionType.bankDirectDebit => Icons.account_balance_wallet,
TransactionType.check => Icons.receipt_long,
TransactionType.creditNote => Icons.replay,
TransactionType.fees => Icons.monetization_on,
TransactionType.unknown => Icons.help_outline,
};
static Color _color(TransactionType type) => switch (type) {
TransactionType.payin ||
TransactionType.payinAcquiring ||
TransactionType.checkPayin => Colors.green,
TransactionType.payout ||
TransactionType.payoutSctInstantEmit => Colors.red,
TransactionType.payinRefund ||
TransactionType.payoutRefund ||
TransactionType.payinRefundAcquiring ||
TransactionType.checkRefund ||
TransactionType.creditTransferReturned ||
TransactionType.payinSctInstantRecall ||
TransactionType.payinSctInstantEmitRecall ||
TransactionType.sctrRecall ||
TransactionType.sddrReversal => Colors.orange,
TransactionType.transfer ||
TransactionType.sctr ||
TransactionType.sctrInst ||
TransactionType.creditInternationalTransfer ||
TransactionType.sdde ||
TransactionType.sddr => Colors.blue,
TransactionType.cardTopup => Colors.green,
TransactionType.cardTransaction => Colors.purple,
TransactionType.bankTransfer ||
TransactionType.instantBankTransfer ||
TransactionType.walletTransfer => Colors.blue,
TransactionType.bankDirectDebit => Colors.red,
TransactionType.check => Colors.teal,
TransactionType.creditNote => Colors.orange,
TransactionType.fees => Colors.red,
TransactionType.unknown => Colors.grey,
};
static String _i18nKey(TransactionType type) => switch (type) {
TransactionType.payin => I18n.transactionPayin,
TransactionType.payout => I18n.transactionPayout,
TransactionType.transfer => I18n.transactionTransfer,
TransactionType.payinRefund => I18n.transactionPayinRefund,
TransactionType.payoutRefund => I18n.transactionPayoutRefund,
TransactionType.bankDirectDebit => I18n.transactionBankDirectDebit,
TransactionType.bankTransfer => I18n.transactionBankTransfer,
TransactionType.cardTopup => I18n.transactionCardTopup,
TransactionType.cardTransaction => I18n.transactionCardPayment,
TransactionType.payinAcquiring => I18n.transactionPayinAcquiring,
TransactionType.payinRefundAcquiring =>
I18n.transactionPayinRefundAcquiring,
TransactionType.sctrInst => I18n.transactionSctrInst,
TransactionType.payinSctInstantRecall =>
I18n.transactionPayinSctInstantRecall,
TransactionType.payoutSctInstantEmit =>
I18n.transactionPayoutSctInstantEmit,
TransactionType.payinSctInstantEmitRecall =>
I18n.transactionPayinSctInstantEmitRecall,
TransactionType.creditTransferReturned =>
I18n.transactionCreditTransferReturned,
TransactionType.checkPayin => I18n.transactionCheckPayin,
TransactionType.sdde => I18n.transactionSdde,
TransactionType.sddr => I18n.transactionSddr,
TransactionType.sddrReversal => I18n.transactionSddrReversal,
TransactionType.sctrRecall => I18n.transactionSctrRecall,
TransactionType.checkRefund => I18n.transactionCheckRefund,
TransactionType.sctr => I18n.transactionSctr,
TransactionType.creditInternationalTransfer =>
I18n.transactionCreditInternationalTransfer,
TransactionType.check => I18n.transactionCheck,
TransactionType.creditNote => I18n.transactionCreditNote,
TransactionType.fees => I18n.transactionFees,
TransactionType.instantBankTransfer => I18n.transactionInstantBankTransfer,
TransactionType.walletTransfer => I18n.transactionWalletTransfer,
TransactionType.unknown => I18n.transactionUnknown,
};
static String _formatDate(String raw, BuildContext context) {
try {
final date = DateTime.parse(raw).toLocal();
final locale = Localizations.localeOf(context).languageCode;
return DateFormat('d MMM yyyy · HH:mm', locale).format(date);
} catch (_) {
return raw;
}
}
}

View File

@@ -7,3 +7,4 @@ export 'src/features/lock_card/lock_card_builder.dart';
export 'src/features/limits/limits_builder.dart';
export 'src/features/goals/goals_builder.dart';
export 'src/features/extract/extract_builder.dart';
export 'src/features/edit_child_profile/edit_child_profile_builder.dart';

View File

@@ -1,6 +1,5 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sf_shared/sf_shared.dart';
@@ -15,11 +14,12 @@ class ChildDataNotifier extends Notifier<ChildDataState> {
final String childId;
ChildDataNotifier(this.childId);
late final TreezorRepository _treezorRepository;
late final UserRepository _userRepository;
late TreezorRepository _treezorRepository;
late UserRepository _userRepository;
@override
ChildDataState build() {
ref.watch(walletRefreshProvider);
final link = ref.keepAlive();
final timer = Timer(const Duration(minutes: 5), link.close);
ref.onDispose(timer.cancel);
@@ -56,9 +56,7 @@ class ChildDataNotifier extends Notifier<ChildDataState> {
device = await _userRepository.getDeviceByIdentificator(
identificator: childProfile.deviceIdentificator,
);
} catch (e) {
debugPrint('Error fetching device for child $childId: $e');
}
} catch (_) {}
if (!ref.mounted) return;

View File

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:navigation/navigation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:sf_shared/sf_shared.dart';
import '../../card_colors.dart';
import '../../presentation/state/home_view_model.dart';
@@ -162,14 +163,60 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
),
),
_buildGenderAvatar(device?.carrierGenre, 50),
Text(
childName,
style: TextStyle(
color: theme.getColorFor(ThemeCode.backgroundPrimary),
fontWeight: FontWeight.bold,
fontSize: 20,
Expanded(
child: Text(
childName,
style: TextStyle(
color: theme.getColorFor(
ThemeCode.backgroundPrimary,
),
fontWeight: FontWeight.bold,
fontSize: 20,
),
),
),
PopupMenuButton<String>(
icon: Icon(
Icons.more_vert,
color: theme.getColorFor(ThemeCode.backgroundPrimary),
),
onSelected: (value) {
if (value == 'edit') {
widget.navigation.pushTo(
AppRoutes.editChildProfile(widget.childId),
);
} else if (value == 'delete') {
_showDeleteConfirmation();
}
},
itemBuilder: (_) => [
PopupMenuItem(
value: 'edit',
child: Row(
spacing: 8,
children: [
Icon(Icons.edit_outlined),
Text(
context.translate(I18n.editChildProfile),
),
],
),
),
PopupMenuItem(
value: 'delete',
child: Row(
spacing: 8,
children: [
Icon(Icons.delete_outline, color: Colors.red),
Text(
context.translate(I18n.deleteDevice),
style: TextStyle(color: Colors.red),
),
],
),
),
],
),
],
),
Column(
@@ -196,76 +243,37 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
minHeight: 10,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
if (CardStatus.fromString(viewState.cardStatus) ==
CardStatus.lost ||
CardStatus.fromString(viewState.cardStatus) ==
CardStatus.stolen)
TextButton(
style: ButtonStyle(
padding: WidgetStatePropertyAll(EdgeInsets.all(0)),
),
onPressed: viewState.isUpdatingCard
? null
: () => _showDeleteConfirmation(context, ref),
child: Row(
spacing: 10,
children: [
Icon(
Icons.delete_outline,
size: 24,
color: theme.getColorFor(
ThemeCode.textSecondary,
),
),
Text(
context.translate(I18n.deleteDevice),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: theme.getColorFor(
ThemeCode.textSecondary,
),
),
),
],
),
)
else
TextButton(
style: ButtonStyle(
padding: WidgetStatePropertyAll(EdgeInsets.all(0)),
),
onPressed: () =>
_showCardStatusSheet(context, ref, theme),
child: Row(
spacing: 10,
children: [
Icon(
Icons.lock_outline,
size: 24,
color: theme.getColorFor(
ThemeCode.textSecondary,
),
),
Text(
locked
? context.translate(
I18n.childWalletUnlockCard,
)
: context.translate(
I18n.childWalletLockCard,
),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: theme.getColorFor(
ThemeCode.textSecondary,
),
),
),
],
),
TextButton(
style: ButtonStyle(
padding: WidgetStatePropertyAll(EdgeInsets.all(0)),
),
onPressed: () =>
_showCardStatusSheet(context, ref, theme),
child: Row(
spacing: 10,
children: [
Icon(
Icons.lock_outline,
size: 24,
color: theme.getColorFor(ThemeCode.textSecondary),
),
Text(
locked
? context.translate(
I18n.childWalletUnlockCard,
)
: context.translate(I18n.childWalletLockCard),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: theme.getColorFor(
ThemeCode.textSecondary,
),
),
),
],
),
),
],
),
Column(
@@ -302,7 +310,7 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
child: AppLoadingIndicator(size: 48),
),
)
else if (viewState.transactions.isEmpty)
else if (viewState.transactionPages.isEmpty)
Padding(
padding: const EdgeInsets.all(24),
child: Center(
@@ -319,13 +327,34 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
),
),
)
else
...viewState.transactions.map(
else ...[
...viewState.transactionPages[viewState.currentPage].map(
(tx) => Padding(
padding: const EdgeInsets.only(bottom: 12),
child: TransactionTile(transaction: tx),
),
),
PaginationBar(
currentPage: viewState.currentPage,
totalPages: viewState.transactionPages.length,
hasMore: viewState.nextCursor != null,
isLoadingMore: viewState.isLoadingMore,
onPageChanged: (page) => ref
.read(
childWalletViewModelProvider(
widget.childId,
).notifier,
)
.setPage(page),
onLoadMore: () => ref
.read(
childWalletViewModelProvider(
widget.childId,
).notifier,
)
.loadMore(),
),
],
],
),
),
@@ -342,17 +371,13 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
Widget _buildGenderAvatar(String? carrierGenre, double size) {
final IconData icon;
final Color color;
switch (carrierGenre) {
case 'M':
icon = Icons.face;
color = const Color(0xFF64B5F6);
case 'F':
icon = Icons.face_3;
color = const Color(0xFFF48FB1);
default:
icon = Icons.face_2;
color = const Color(0xFF90A4AE);
}
return CircleAvatar(
radius: size / 2,
@@ -376,47 +401,108 @@ class _ChildWalletScreenState extends ConsumerState<ChildWalletScreen> {
);
}
void _showDeleteConfirmation(BuildContext context, WidgetRef ref) {
Future<void> _showDeleteConfirmation() async {
final theme = ref.read(themePortProvider);
final userRepo = ref.read(userRepositoryProvider);
final navigator = Navigator.of(context, rootNavigator: true);
final checkingText = context.translate(I18n.deleteDeviceChecking);
final notAllowedTitle = context.translate(I18n.deleteDeviceNotAllowedTitle);
final nonZeroText = context.translate(
I18n.deleteDeviceWalletNonZeroBalance,
);
final acceptText = context.translate(I18n.accept);
final confirmTitle = context.translate(I18n.deleteDeviceConfirmTitle);
final confirmMessage = context.translate(I18n.deleteDeviceConfirmMessage);
final cancelText = context.translate(I18n.cancel);
final deleteText = context.translate(I18n.deleteDevice);
final successText = context.translate(I18n.deleteDeviceSuccess);
final bgColor = theme.getColorFor(ThemeCode.backgroundPrimary);
final shape = RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
);
showDialog(
context: context,
barrierDismissible: false,
builder: (_) => AlertDialog(
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
title: Text(context.translate(I18n.deleteDeviceConfirmTitle)),
content: Text(context.translate(I18n.deleteDeviceConfirmMessage)),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(context.translate(I18n.cancel)),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
final viewModel = ref.read(
childWalletViewModelProvider(widget.childId).notifier,
);
final success = await viewModel.deleteDevice();
if (success && context.mounted) {
ref
.read(homeViewModelProvider.notifier)
.removeChild(widget.childId);
showTopSnackbar(
context,
message: context.translate(I18n.deleteDeviceSuccess),
type: MessageType.success,
);
widget.navigation.goBack();
}
},
child: Text(
context.translate(I18n.deleteDevice),
style: TextStyle(color: Colors.red),
),
),
],
backgroundColor: bgColor,
shape: shape,
content: Row(
spacing: 16,
children: [const AppLoadingIndicator(size: 24), Text(checkingText)],
),
),
);
try {
final deletability = await userRepo.checkChildProfileDeletability(
childProfileId: widget.childId,
);
if (!mounted) return;
navigator.pop();
if (!deletability.isDeletable) {
if (!mounted) return;
showDialog(
context: context,
builder: (ctx) => AlertDialog(
backgroundColor: bgColor,
shape: shape,
title: Text(notAllowedTitle),
content: Text(nonZeroText),
actions: [
TextButton(
onPressed: () => Navigator.of(ctx).pop(),
child: Text(acceptText),
),
],
),
);
return;
}
if (!mounted) return;
showDialog(
context: context,
builder: (ctx) => AlertDialog(
backgroundColor: bgColor,
shape: shape,
title: Text(confirmTitle),
content: Text(confirmMessage),
actions: [
TextButton(
onPressed: () => Navigator.of(ctx).pop(),
child: Text(cancelText),
),
TextButton(
onPressed: () async {
Navigator.of(ctx).pop();
final viewModel = ref.read(
childWalletViewModelProvider(widget.childId).notifier,
);
final success = await viewModel.deleteDevice();
if (success && mounted) {
ref
.read(homeViewModelProvider.notifier)
.removeChild(widget.childId);
showTopSnackbar(
context,
message: successText,
type: MessageType.success,
);
widget.navigation.goBack();
}
},
child: Text(deleteText, style: TextStyle(color: Colors.red)),
),
],
),
);
} catch (e) {
if (!mounted) return;
navigator.pop();
showTopSnackbar(context, message: e.toString(), type: MessageType.error);
}
}
}
@@ -463,13 +549,19 @@ class _CardStatusSheetState extends ConsumerState<_CardStatusSheet> {
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
const SizedBox(height: 20),
...statuses.map(
(status) => RadioListTile<String>(
title: Text(context.translate(_labelKey(status))),
value: status,
groupValue: _selected,
activeColor: theme.getColorFor(ThemeCode.buttonPrimary),
onChanged: (v) => setState(() => _selected = v!),
RadioGroup<String>(
groupValue: _selected!,
onChanged: (v) => setState(() => _selected = v),
child: Column(
children: statuses
.map(
(status) => RadioListTile<String>(
title: Text(context.translate(_labelKey(status))),
value: status,
activeColor: theme.getColorFor(ThemeCode.buttonPrimary),
),
)
.toList(),
),
),
const SizedBox(height: 16),

View File

@@ -5,7 +5,6 @@ import 'package:get_it/get_it.dart';
import 'package:sca_treezor/sca_treezor.dart';
import 'package:sf_shared/sf_shared.dart';
import '../../card_colors.dart';
import 'child_data_provider.dart';
import 'child_wallet_view_state.dart';
@@ -19,8 +18,8 @@ class ChildWalletViewModel extends Notifier<ChildWalletViewState> {
final String childId;
ChildWalletViewModel(this.childId);
late final TreezorWalletConnectionService _connectionService;
late final TreezorWalletSignatureService _signatureService;
late TreezorWalletConnectionService _connectionService;
late TreezorWalletSignatureService _signatureService;
@override
ChildWalletViewState build() {
@@ -43,6 +42,8 @@ class ChildWalletViewModel extends Notifier<ChildWalletViewState> {
}
});
ref.watch(walletRefreshProvider);
final data = ref.read(childDataProvider(childId));
final initialState = ChildWalletViewState(
isLoading: data.isLoading,
@@ -66,19 +67,53 @@ class ChildWalletViewModel extends Notifier<ChildWalletViewState> {
state = state.copyWith(isLoadingTransactions: true);
try {
final query = TransactionsQuery(walletId: walletId);
final transactions =
await ref.read(walletTransactionsProvider(query).future);
final response = await ref.read(
walletTransactionsProvider(query).future,
);
if (!ref.mounted) return;
state = state.copyWith(
isLoadingTransactions: false,
transactions: transactions,
transactionPages: [response.items],
nextCursor: response.nextCursor,
currentPage: 0,
);
} catch (_) {
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(isLoadingTransactions: false);
}
}
Future<void> loadMore() async {
final walletId = state.childProfile?.walletId;
if (walletId == null || state.isLoadingMore || state.nextCursor == null) return;
state = state.copyWith(isLoadingMore: true);
try {
final query = TransactionsQuery(
walletId: walletId,
cursor: state.nextCursor,
);
final response = await ref.read(
walletTransactionsProvider(query).future,
);
if (!ref.mounted) return;
state = state.copyWith(
isLoadingMore: false,
transactionPages: [...state.transactionPages, response.items],
nextCursor: response.nextCursor,
currentPage: state.transactionPages.length,
);
} catch (_) {
if (!ref.mounted) return;
state = state.copyWith(isLoadingMore: false);
}
}
void setPage(int page) {
state = state.copyWith(currentPage: page);
}
Future<void> _loadCard(String walletId) async {
try {
final card = await ref
@@ -181,6 +216,12 @@ class ChildWalletViewModel extends Notifier<ChildWalletViewState> {
}
}
Future<ChildProfileDeletabilityEntity> checkDeletability() async {
return ref
.read(userRepositoryProvider)
.checkChildProfileDeletability(childProfileId: childId);
}
Future<bool> deleteDevice() async {
final deviceId = state.device?.id;
if (deviceId == null || deviceId.isEmpty) return false;
@@ -195,7 +236,10 @@ class ChildWalletViewModel extends Notifier<ChildWalletViewState> {
return true;
} catch (e) {
if (!ref.mounted) return false;
state = state.copyWith(isUpdatingCard: false, cardStatusError: e.toString());
state = state.copyWith(
isUpdatingCard: false,
cardStatusError: e.toString(),
);
return false;
}
}

View File

@@ -22,6 +22,9 @@ abstract class ChildWalletViewState with _$ChildWalletViewState {
@Default('') String pin,
@Default(false) bool isSigning,
@Default(false) bool isLoadingTransactions,
@Default([]) List<WalletTransactionEntity> transactions,
@Default([]) List<List<WalletTransactionEntity>> transactionPages,
String? nextCursor,
@Default(false) bool isLoadingMore,
@Default(0) int currentPage,
}) = _ChildWalletViewState;
}

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ChildWalletViewState {
bool get isLoading; ChildProfileEntity? get childProfile; ChildWalletEntity? get childWallet; DeviceEntity? get device; String get cardId; String get cardStatus; bool get locked; String get errorMessage; bool get isUpdatingCard; String get cardStatusError; bool get cardStatusSuccess; bool get showPin; String get selectedStatus; String get pin; bool get isSigning; bool get isLoadingTransactions; List<WalletTransactionEntity> get transactions;
bool get isLoading; ChildProfileEntity? get childProfile; ChildWalletEntity? get childWallet; DeviceEntity? get device; String get cardId; String get cardStatus; bool get locked; String get errorMessage; bool get isUpdatingCard; String get cardStatusError; bool get cardStatusSuccess; bool get showPin; String get selectedStatus; String get pin; bool get isSigning; bool get isLoadingTransactions; List<List<WalletTransactionEntity>> get transactionPages; String? get nextCursor; bool get isLoadingMore; int get currentPage;
/// Create a copy of ChildWalletViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $ChildWalletViewStateCopyWith<ChildWalletViewState> get copyWith => _$ChildWalle
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChildWalletViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.childProfile, childProfile) || other.childProfile == childProfile)&&(identical(other.childWallet, childWallet) || other.childWallet == childWallet)&&(identical(other.device, device) || other.device == device)&&(identical(other.cardId, cardId) || other.cardId == cardId)&&(identical(other.cardStatus, cardStatus) || other.cardStatus == cardStatus)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.isUpdatingCard, isUpdatingCard) || other.isUpdatingCard == isUpdatingCard)&&(identical(other.cardStatusError, cardStatusError) || other.cardStatusError == cardStatusError)&&(identical(other.cardStatusSuccess, cardStatusSuccess) || other.cardStatusSuccess == cardStatusSuccess)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.selectedStatus, selectedStatus) || other.selectedStatus == selectedStatus)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other.transactions, transactions));
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChildWalletViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.childProfile, childProfile) || other.childProfile == childProfile)&&(identical(other.childWallet, childWallet) || other.childWallet == childWallet)&&(identical(other.device, device) || other.device == device)&&(identical(other.cardId, cardId) || other.cardId == cardId)&&(identical(other.cardStatus, cardStatus) || other.cardStatus == cardStatus)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.isUpdatingCard, isUpdatingCard) || other.isUpdatingCard == isUpdatingCard)&&(identical(other.cardStatusError, cardStatusError) || other.cardStatusError == cardStatusError)&&(identical(other.cardStatusSuccess, cardStatusSuccess) || other.cardStatusSuccess == cardStatusSuccess)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.selectedStatus, selectedStatus) || other.selectedStatus == selectedStatus)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other.transactionPages, transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,childProfile,childWallet,device,cardId,cardStatus,locked,errorMessage,isUpdatingCard,cardStatusError,cardStatusSuccess,showPin,selectedStatus,pin,isSigning,isLoadingTransactions,const DeepCollectionEquality().hash(transactions));
int get hashCode => Object.hashAll([runtimeType,isLoading,childProfile,childWallet,device,cardId,cardStatus,locked,errorMessage,isUpdatingCard,cardStatusError,cardStatusSuccess,showPin,selectedStatus,pin,isSigning,isLoadingTransactions,const DeepCollectionEquality().hash(transactionPages),nextCursor,isLoadingMore,currentPage]);
@override
String toString() {
return 'ChildWalletViewState(isLoading: $isLoading, childProfile: $childProfile, childWallet: $childWallet, device: $device, cardId: $cardId, cardStatus: $cardStatus, locked: $locked, errorMessage: $errorMessage, isUpdatingCard: $isUpdatingCard, cardStatusError: $cardStatusError, cardStatusSuccess: $cardStatusSuccess, showPin: $showPin, selectedStatus: $selectedStatus, pin: $pin, isSigning: $isSigning, isLoadingTransactions: $isLoadingTransactions, transactions: $transactions)';
return 'ChildWalletViewState(isLoading: $isLoading, childProfile: $childProfile, childWallet: $childWallet, device: $device, cardId: $cardId, cardStatus: $cardStatus, locked: $locked, errorMessage: $errorMessage, isUpdatingCard: $isUpdatingCard, cardStatusError: $cardStatusError, cardStatusSuccess: $cardStatusSuccess, showPin: $showPin, selectedStatus: $selectedStatus, pin: $pin, isSigning: $isSigning, isLoadingTransactions: $isLoadingTransactions, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage)';
}
@@ -45,7 +45,7 @@ abstract mixin class $ChildWalletViewStateCopyWith<$Res> {
factory $ChildWalletViewStateCopyWith(ChildWalletViewState value, $Res Function(ChildWalletViewState) _then) = _$ChildWalletViewStateCopyWithImpl;
@useResult
$Res call({
bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<WalletTransactionEntity> transactions
bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage
});
@@ -62,7 +62,7 @@ class _$ChildWalletViewStateCopyWithImpl<$Res>
/// Create a copy of ChildWalletViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? childProfile = freezed,Object? childWallet = freezed,Object? device = freezed,Object? cardId = null,Object? cardStatus = null,Object? locked = null,Object? errorMessage = null,Object? isUpdatingCard = null,Object? cardStatusError = null,Object? cardStatusSuccess = null,Object? showPin = null,Object? selectedStatus = null,Object? pin = null,Object? isSigning = null,Object? isLoadingTransactions = null,Object? transactions = null,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? childProfile = freezed,Object? childWallet = freezed,Object? device = freezed,Object? cardId = null,Object? cardStatus = null,Object? locked = null,Object? errorMessage = null,Object? isUpdatingCard = null,Object? cardStatusError = null,Object? cardStatusSuccess = null,Object? showPin = null,Object? selectedStatus = null,Object? pin = null,Object? isSigning = null,Object? isLoadingTransactions = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,}) {
return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,childProfile: freezed == childProfile ? _self.childProfile : childProfile // ignore: cast_nullable_to_non_nullable
@@ -80,8 +80,11 @@ as bool,selectedStatus: null == selectedStatus ? _self.selectedStatus : selected
as String,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,isLoadingTransactions: null == isLoadingTransactions ? _self.isLoadingTransactions : isLoadingTransactions // ignore: cast_nullable_to_non_nullable
as bool,transactions: null == transactions ? _self.transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,
as bool,transactionPages: null == transactionPages ? _self.transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,
));
}
/// Create a copy of ChildWalletViewState
@@ -202,10 +205,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<WalletTransactionEntity> transactions)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChildWalletViewState() when $default != null:
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactions);case _:
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage);case _:
return orElse();
}
@@ -223,10 +226,10 @@ return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.devic
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<WalletTransactionEntity> transactions) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage) $default,) {final _that = this;
switch (_that) {
case _ChildWalletViewState():
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactions);case _:
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage);case _:
throw StateError('Unexpected subclass');
}
@@ -243,10 +246,10 @@ return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.devic
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<WalletTransactionEntity> transactions)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage)? $default,) {final _that = this;
switch (_that) {
case _ChildWalletViewState() when $default != null:
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactions);case _:
return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.device,_that.cardId,_that.cardStatus,_that.locked,_that.errorMessage,_that.isUpdatingCard,_that.cardStatusError,_that.cardStatusSuccess,_that.showPin,_that.selectedStatus,_that.pin,_that.isSigning,_that.isLoadingTransactions,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage);case _:
return null;
}
@@ -258,7 +261,7 @@ return $default(_that.isLoading,_that.childProfile,_that.childWallet,_that.devic
class _ChildWalletViewState implements ChildWalletViewState {
const _ChildWalletViewState({this.isLoading = true, this.childProfile, this.childWallet, this.device, this.cardId = '', this.cardStatus = '', this.locked = false, this.errorMessage = '', this.isUpdatingCard = false, this.cardStatusError = '', this.cardStatusSuccess = false, this.showPin = false, this.selectedStatus = '', this.pin = '', this.isSigning = false, this.isLoadingTransactions = false, final List<WalletTransactionEntity> transactions = const []}): _transactions = transactions;
const _ChildWalletViewState({this.isLoading = true, this.childProfile, this.childWallet, this.device, this.cardId = '', this.cardStatus = '', this.locked = false, this.errorMessage = '', this.isUpdatingCard = false, this.cardStatusError = '', this.cardStatusSuccess = false, this.showPin = false, this.selectedStatus = '', this.pin = '', this.isSigning = false, this.isLoadingTransactions = false, final List<List<WalletTransactionEntity>> transactionPages = const [], this.nextCursor, this.isLoadingMore = false, this.currentPage = 0}): _transactionPages = transactionPages;
@override@JsonKey() final bool isLoading;
@@ -277,13 +280,16 @@ class _ChildWalletViewState implements ChildWalletViewState {
@override@JsonKey() final String pin;
@override@JsonKey() final bool isSigning;
@override@JsonKey() final bool isLoadingTransactions;
final List<WalletTransactionEntity> _transactions;
@override@JsonKey() List<WalletTransactionEntity> get transactions {
if (_transactions is EqualUnmodifiableListView) return _transactions;
final List<List<WalletTransactionEntity>> _transactionPages;
@override@JsonKey() List<List<WalletTransactionEntity>> get transactionPages {
if (_transactionPages is EqualUnmodifiableListView) return _transactionPages;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_transactions);
return EqualUnmodifiableListView(_transactionPages);
}
@override final String? nextCursor;
@override@JsonKey() final bool isLoadingMore;
@override@JsonKey() final int currentPage;
/// Create a copy of ChildWalletViewState
/// with the given fields replaced by the non-null parameter values.
@@ -295,16 +301,16 @@ _$ChildWalletViewStateCopyWith<_ChildWalletViewState> get copyWith => __$ChildWa
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChildWalletViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.childProfile, childProfile) || other.childProfile == childProfile)&&(identical(other.childWallet, childWallet) || other.childWallet == childWallet)&&(identical(other.device, device) || other.device == device)&&(identical(other.cardId, cardId) || other.cardId == cardId)&&(identical(other.cardStatus, cardStatus) || other.cardStatus == cardStatus)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.isUpdatingCard, isUpdatingCard) || other.isUpdatingCard == isUpdatingCard)&&(identical(other.cardStatusError, cardStatusError) || other.cardStatusError == cardStatusError)&&(identical(other.cardStatusSuccess, cardStatusSuccess) || other.cardStatusSuccess == cardStatusSuccess)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.selectedStatus, selectedStatus) || other.selectedStatus == selectedStatus)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other._transactions, _transactions));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChildWalletViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.childProfile, childProfile) || other.childProfile == childProfile)&&(identical(other.childWallet, childWallet) || other.childWallet == childWallet)&&(identical(other.device, device) || other.device == device)&&(identical(other.cardId, cardId) || other.cardId == cardId)&&(identical(other.cardStatus, cardStatus) || other.cardStatus == cardStatus)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.isUpdatingCard, isUpdatingCard) || other.isUpdatingCard == isUpdatingCard)&&(identical(other.cardStatusError, cardStatusError) || other.cardStatusError == cardStatusError)&&(identical(other.cardStatusSuccess, cardStatusSuccess) || other.cardStatusSuccess == cardStatusSuccess)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.selectedStatus, selectedStatus) || other.selectedStatus == selectedStatus)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.isLoadingTransactions, isLoadingTransactions) || other.isLoadingTransactions == isLoadingTransactions)&&const DeepCollectionEquality().equals(other._transactionPages, _transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,childProfile,childWallet,device,cardId,cardStatus,locked,errorMessage,isUpdatingCard,cardStatusError,cardStatusSuccess,showPin,selectedStatus,pin,isSigning,isLoadingTransactions,const DeepCollectionEquality().hash(_transactions));
int get hashCode => Object.hashAll([runtimeType,isLoading,childProfile,childWallet,device,cardId,cardStatus,locked,errorMessage,isUpdatingCard,cardStatusError,cardStatusSuccess,showPin,selectedStatus,pin,isSigning,isLoadingTransactions,const DeepCollectionEquality().hash(_transactionPages),nextCursor,isLoadingMore,currentPage]);
@override
String toString() {
return 'ChildWalletViewState(isLoading: $isLoading, childProfile: $childProfile, childWallet: $childWallet, device: $device, cardId: $cardId, cardStatus: $cardStatus, locked: $locked, errorMessage: $errorMessage, isUpdatingCard: $isUpdatingCard, cardStatusError: $cardStatusError, cardStatusSuccess: $cardStatusSuccess, showPin: $showPin, selectedStatus: $selectedStatus, pin: $pin, isSigning: $isSigning, isLoadingTransactions: $isLoadingTransactions, transactions: $transactions)';
return 'ChildWalletViewState(isLoading: $isLoading, childProfile: $childProfile, childWallet: $childWallet, device: $device, cardId: $cardId, cardStatus: $cardStatus, locked: $locked, errorMessage: $errorMessage, isUpdatingCard: $isUpdatingCard, cardStatusError: $cardStatusError, cardStatusSuccess: $cardStatusSuccess, showPin: $showPin, selectedStatus: $selectedStatus, pin: $pin, isSigning: $isSigning, isLoadingTransactions: $isLoadingTransactions, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage)';
}
@@ -315,7 +321,7 @@ abstract mixin class _$ChildWalletViewStateCopyWith<$Res> implements $ChildWalle
factory _$ChildWalletViewStateCopyWith(_ChildWalletViewState value, $Res Function(_ChildWalletViewState) _then) = __$ChildWalletViewStateCopyWithImpl;
@override @useResult
$Res call({
bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<WalletTransactionEntity> transactions
bool isLoading, ChildProfileEntity? childProfile, ChildWalletEntity? childWallet, DeviceEntity? device, String cardId, String cardStatus, bool locked, String errorMessage, bool isUpdatingCard, String cardStatusError, bool cardStatusSuccess, bool showPin, String selectedStatus, String pin, bool isSigning, bool isLoadingTransactions, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage
});
@@ -332,7 +338,7 @@ class __$ChildWalletViewStateCopyWithImpl<$Res>
/// Create a copy of ChildWalletViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? childProfile = freezed,Object? childWallet = freezed,Object? device = freezed,Object? cardId = null,Object? cardStatus = null,Object? locked = null,Object? errorMessage = null,Object? isUpdatingCard = null,Object? cardStatusError = null,Object? cardStatusSuccess = null,Object? showPin = null,Object? selectedStatus = null,Object? pin = null,Object? isSigning = null,Object? isLoadingTransactions = null,Object? transactions = null,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? childProfile = freezed,Object? childWallet = freezed,Object? device = freezed,Object? cardId = null,Object? cardStatus = null,Object? locked = null,Object? errorMessage = null,Object? isUpdatingCard = null,Object? cardStatusError = null,Object? cardStatusSuccess = null,Object? showPin = null,Object? selectedStatus = null,Object? pin = null,Object? isSigning = null,Object? isLoadingTransactions = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,}) {
return _then(_ChildWalletViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,childProfile: freezed == childProfile ? _self.childProfile : childProfile // ignore: cast_nullable_to_non_nullable
@@ -350,8 +356,11 @@ as bool,selectedStatus: null == selectedStatus ? _self.selectedStatus : selected
as String,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,isLoadingTransactions: null == isLoadingTransactions ? _self.isLoadingTransactions : isLoadingTransactions // ignore: cast_nullable_to_non_nullable
as bool,transactions: null == transactions ? _self._transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,
as bool,transactionPages: null == transactionPages ? _self._transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,
));
}

View File

@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sf_shared/sf_shared.dart';
import '../../presentation/state/home_view_model.dart';
import '../child_wallet/child_data_provider.dart';
import 'deposit_view_state.dart';
@@ -100,8 +99,7 @@ class DepositViewModel extends Notifier<DepositViewState> {
);
if (!ref.mounted) return;
ref.read(childDataProvider(childId).notifier).load();
ref.read(homeViewModelProvider.notifier).refreshChildWallet(childId);
ref.read(walletRefreshProvider.notifier).refresh();
await ref.read(parentWalletBalanceProvider.notifier).refresh();
if (!ref.mounted) return;
state = state.copyWith(isSubmitting: false, success: true);

View File

@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
import 'package:go_router/go_router.dart';
import 'package:navigation/navigation.dart';
import 'presentation/edit_child_profile_screen.dart';
class EditChildProfileBuilder {
const EditChildProfileBuilder();
Page<void> buildPage(BuildContext context, GoRouterState state) {
final childWalletId = state.pathParameters['childWalletId'] ?? '';
final navigationContract = GetIt.I<NavigationContract>();
return MaterialPage(
key: state.pageKey,
child: EditChildProfileScreen(
childId: childWalletId,
navigation: navigationContract,
),
);
}
}

View File

@@ -0,0 +1,191 @@
import 'package:auth/auth.dart';
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'edit_child_profile_view_model.dart';
class EditChildProfileScreen extends ConsumerWidget {
final String childId;
final NavigationContract navigation;
const EditChildProfileScreen({
super.key,
required this.childId,
required this.navigation,
});
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
final viewState = ref.watch(editChildProfileViewModelProvider(childId));
final viewModel =
ref.read(editChildProfileViewModelProvider(childId).notifier);
ref.listen(editChildProfileViewModelProvider(childId), (prev, next) {
if (next.saveSuccess && !(prev?.saveSuccess ?? false)) {
showTopSnackbar(
context,
message: context.translate(I18n.editChildProfileSaveSuccess),
type: MessageType.success,
);
navigation.goBack();
}
if (next.errorMessage.isNotEmpty &&
!next.showPin &&
next.errorMessage != (prev?.errorMessage ?? '')) {
showTopSnackbar(
context,
message: next.errorMessage,
type: MessageType.error,
);
}
});
if (viewState.isLoading) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
body: const Center(child: AppLoadingIndicator()),
);
}
if (viewState.showPin) {
return _buildPinScaffold(context, theme, viewState, viewModel);
}
return _buildFormScaffold(context, theme, viewState, viewModel);
}
Widget _buildPinScaffold(
BuildContext context,
ThemePort theme,
EditChildProfileViewState viewState,
EditChildProfileViewModel viewModel,
) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
appBar: AppBar(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: theme.getColorFor(ThemeCode.textPrimary),
),
onPressed: viewModel.cancelPin,
),
),
body: SafeArea(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: ScaPinView(
title: context.translate(I18n.scaPinEnter),
pin: viewState.pin,
isProcessing: viewState.isSigning || viewState.isSaving,
processingText: context.translate(I18n.scaSigning),
canSubmit: viewModel.canSubmitPin,
submitText: context.translate(I18n.scaConnect),
clearPinText: context.translate(I18n.scaClearPin),
onDigitPressed: viewModel.onDigitPressed,
onBackspacePressed: viewModel.onBackspacePressed,
onClearPin: viewModel.onClearPin,
onSubmit: () => viewModel.onPinSubmit(),
),
),
),
if (viewState.errorMessage.isNotEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Text(
viewState.errorMessage,
style: const TextStyle(color: Colors.red),
textAlign: TextAlign.center,
),
),
TextButton(
onPressed: viewModel.cancelPin,
child: Text(context.translate(I18n.cancel)),
),
],
),
),
);
}
Widget _buildFormScaffold(
BuildContext context,
ThemePort theme,
EditChildProfileViewState viewState,
EditChildProfileViewModel viewModel,
) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
appBar: AppBar(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: theme.getColorFor(ThemeCode.textPrimary),
),
onPressed: () => navigation.goBack(),
),
title: Text(
context.translate(I18n.editChildProfileTitle),
style: TextStyle(color: theme.getColorFor(ThemeCode.textPrimary)),
),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: Column(
children: [
Expanded(
child: ListView(
children: [
TextFormField(
initialValue: viewState.firstName,
decoration: InputDecoration(
labelText: context.translate(I18n.firstNameLabel),
border: const OutlineInputBorder(),
),
onChanged: viewModel.setFirstName,
),
const SizedBox(height: 16),
TextFormField(
initialValue: viewState.lastName,
decoration: InputDecoration(
labelText: context.translate(I18n.lastNameLabel),
border: const OutlineInputBorder(),
),
onChanged: viewModel.setLastName,
),
const SizedBox(height: 16),
TextFormField(
initialValue: viewState.address,
decoration: InputDecoration(
labelText: context.translate(I18n.streetLabel),
border: const OutlineInputBorder(),
),
onChanged: viewModel.setAddress,
),
],
),
),
PrimaryButton(
onPressed: () => viewModel.requestPin(),
text: context.translate(I18n.profileSettingsSave),
color: theme.getColorFor(ThemeCode.buttonPrimary),
),
TextButton(
onPressed: () => navigation.goBack(),
child: Text(context.translate(I18n.cancel)),
),
],
),
),
);
}
}

View File

@@ -0,0 +1,155 @@
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:get_it/get_it.dart';
import 'package:sca_treezor/sca_treezor.dart';
import 'package:sf_shared/sf_shared.dart';
import '../../child_wallet/child_data_provider.dart';
export 'edit_child_profile_view_state.dart';
import 'edit_child_profile_view_state.dart';
final editChildProfileViewModelProvider = NotifierProvider.autoDispose
.family<EditChildProfileViewModel, EditChildProfileViewState, String>(
EditChildProfileViewModel.new,
);
class EditChildProfileViewModel extends Notifier<EditChildProfileViewState> {
final String childId;
EditChildProfileViewModel(this.childId);
late TreezorWalletConnectionService _connectionService;
late TreezorWalletSignatureService _signatureService;
@override
EditChildProfileViewState build() {
_connectionService = GetIt.I<TreezorWalletConnectionService>();
_signatureService = GetIt.I<TreezorWalletSignatureService>();
Future.microtask(() => _loadChildProfile());
return const EditChildProfileViewState();
}
Future<void> _loadChildProfile() async {
state = state.copyWith(isLoading: true, errorMessage: '');
try {
final childData = ref.read(childDataProvider(childId));
var childProfile = childData.childProfile;
if (childProfile == null) {
final profiles =
await ref.read(userRepositoryProvider).getChildProfiles();
childProfile = profiles.where((p) => p.id == childId).firstOrNull;
if (childProfile == null) {
state = state.copyWith(
isLoading: false,
errorMessage: 'Child profile not found',
);
return;
}
if (!ref.mounted) return;
}
state = state.copyWith(
isLoading: false,
firstName: childProfile.firstName,
lastName: childProfile.lastName,
address: childProfile.address,
childProfileId: childProfile.id,
treezorUserId: childProfile.treezorUserId,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(isLoading: false, errorMessage: e.toString());
}
}
void setFirstName(String value) =>
state = state.copyWith(firstName: value, saveSuccess: false);
void setLastName(String value) =>
state = state.copyWith(lastName: value, saveSuccess: false);
void setAddress(String value) =>
state = state.copyWith(address: value, saveSuccess: false);
void requestPin() {
state = state.copyWith(showPin: true, pin: '', errorMessage: '');
}
void cancelPin() {
state = state.copyWith(showPin: false, pin: '');
}
void onDigitPressed(String digit) {
if (state.pin.length >= 6) return;
state = state.copyWith(pin: state.pin + digit, errorMessage: '');
}
void onBackspacePressed() {
if (state.pin.isEmpty) return;
state = state.copyWith(pin: state.pin.substring(0, state.pin.length - 1));
}
void onClearPin() {
state = state.copyWith(pin: '');
}
bool get canSubmitPin => state.pin.length == 6;
Future<void> onPinSubmit() async {
state = state.copyWith(isSigning: true, errorMessage: '');
try {
await _connectionService.connectWithPin(loginPin: state.pin);
if (!ref.mounted) return;
final scaProof = await _generateScaProof();
if (!ref.mounted) return;
state = state.copyWith(isSigning: false, isSaving: true, pin: '');
await ref.read(userRepositoryProvider).updateChildProfile(
childProfileId: state.childProfileId,
scaProof: scaProof,
firstName: state.firstName,
lastName: state.lastName,
address: state.address,
);
if (!ref.mounted) return;
ref.read(walletRefreshProvider.notifier).refresh();
state = state.copyWith(
isSaving: false,
saveSuccess: true,
showPin: false,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(
isSigning: false,
isSaving: false,
pin: '',
errorMessage: e.toString(),
);
}
}
Future<String> _generateScaProof() async {
final url =
'https://savefamily.sandbox.treezor.co/v1/users/${state.treezorUserId}';
final scaBody = <String, dynamic>{
'firstName': state.firstName,
'lastName': state.lastName,
};
return _signatureService.generateJwsWithPin(
message: '',
input: jsonEncode({'url': url, 'body': scaBody}),
pin: state.pin,
);
}
}

View File

@@ -0,0 +1,21 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'edit_child_profile_view_state.freezed.dart';
@freezed
abstract class EditChildProfileViewState with _$EditChildProfileViewState {
const factory EditChildProfileViewState({
@Default(true) bool isLoading,
@Default(false) bool isSaving,
@Default(false) bool isSigning,
@Default(false) bool showPin,
@Default('') String pin,
@Default('') String firstName,
@Default('') String lastName,
@Default('') String address,
@Default('') String childProfileId,
@Default('') String treezorUserId,
@Default('') String errorMessage,
@Default(false) bool saveSuccess,
}) = _EditChildProfileViewState;
}

View File

@@ -0,0 +1,304 @@
// 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 'edit_child_profile_view_state.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$EditChildProfileViewState {
bool get isLoading; bool get isSaving; bool get isSigning; bool get showPin; String get pin; String get firstName; String get lastName; String get address; String get childProfileId; String get treezorUserId; String get errorMessage; bool get saveSuccess;
/// Create a copy of EditChildProfileViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$EditChildProfileViewStateCopyWith<EditChildProfileViewState> get copyWith => _$EditChildProfileViewStateCopyWithImpl<EditChildProfileViewState>(this as EditChildProfileViewState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is EditChildProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSaving, isSaving) || other.isSaving == isSaving)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.address, address) || other.address == address)&&(identical(other.childProfileId, childProfileId) || other.childProfileId == childProfileId)&&(identical(other.treezorUserId, treezorUserId) || other.treezorUserId == treezorUserId)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.saveSuccess, saveSuccess) || other.saveSuccess == saveSuccess));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isSaving,isSigning,showPin,pin,firstName,lastName,address,childProfileId,treezorUserId,errorMessage,saveSuccess);
@override
String toString() {
return 'EditChildProfileViewState(isLoading: $isLoading, isSaving: $isSaving, isSigning: $isSigning, showPin: $showPin, pin: $pin, firstName: $firstName, lastName: $lastName, address: $address, childProfileId: $childProfileId, treezorUserId: $treezorUserId, errorMessage: $errorMessage, saveSuccess: $saveSuccess)';
}
}
/// @nodoc
abstract mixin class $EditChildProfileViewStateCopyWith<$Res> {
factory $EditChildProfileViewStateCopyWith(EditChildProfileViewState value, $Res Function(EditChildProfileViewState) _then) = _$EditChildProfileViewStateCopyWithImpl;
@useResult
$Res call({
bool isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String address, String childProfileId, String treezorUserId, String errorMessage, bool saveSuccess
});
}
/// @nodoc
class _$EditChildProfileViewStateCopyWithImpl<$Res>
implements $EditChildProfileViewStateCopyWith<$Res> {
_$EditChildProfileViewStateCopyWithImpl(this._self, this._then);
final EditChildProfileViewState _self;
final $Res Function(EditChildProfileViewState) _then;
/// Create a copy of EditChildProfileViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isSaving = null,Object? isSigning = null,Object? showPin = null,Object? pin = null,Object? firstName = null,Object? lastName = null,Object? address = null,Object? childProfileId = null,Object? treezorUserId = null,Object? errorMessage = null,Object? saveSuccess = null,}) {
return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isSaving: null == isSaving ? _self.isSaving : isSaving // ignore: cast_nullable_to_non_nullable
as bool,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,showPin: null == showPin ? _self.showPin : showPin // ignore: cast_nullable_to_non_nullable
as bool,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String,childProfileId: null == childProfileId ? _self.childProfileId : childProfileId // ignore: cast_nullable_to_non_nullable
as String,treezorUserId: null == treezorUserId ? _self.treezorUserId : treezorUserId // ignore: cast_nullable_to_non_nullable
as String,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,saveSuccess: null == saveSuccess ? _self.saveSuccess : saveSuccess // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// Adds pattern-matching-related methods to [EditChildProfileViewState].
extension EditChildProfileViewStatePatterns on EditChildProfileViewState {
/// 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( _EditChildProfileViewState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _EditChildProfileViewState() 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( _EditChildProfileViewState value) $default,){
final _that = this;
switch (_that) {
case _EditChildProfileViewState():
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( _EditChildProfileViewState value)? $default,){
final _that = this;
switch (_that) {
case _EditChildProfileViewState() 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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String address, String childProfileId, String treezorUserId, String errorMessage, bool saveSuccess)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _EditChildProfileViewState() when $default != null:
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.address,_that.childProfileId,_that.treezorUserId,_that.errorMessage,_that.saveSuccess);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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String address, String childProfileId, String treezorUserId, String errorMessage, bool saveSuccess) $default,) {final _that = this;
switch (_that) {
case _EditChildProfileViewState():
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.address,_that.childProfileId,_that.treezorUserId,_that.errorMessage,_that.saveSuccess);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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String address, String childProfileId, String treezorUserId, String errorMessage, bool saveSuccess)? $default,) {final _that = this;
switch (_that) {
case _EditChildProfileViewState() when $default != null:
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.address,_that.childProfileId,_that.treezorUserId,_that.errorMessage,_that.saveSuccess);case _:
return null;
}
}
}
/// @nodoc
class _EditChildProfileViewState implements EditChildProfileViewState {
const _EditChildProfileViewState({this.isLoading = true, this.isSaving = false, this.isSigning = false, this.showPin = false, this.pin = '', this.firstName = '', this.lastName = '', this.address = '', this.childProfileId = '', this.treezorUserId = '', this.errorMessage = '', this.saveSuccess = false});
@override@JsonKey() final bool isLoading;
@override@JsonKey() final bool isSaving;
@override@JsonKey() final bool isSigning;
@override@JsonKey() final bool showPin;
@override@JsonKey() final String pin;
@override@JsonKey() final String firstName;
@override@JsonKey() final String lastName;
@override@JsonKey() final String address;
@override@JsonKey() final String childProfileId;
@override@JsonKey() final String treezorUserId;
@override@JsonKey() final String errorMessage;
@override@JsonKey() final bool saveSuccess;
/// Create a copy of EditChildProfileViewState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$EditChildProfileViewStateCopyWith<_EditChildProfileViewState> get copyWith => __$EditChildProfileViewStateCopyWithImpl<_EditChildProfileViewState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EditChildProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSaving, isSaving) || other.isSaving == isSaving)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.address, address) || other.address == address)&&(identical(other.childProfileId, childProfileId) || other.childProfileId == childProfileId)&&(identical(other.treezorUserId, treezorUserId) || other.treezorUserId == treezorUserId)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.saveSuccess, saveSuccess) || other.saveSuccess == saveSuccess));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isSaving,isSigning,showPin,pin,firstName,lastName,address,childProfileId,treezorUserId,errorMessage,saveSuccess);
@override
String toString() {
return 'EditChildProfileViewState(isLoading: $isLoading, isSaving: $isSaving, isSigning: $isSigning, showPin: $showPin, pin: $pin, firstName: $firstName, lastName: $lastName, address: $address, childProfileId: $childProfileId, treezorUserId: $treezorUserId, errorMessage: $errorMessage, saveSuccess: $saveSuccess)';
}
}
/// @nodoc
abstract mixin class _$EditChildProfileViewStateCopyWith<$Res> implements $EditChildProfileViewStateCopyWith<$Res> {
factory _$EditChildProfileViewStateCopyWith(_EditChildProfileViewState value, $Res Function(_EditChildProfileViewState) _then) = __$EditChildProfileViewStateCopyWithImpl;
@override @useResult
$Res call({
bool isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String address, String childProfileId, String treezorUserId, String errorMessage, bool saveSuccess
});
}
/// @nodoc
class __$EditChildProfileViewStateCopyWithImpl<$Res>
implements _$EditChildProfileViewStateCopyWith<$Res> {
__$EditChildProfileViewStateCopyWithImpl(this._self, this._then);
final _EditChildProfileViewState _self;
final $Res Function(_EditChildProfileViewState) _then;
/// Create a copy of EditChildProfileViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isSaving = null,Object? isSigning = null,Object? showPin = null,Object? pin = null,Object? firstName = null,Object? lastName = null,Object? address = null,Object? childProfileId = null,Object? treezorUserId = null,Object? errorMessage = null,Object? saveSuccess = null,}) {
return _then(_EditChildProfileViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isSaving: null == isSaving ? _self.isSaving : isSaving // ignore: cast_nullable_to_non_nullable
as bool,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,showPin: null == showPin ? _self.showPin : showPin // ignore: cast_nullable_to_non_nullable
as bool,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String,childProfileId: null == childProfileId ? _self.childProfileId : childProfileId // ignore: cast_nullable_to_non_nullable
as String,treezorUserId: null == treezorUserId ? _self.treezorUserId : treezorUserId // ignore: cast_nullable_to_non_nullable
as String,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,saveSuccess: null == saveSuccess ? _self.saveSuccess : saveSuccess // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
// dart format on

View File

@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sf_shared/sf_shared.dart';
import '../../presentation/state/home_view_model.dart';
import '../child_wallet/child_data_provider.dart';
import 'extract_view_state.dart';
@@ -92,8 +91,7 @@ class ExtractViewModel extends Notifier<ExtractViewState> {
);
if (!ref.mounted) return;
ref.read(childDataProvider(childId).notifier).load();
ref.read(homeViewModelProvider.notifier).refreshChildWallet(childId);
ref.read(walletRefreshProvider.notifier).refresh();
ref.read(parentWalletBalanceProvider.notifier).applyOptimisticPayin(amount);
state = state.copyWith(isSubmitting: false, success: true);
} catch (e) {

View File

@@ -37,32 +37,20 @@ class HomeScreen extends ConsumerWidget {
margin: EdgeInsets.all(30),
child: Column(
children: [
Row(
children: [
Expanded(
child: Text.rich(
Align(
alignment: Alignment.centerLeft,
child: Text.rich(
TextSpan(
text: context.translate(I18n.homeGreeting),
style: TextStyle(fontSize: 25),
children: <TextSpan>[
TextSpan(
text: context.translate(I18n.homeGreeting),
style: TextStyle(fontSize: 25),
children: <TextSpan>[
TextSpan(
text: viewState.userName,
style: TextStyle(fontWeight: FontWeight.w500),
),
],
text: viewState.userName,
style: TextStyle(fontWeight: FontWeight.w500),
),
),
],
),
IconButton(
onPressed: () =>
navigationContract.pushTo(AppRoutes.deviceSetup),
icon: Icon(
Icons.person_add_outlined,
color: theme.getColorFor(ThemeCode.textPrimary),
),
tooltip: context.translate(I18n.homeAddAnotherKid),
),
],
),
),
const ChildWalletsSlider(),
Align(

View File

@@ -13,28 +13,21 @@ import 'package:utils/utils.dart';
class ControlPanelScreen extends ConsumerWidget {
final NavigationContract navigationContract;
const ControlPanelScreen({
super.key,
required this.navigationContract,
});
const ControlPanelScreen({super.key, required this.navigationContract});
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
final state = ref.watch(controlPanelViewModelProvider);
ref.listen(
controlPanelViewModelProvider.select((s) => s.errorMessage),
(previous, next) {
if (next.isNotEmpty) {
showTopSnackbar(
context,
message: next,
type: MessageType.error,
);
}
},
);
ref.listen(controlPanelViewModelProvider.select((s) => s.errorMessage), (
previous,
next,
) {
if (next.isNotEmpty) {
showTopSnackbar(context, message: next, type: MessageType.error);
}
});
if (state.isLoading) {
return Scaffold(
@@ -90,7 +83,9 @@ class _Header extends ConsumerWidget {
alignment: Alignment.center,
children: [
Padding(
padding: EdgeInsets.only(top: SizeUtils.getByScreen(small: 14, big: 14)),
padding: EdgeInsets.only(
top: SizeUtils.getByScreen(small: 14, big: 14),
),
child: Row(
children: [
Image.asset(
@@ -102,17 +97,13 @@ class _Header extends ConsumerWidget {
width: SizeUtils.getByScreen(small: 130, big: 140),
height: 32,
child: CustomDropdown(
items: state.devices
.map(
(DeviceEntity device) {
final name = device.carrierName ?? '';
return Text(
name.length > 10 ? '${name.substring(0, 10)}...' : name,
overflow: TextOverflow.ellipsis,
);
},
)
.toList(),
items: state.devices.map((DeviceEntity device) {
final name = device.carrierName ?? '';
return Text(
name.length > 10 ? '${name.substring(0, 10)}...' : name,
overflow: TextOverflow.ellipsis,
);
}).toList(),
values: state.devices,
value: state.selectedDevice,
onChanged: (device) {
@@ -153,13 +144,13 @@ class _MenuSection extends ConsumerWidget {
text: I18n.customerService,
),
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
_SectionButton(
onPressed: () {
navigationContract.pushTo(AppRoutes.dashboardHome);
},
icon: SFIcons.payments,
text: I18n.sfPay,
),
// _SectionButton(
// onPressed: () {
// navigationContract.pushTo(AppRoutes.dashboardHome);
// },
// icon: SFIcons.payments,
// text: I18n.sfPay,
// ),
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
_SectionButton(
onPressed: () {

View File

@@ -46,8 +46,6 @@ class _OptionsSection extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final state = ref.watch(remoteManagementViewModelProvider);
final vm = ref.read(remoteManagementViewModelProvider.notifier);
return SingleChildScrollView(
@@ -61,26 +59,9 @@ class _OptionsSection extends ConsumerWidget {
child: ConfirmDialog(
title: context.translate(I18n.remoteTurnOff),
message: context.translate(I18n.remoteTurnOffConfirm),
onConfirm: () async {
await vm.shutdown();
final errorMessage = ref.read(
remoteManagementViewModelProvider.select((s)=>s.errorMessage)
);
if (errorMessage.isNotEmpty) {
showTopSnackbar(
context,
message: errorMessage,
type: MessageType.error
);
}
final isComplete = ref.read(
remoteManagementViewModelProvider.select((s)=>s.isComplete)
);
if (isComplete) {
Navigator.pop(context);
}
onConfirm: () {
vm.turnOff();
Navigator.pop(context);
}
),
));},
@@ -139,7 +120,6 @@ class _SectionButton extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.read(themePortProvider);
return SectionButton(
@@ -149,13 +129,11 @@ class _SectionButton extends ConsumerWidget {
size: 48,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(title,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16
fontSize: 14
)
),
Text(subtitle,

View File

@@ -1,5 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:legacy_shared/legacy_shared.dart';
import 'package:sf_shared/sf_shared.dart';
import 'remote_management_view_state.dart';
final remoteManagementViewModelProvider =
@@ -8,48 +10,40 @@ NotifierProvider.autoDispose<RemoteManagementViewModel, RemoteManagementViewStat
);
class RemoteManagementViewModel extends Notifier<RemoteManagementViewState> {
late final CommandsRepository _commandsRepository;
// late final TurnOffUsecase _turnOffUseCase;
// late final RestartUsecase _restartUseCase;
// late final FactoryResetUseCase _factoryResetUseCase;
@override
RemoteManagementViewState build() {
// _turnOffUseCase = ref.read(turnOffUseCaseProvider);
// _restartUseCase = ref.read(restartUseCaseProvider);
// _factoryResetUseCase = ref.read(factoryResetUseCaseProvider);
_commandsRepository = ref.read(commandsRepositoryProvider);
Future.microtask(() => load());
state = const RemoteManagementViewState();
_init();
return state;
return const RemoteManagementViewState();
}
Future<void> _init() async {
Future<void> load() async {
final device = ref.read(selectedDeviceProvider);
setDevice(device!);
}
void setDevice(DeviceEntity device) {
state = state.copyWith(
deviceId: device!.identificator,
deviceId: device.identificator,
isLoading: false,
);
}
Future<void> tryCommand(DeviceCommand command) async {
Future<void> turnOff() async {
try {
state = state.copyWith(
isLoading: true,
isComplete: false,
);
final request = SendCommandRequestModel(
device: state.deviceId,
command: command,
);
_commandsRepository.send(request: request);
state = state.copyWith(
isLoading: false,
isComplete: true,
);
// _turnOffUseCase.turnOff();
} catch (e) {
state = state.copyWith(
isLoading: false,
@@ -58,15 +52,31 @@ class RemoteManagementViewModel extends Notifier<RemoteManagementViewState> {
}
}
Future<void> shutdown() async {
await tryCommand(DeviceCommand.shutdown);
}
Future<void> restart() async {
await tryCommand(DeviceCommand.restart);
try {
state = state.copyWith(
isLoading: true,
);
// _restartUseCase.restart();
} catch (e) {
state = state.copyWith(
isLoading: false,
errorMessage: e.toString()
);
}
}
Future<void> factoryReset() async {
await tryCommand(DeviceCommand.factory);
try {
state = state.copyWith(
isLoading: true,
);
// _factoryResetUseCase.fatoryReset();
} catch (e) {
state = state.copyWith(
isLoading: false,
errorMessage: e.toString()
);
}
}
}

View File

@@ -7,7 +7,6 @@ abstract class RemoteManagementViewState with _$RemoteManagementViewState {
const factory RemoteManagementViewState({
@Default('') String deviceId,
@Default(true) bool isLoading,
@Default(true) bool isComplete,
@Default('') String errorMessage,
}) = _RemoteManagementViewState;
}

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$RemoteManagementViewState {
String get deviceId; bool get isLoading; bool get isComplete; String get errorMessage;
String get deviceId; bool get isLoading; String get errorMessage;
/// Create a copy of RemoteManagementViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $RemoteManagementViewStateCopyWith<RemoteManagementViewState> get copyWith => _$
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is RemoteManagementViewState&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is RemoteManagementViewState&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,deviceId,isLoading,isComplete,errorMessage);
int get hashCode => Object.hash(runtimeType,deviceId,isLoading,errorMessage);
@override
String toString() {
return 'RemoteManagementViewState(deviceId: $deviceId, isLoading: $isLoading, isComplete: $isComplete, errorMessage: $errorMessage)';
return 'RemoteManagementViewState(deviceId: $deviceId, isLoading: $isLoading, errorMessage: $errorMessage)';
}
@@ -45,7 +45,7 @@ abstract mixin class $RemoteManagementViewStateCopyWith<$Res> {
factory $RemoteManagementViewStateCopyWith(RemoteManagementViewState value, $Res Function(RemoteManagementViewState) _then) = _$RemoteManagementViewStateCopyWithImpl;
@useResult
$Res call({
String deviceId, bool isLoading, bool isComplete, String errorMessage
String deviceId, bool isLoading, String errorMessage
});
@@ -62,11 +62,10 @@ class _$RemoteManagementViewStateCopyWithImpl<$Res>
/// Create a copy of RemoteManagementViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? deviceId = null,Object? isLoading = null,Object? isComplete = null,Object? errorMessage = null,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? deviceId = null,Object? isLoading = null,Object? errorMessage = null,}) {
return _then(_self.copyWith(
deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
as String,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,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
@@ -153,10 +152,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String deviceId, bool isLoading, bool isComplete, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String deviceId, bool isLoading, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RemoteManagementViewState() when $default != null:
return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessage);case _:
return $default(_that.deviceId,_that.isLoading,_that.errorMessage);case _:
return orElse();
}
@@ -174,10 +173,10 @@ return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessa
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String deviceId, bool isLoading, bool isComplete, String errorMessage) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String deviceId, bool isLoading, String errorMessage) $default,) {final _that = this;
switch (_that) {
case _RemoteManagementViewState():
return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessage);case _:
return $default(_that.deviceId,_that.isLoading,_that.errorMessage);case _:
throw StateError('Unexpected subclass');
}
@@ -194,10 +193,10 @@ return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessa
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String deviceId, bool isLoading, bool isComplete, String errorMessage)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String deviceId, bool isLoading, String errorMessage)? $default,) {final _that = this;
switch (_that) {
case _RemoteManagementViewState() when $default != null:
return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessage);case _:
return $default(_that.deviceId,_that.isLoading,_that.errorMessage);case _:
return null;
}
@@ -209,12 +208,11 @@ return $default(_that.deviceId,_that.isLoading,_that.isComplete,_that.errorMessa
class _RemoteManagementViewState implements RemoteManagementViewState {
const _RemoteManagementViewState({this.deviceId = '', this.isLoading = true, this.isComplete = true, this.errorMessage = ''});
const _RemoteManagementViewState({this.deviceId = '', this.isLoading = true, this.errorMessage = ''});
@override@JsonKey() final String deviceId;
@override@JsonKey() final bool isLoading;
@override@JsonKey() final bool isComplete;
@override@JsonKey() final String errorMessage;
/// Create a copy of RemoteManagementViewState
@@ -227,16 +225,16 @@ _$RemoteManagementViewStateCopyWith<_RemoteManagementViewState> get copyWith =>
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RemoteManagementViewState&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RemoteManagementViewState&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,deviceId,isLoading,isComplete,errorMessage);
int get hashCode => Object.hash(runtimeType,deviceId,isLoading,errorMessage);
@override
String toString() {
return 'RemoteManagementViewState(deviceId: $deviceId, isLoading: $isLoading, isComplete: $isComplete, errorMessage: $errorMessage)';
return 'RemoteManagementViewState(deviceId: $deviceId, isLoading: $isLoading, errorMessage: $errorMessage)';
}
@@ -247,7 +245,7 @@ abstract mixin class _$RemoteManagementViewStateCopyWith<$Res> implements $Remot
factory _$RemoteManagementViewStateCopyWith(_RemoteManagementViewState value, $Res Function(_RemoteManagementViewState) _then) = __$RemoteManagementViewStateCopyWithImpl;
@override @useResult
$Res call({
String deviceId, bool isLoading, bool isComplete, String errorMessage
String deviceId, bool isLoading, String errorMessage
});
@@ -264,11 +262,10 @@ class __$RemoteManagementViewStateCopyWithImpl<$Res>
/// Create a copy of RemoteManagementViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? deviceId = null,Object? isLoading = null,Object? isComplete = null,Object? errorMessage = null,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? deviceId = null,Object? isLoading = null,Object? errorMessage = null,}) {
return _then(_RemoteManagementViewState(
deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
as String,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,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));

View File

@@ -31,15 +31,12 @@ class ConfirmDialog extends ConsumerWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title,
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16
),
),
Text(message,
textAlign: TextAlign.center,
),
Text(message),
Row(
children: [
Expanded(child: PrimaryButton(

View File

@@ -96,7 +96,7 @@ packages:
source: hosted
version: "3.0.3"
build_runner:
dependency: transitive
dependency: "direct dev"
description:
name: build_runner
sha256: b24597fceb695969d47025c958f3837f9f0122e237c6a22cb082a5ac66c3ca30
@@ -380,7 +380,7 @@ packages:
source: hosted
version: "3.3.1"
flutter_svg:
dependency: "direct main"
dependency: transitive
description:
name: flutter_svg
sha256: "1ded017b39c8e15c8948ea855070a5ff8ff8b3d5e83f3446e02d6bb12add7ad9"
@@ -1159,70 +1159,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
url: "https://pub.dev"
source: hosted
version: "6.3.2"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611"
url: "https://pub.dev"
source: hosted
version: "6.3.28"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad
url: "https://pub.dev"
source: hosted
version: "6.3.6"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
url: "https://pub.dev"
source: hosted
version: "3.2.2"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
url: "https://pub.dev"
source: hosted
version: "3.2.5"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
url: "https://pub.dev"
source: hosted
version: "3.1.5"
utils:
dependency: "direct main"
description:
@@ -1231,7 +1167,7 @@ packages:
source: path
version: "0.0.1"
uuid:
dependency: transitive
dependency: "direct main"
description:
name: uuid
sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489"

View File

@@ -1,20 +1,6 @@
name: settings
description: "A new Flutter project."
description: "Settings module for legacy device management features."
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#
# This version is used _only_ for the Runner app, which is used if you just do
# a `flutter run`. It has no impact on any other native host app that you embed
# your Flutter project into.
version: 1.0.0+1
environment:
@@ -23,8 +9,6 @@ environment:
dependencies:
flutter:
sdk: flutter
#modules dependencies go here
#packages dependencies go here
design_system:
path: ../../../../packages/design_system
@@ -43,75 +27,27 @@ dependencies:
sf_shared:
path: ../../../../packages/sf_shared
#dependencies go here
flutter_svg: ^2.2.1
get_it: ^9.0.5
go_router: ^17.0.0
flutter_riverpod: ^3.0.3
freezed_annotation: ^3.1.0
freezed: ^3.2.3
dio: ^5.9.0
json_annotation: ^4.9.0
json_serializable: ^6.11.2
url_launcher: ^6.3.2
flutter_contacts: ^1.1.9+2
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
dio: ^5.8.0+1
uuid: ^4.5.1
flutter_contacts: ^1.1.9+2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
build_runner: ^2.4.15
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add Flutter specific assets to your application, add an assets section,
# like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add Flutter specific custom fonts to your application, add a fonts
# section here, in this "flutter" section. Each entry in this list should
# have a "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
# This section identifies your Flutter project as a module meant for
# embedding in a native host app. These identifiers should _not_ ordinarily
# be changed after generation - they are used to ensure that the tooling can
# maintain consistency when adding or modifying assets and plugins.
# They also do not have any bearing on your native host application's
# identifiers, which may be completely independent or the same as these.
module:
androidX: true
androidPackage: com.example.settings

View File

@@ -4,16 +4,10 @@ part 'send_command_request_model.freezed.dart';
part 'send_command_request_model.g.dart';
enum DeviceCommand {
@JsonValue('FACTORY')
factory,
@JsonValue('FIND_DEVICE')
findDevice,
@JsonValue('RESTART')
restart,
@JsonValue('REWARDS')
rewards,
@JsonValue('SHUTDOWN')
shutdown,
@JsonValue('SOUND')
sound,
}

View File

@@ -23,10 +23,7 @@ Map<String, dynamic> _$SendCommandRequestModelToJson(
};
const _$DeviceCommandEnumMap = {
DeviceCommand.factory: 'FACTORY',
DeviceCommand.findDevice: 'FIND_DEVICE',
DeviceCommand.restart: 'RESTART',
DeviceCommand.rewards: 'REWARDS',
DeviceCommand.shutdown: 'SHUTDOWN',
DeviceCommand.sound: 'SOUND',
};

View File

@@ -1,5 +1,6 @@
export 'src/presentation/profile_screen.dart';
export 'src/profile_builder.dart';
export 'src/features/profile_settings/presentation/profile_settings_builder.dart';
export 'src/features/edit_personal_data/presentation/edit_personal_data_builder.dart';
export 'src/features/payment_methods/presentation/payment_methods_builder.dart';
export 'src/features/payout/presentation/payout_builder.dart';

View File

@@ -0,0 +1,59 @@
import 'package:country_code_picker/country_code_picker.dart';
import 'package:flutter/widgets.dart';
import 'package:sealed_countries/sealed_countries.dart';
final List<String> _sortedDialCodes = List.unmodifiable(
codes
.map((c) => c['dial_code'] ?? '')
.where((d) => d.isNotEmpty)
.toSet()
.toList()
..sort((a, b) => b.length.compareTo(a.length)),
);
String extractDialCode(String phone) {
if (phone.isEmpty || !phone.startsWith('+')) return '';
for (final dc in _sortedDialCodes) {
if (phone.startsWith(dc)) return dc;
}
return '';
}
String alpha2ToCountryName(String code) {
if (code.isEmpty) return '';
try {
return WorldCountry.list
.firstWhere((c) => c.codeShort.toUpperCase() == code.toUpperCase())
.name
.common;
} catch (_) {
return code;
}
}
String countryNameToAlpha2(String name) {
if (name.isEmpty) return '';
if (name.length == 2) return name.toUpperCase();
try {
return WorldCountry.list
.firstWhere((c) => c.name.common.toLowerCase() == name.toLowerCase())
.codeShort;
} catch (_) {
return name;
}
}
String resolveAlpha2({required String country, required String countryCode}) {
if (countryCode.length == 2) return countryCode.toUpperCase();
if (country.length == 2) return country.toUpperCase();
return countryNameToAlpha2(country);
}
String localizedCountryName(BuildContext context, String alpha2) {
if (alpha2.isEmpty) return '';
try {
return CountryCode.fromCountryCode(alpha2).localize(context).name ?? alpha2;
} catch (_) {
return alpha2;
}
}

View File

@@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
import 'package:go_router/go_router.dart';
import 'package:navigation/navigation.dart';
import 'edit_personal_data_screen.dart';
class EditPersonalDataBuilder {
const EditPersonalDataBuilder();
Page<void> buildPage(BuildContext context, GoRouterState state) {
final navigationContract = GetIt.I<NavigationContract>();
return MaterialPage(
key: state.pageKey,
child: EditPersonalDataScreen(navigationContract: navigationContract),
);
}
}

View File

@@ -0,0 +1,341 @@
import 'package:auth/auth.dart';
import 'package:country_code_picker/country_code_picker.dart';
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import '../country_utils.dart';
import 'edit_personal_data_view_model.dart';
class EditPersonalDataScreen extends ConsumerWidget {
final NavigationContract navigationContract;
const EditPersonalDataScreen({super.key, required this.navigationContract});
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
final viewState = ref.watch(editPersonalDataViewModelProvider);
final viewModel = ref.read(editPersonalDataViewModelProvider.notifier);
ref.listen(editPersonalDataViewModelProvider, (prev, next) {
if (next.saveSuccess && !(prev?.saveSuccess ?? false)) {
showTopSnackbar(
context,
message: context.translate(I18n.profileSettingsSaveSuccess),
type: MessageType.success,
);
navigationContract.goBack();
}
if (next.errorMessage.isNotEmpty &&
!next.showPin &&
next.errorMessage != (prev?.errorMessage ?? '')) {
showTopSnackbar(
context,
message: next.errorMessage,
type: MessageType.error,
);
}
});
if (viewState.isLoading) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
body: const Center(child: AppLoadingIndicator()),
);
}
if (viewState.showPin) {
return _buildPinScaffold(context, theme, viewState, viewModel);
}
return _buildFormScaffold(context, theme, viewState, viewModel);
}
Widget _buildPinScaffold(
BuildContext context,
ThemePort theme,
EditPersonalDataViewState viewState,
EditPersonalDataViewModel viewModel,
) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
appBar: AppBar(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: theme.getColorFor(ThemeCode.textPrimary),
),
onPressed: viewModel.cancelPin,
),
),
body: SafeArea(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: ScaPinView(
title: context.translate(I18n.scaPinEnter),
pin: viewState.pin,
isProcessing: viewState.isSigning || viewState.isSaving,
processingText: context.translate(I18n.scaSigning),
canSubmit: viewModel.canSubmitPin,
submitText: context.translate(I18n.scaConnect),
clearPinText: context.translate(I18n.scaClearPin),
onDigitPressed: viewModel.onDigitPressed,
onBackspacePressed: viewModel.onBackspacePressed,
onClearPin: viewModel.onClearPin,
onSubmit: () => viewModel.onPinSubmit(),
),
),
),
if (viewState.errorMessage.isNotEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Text(
viewState.errorMessage,
style: const TextStyle(color: Colors.red),
textAlign: TextAlign.center,
),
),
TextButton(
onPressed: viewModel.cancelPin,
child: Text(context.translate(I18n.cancel)),
),
],
),
),
);
}
Widget _buildFormScaffold(
BuildContext context,
ThemePort theme,
EditPersonalDataViewState viewState,
EditPersonalDataViewModel viewModel,
) {
return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
appBar: AppBar(
backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary),
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: theme.getColorFor(ThemeCode.textPrimary),
),
onPressed: () => navigationContract.goBack(),
),
title: Text(
context.translate(I18n.profileSettingsEdit),
style: TextStyle(color: theme.getColorFor(ThemeCode.textPrimary)),
),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: Column(
children: [
Expanded(
child: ListView(
children: [
..._personalDataSection(context, viewState, viewModel),
const SizedBox(height: 32),
..._addressSection(context, viewState, viewModel),
],
),
),
PrimaryButton(
onPressed: () => viewModel.requestPin(),
text: context.translate(I18n.profileSettingsSave),
color: theme.getColorFor(ThemeCode.buttonPrimary),
),
TextButton(
onPressed: () => navigationContract.goBack(),
child: Text(context.translate(I18n.cancel)),
),
],
),
),
);
}
List<Widget> _personalDataSection(
BuildContext context,
EditPersonalDataViewState viewState,
EditPersonalDataViewModel viewModel,
) {
return [
_sectionTitle(context.translate(I18n.profileSettingsPersonalData)),
const SizedBox(height: 12),
_textField(
label: context.translate(I18n.profileSettingsName),
initialValue: viewState.firstName,
onChanged: viewModel.setFirstName,
),
const SizedBox(height: 16),
_textField(
label: context.translate(I18n.profileSettingsLastName),
initialValue: viewState.lastName,
onChanged: viewModel.setLastName,
),
const SizedBox(height: 16),
_labeledField(
label: context.translate(I18n.profileSettingsPhone),
child: Row(
spacing: 10,
children: [
CountryPrefixPicker(
headerText: context.translate(I18n.selectYourCountry),
initialSelection: viewState.dialCode,
onChanged: (CountryCode value) {
viewModel.setDialCode(value.dialCode ?? '');
},
),
Expanded(
child: TextFormField(
initialValue: viewState.phoneNumber,
decoration: const InputDecoration(border: OutlineInputBorder()),
keyboardType: TextInputType.phone,
onChanged: viewModel.setPhoneNumber,
),
),
],
),
),
const SizedBox(height: 16),
_countryPickerField(
context: context,
label: context.translate(I18n.profileSettingsNationality),
displayName: localizedCountryName(context, viewState.nationality),
initialSelection: viewState.nationality.isNotEmpty
? viewState.nationality
: 'ES',
onChanged: (CountryCode value) {
viewModel.setNationality(value.code ?? '');
},
),
];
}
List<Widget> _addressSection(
BuildContext context,
EditPersonalDataViewState viewState,
EditPersonalDataViewModel viewModel,
) {
return [
_sectionTitle(context.translate(I18n.profileSettingsAddress)),
const SizedBox(height: 12),
_textField(
label: context.translate(I18n.profileSettingsStreet),
initialValue: viewState.address.street,
onChanged: viewModel.setStreet,
),
const SizedBox(height: 16),
_textField(
label: context.translate(I18n.profileSettingsCity),
initialValue: viewState.address.city,
onChanged: viewModel.setCity,
),
const SizedBox(height: 16),
_textField(
label: context.translate(I18n.profileSettingsPostCode),
initialValue: viewState.address.postCode == 0
? ''
: viewState.address.postCode.toString(),
onChanged: viewModel.setPostCode,
keyboardType: TextInputType.number,
),
const SizedBox(height: 16),
_countryPickerField(
context: context,
label: context.translate(I18n.profileSettingsCountry),
displayName: localizedCountryName(
context,
viewState.address.countryCode,
),
initialSelection: viewState.address.countryCode.isNotEmpty
? viewState.address.countryCode
: 'ES',
onChanged: (CountryCode value) {
viewModel.setCountry(name: value.name ?? '', code: value.code ?? '');
},
),
];
}
Widget _sectionTitle(String title) {
return Text(
title,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
);
}
Widget _textField({
required String label,
required String initialValue,
required ValueChanged<String> onChanged,
TextInputType keyboardType = TextInputType.text,
}) {
return TextFormField(
initialValue: initialValue,
decoration: InputDecoration(
labelText: label,
border: const OutlineInputBorder(),
),
keyboardType: keyboardType,
onChanged: onChanged,
);
}
Widget _labeledField({required String label, required Widget child}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label, style: const TextStyle(fontSize: 14)),
const SizedBox(height: 8),
child,
],
);
}
Widget _countryPickerField({
required BuildContext context,
required String label,
required String displayName,
required String initialSelection,
required ValueChanged<CountryCode> onChanged,
}) {
return _labeledField(
label: label,
child: Row(
spacing: 10,
children: [
CountryPrefixPicker(
headerText: context.translate(I18n.selectYourCountry),
initialSelection: initialSelection,
onChanged: onChanged,
),
Expanded(
child: InputDecorator(
decoration: InputDecoration(
border: const OutlineInputBorder(),
contentPadding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 14,
),
),
child: Text(
displayName.isNotEmpty ? displayName : label,
style: TextStyle(
color: displayName.isNotEmpty ? null : Colors.grey,
),
),
),
),
],
),
);
}
}

View File

@@ -0,0 +1,239 @@
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:get_it/get_it.dart';
import 'package:sca_treezor/sca_treezor.dart';
import 'package:sf_shared/sf_shared.dart';
import '../country_utils.dart';
export 'edit_personal_data_view_state.dart';
import 'edit_personal_data_view_state.dart';
final editPersonalDataViewModelProvider =
NotifierProvider.autoDispose<
EditPersonalDataViewModel,
EditPersonalDataViewState
>(EditPersonalDataViewModel.new);
class EditPersonalDataViewModel extends Notifier<EditPersonalDataViewState> {
late GetUserInfoUseCase _getUserInfoUseCase;
late GetPaymentProfileUseCase _getPaymentProfileUseCase;
late TreezorWalletConnectionService _connectionService;
late TreezorWalletSignatureService _signatureService;
@override
EditPersonalDataViewState build() {
_getUserInfoUseCase = ref.read(getUserInfoUseCaseProvider);
_getPaymentProfileUseCase = ref.read(getPaymentProfileUseCaseProvider);
_connectionService = GetIt.I<TreezorWalletConnectionService>();
_signatureService = GetIt.I<TreezorWalletSignatureService>();
Future.microtask(() => load());
return const EditPersonalDataViewState();
}
Future<void> load() async {
state = state.copyWith(isLoading: true, errorMessage: '');
try {
final user = await _getUserInfoUseCase.getUserInfo();
if (!ref.mounted) return;
final profile = await _getPaymentProfileUseCase.getPaymentProfile(
userId: user.id,
);
if (!ref.mounted) return;
final profileAddress = profile.addresses.isNotEmpty
? profile.addresses.first
: null;
final phone = profile.phone;
final dialCode = extractDialCode(phone);
final phoneNumber = dialCode.isNotEmpty
? phone.substring(dialCode.length)
: phone;
final rawCountry = profileAddress?.country ?? '';
state = state.copyWith(
isLoading: false,
firstName: user.firstName,
lastName: user.lastName,
dialCode: dialCode,
phoneNumber: phoneNumber,
nationality: profile.nationality,
address: AddressViewState(
street: profileAddress?.street ?? '',
city: profileAddress?.city ?? '',
province: profileAddress?.province ?? '',
state: profileAddress?.state ?? '',
country: rawCountry,
countryCode: countryNameToAlpha2(rawCountry),
postCode: profileAddress?.postCode ?? 0,
),
paymentProfileId: profile.paymentProfileId,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(isLoading: false, errorMessage: e.toString());
}
}
void setFirstName(String value) =>
state = state.copyWith(firstName: value, saveSuccess: false);
void setLastName(String value) =>
state = state.copyWith(lastName: value, saveSuccess: false);
void setDialCode(String value) =>
state = state.copyWith(dialCode: value, saveSuccess: false);
void setPhoneNumber(String value) =>
state = state.copyWith(phoneNumber: value, saveSuccess: false);
void setNationality(String code) =>
state = state.copyWith(nationality: code, saveSuccess: false);
void setStreet(String value) => state = state.copyWith(
address: state.address.copyWith(street: value),
saveSuccess: false,
);
void setCity(String value) => state = state.copyWith(
address: state.address.copyWith(city: value),
saveSuccess: false,
);
void setCountry({required String name, required String code}) =>
state = state.copyWith(
address: state.address.copyWith(country: name, countryCode: code),
saveSuccess: false,
);
void setPostCode(String value) => state = state.copyWith(
address: state.address.copyWith(postCode: int.tryParse(value) ?? 0),
saveSuccess: false,
);
void requestPin() {
state = state.copyWith(showPin: true, pin: '', errorMessage: '');
}
void cancelPin() {
state = state.copyWith(showPin: false, pin: '');
}
void onDigitPressed(String digit) {
if (state.pin.length >= 6) return;
state = state.copyWith(pin: state.pin + digit, errorMessage: '');
}
void onBackspacePressed() {
if (state.pin.isEmpty) return;
state = state.copyWith(pin: state.pin.substring(0, state.pin.length - 1));
}
void onClearPin() {
state = state.copyWith(pin: '');
}
bool get canSubmitPin => state.pin.length == 6;
Future<void> onPinSubmit() async {
state = state.copyWith(isSigning: true, errorMessage: '');
try {
await _connectionService.connectWithPin(loginPin: state.pin);
if (!ref.mounted) return;
final scaProof = await _generateScaProof();
if (!ref.mounted) return;
state = state.copyWith(isSigning: false, isSaving: true, pin: '');
await _saveProfile(scaProof);
if (!ref.mounted) return;
ref.read(walletRefreshProvider.notifier).refresh();
state = state.copyWith(
isSaving: false,
saveSuccess: true,
showPin: false,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(
isSigning: false,
isSaving: false,
pin: '',
errorMessage: e.toString(),
);
}
}
String get _fullPhone => '${state.dialCode}${state.phoneNumber}'.trim();
String get _addressCountryName => alpha2ToCountryName(
resolveAlpha2(
country: state.address.country,
countryCode: state.address.countryCode,
),
);
Future<String> _generateScaProof() async {
final url =
'https://savefamily.sandbox.treezor.co/v1/users/${state.paymentProfileId}';
final scaBody = <String, dynamic>{
'firstName': state.firstName,
'lastName': state.lastName,
'phone': _fullPhone,
'nationality': state.nationality,
'address1': state.address.street,
'postcode': state.address.postCode,
'city': state.address.city,
'country': resolveAlpha2(
country: state.address.country,
countryCode: state.address.countryCode,
),
};
final scaInput = jsonEncode({'url': url, 'body': scaBody});
return _signatureService.generateJwsWithPin(
message: '',
input: scaInput,
pin: state.pin,
);
}
PaymentProfileAddressEntity _buildAddressEntity() {
return PaymentProfileAddressEntity(
street: state.address.street,
city: state.address.city,
province: state.address.province,
state: state.address.state,
country: _addressCountryName,
postCode: state.address.postCode,
);
}
Future<void> _saveProfile(String scaProof) async {
final address = _buildAddressEntity();
await ref
.read(treezorRepositoryProvider)
.updatePaymentProfile(
paymentProfileId: state.paymentProfileId,
scaProof: scaProof,
firstName: state.firstName,
lastName: state.lastName,
phone: _fullPhone,
nationality: state.nationality,
addresses: [address],
taxResidences: [address],
);
}
}

View File

@@ -0,0 +1,36 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'edit_personal_data_view_state.freezed.dart';
@freezed
abstract class AddressViewState with _$AddressViewState {
const factory AddressViewState({
@Default('') String street,
@Default('') String city,
@Default('') String province,
@Default('') String state,
@Default('') String country,
@Default('') String countryCode,
@Default(0) int postCode,
}) = _AddressViewState;
}
@freezed
abstract class EditPersonalDataViewState with _$EditPersonalDataViewState {
const factory EditPersonalDataViewState({
@Default(true) bool isLoading,
@Default(false) bool isSaving,
@Default(false) bool isSigning,
@Default(false) bool showPin,
@Default('') String pin,
@Default('') String firstName,
@Default('') String lastName,
@Default('') String dialCode,
@Default('') String phoneNumber,
@Default('') String nationality,
@Default(AddressViewState()) AddressViewState address,
@Default('') String paymentProfileId,
@Default('') String errorMessage,
@Default(false) bool saveSuccess,
}) = _EditPersonalDataViewState;
}

View File

@@ -0,0 +1,603 @@
// 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 'edit_personal_data_view_state.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$AddressViewState {
String get street; String get city; String get province; String get state; String get country; String get countryCode; int get postCode;
/// Create a copy of AddressViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AddressViewStateCopyWith<AddressViewState> get copyWith => _$AddressViewStateCopyWithImpl<AddressViewState>(this as AddressViewState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AddressViewState&&(identical(other.street, street) || other.street == street)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.state, state) || other.state == state)&&(identical(other.country, country) || other.country == country)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.postCode, postCode) || other.postCode == postCode));
}
@override
int get hashCode => Object.hash(runtimeType,street,city,province,state,country,countryCode,postCode);
@override
String toString() {
return 'AddressViewState(street: $street, city: $city, province: $province, state: $state, country: $country, countryCode: $countryCode, postCode: $postCode)';
}
}
/// @nodoc
abstract mixin class $AddressViewStateCopyWith<$Res> {
factory $AddressViewStateCopyWith(AddressViewState value, $Res Function(AddressViewState) _then) = _$AddressViewStateCopyWithImpl;
@useResult
$Res call({
String street, String city, String province, String state, String country, String countryCode, int postCode
});
}
/// @nodoc
class _$AddressViewStateCopyWithImpl<$Res>
implements $AddressViewStateCopyWith<$Res> {
_$AddressViewStateCopyWithImpl(this._self, this._then);
final AddressViewState _self;
final $Res Function(AddressViewState) _then;
/// Create a copy of AddressViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? street = null,Object? city = null,Object? province = null,Object? state = null,Object? country = null,Object? countryCode = null,Object? postCode = null,}) {
return _then(_self.copyWith(
street: null == street ? _self.street : street // ignore: cast_nullable_to_non_nullable
as String,city: null == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String,province: null == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as String,country: null == country ? _self.country : country // ignore: cast_nullable_to_non_nullable
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as String,postCode: null == postCode ? _self.postCode : postCode // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [AddressViewState].
extension AddressViewStatePatterns on AddressViewState {
/// 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( _AddressViewState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AddressViewState() 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( _AddressViewState value) $default,){
final _that = this;
switch (_that) {
case _AddressViewState():
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( _AddressViewState value)? $default,){
final _that = this;
switch (_that) {
case _AddressViewState() 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 street, String city, String province, String state, String country, String countryCode, int postCode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AddressViewState() when $default != null:
return $default(_that.street,_that.city,_that.province,_that.state,_that.country,_that.countryCode,_that.postCode);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 street, String city, String province, String state, String country, String countryCode, int postCode) $default,) {final _that = this;
switch (_that) {
case _AddressViewState():
return $default(_that.street,_that.city,_that.province,_that.state,_that.country,_that.countryCode,_that.postCode);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 street, String city, String province, String state, String country, String countryCode, int postCode)? $default,) {final _that = this;
switch (_that) {
case _AddressViewState() when $default != null:
return $default(_that.street,_that.city,_that.province,_that.state,_that.country,_that.countryCode,_that.postCode);case _:
return null;
}
}
}
/// @nodoc
class _AddressViewState implements AddressViewState {
const _AddressViewState({this.street = '', this.city = '', this.province = '', this.state = '', this.country = '', this.countryCode = '', this.postCode = 0});
@override@JsonKey() final String street;
@override@JsonKey() final String city;
@override@JsonKey() final String province;
@override@JsonKey() final String state;
@override@JsonKey() final String country;
@override@JsonKey() final String countryCode;
@override@JsonKey() final int postCode;
/// Create a copy of AddressViewState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AddressViewStateCopyWith<_AddressViewState> get copyWith => __$AddressViewStateCopyWithImpl<_AddressViewState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AddressViewState&&(identical(other.street, street) || other.street == street)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.state, state) || other.state == state)&&(identical(other.country, country) || other.country == country)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.postCode, postCode) || other.postCode == postCode));
}
@override
int get hashCode => Object.hash(runtimeType,street,city,province,state,country,countryCode,postCode);
@override
String toString() {
return 'AddressViewState(street: $street, city: $city, province: $province, state: $state, country: $country, countryCode: $countryCode, postCode: $postCode)';
}
}
/// @nodoc
abstract mixin class _$AddressViewStateCopyWith<$Res> implements $AddressViewStateCopyWith<$Res> {
factory _$AddressViewStateCopyWith(_AddressViewState value, $Res Function(_AddressViewState) _then) = __$AddressViewStateCopyWithImpl;
@override @useResult
$Res call({
String street, String city, String province, String state, String country, String countryCode, int postCode
});
}
/// @nodoc
class __$AddressViewStateCopyWithImpl<$Res>
implements _$AddressViewStateCopyWith<$Res> {
__$AddressViewStateCopyWithImpl(this._self, this._then);
final _AddressViewState _self;
final $Res Function(_AddressViewState) _then;
/// Create a copy of AddressViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? street = null,Object? city = null,Object? province = null,Object? state = null,Object? country = null,Object? countryCode = null,Object? postCode = null,}) {
return _then(_AddressViewState(
street: null == street ? _self.street : street // ignore: cast_nullable_to_non_nullable
as String,city: null == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String,province: null == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as String,country: null == country ? _self.country : country // ignore: cast_nullable_to_non_nullable
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as String,postCode: null == postCode ? _self.postCode : postCode // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
mixin _$EditPersonalDataViewState {
bool get isLoading; bool get isSaving; bool get isSigning; bool get showPin; String get pin; String get firstName; String get lastName; String get dialCode; String get phoneNumber; String get nationality; AddressViewState get address; String get paymentProfileId; String get errorMessage; bool get saveSuccess;
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$EditPersonalDataViewStateCopyWith<EditPersonalDataViewState> get copyWith => _$EditPersonalDataViewStateCopyWithImpl<EditPersonalDataViewState>(this as EditPersonalDataViewState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is EditPersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSaving, isSaving) || other.isSaving == isSaving)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.dialCode, dialCode) || other.dialCode == dialCode)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.address, address) || other.address == address)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.saveSuccess, saveSuccess) || other.saveSuccess == saveSuccess));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isSaving,isSigning,showPin,pin,firstName,lastName,dialCode,phoneNumber,nationality,address,paymentProfileId,errorMessage,saveSuccess);
@override
String toString() {
return 'EditPersonalDataViewState(isLoading: $isLoading, isSaving: $isSaving, isSigning: $isSigning, showPin: $showPin, pin: $pin, firstName: $firstName, lastName: $lastName, dialCode: $dialCode, phoneNumber: $phoneNumber, nationality: $nationality, address: $address, paymentProfileId: $paymentProfileId, errorMessage: $errorMessage, saveSuccess: $saveSuccess)';
}
}
/// @nodoc
abstract mixin class $EditPersonalDataViewStateCopyWith<$Res> {
factory $EditPersonalDataViewStateCopyWith(EditPersonalDataViewState value, $Res Function(EditPersonalDataViewState) _then) = _$EditPersonalDataViewStateCopyWithImpl;
@useResult
$Res call({
bool isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String dialCode, String phoneNumber, String nationality, AddressViewState address, String paymentProfileId, String errorMessage, bool saveSuccess
});
$AddressViewStateCopyWith<$Res> get address;
}
/// @nodoc
class _$EditPersonalDataViewStateCopyWithImpl<$Res>
implements $EditPersonalDataViewStateCopyWith<$Res> {
_$EditPersonalDataViewStateCopyWithImpl(this._self, this._then);
final EditPersonalDataViewState _self;
final $Res Function(EditPersonalDataViewState) _then;
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? isSaving = null,Object? isSigning = null,Object? showPin = null,Object? pin = null,Object? firstName = null,Object? lastName = null,Object? dialCode = null,Object? phoneNumber = null,Object? nationality = null,Object? address = null,Object? paymentProfileId = null,Object? errorMessage = null,Object? saveSuccess = null,}) {
return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isSaving: null == isSaving ? _self.isSaving : isSaving // ignore: cast_nullable_to_non_nullable
as bool,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,showPin: null == showPin ? _self.showPin : showPin // ignore: cast_nullable_to_non_nullable
as bool,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,dialCode: null == dialCode ? _self.dialCode : dialCode // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable
as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as AddressViewState,paymentProfileId: null == paymentProfileId ? _self.paymentProfileId : paymentProfileId // ignore: cast_nullable_to_non_nullable
as String,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,saveSuccess: null == saveSuccess ? _self.saveSuccess : saveSuccess // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AddressViewStateCopyWith<$Res> get address {
return $AddressViewStateCopyWith<$Res>(_self.address, (value) {
return _then(_self.copyWith(address: value));
});
}
}
/// Adds pattern-matching-related methods to [EditPersonalDataViewState].
extension EditPersonalDataViewStatePatterns on EditPersonalDataViewState {
/// 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( _EditPersonalDataViewState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _EditPersonalDataViewState() 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( _EditPersonalDataViewState value) $default,){
final _that = this;
switch (_that) {
case _EditPersonalDataViewState():
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( _EditPersonalDataViewState value)? $default,){
final _that = this;
switch (_that) {
case _EditPersonalDataViewState() 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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String dialCode, String phoneNumber, String nationality, AddressViewState address, String paymentProfileId, String errorMessage, bool saveSuccess)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _EditPersonalDataViewState() when $default != null:
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.dialCode,_that.phoneNumber,_that.nationality,_that.address,_that.paymentProfileId,_that.errorMessage,_that.saveSuccess);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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String dialCode, String phoneNumber, String nationality, AddressViewState address, String paymentProfileId, String errorMessage, bool saveSuccess) $default,) {final _that = this;
switch (_that) {
case _EditPersonalDataViewState():
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.dialCode,_that.phoneNumber,_that.nationality,_that.address,_that.paymentProfileId,_that.errorMessage,_that.saveSuccess);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 isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String dialCode, String phoneNumber, String nationality, AddressViewState address, String paymentProfileId, String errorMessage, bool saveSuccess)? $default,) {final _that = this;
switch (_that) {
case _EditPersonalDataViewState() when $default != null:
return $default(_that.isLoading,_that.isSaving,_that.isSigning,_that.showPin,_that.pin,_that.firstName,_that.lastName,_that.dialCode,_that.phoneNumber,_that.nationality,_that.address,_that.paymentProfileId,_that.errorMessage,_that.saveSuccess);case _:
return null;
}
}
}
/// @nodoc
class _EditPersonalDataViewState implements EditPersonalDataViewState {
const _EditPersonalDataViewState({this.isLoading = true, this.isSaving = false, this.isSigning = false, this.showPin = false, this.pin = '', this.firstName = '', this.lastName = '', this.dialCode = '', this.phoneNumber = '', this.nationality = '', this.address = const AddressViewState(), this.paymentProfileId = '', this.errorMessage = '', this.saveSuccess = false});
@override@JsonKey() final bool isLoading;
@override@JsonKey() final bool isSaving;
@override@JsonKey() final bool isSigning;
@override@JsonKey() final bool showPin;
@override@JsonKey() final String pin;
@override@JsonKey() final String firstName;
@override@JsonKey() final String lastName;
@override@JsonKey() final String dialCode;
@override@JsonKey() final String phoneNumber;
@override@JsonKey() final String nationality;
@override@JsonKey() final AddressViewState address;
@override@JsonKey() final String paymentProfileId;
@override@JsonKey() final String errorMessage;
@override@JsonKey() final bool saveSuccess;
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$EditPersonalDataViewStateCopyWith<_EditPersonalDataViewState> get copyWith => __$EditPersonalDataViewStateCopyWithImpl<_EditPersonalDataViewState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EditPersonalDataViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSaving, isSaving) || other.isSaving == isSaving)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.showPin, showPin) || other.showPin == showPin)&&(identical(other.pin, pin) || other.pin == pin)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.dialCode, dialCode) || other.dialCode == dialCode)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.address, address) || other.address == address)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.saveSuccess, saveSuccess) || other.saveSuccess == saveSuccess));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,isSaving,isSigning,showPin,pin,firstName,lastName,dialCode,phoneNumber,nationality,address,paymentProfileId,errorMessage,saveSuccess);
@override
String toString() {
return 'EditPersonalDataViewState(isLoading: $isLoading, isSaving: $isSaving, isSigning: $isSigning, showPin: $showPin, pin: $pin, firstName: $firstName, lastName: $lastName, dialCode: $dialCode, phoneNumber: $phoneNumber, nationality: $nationality, address: $address, paymentProfileId: $paymentProfileId, errorMessage: $errorMessage, saveSuccess: $saveSuccess)';
}
}
/// @nodoc
abstract mixin class _$EditPersonalDataViewStateCopyWith<$Res> implements $EditPersonalDataViewStateCopyWith<$Res> {
factory _$EditPersonalDataViewStateCopyWith(_EditPersonalDataViewState value, $Res Function(_EditPersonalDataViewState) _then) = __$EditPersonalDataViewStateCopyWithImpl;
@override @useResult
$Res call({
bool isLoading, bool isSaving, bool isSigning, bool showPin, String pin, String firstName, String lastName, String dialCode, String phoneNumber, String nationality, AddressViewState address, String paymentProfileId, String errorMessage, bool saveSuccess
});
@override $AddressViewStateCopyWith<$Res> get address;
}
/// @nodoc
class __$EditPersonalDataViewStateCopyWithImpl<$Res>
implements _$EditPersonalDataViewStateCopyWith<$Res> {
__$EditPersonalDataViewStateCopyWithImpl(this._self, this._then);
final _EditPersonalDataViewState _self;
final $Res Function(_EditPersonalDataViewState) _then;
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? isSaving = null,Object? isSigning = null,Object? showPin = null,Object? pin = null,Object? firstName = null,Object? lastName = null,Object? dialCode = null,Object? phoneNumber = null,Object? nationality = null,Object? address = null,Object? paymentProfileId = null,Object? errorMessage = null,Object? saveSuccess = null,}) {
return _then(_EditPersonalDataViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,isSaving: null == isSaving ? _self.isSaving : isSaving // ignore: cast_nullable_to_non_nullable
as bool,isSigning: null == isSigning ? _self.isSigning : isSigning // ignore: cast_nullable_to_non_nullable
as bool,showPin: null == showPin ? _self.showPin : showPin // ignore: cast_nullable_to_non_nullable
as bool,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,dialCode: null == dialCode ? _self.dialCode : dialCode // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable
as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as AddressViewState,paymentProfileId: null == paymentProfileId ? _self.paymentProfileId : paymentProfileId // ignore: cast_nullable_to_non_nullable
as String,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,saveSuccess: null == saveSuccess ? _self.saveSuccess : saveSuccess // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of EditPersonalDataViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AddressViewStateCopyWith<$Res> get address {
return $AddressViewStateCopyWith<$Res>(_self.address, (value) {
return _then(_self.copyWith(address: value));
});
}
}
// dart format on

View File

@@ -221,7 +221,9 @@ class PayoutScreen extends ConsumerWidget {
),
),
subtitle: Text(
maskedIban,
beneficiary.bic.isNotEmpty
? '$maskedIban · ${beneficiary.bic}'
: maskedIban,
style: TextStyle(
fontSize: 12,
color: theme
@@ -279,6 +281,12 @@ class PayoutScreen extends ConsumerWidget {
label: context.translate(I18n.payoutHolderNameLabel),
hint: context.translate(I18n.payoutHolderNameHint),
),
const SizedBox(height: 16),
CustomTextField(
controller: viewModel.bicController,
label: 'BIC / SWIFT',
hint: 'XXXXXXXX',
),
const SizedBox(height: 24),
if (viewState.isSubmitting)
const Center(child: AppLoadingIndicator(size: 48))

View File

@@ -16,13 +16,14 @@ final payoutViewModelProvider =
);
class PayoutViewModel extends Notifier<PayoutViewState> {
late final TreezorWalletSignatureService _signatureService;
late final GetPaymentProfileUseCase _getPaymentProfileUseCase;
late final GetUserInfoUseCase _getUserInfoUseCase;
late TreezorWalletSignatureService _signatureService;
late GetPaymentProfileUseCase _getPaymentProfileUseCase;
late GetUserInfoUseCase _getUserInfoUseCase;
late final TextEditingController amountController;
late final TextEditingController ibanController;
late final TextEditingController holderNameController;
late TextEditingController amountController;
late TextEditingController ibanController;
late TextEditingController holderNameController;
late TextEditingController bicController;
@override
PayoutViewState build() {
@@ -33,10 +34,12 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
amountController = TextEditingController();
ibanController = TextEditingController();
holderNameController = TextEditingController();
bicController = TextEditingController();
amountController.addListener(_onAmountChanged);
ibanController.addListener(_onIbanChanged);
holderNameController.addListener(_onHolderNameChanged);
bicController.addListener(_onBicChanged);
ref.onDispose(disposeControllers);
@@ -49,9 +52,11 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
amountController.removeListener(_onAmountChanged);
ibanController.removeListener(_onIbanChanged);
holderNameController.removeListener(_onHolderNameChanged);
bicController.removeListener(_onBicChanged);
amountController.dispose();
ibanController.dispose();
holderNameController.dispose();
bicController.dispose();
}
void _onAmountChanged() {
@@ -66,6 +71,10 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
state = state.copyWith(holderName: holderNameController.text);
}
void _onBicChanged() {
state = state.copyWith(bic: bicController.text);
}
Future<void> _load() async {
try {
final user = await _getUserInfoUseCase.getUserInfo();
@@ -117,10 +126,12 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
void showAddBeneficiaryForm() {
ibanController.clear();
holderNameController.clear();
bicController.clear();
state = state.copyWith(
step: PayoutStep.addBeneficiary,
iban: '',
holderName: '',
bic: '',
errorMessage: '',
);
}
@@ -224,16 +235,22 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
try {
final url = 'https://savefamily.sandbox.treezor.co/v1/beneficiaries';
final scaBody = <String, dynamic>{
'name': state.holderName.trim(),
'userId': state.paymentProfileId,
'iban': state.iban.replaceAll(' ', ''),
'usableForSct': true,
};
if (state.bic.trim().isNotEmpty) {
scaBody['bic'] = state.bic.trim();
}
final scaInput = {
'url': url,
'body': scaBody,
};
final scaProof = await _signatureService.generateJwsWithPin(
message: '',
input: jsonEncode({
'url': url,
'body': {
'name': state.holderName.trim(),
'userId': state.paymentProfileId,
'iban': state.iban.trim(),
},
}),
input: jsonEncode(scaInput),
pin: state.pin,
);
@@ -243,7 +260,8 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
final treezorRepo = ref.read(treezorRepositoryProvider);
await treezorRepo.createTransactionBeneficiary(
name: state.holderName.trim(),
iban: state.iban.trim(),
iban: state.iban.replaceAll(' ', ''),
bic: state.bic.trim().isNotEmpty ? state.bic.trim() : null,
scaProof: scaProof,
);
@@ -296,7 +314,6 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
'beneficiaryValidationId': beneficiaryValidationId,
},
};
debugPrint('[Payout] SCA input: ${jsonEncode(scaInput)}');
final scaProof = await _signatureService.generateJwsWithPin(
message: '',
input: jsonEncode(scaInput),
@@ -307,7 +324,6 @@ class PayoutViewModel extends Notifier<PayoutViewState> {
state = state.copyWith(isSigning: false, isSubmitting: true);
await treezorRepo.walletTransfer(
walletId: state.walletId,
beneficiaryId: beneficiary.id,
beneficiaryValidationId: beneficiaryValidationId,
amount: amount,

View File

@@ -20,6 +20,7 @@ abstract class PayoutViewState with _$PayoutViewState {
PayoutBeneficiaryEntity? selectedBeneficiary,
@Default('') String iban,
@Default('') String holderName,
@Default('') String bic,
@Default('') String amount,
@Default('') String pin,
}) = _PayoutViewState;

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$PayoutViewState {
PayoutStep get step; bool get isLoading; bool get isSubmitting; bool get isSigning; String get errorMessage; String get walletId; String get paymentProfileId; double get availableBalance; List<PayoutBeneficiaryEntity> get beneficiaries; PayoutBeneficiaryEntity? get selectedBeneficiary; String get iban; String get holderName; String get amount; String get pin;
PayoutStep get step; bool get isLoading; bool get isSubmitting; bool get isSigning; String get errorMessage; String get walletId; String get paymentProfileId; double get availableBalance; List<PayoutBeneficiaryEntity> get beneficiaries; PayoutBeneficiaryEntity? get selectedBeneficiary; String get iban; String get holderName; String get bic; String get amount; String get pin;
/// Create a copy of PayoutViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $PayoutViewStateCopyWith<PayoutViewState> get copyWith => _$PayoutViewStateCopyW
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is PayoutViewState&&(identical(other.step, step) || other.step == step)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.availableBalance, availableBalance) || other.availableBalance == availableBalance)&&const DeepCollectionEquality().equals(other.beneficiaries, beneficiaries)&&(identical(other.selectedBeneficiary, selectedBeneficiary) || other.selectedBeneficiary == selectedBeneficiary)&&(identical(other.iban, iban) || other.iban == iban)&&(identical(other.holderName, holderName) || other.holderName == holderName)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.pin, pin) || other.pin == pin));
return identical(this, other) || (other.runtimeType == runtimeType&&other is PayoutViewState&&(identical(other.step, step) || other.step == step)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.availableBalance, availableBalance) || other.availableBalance == availableBalance)&&const DeepCollectionEquality().equals(other.beneficiaries, beneficiaries)&&(identical(other.selectedBeneficiary, selectedBeneficiary) || other.selectedBeneficiary == selectedBeneficiary)&&(identical(other.iban, iban) || other.iban == iban)&&(identical(other.holderName, holderName) || other.holderName == holderName)&&(identical(other.bic, bic) || other.bic == bic)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.pin, pin) || other.pin == pin));
}
@override
int get hashCode => Object.hash(runtimeType,step,isLoading,isSubmitting,isSigning,errorMessage,walletId,paymentProfileId,availableBalance,const DeepCollectionEquality().hash(beneficiaries),selectedBeneficiary,iban,holderName,amount,pin);
int get hashCode => Object.hash(runtimeType,step,isLoading,isSubmitting,isSigning,errorMessage,walletId,paymentProfileId,availableBalance,const DeepCollectionEquality().hash(beneficiaries),selectedBeneficiary,iban,holderName,bic,amount,pin);
@override
String toString() {
return 'PayoutViewState(step: $step, isLoading: $isLoading, isSubmitting: $isSubmitting, isSigning: $isSigning, errorMessage: $errorMessage, walletId: $walletId, paymentProfileId: $paymentProfileId, availableBalance: $availableBalance, beneficiaries: $beneficiaries, selectedBeneficiary: $selectedBeneficiary, iban: $iban, holderName: $holderName, amount: $amount, pin: $pin)';
return 'PayoutViewState(step: $step, isLoading: $isLoading, isSubmitting: $isSubmitting, isSigning: $isSigning, errorMessage: $errorMessage, walletId: $walletId, paymentProfileId: $paymentProfileId, availableBalance: $availableBalance, beneficiaries: $beneficiaries, selectedBeneficiary: $selectedBeneficiary, iban: $iban, holderName: $holderName, bic: $bic, amount: $amount, pin: $pin)';
}
@@ -45,7 +45,7 @@ abstract mixin class $PayoutViewStateCopyWith<$Res> {
factory $PayoutViewStateCopyWith(PayoutViewState value, $Res Function(PayoutViewState) _then) = _$PayoutViewStateCopyWithImpl;
@useResult
$Res call({
PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String amount, String pin
PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String bic, String amount, String pin
});
@@ -62,7 +62,7 @@ class _$PayoutViewStateCopyWithImpl<$Res>
/// Create a copy of PayoutViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? step = null,Object? isLoading = null,Object? isSubmitting = null,Object? isSigning = null,Object? errorMessage = null,Object? walletId = null,Object? paymentProfileId = null,Object? availableBalance = null,Object? beneficiaries = null,Object? selectedBeneficiary = freezed,Object? iban = null,Object? holderName = null,Object? amount = null,Object? pin = null,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? step = null,Object? isLoading = null,Object? isSubmitting = null,Object? isSigning = null,Object? errorMessage = null,Object? walletId = null,Object? paymentProfileId = null,Object? availableBalance = null,Object? beneficiaries = null,Object? selectedBeneficiary = freezed,Object? iban = null,Object? holderName = null,Object? bic = null,Object? amount = null,Object? pin = null,}) {
return _then(_self.copyWith(
step: null == step ? _self.step : step // ignore: cast_nullable_to_non_nullable
as PayoutStep,isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
@@ -76,6 +76,7 @@ as double,beneficiaries: null == beneficiaries ? _self.beneficiaries : beneficia
as List<PayoutBeneficiaryEntity>,selectedBeneficiary: freezed == selectedBeneficiary ? _self.selectedBeneficiary : selectedBeneficiary // ignore: cast_nullable_to_non_nullable
as PayoutBeneficiaryEntity?,iban: null == iban ? _self.iban : iban // ignore: cast_nullable_to_non_nullable
as String,holderName: null == holderName ? _self.holderName : holderName // ignore: cast_nullable_to_non_nullable
as String,bic: null == bic ? _self.bic : bic // ignore: cast_nullable_to_non_nullable
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as String,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,
@@ -175,10 +176,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String amount, String pin)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String bic, String amount, String pin)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _PayoutViewState() when $default != null:
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.amount,_that.pin);case _:
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.bic,_that.amount,_that.pin);case _:
return orElse();
}
@@ -196,10 +197,10 @@ return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_t
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String amount, String pin) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String bic, String amount, String pin) $default,) {final _that = this;
switch (_that) {
case _PayoutViewState():
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.amount,_that.pin);case _:
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.bic,_that.amount,_that.pin);case _:
throw StateError('Unexpected subclass');
}
@@ -216,10 +217,10 @@ return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_t
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String amount, String pin)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String bic, String amount, String pin)? $default,) {final _that = this;
switch (_that) {
case _PayoutViewState() when $default != null:
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.amount,_that.pin);case _:
return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_that.errorMessage,_that.walletId,_that.paymentProfileId,_that.availableBalance,_that.beneficiaries,_that.selectedBeneficiary,_that.iban,_that.holderName,_that.bic,_that.amount,_that.pin);case _:
return null;
}
@@ -231,7 +232,7 @@ return $default(_that.step,_that.isLoading,_that.isSubmitting,_that.isSigning,_t
class _PayoutViewState implements PayoutViewState {
const _PayoutViewState({this.step = PayoutStep.loading, this.isLoading = false, this.isSubmitting = false, this.isSigning = false, this.errorMessage = '', this.walletId = '', this.paymentProfileId = '', this.availableBalance = 0, final List<PayoutBeneficiaryEntity> beneficiaries = const [], this.selectedBeneficiary, this.iban = '', this.holderName = '', this.amount = '', this.pin = ''}): _beneficiaries = beneficiaries;
const _PayoutViewState({this.step = PayoutStep.loading, this.isLoading = false, this.isSubmitting = false, this.isSigning = false, this.errorMessage = '', this.walletId = '', this.paymentProfileId = '', this.availableBalance = 0, final List<PayoutBeneficiaryEntity> beneficiaries = const [], this.selectedBeneficiary, this.iban = '', this.holderName = '', this.bic = '', this.amount = '', this.pin = ''}): _beneficiaries = beneficiaries;
@override@JsonKey() final PayoutStep step;
@@ -252,6 +253,7 @@ class _PayoutViewState implements PayoutViewState {
@override final PayoutBeneficiaryEntity? selectedBeneficiary;
@override@JsonKey() final String iban;
@override@JsonKey() final String holderName;
@override@JsonKey() final String bic;
@override@JsonKey() final String amount;
@override@JsonKey() final String pin;
@@ -265,16 +267,16 @@ _$PayoutViewStateCopyWith<_PayoutViewState> get copyWith => __$PayoutViewStateCo
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PayoutViewState&&(identical(other.step, step) || other.step == step)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.availableBalance, availableBalance) || other.availableBalance == availableBalance)&&const DeepCollectionEquality().equals(other._beneficiaries, _beneficiaries)&&(identical(other.selectedBeneficiary, selectedBeneficiary) || other.selectedBeneficiary == selectedBeneficiary)&&(identical(other.iban, iban) || other.iban == iban)&&(identical(other.holderName, holderName) || other.holderName == holderName)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.pin, pin) || other.pin == pin));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PayoutViewState&&(identical(other.step, step) || other.step == step)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.isSigning, isSigning) || other.isSigning == isSigning)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&(identical(other.paymentProfileId, paymentProfileId) || other.paymentProfileId == paymentProfileId)&&(identical(other.availableBalance, availableBalance) || other.availableBalance == availableBalance)&&const DeepCollectionEquality().equals(other._beneficiaries, _beneficiaries)&&(identical(other.selectedBeneficiary, selectedBeneficiary) || other.selectedBeneficiary == selectedBeneficiary)&&(identical(other.iban, iban) || other.iban == iban)&&(identical(other.holderName, holderName) || other.holderName == holderName)&&(identical(other.bic, bic) || other.bic == bic)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.pin, pin) || other.pin == pin));
}
@override
int get hashCode => Object.hash(runtimeType,step,isLoading,isSubmitting,isSigning,errorMessage,walletId,paymentProfileId,availableBalance,const DeepCollectionEquality().hash(_beneficiaries),selectedBeneficiary,iban,holderName,amount,pin);
int get hashCode => Object.hash(runtimeType,step,isLoading,isSubmitting,isSigning,errorMessage,walletId,paymentProfileId,availableBalance,const DeepCollectionEquality().hash(_beneficiaries),selectedBeneficiary,iban,holderName,bic,amount,pin);
@override
String toString() {
return 'PayoutViewState(step: $step, isLoading: $isLoading, isSubmitting: $isSubmitting, isSigning: $isSigning, errorMessage: $errorMessage, walletId: $walletId, paymentProfileId: $paymentProfileId, availableBalance: $availableBalance, beneficiaries: $beneficiaries, selectedBeneficiary: $selectedBeneficiary, iban: $iban, holderName: $holderName, amount: $amount, pin: $pin)';
return 'PayoutViewState(step: $step, isLoading: $isLoading, isSubmitting: $isSubmitting, isSigning: $isSigning, errorMessage: $errorMessage, walletId: $walletId, paymentProfileId: $paymentProfileId, availableBalance: $availableBalance, beneficiaries: $beneficiaries, selectedBeneficiary: $selectedBeneficiary, iban: $iban, holderName: $holderName, bic: $bic, amount: $amount, pin: $pin)';
}
@@ -285,7 +287,7 @@ abstract mixin class _$PayoutViewStateCopyWith<$Res> implements $PayoutViewState
factory _$PayoutViewStateCopyWith(_PayoutViewState value, $Res Function(_PayoutViewState) _then) = __$PayoutViewStateCopyWithImpl;
@override @useResult
$Res call({
PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String amount, String pin
PayoutStep step, bool isLoading, bool isSubmitting, bool isSigning, String errorMessage, String walletId, String paymentProfileId, double availableBalance, List<PayoutBeneficiaryEntity> beneficiaries, PayoutBeneficiaryEntity? selectedBeneficiary, String iban, String holderName, String bic, String amount, String pin
});
@@ -302,7 +304,7 @@ class __$PayoutViewStateCopyWithImpl<$Res>
/// Create a copy of PayoutViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? step = null,Object? isLoading = null,Object? isSubmitting = null,Object? isSigning = null,Object? errorMessage = null,Object? walletId = null,Object? paymentProfileId = null,Object? availableBalance = null,Object? beneficiaries = null,Object? selectedBeneficiary = freezed,Object? iban = null,Object? holderName = null,Object? amount = null,Object? pin = null,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? step = null,Object? isLoading = null,Object? isSubmitting = null,Object? isSigning = null,Object? errorMessage = null,Object? walletId = null,Object? paymentProfileId = null,Object? availableBalance = null,Object? beneficiaries = null,Object? selectedBeneficiary = freezed,Object? iban = null,Object? holderName = null,Object? bic = null,Object? amount = null,Object? pin = null,}) {
return _then(_PayoutViewState(
step: null == step ? _self.step : step // ignore: cast_nullable_to_non_nullable
as PayoutStep,isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
@@ -316,6 +318,7 @@ as double,beneficiaries: null == beneficiaries ? _self._beneficiaries : benefici
as List<PayoutBeneficiaryEntity>,selectedBeneficiary: freezed == selectedBeneficiary ? _self.selectedBeneficiary : selectedBeneficiary // ignore: cast_nullable_to_non_nullable
as PayoutBeneficiaryEntity?,iban: null == iban ? _self.iban : iban // ignore: cast_nullable_to_non_nullable
as String,holderName: null == holderName ? _self.holderName : holderName // ignore: cast_nullable_to_non_nullable
as String,bic: null == bic ? _self.bic : bic // ignore: cast_nullable_to_non_nullable
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as String,pin: null == pin ? _self.pin : pin // ignore: cast_nullable_to_non_nullable
as String,

View File

@@ -155,6 +155,12 @@ class ProfileSettingsScreen extends ConsumerWidget {
),
),
const Spacer(),
TextButton(
onPressed: () => navigationContract.pushTo(
AppRoutes.dashboardProfileEditPersonalData,
),
child: Text(context.translate(I18n.profileSettingsEdit)),
),
],
),
_labelValue(context.translate(I18n.profileSettingsName), fullName),

View File

@@ -5,17 +5,19 @@ import 'package:url_launcher/url_launcher.dart';
export 'profile_settings_view_state.dart';
import 'profile_settings_view_state.dart';
final profileSettingsViewModelProvider = NotifierProvider.autoDispose<
ProfileSettingsViewModel, ProfileSettingsViewState>(
ProfileSettingsViewModel.new,
);
final profileSettingsViewModelProvider =
NotifierProvider.autoDispose<
ProfileSettingsViewModel,
ProfileSettingsViewState
>(ProfileSettingsViewModel.new);
class ProfileSettingsViewModel extends Notifier<ProfileSettingsViewState> {
late final GetUserInfoUseCase _getUserInfoUseCase;
late final GetPaymentProfileUseCase _getPaymentProfileUseCase;
late GetUserInfoUseCase _getUserInfoUseCase;
late GetPaymentProfileUseCase _getPaymentProfileUseCase;
@override
ProfileSettingsViewState build() {
ref.watch(walletRefreshProvider);
_getUserInfoUseCase = ref.read(getUserInfoUseCaseProvider);
_getPaymentProfileUseCase = ref.read(getPaymentProfileUseCaseProvider);
@@ -38,8 +40,9 @@ class ProfileSettingsViewModel extends Notifier<ProfileSettingsViewState> {
final user = await _getUserInfoUseCase.getUserInfo();
if (!ref.mounted) return;
final paymentProfile =
await _getPaymentProfileUseCase.getPaymentProfile(userId: user.id);
final paymentProfile = await _getPaymentProfileUseCase.getPaymentProfile(
userId: user.id,
);
if (!ref.mounted) return;
state = state.copyWith(
@@ -78,11 +81,7 @@ class ProfileSettingsViewModel extends Notifier<ProfileSettingsViewState> {
try {
final link = await ref
.read(treezorRepositoryProvider)
.getAccountStatement(
walletId: walletId,
year: year,
month: month,
);
.getAccountStatement(walletId: walletId, year: year, month: month);
await launchUrl(Uri.parse(link), mode: LaunchMode.externalApplication);
return null;
} catch (e) {

View File

@@ -131,12 +131,47 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
),
];
final transactions = viewState.transactions;
final hasTransactions = transactions.isNotEmpty;
final hasPages = viewState.transactionPages.isNotEmpty;
final currentTransactions = hasPages
? viewState.transactionPages[viewState.currentPage]
: <WalletTransactionEntity>[];
final itemCount = header.length
+ 1 // transactions title or empty message
+ (hasTransactions ? transactions.length : 0);
final content = [
...header,
if (!hasPages)
Center(
child: Text(
context.translate(I18n.profileNoRecentTransactions),
style: TextStyle(
fontSize: 14,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
)
else ...[
Text(
context.translate(I18n.profileRecentTransactions),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 18,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
...currentTransactions.map(
(tx) => TransactionTile(transaction: tx),
),
PaginationBar(
currentPage: viewState.currentPage,
totalPages: viewState.transactionPages.length,
hasMore: viewState.nextCursor != null,
isLoadingMore: viewState.isLoadingMore,
onPageChanged: (page) =>
ref.read(profileViewModelProvider.notifier).setPage(page),
onLoadMore: () =>
ref.read(profileViewModelProvider.notifier).loadMore(),
),
],
];
return Stack(
children: [
@@ -160,43 +195,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
ref.read(profileViewModelProvider.notifier).load(),
child: ListView.separated(
physics: const AlwaysScrollableScrollPhysics(),
itemCount: itemCount,
itemCount: content.length,
separatorBuilder: (_, __) =>
const Divider(color: Colors.transparent, height: 20),
itemBuilder: (context, index) {
// Header items
if (index < header.length) {
return header[index];
}
final offset = index - header.length;
// Transactions title or empty message
if (offset == 0) {
if (!hasTransactions) {
return Center(
child: Text(
context.translate(I18n.profileNoRecentTransactions),
style: TextStyle(
fontSize: 14,
color: theme.getColorFor(ThemeCode.textPrimary),
),
),
);
}
return Text(
context.translate(I18n.profileRecentTransactions),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 18,
color: theme.getColorFor(ThemeCode.textPrimary),
),
);
}
final txIndex = offset - 1;
return TransactionTile(transaction: transactions[txIndex]);
},
itemBuilder: (_, index) => content[index],
),
),
),

View File

@@ -43,7 +43,7 @@ class ProfileViewModel extends Notifier<ProfileViewState> {
dateFilter: DateFilter.lastWeek,
);
final transactions = await ref
final response = await ref
.read(walletTransactionsProvider(query).future);
if (!ref.mounted) return;
@@ -52,7 +52,8 @@ class ProfileViewModel extends Notifier<ProfileViewState> {
isLoading: false,
userName: name,
walletId: walletId,
transactions: transactions,
transactionPages: [response.items],
nextCursor: response.nextCursor,
);
} catch (e) {
if (!ref.mounted) return;
@@ -60,6 +61,36 @@ class ProfileViewModel extends Notifier<ProfileViewState> {
}
}
Future<void> loadMore() async {
if (state.isLoadingMore || state.nextCursor == null || state.walletId.isEmpty) return;
state = state.copyWith(isLoadingMore: true);
try {
final query = TransactionsQuery(
walletId: state.walletId,
dateFilter: DateFilter.lastWeek,
cursor: state.nextCursor,
);
final response = await ref.read(walletTransactionsProvider(query).future);
if (!ref.mounted) return;
state = state.copyWith(
isLoadingMore: false,
transactionPages: [...state.transactionPages, response.items],
nextCursor: response.nextCursor,
currentPage: state.transactionPages.length,
);
} catch (e) {
if (!ref.mounted) return;
state = state.copyWith(isLoadingMore: false);
}
}
void setPage(int page) {
state = state.copyWith(currentPage: page);
}
Future<void> retry() async {
await load();
}

View File

@@ -9,7 +9,10 @@ abstract class ProfileViewState with _$ProfileViewState {
@Default(false) bool isLoading,
@Default('') String userName,
@Default('') String walletId,
@Default([]) List<WalletTransactionEntity> transactions,
@Default([]) List<List<WalletTransactionEntity>> transactionPages,
String? nextCursor,
@Default(false) bool isLoadingMore,
@Default(0) int currentPage,
@Default('') String errorMessage,
}) = _ProfileViewState;
}

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ProfileViewState {
bool get isLoading; String get userName; String get walletId; List<WalletTransactionEntity> get transactions; String get errorMessage;
bool get isLoading; String get userName; String get walletId; List<List<WalletTransactionEntity>> get transactionPages; String? get nextCursor; bool get isLoadingMore; int get currentPage; String get errorMessage;
/// Create a copy of ProfileViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $ProfileViewStateCopyWith<ProfileViewState> get copyWith => _$ProfileViewStateCo
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.userName, userName) || other.userName == userName)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&const DeepCollectionEquality().equals(other.transactions, transactions)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.userName, userName) || other.userName == userName)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&const DeepCollectionEquality().equals(other.transactionPages, transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,userName,walletId,const DeepCollectionEquality().hash(transactions),errorMessage);
int get hashCode => Object.hash(runtimeType,isLoading,userName,walletId,const DeepCollectionEquality().hash(transactionPages),nextCursor,isLoadingMore,currentPage,errorMessage);
@override
String toString() {
return 'ProfileViewState(isLoading: $isLoading, userName: $userName, walletId: $walletId, transactions: $transactions, errorMessage: $errorMessage)';
return 'ProfileViewState(isLoading: $isLoading, userName: $userName, walletId: $walletId, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage, errorMessage: $errorMessage)';
}
@@ -45,7 +45,7 @@ abstract mixin class $ProfileViewStateCopyWith<$Res> {
factory $ProfileViewStateCopyWith(ProfileViewState value, $Res Function(ProfileViewState) _then) = _$ProfileViewStateCopyWithImpl;
@useResult
$Res call({
bool isLoading, String userName, String walletId, List<WalletTransactionEntity> transactions, String errorMessage
bool isLoading, String userName, String walletId, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage
});
@@ -62,13 +62,16 @@ class _$ProfileViewStateCopyWithImpl<$Res>
/// Create a copy of ProfileViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? userName = null,Object? walletId = null,Object? transactions = null,Object? errorMessage = null,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? userName = null,Object? walletId = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,Object? errorMessage = null,}) {
return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,userName: null == userName ? _self.userName : userName // ignore: cast_nullable_to_non_nullable
as String,walletId: null == walletId ? _self.walletId : walletId // ignore: cast_nullable_to_non_nullable
as String,transactions: null == transactions ? _self.transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,transactionPages: null == transactionPages ? _self.transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}
@@ -154,10 +157,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, String userName, String walletId, List<WalletTransactionEntity> transactions, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, String userName, String walletId, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ProfileViewState() when $default != null:
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
return orElse();
}
@@ -175,10 +178,10 @@ return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, String userName, String walletId, List<WalletTransactionEntity> transactions, String errorMessage) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, String userName, String walletId, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage) $default,) {final _that = this;
switch (_that) {
case _ProfileViewState():
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
throw StateError('Unexpected subclass');
}
@@ -195,10 +198,10 @@ return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, String userName, String walletId, List<WalletTransactionEntity> transactions, String errorMessage)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, String userName, String walletId, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage)? $default,) {final _that = this;
switch (_that) {
case _ProfileViewState() when $default != null:
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions,_that.errorMessage);case _:
return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactionPages,_that.nextCursor,_that.isLoadingMore,_that.currentPage,_that.errorMessage);case _:
return null;
}
@@ -210,19 +213,22 @@ return $default(_that.isLoading,_that.userName,_that.walletId,_that.transactions
class _ProfileViewState implements ProfileViewState {
const _ProfileViewState({this.isLoading = false, this.userName = '', this.walletId = '', final List<WalletTransactionEntity> transactions = const [], this.errorMessage = ''}): _transactions = transactions;
const _ProfileViewState({this.isLoading = false, this.userName = '', this.walletId = '', final List<List<WalletTransactionEntity>> transactionPages = const [], this.nextCursor, this.isLoadingMore = false, this.currentPage = 0, this.errorMessage = ''}): _transactionPages = transactionPages;
@override@JsonKey() final bool isLoading;
@override@JsonKey() final String userName;
@override@JsonKey() final String walletId;
final List<WalletTransactionEntity> _transactions;
@override@JsonKey() List<WalletTransactionEntity> get transactions {
if (_transactions is EqualUnmodifiableListView) return _transactions;
final List<List<WalletTransactionEntity>> _transactionPages;
@override@JsonKey() List<List<WalletTransactionEntity>> get transactionPages {
if (_transactionPages is EqualUnmodifiableListView) return _transactionPages;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_transactions);
return EqualUnmodifiableListView(_transactionPages);
}
@override final String? nextCursor;
@override@JsonKey() final bool isLoadingMore;
@override@JsonKey() final int currentPage;
@override@JsonKey() final String errorMessage;
/// Create a copy of ProfileViewState
@@ -235,16 +241,16 @@ _$ProfileViewStateCopyWith<_ProfileViewState> get copyWith => __$ProfileViewStat
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.userName, userName) || other.userName == userName)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&const DeepCollectionEquality().equals(other._transactions, _transactions)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfileViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.userName, userName) || other.userName == userName)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&const DeepCollectionEquality().equals(other._transactionPages, _transactionPages)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor)&&(identical(other.isLoadingMore, isLoadingMore) || other.isLoadingMore == isLoadingMore)&&(identical(other.currentPage, currentPage) || other.currentPage == currentPage)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,isLoading,userName,walletId,const DeepCollectionEquality().hash(_transactions),errorMessage);
int get hashCode => Object.hash(runtimeType,isLoading,userName,walletId,const DeepCollectionEquality().hash(_transactionPages),nextCursor,isLoadingMore,currentPage,errorMessage);
@override
String toString() {
return 'ProfileViewState(isLoading: $isLoading, userName: $userName, walletId: $walletId, transactions: $transactions, errorMessage: $errorMessage)';
return 'ProfileViewState(isLoading: $isLoading, userName: $userName, walletId: $walletId, transactionPages: $transactionPages, nextCursor: $nextCursor, isLoadingMore: $isLoadingMore, currentPage: $currentPage, errorMessage: $errorMessage)';
}
@@ -255,7 +261,7 @@ abstract mixin class _$ProfileViewStateCopyWith<$Res> implements $ProfileViewSta
factory _$ProfileViewStateCopyWith(_ProfileViewState value, $Res Function(_ProfileViewState) _then) = __$ProfileViewStateCopyWithImpl;
@override @useResult
$Res call({
bool isLoading, String userName, String walletId, List<WalletTransactionEntity> transactions, String errorMessage
bool isLoading, String userName, String walletId, List<List<WalletTransactionEntity>> transactionPages, String? nextCursor, bool isLoadingMore, int currentPage, String errorMessage
});
@@ -272,13 +278,16 @@ class __$ProfileViewStateCopyWithImpl<$Res>
/// Create a copy of ProfileViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? userName = null,Object? walletId = null,Object? transactions = null,Object? errorMessage = null,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? userName = null,Object? walletId = null,Object? transactionPages = null,Object? nextCursor = freezed,Object? isLoadingMore = null,Object? currentPage = null,Object? errorMessage = null,}) {
return _then(_ProfileViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,userName: null == userName ? _self.userName : userName // ignore: cast_nullable_to_non_nullable
as String,walletId: null == walletId ? _self.walletId : walletId // ignore: cast_nullable_to_non_nullable
as String,transactions: null == transactions ? _self._transactions : transactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionEntity>,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,transactionPages: null == transactionPages ? _self._transactionPages : transactionPages // ignore: cast_nullable_to_non_nullable
as List<List<WalletTransactionEntity>>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
as String?,isLoadingMore: null == isLoadingMore ? _self.isLoadingMore : isLoadingMore // ignore: cast_nullable_to_non_nullable
as bool,currentPage: null == currentPage ? _self.currentPage : currentPage // ignore: cast_nullable_to_non_nullable
as int,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}

View File

@@ -35,6 +35,7 @@ dependencies:
dio: ^5.9.0
#dependencies go here
country_code_picker: ^3.4.1
sealed_countries: ^2.8.0
freezed_annotation: ^3.0.0
flutter_riverpod: ^3.0.3

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:sf_shared/sf_shared.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'check_session_use_case.dart';
import 'initial_route.dart';
@@ -7,10 +8,22 @@ import 'initial_route.dart';
class CheckSessionUseCaseImpl implements CheckSessionUseCase {
CheckSessionUseCaseImpl(this._userRepository);
static const _onboardingSeenKey = 'onboarding_seen';
final UserRepository _userRepository;
@override
Future<InitialRoute> execute() async {
final prefs = await SharedPreferences.getInstance();
final onboardingSeen = prefs.getBool(_onboardingSeenKey) ?? false;
debugPrint('[CheckSession] onboardingSeen=$onboardingSeen');
if (!onboardingSeen) {
await prefs.setBool(_onboardingSeenKey, true);
debugPrint('[CheckSession] → onboarding');
return InitialRoute.onboarding;
}
try {
await _userRepository.getUserInfo();
return InitialRoute.home;

View File

@@ -1 +1 @@
enum InitialRoute { login, home }
enum InitialRoute { login, home, onboarding }

View File

@@ -53,6 +53,7 @@ class _SplashScreenState extends State<SplashScreen>
if (!_animationDone || _route == null || !mounted) return;
final destination = switch (_route!) {
InitialRoute.onboarding => AppRoutes.legacyOnboarding,
InitialRoute.login => AppRoutes.legacyLogin,
InitialRoute.home => AppRoutes.controlPanel,
};

View File

@@ -3,163 +3,163 @@
"packages": [
{
"name": "async",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.11.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.11.0",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "boolean_selector",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
"packageUri": "lib/",
"languageVersion": "2.17"
},
{
"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": "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": "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": "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": "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-4.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"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"
},
{
"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-4.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"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": "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": "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": "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.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.0",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"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": "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": "string_scanner",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.3.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.3.0",
"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.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"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": "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-14.3.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vm_service-14.3.0",
"packageUri": "lib/",
"languageVersion": "3.3"
},
@@ -172,7 +172,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"
}

View File

@@ -3,91 +3,91 @@
"packages": [
{
"name": "async",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.11.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.11.0",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "boolean_selector",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
"packageUri": "lib/",
"languageVersion": "2.17"
},
{
"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": "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": "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": "crypto",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.6",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/crypto-3.0.6",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "cupertino_icons",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/cupertino_icons-1.0.8",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "dio",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/dio-5.7.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio-5.7.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.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0",
"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"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": "file",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/file-7.0.0",
"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_driver",
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter_driver",
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_driver",
"packageUri": "lib/",
"languageVersion": "3.8"
},
{
"name": "flutter_lints",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_lints-4.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"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"
},
@@ -99,163 +99,163 @@
},
{
"name": "fuchsia_remote_debug_protocol",
"rootUri": "file:///C:/Program%20Files/Flutter/packages/fuchsia_remote_debug_protocol",
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/fuchsia_remote_debug_protocol",
"packageUri": "lib/",
"languageVersion": "3.8"
},
{
"name": "http_parser",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_parser-4.0.2",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "integration_test",
"rootUri": "file:///C:/Program%20Files/Flutter/packages/integration_test",
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/integration_test",
"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-4.0.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"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": "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": "platform",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.5",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/platform-3.1.5",
"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": "process",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/process-5.0.2",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/process-5.0.2",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"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.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.0",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"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": "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": "string_scanner",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.3.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.3.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "sync_http",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/sync_http-0.3.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/sync_http-0.3.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "term_glyph",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"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": "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": "vm_service",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-14.3.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vm_service-14.3.0",
"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"name": "web",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web-1.1.0",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "webdriver",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webdriver-3.0.4",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webdriver-3.0.4",
"packageUri": "lib/",
"languageVersion": "3.1"
},
@@ -268,7 +268,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"
}

View File

@@ -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":"integration_test","path":"C:\\\\Program Files\\\\Flutter\\\\packages\\\\integration_test\\\\","native_build":true,"dependencies":[],"dev_dependency":true}],"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":"integration_test","path":"C:\\\\Program Files\\\\Flutter\\\\packages\\\\integration_test\\\\","native_build":true,"dependencies":[],"dev_dependency":true}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"integration_test","dependencies":[]}],"date_created":"2026-03-16 09:33:20.855374","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":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"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":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"integration_test","dependencies":[]}],"date_created":"2026-03-13 09:49:17.301395","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}

View File

@@ -1,3 +1,3 @@
sdk.dir=C:\\dev\\sdk\\android
flutter.sdk=C:\\Program Files\\Flutter
sdk.dir=/Users/juliandalcalaf/Library/Android/sdk
flutter.sdk=/Users/juliandalcalaf/Development/flutter
flutter.buildMode=debug

View File

@@ -3,43 +3,43 @@
"packages": [
{
"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": "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": "flutter",
"rootUri": "file:///C:/Program%20Files/Flutter/packages/flutter",
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "3.8"
},
{
"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": "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": "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"
},
@@ -52,7 +52,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"
}

View File

@@ -1 +1 @@
3.35.6
3.35.7

View File

@@ -29,11 +29,15 @@ class AppRoutes {
'${childWallet(childWalletId)}/goals';
static String extract(String childWalletId) =>
'${childWallet(childWalletId)}/extract';
static String editChildProfile(String childWalletId) =>
'${childWallet(childWalletId)}/edit';
static const dashboardActivity = '$dashboard/activity';
static const dashboardNotifications = '$dashboard/notifications';
static const dashboardProfile = '$dashboard/profile';
static const dashboardProfileSettings = '$dashboardProfile/settings';
static const dashboardProfilePayout = '$dashboardProfile/payout';
static const dashboardProfileEditPersonalData =
'$dashboardProfileSettings/edit-personal-data';
static const dashboardProfilePaymentMethods =
'$dashboardProfileSettings/payment-methods';

View File

@@ -3,211 +3,211 @@
"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.6.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/analyzer-7.6.0",
"packageUri": "lib/",
"languageVersion": "3.5"
},
{
"name": "analyzer_buffer",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer_buffer-0.1.10",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/analyzer_buffer-0.1.10",
"packageUri": "lib/",
"languageVersion": "3.6"
},
{
"name": "analyzer_plugin",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer_plugin-0.13.4",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/analyzer_plugin-0.13.4",
"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": "ci",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/ci-0.1.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ci-0.1.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"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": "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": "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": "custom_lint",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/custom_lint-0.8.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/custom_lint-0.8.0",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "custom_lint_builder",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/custom_lint_builder-0.8.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/custom_lint_builder-0.8.0",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "custom_lint_core",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/custom_lint_core-0.8.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/custom_lint_core-0.8.0",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "custom_lint_visitor",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/custom_lint_visitor-1.0.0+7.7.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/custom_lint_visitor-1.0.0+7.7.0",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"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"
},
@@ -219,79 +219,79 @@
},
{
"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": "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": "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.0.3",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_riverpod-3.0.3",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"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"
},
{
"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"
},
@@ -303,163 +303,163 @@
},
{
"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": "hotreloader",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/hotreloader-4.3.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/hotreloader-4.3.0",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"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": "mockito",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/mockito-5.5.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/mockito-5.5.0",
"packageUri": "lib/",
"languageVersion": "3.7"
},
@@ -471,127 +471,127 @@
},
{
"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_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": "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.0.3",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod-3.0.3",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "riverpod_analyzer_utils",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/riverpod_analyzer_utils-1.0.0-dev.7",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod_analyzer_utils-1.0.0-dev.7",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "riverpod_annotation",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/riverpod_annotation-3.0.3",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod_annotation-3.0.3",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "riverpod_generator",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/riverpod_generator-3.0.3",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod_generator-3.0.3",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "riverpod_lint",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/riverpod_lint-3.0.3",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/riverpod_lint-3.0.3",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "rxdart",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/rxdart-0.28.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/rxdart-0.28.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
@@ -609,181 +609,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-3.1.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_gen-3.1.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"
},
@@ -795,85 +795,85 @@
},
{
"name": "uuid",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/uuid-4.5.2",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/uuid-4.5.2",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"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": "webview_flutter",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webview_flutter-4.13.1",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter-4.13.1",
"packageUri": "lib/",
"languageVersion": "3.8"
},
{
"name": "webview_flutter_android",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webview_flutter_android-4.10.11",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_android-4.10.11",
"packageUri": "lib/",
"languageVersion": "3.9"
},
{
"name": "webview_flutter_platform_interface",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webview_flutter_platform_interface-2.14.0",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_platform_interface-2.14.0",
"packageUri": "lib/",
"languageVersion": "3.6"
},
{
"name": "webview_flutter_wkwebview",
"rootUri": "file:///C:/Users/Aitor%20Arana/AppData/Local/Pub/Cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.6",
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.6",
"packageUri": "lib/",
"languageVersion": "3.9"
},
{
"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"
},
@@ -886,7 +886,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"
}

View File

@@ -1 +1 @@
3.35.6
3.35.7

View File

@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"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},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_wkwebview-3.23.6\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"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},{"name":"webview_flutter_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_android-4.10.11\\\\","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},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_wkwebview-3.23.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":"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"]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2026-03-16 09:33:26.998435","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":"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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"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},{"name":"webview_flutter_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_android-4.10.11/","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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.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":"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"]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2026-03-13 09:49:21.741790","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}

View File

@@ -21,18 +21,17 @@ class TreezorTokenInterceptor extends Interceptor {
_handling = true;
_onTokenExpired();
Future.delayed(const Duration(seconds: 2), () => _handling = false);
} else if (err.response?.statusCode == 500) {
_handling = true;
_onTokenExpired();
Future.delayed(const Duration(seconds: 2), () => _handling = false);
} else if (err.response?.statusCode == 401) {
_handling = true;
_onUnauthorized();
Future.delayed(const Duration(seconds: 2), () => _handling = false);
}
// else if (err.response?.statusCode == 401) {
// _handling = true;
// _onUnauthorized();
// Future.delayed(const Duration(seconds: 2), () => _handling = false);
// }
// } else if (err.response?.statusCode == 500) {
// _handling = true;
// _onTokenExpired();
// Future.delayed(const Duration(seconds: 2), () => _handling = false);
// }
}
handler.next(err);
}

View File

@@ -574,5 +574,24 @@
"wifiSsid": "Netzwerkname (SSID)",
"wifiBssid": "MAC-Adresse (BSSID)",
"wifiSsidHint": "z.B. MeinHeimWLAN",
"wifiBssidHint": "z.B. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "z.B. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Lastschrift",
"transactionBankTransfer": "Banküberweisung",
"transactionCardTopup": "Kartenaufladung",
"transactionCheck": "Scheck",
"transactionCreditNote": "Gutschrift",
"transactionFees": "Gebühren",
"transactionInstantBankTransfer": "Sofortüberweisung",
"transactionWalletTransfer": "Kontotransfer",
"editChildProfile": "Profil bearbeiten",
"editChildProfileSaveSuccess": "Kinderprofil erfolgreich aktualisiert",
"editChildProfileTitle": "Kinderprofil bearbeiten",
"deleteDeviceChecking": "Überprüfung...",
"deleteDeviceNotAllowedTitle": "Löschen nicht möglich",
"deleteDeviceWalletNonZeroBalance": "Das Profil kann nicht gelöscht werden, da das Wallet ein verfügbares Guthaben hat",
"profileSettingsCity": "Stadt",
"profileSettingsLastName": "Nachname",
"profileSettingsPostCode": "Postleitzahl",
"profileSettingsStreet": "Straße",
"profileSettingsSaveSuccess": "Änderungen erfolgreich gespeichert"
}

View File

@@ -683,5 +683,24 @@
"wifiSsid": "Network name (SSID)",
"wifiBssid": "MAC address (BSSID)",
"wifiSsidHint": "e.g. MyHomeWiFi",
"wifiBssidHint": "e.g. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "e.g. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Direct debit",
"transactionBankTransfer": "Bank transfer",
"transactionCardTopup": "Card top-up",
"transactionCheck": "Check",
"transactionCreditNote": "Credit note",
"transactionFees": "Fees",
"transactionInstantBankTransfer": "Instant transfer",
"transactionWalletTransfer": "Wallet transfer",
"editChildProfile": "Edit profile",
"editChildProfileSaveSuccess": "Child profile updated successfully",
"editChildProfileTitle": "Edit child profile",
"deleteDeviceChecking": "Checking...",
"deleteDeviceNotAllowedTitle": "Cannot delete",
"deleteDeviceWalletNonZeroBalance": "Cannot delete the profile because the wallet has a non-zero balance",
"profileSettingsCity": "City",
"profileSettingsLastName": "Last name",
"profileSettingsPostCode": "Post code",
"profileSettingsStreet": "Street",
"profileSettingsSaveSuccess": "Changes saved successfully"
}

View File

@@ -681,5 +681,24 @@
"wifiSsid": "Nombre de red (SSID)",
"wifiBssid": "Dirección MAC (BSSID)",
"wifiSsidHint": "ej. MiWiFiCasa",
"wifiBssidHint": "ej. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "ej. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Domiciliación bancaria",
"transactionBankTransfer": "Transferencia bancaria",
"transactionCardTopup": "Recarga con tarjeta",
"transactionCheck": "Cheque",
"transactionCreditNote": "Nota de crédito",
"transactionFees": "Comisiones",
"transactionInstantBankTransfer": "Transferencia instantánea",
"transactionWalletTransfer": "Transferencia entre cuentas",
"editChildProfile": "Editar perfil",
"editChildProfileSaveSuccess": "Perfil del niño actualizado correctamente",
"editChildProfileTitle": "Editar perfil del niño",
"deleteDeviceChecking": "Comprobando...",
"deleteDeviceNotAllowedTitle": "No se puede eliminar",
"deleteDeviceWalletNonZeroBalance": "No se puede eliminar el perfil porque la cartera tiene saldo disponible",
"profileSettingsCity": "Ciudad",
"profileSettingsLastName": "Apellido",
"profileSettingsPostCode": "Código postal",
"profileSettingsStreet": "Calle",
"profileSettingsSaveSuccess": "Cambios guardados correctamente"
}

View File

@@ -574,5 +574,24 @@
"wifiSsid": "Nom du réseau (SSID)",
"wifiBssid": "Adresse MAC (BSSID)",
"wifiSsidHint": "ex. MonWiFiMaison",
"wifiBssidHint": "ex. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "ex. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Prélèvement bancaire",
"transactionBankTransfer": "Virement bancaire",
"transactionCardTopup": "Rechargement par carte",
"transactionCheck": "Chèque",
"transactionCreditNote": "Avoir",
"transactionFees": "Frais",
"transactionInstantBankTransfer": "Virement instantané",
"transactionWalletTransfer": "Transfert entre comptes",
"editChildProfile": "Modifier le profil",
"editChildProfileSaveSuccess": "Profil de l'enfant mis à jour avec succès",
"editChildProfileTitle": "Modifier le profil de l'enfant",
"deleteDeviceChecking": "Vérification...",
"deleteDeviceNotAllowedTitle": "Suppression impossible",
"deleteDeviceWalletNonZeroBalance": "Impossible de supprimer le profil car le portefeuille a un solde disponible",
"profileSettingsCity": "Ville",
"profileSettingsLastName": "Nom de famille",
"profileSettingsPostCode": "Code postal",
"profileSettingsStreet": "Rue",
"profileSettingsSaveSuccess": "Modifications enregistrées avec succès"
}

View File

@@ -574,5 +574,24 @@
"wifiSsid": "Nome rete (SSID)",
"wifiBssid": "Indirizzo MAC (BSSID)",
"wifiSsidHint": "es. MiaReteCasa",
"wifiBssidHint": "es. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "es. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Addebito diretto",
"transactionBankTransfer": "Bonifico bancario",
"transactionCardTopup": "Ricarica con carta",
"transactionCheck": "Assegno",
"transactionCreditNote": "Nota di credito",
"transactionFees": "Commissioni",
"transactionInstantBankTransfer": "Bonifico istantaneo",
"transactionWalletTransfer": "Trasferimento tra conti",
"editChildProfile": "Modifica profilo",
"editChildProfileSaveSuccess": "Profilo del bambino aggiornato con successo",
"editChildProfileTitle": "Modifica profilo del bambino",
"deleteDeviceChecking": "Verifica in corso...",
"deleteDeviceNotAllowedTitle": "Impossibile eliminare",
"deleteDeviceWalletNonZeroBalance": "Impossibile eliminare il profilo perché il portafoglio ha un saldo disponibile",
"profileSettingsCity": "Città",
"profileSettingsLastName": "Cognome",
"profileSettingsPostCode": "Codice postale",
"profileSettingsStreet": "Via",
"profileSettingsSaveSuccess": "Modifiche salvate con successo"
}

View File

@@ -574,5 +574,24 @@
"wifiSsid": "Nome da rede (SSID)",
"wifiBssid": "Endereço MAC (BSSID)",
"wifiSsidHint": "ex. MinhaRedeWiFi",
"wifiBssidHint": "ex. 0c:80:63:e4:cb:e1"
"wifiBssidHint": "ex. 0c:80:63:e4:cb:e1",
"transactionBankDirectDebit": "Débito direto",
"transactionBankTransfer": "Transferência bancária",
"transactionCardTopup": "Carregamento com cartão",
"transactionCheck": "Cheque",
"transactionCreditNote": "Nota de crédito",
"transactionFees": "Taxas",
"transactionInstantBankTransfer": "Transferência instantânea",
"transactionWalletTransfer": "Transferência entre contas",
"editChildProfile": "Editar perfil",
"editChildProfileSaveSuccess": "Perfil da criança atualizado com sucesso",
"editChildProfileTitle": "Editar perfil da criança",
"deleteDeviceChecking": "A verificar...",
"deleteDeviceNotAllowedTitle": "Não é possível eliminar",
"deleteDeviceWalletNonZeroBalance": "Não é possível eliminar o perfil porque a carteira tem saldo disponível",
"profileSettingsCity": "Cidade",
"profileSettingsLastName": "Apelido",
"profileSettingsPostCode": "Código postal",
"profileSettingsStreet": "Rua",
"profileSettingsSaveSuccess": "Alterações guardadas com sucesso"
}

View File

@@ -807,4 +807,23 @@ class I18n {
static const String wifiBssid = 'wifiBssid';
static const String wifiSsidHint = 'wifiSsidHint';
static const String wifiBssidHint = 'wifiBssidHint';
static const String transactionBankDirectDebit = 'transactionBankDirectDebit';
static const String transactionBankTransfer = 'transactionBankTransfer';
static const String transactionCardTopup = 'transactionCardTopup';
static const String transactionCheck = 'transactionCheck';
static const String transactionCreditNote = 'transactionCreditNote';
static const String transactionFees = 'transactionFees';
static const String transactionInstantBankTransfer = 'transactionInstantBankTransfer';
static const String transactionWalletTransfer = 'transactionWalletTransfer';
static const String editChildProfile = 'editChildProfile';
static const String editChildProfileSaveSuccess = 'editChildProfileSaveSuccess';
static const String editChildProfileTitle = 'editChildProfileTitle';
static const String deleteDeviceChecking = 'deleteDeviceChecking';
static const String deleteDeviceNotAllowedTitle = 'deleteDeviceNotAllowedTitle';
static const String deleteDeviceWalletNonZeroBalance = 'deleteDeviceWalletNonZeroBalance';
static const String profileSettingsCity = 'profileSettingsCity';
static const String profileSettingsLastName = 'profileSettingsLastName';
static const String profileSettingsPostCode = 'profileSettingsPostCode';
static const String profileSettingsStreet = 'profileSettingsStreet';
static const String profileSettingsSaveSuccess = 'profileSettingsSaveSuccess';
}

View File

@@ -16,6 +16,7 @@ export 'src/domain/entities/payment_profile_entity.dart';
export 'src/domain/use_cases/get_payment_profile_use_case.dart';
export 'src/providers/get_payment_profile_use_case_provider.dart';
export 'src/domain/entities/child_profile_entity.dart';
export 'src/domain/entities/child_profile_deletability_entity.dart';
export 'src/domain/entities/wallet_balance_entity.dart';
export 'src/domain/entities/wallet_transaction_entity.dart';
export 'src/domain/entities/user_entity.dart';

View File

@@ -7,7 +7,7 @@ import 'package:sf_shared/src/data/models/transaction_beneficiary_model.dart';
import 'package:sf_shared/src/data/models/wallet_balance_model.dart';
import 'package:sf_shared/src/data/models/wallet_card_model.dart';
import 'package:sf_shared/src/data/models/wallet_limits_model.dart';
import 'package:sf_shared/src/data/models/wallet_transaction_model.dart';
import 'package:sf_shared/src/data/models/wallet_operation_model.dart';
abstract class TreezorRemoteDatasource {
Future<ScaWalletsResponseModel> scaWallets();
@@ -20,7 +20,12 @@ abstract class TreezorRemoteDatasource {
required String userId,
});
Future<WalletTransactionsResponseModel> getWalletTransactions({
Future<PaymentProfileResponseModel> updatePaymentProfile({
required String paymentProfileId,
required Map<String, dynamic> body,
});
Future<WalletOperationsResponseModel> getWalletOperations({
required String walletId,
Map<String, dynamic>? queryParameters,
});
@@ -32,13 +37,13 @@ abstract class TreezorRemoteDatasource {
Future<TransactionBeneficiaryModel> createTransactionBeneficiary({
required String name,
required String iban,
String? bic,
required String scaProof,
});
Future<String> validateTransactionBeneficiary({required int beneficiaryId});
Future<void> walletTransfer({
required String walletId,
required int beneficiaryId,
required String beneficiaryValidationId,
required double amount,

View File

@@ -1,6 +1,5 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:dio/dio.dart';
import 'package:sf_infrastructure/sf_infrastructure.dart';
import 'package:sf_shared/src/data/models/child_wallet_model.dart';
@@ -12,7 +11,7 @@ import 'package:sf_shared/src/data/models/transaction_beneficiary_model.dart';
import 'package:sf_shared/src/data/models/wallet_balance_model.dart';
import 'package:sf_shared/src/data/models/wallet_card_model.dart';
import 'package:sf_shared/src/data/models/wallet_limits_model.dart';
import 'package:sf_shared/src/data/models/wallet_transaction_model.dart';
import 'package:sf_shared/src/data/models/wallet_operation_model.dart';
import 'treezor_remote_data_source.dart';
@@ -120,26 +119,53 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
}
@override
Future<WalletTransactionsResponseModel> getWalletTransactions({
Future<PaymentProfileResponseModel> updatePaymentProfile({
required String paymentProfileId,
required Map<String, dynamic> body,
}) async {
try {
final response = await _repository.put<Map<String, dynamic>>(
'/payment-profiles',
body: body,
);
final data = response.data;
if (data == null || data.isEmpty) {
throw Exception(
'Empty response from PUT /payment-profiles/$paymentProfileId',
);
}
return PaymentProfileResponseModel.fromJson(data);
} on DioException catch (error) {
throw _mapDioError(
error,
defaultMessage: 'Error in PUT /payment-profiles/$paymentProfileId',
);
}
}
@override
Future<WalletOperationsResponseModel> getWalletOperations({
required String walletId,
Map<String, dynamic>? queryParameters,
}) async {
try {
final response = await _repository.get<Map<String, dynamic>>(
'/wallets/$walletId/transactions',
'/wallets/$walletId/operations',
queryParameters: queryParameters,
);
final data = response.data;
if (data == null || data.isEmpty) {
throw Exception('Empty response from /wallets/$walletId/transactions');
throw Exception('Empty response from /wallets/$walletId/operations');
}
return WalletTransactionsResponseModel.fromJson(data);
return WalletOperationsResponseModel.fromJson(data);
} on DioException catch (error) {
throw _mapDioError(
error,
defaultMessage: 'Error in /wallets/$walletId/transactions',
defaultMessage: 'Error in /wallets/$walletId/operations',
);
}
}
@@ -183,16 +209,19 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
Future<TransactionBeneficiaryModel> createTransactionBeneficiary({
required String name,
required String iban,
String? bic,
required String scaProof,
}) async {
try {
final body = <String, dynamic>{
'name': name,
'iban': iban,
if (bic != null && bic.isNotEmpty) 'bic': bic,
'scaProof': scaProof,
};
final response = await _repository.post<Map<String, dynamic>>(
'/transaction-beneficiaries',
body: <String, dynamic>{
'name': name,
'iban': iban,
'scaProof': scaProof,
},
body: body,
);
final data = response.data;
@@ -236,7 +265,6 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
@override
Future<void> walletTransfer({
required String walletId,
required int beneficiaryId,
required String beneficiaryValidationId,
required double amount,
@@ -244,13 +272,11 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
}) async {
try {
final body = <String, dynamic>{
'walletId': walletId,
'target': beneficiaryId,
'beneficiaryValidationId': beneficiaryValidationId,
'amount': amount.toStringAsFixed(2),
'scaProof': scaProof,
};
debugPrint('[Payout] POST /wallets/transfer body: $body');
await _repository.post<void>('/wallets/transfer', body: body);
} on DioException catch (error) {
throw _mapDioError(error, defaultMessage: 'Error in /wallets/transfer');
@@ -512,7 +538,6 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
}) async {
try {
final body = limits.toJson()..removeWhere((_, v) => v == null);
debugPrint('setWalletLimits body: $body');
await _repository.post<void>('/wallets/$walletId/limits', body: body);
} on DioException catch (error) {
throw _mapDioError(

View File

@@ -1,3 +1,4 @@
import 'package:sf_shared/src/data/models/child_profile_deletability_model.dart';
import 'package:sf_shared/src/data/models/child_profile_response_model.dart';
import 'package:sf_shared/src/data/models/device_model.dart';
import 'package:sf_shared/src/data/models/user_response_model.dart';
@@ -5,6 +6,13 @@ import 'package:sf_shared/src/data/models/user_response_model.dart';
abstract class UserRemoteDatasource {
Future<UserModel> getUserInfo();
Future<ChildProfileResponseModel> getChildProfiles();
Future<ChildProfileDeletabilityModel> checkChildProfileDeletability({
required String childProfileId,
});
Future<DeviceModel> getDeviceByIdentificator({required String identificator});
Future<String> deleteDevice({required String deviceId});
Future<void> updateChildProfile({
required String childProfileId,
required Map<String, dynamic> body,
});
}

View File

@@ -1,6 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:sf_infrastructure/sf_infrastructure.dart';
import 'package:sf_shared/src/data/models/child_profile_deletability_model.dart';
import 'package:sf_shared/src/data/models/child_profile_response_model.dart';
import 'package:sf_shared/src/data/models/device_model.dart';
import 'package:sf_shared/src/data/models/user_response_model.dart';
@@ -45,6 +45,31 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
return ChildProfileResponseModel.fromJson(data);
}
@override
Future<ChildProfileDeletabilityModel> checkChildProfileDeletability({
required String childProfileId,
}) async {
try {
final response = await _repository.get<Map<String, dynamic>>(
'/child-profiles/$childProfileId/deletability',
);
final data = response.data;
if (data == null || data.isEmpty) {
throw Exception(
'Empty response from /child-profiles/$childProfileId/deletability',
);
}
final inner = data['item'] as Map<String, dynamic>? ?? data;
return ChildProfileDeletabilityModel.fromJson(inner);
} on DioException catch (error) {
final apiMsg = error.response?.data;
final msg = apiMsg is String
? apiMsg
: (error.message ?? 'Error checking child profile deletability');
throw Exception(msg);
}
}
@override
Future<DeviceModel> getDeviceByIdentificator({
required String identificator,
@@ -54,7 +79,6 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
'/devices/identificator/$identificator',
);
final data = response.data;
debugPrint('Response from /devices/identificator/$identificator: $data');
if (data == null || data.isEmpty) {
throw Exception(
'Empty response from /devices/identificator/$identificator',
@@ -73,6 +97,25 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
}
}
@override
Future<void> updateChildProfile({
required String childProfileId,
required Map<String, dynamic> body,
}) async {
try {
await _repository.put<Map<String, dynamic>>(
'/child-profiles/$childProfileId',
body: body,
);
} on DioException catch (error) {
final apiMsg = error.response?.data;
final msg = apiMsg is String
? apiMsg
: (error.message ?? 'Error updating child profile');
throw Exception(msg);
}
}
@override
Future<String> deleteDevice({required String deviceId}) async {
try {

View File

@@ -0,0 +1,27 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:sf_shared/src/domain/entities/child_profile_deletability_entity.dart';
part 'child_profile_deletability_model.freezed.dart';
part 'child_profile_deletability_model.g.dart';
@freezed
abstract class ChildProfileDeletabilityModel
with _$ChildProfileDeletabilityModel {
const factory ChildProfileDeletabilityModel({
required bool deletable,
@Default('') String reason,
}) = _ChildProfileDeletabilityModel;
factory ChildProfileDeletabilityModel.fromJson(Map<String, dynamic> json) =>
_$ChildProfileDeletabilityModelFromJson(json);
}
extension ChildProfileDeletabilityModelMapper
on ChildProfileDeletabilityModel {
ChildProfileDeletabilityEntity toEntity() {
return ChildProfileDeletabilityEntity(
isDeletable: deletable,
reason: reason,
);
}
}

View File

@@ -0,0 +1,280 @@
// 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 'child_profile_deletability_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ChildProfileDeletabilityModel {
bool get deletable; String get reason;
/// Create a copy of ChildProfileDeletabilityModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ChildProfileDeletabilityModelCopyWith<ChildProfileDeletabilityModel> get copyWith => _$ChildProfileDeletabilityModelCopyWithImpl<ChildProfileDeletabilityModel>(this as ChildProfileDeletabilityModel, _$identity);
/// Serializes this ChildProfileDeletabilityModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChildProfileDeletabilityModel&&(identical(other.deletable, deletable) || other.deletable == deletable)&&(identical(other.reason, reason) || other.reason == reason));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,deletable,reason);
@override
String toString() {
return 'ChildProfileDeletabilityModel(deletable: $deletable, reason: $reason)';
}
}
/// @nodoc
abstract mixin class $ChildProfileDeletabilityModelCopyWith<$Res> {
factory $ChildProfileDeletabilityModelCopyWith(ChildProfileDeletabilityModel value, $Res Function(ChildProfileDeletabilityModel) _then) = _$ChildProfileDeletabilityModelCopyWithImpl;
@useResult
$Res call({
bool deletable, String reason
});
}
/// @nodoc
class _$ChildProfileDeletabilityModelCopyWithImpl<$Res>
implements $ChildProfileDeletabilityModelCopyWith<$Res> {
_$ChildProfileDeletabilityModelCopyWithImpl(this._self, this._then);
final ChildProfileDeletabilityModel _self;
final $Res Function(ChildProfileDeletabilityModel) _then;
/// Create a copy of ChildProfileDeletabilityModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? deletable = null,Object? reason = null,}) {
return _then(_self.copyWith(
deletable: null == deletable ? _self.deletable : deletable // ignore: cast_nullable_to_non_nullable
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [ChildProfileDeletabilityModel].
extension ChildProfileDeletabilityModelPatterns on ChildProfileDeletabilityModel {
/// 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( _ChildProfileDeletabilityModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel() 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( _ChildProfileDeletabilityModel value) $default,){
final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel():
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( _ChildProfileDeletabilityModel value)? $default,){
final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel() 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 deletable, String reason)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel() when $default != null:
return $default(_that.deletable,_that.reason);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 deletable, String reason) $default,) {final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel():
return $default(_that.deletable,_that.reason);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 deletable, String reason)? $default,) {final _that = this;
switch (_that) {
case _ChildProfileDeletabilityModel() when $default != null:
return $default(_that.deletable,_that.reason);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ChildProfileDeletabilityModel implements ChildProfileDeletabilityModel {
const _ChildProfileDeletabilityModel({required this.deletable, this.reason = ''});
factory _ChildProfileDeletabilityModel.fromJson(Map<String, dynamic> json) => _$ChildProfileDeletabilityModelFromJson(json);
@override final bool deletable;
@override@JsonKey() final String reason;
/// Create a copy of ChildProfileDeletabilityModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ChildProfileDeletabilityModelCopyWith<_ChildProfileDeletabilityModel> get copyWith => __$ChildProfileDeletabilityModelCopyWithImpl<_ChildProfileDeletabilityModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ChildProfileDeletabilityModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChildProfileDeletabilityModel&&(identical(other.deletable, deletable) || other.deletable == deletable)&&(identical(other.reason, reason) || other.reason == reason));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,deletable,reason);
@override
String toString() {
return 'ChildProfileDeletabilityModel(deletable: $deletable, reason: $reason)';
}
}
/// @nodoc
abstract mixin class _$ChildProfileDeletabilityModelCopyWith<$Res> implements $ChildProfileDeletabilityModelCopyWith<$Res> {
factory _$ChildProfileDeletabilityModelCopyWith(_ChildProfileDeletabilityModel value, $Res Function(_ChildProfileDeletabilityModel) _then) = __$ChildProfileDeletabilityModelCopyWithImpl;
@override @useResult
$Res call({
bool deletable, String reason
});
}
/// @nodoc
class __$ChildProfileDeletabilityModelCopyWithImpl<$Res>
implements _$ChildProfileDeletabilityModelCopyWith<$Res> {
__$ChildProfileDeletabilityModelCopyWithImpl(this._self, this._then);
final _ChildProfileDeletabilityModel _self;
final $Res Function(_ChildProfileDeletabilityModel) _then;
/// Create a copy of ChildProfileDeletabilityModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? deletable = null,Object? reason = null,}) {
return _then(_ChildProfileDeletabilityModel(
deletable: null == deletable ? _self.deletable : deletable // ignore: cast_nullable_to_non_nullable
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on

Some files were not shown because too many files have changed in this diff Show More