diff --git a/.dart_tool/extension_discovery/README.md b/.dart_tool/extension_discovery/README.md new file mode 100644 index 00000000..9dc6757b --- /dev/null +++ b/.dart_tool/extension_discovery/README.md @@ -0,0 +1,31 @@ +Extension Discovery Cache +========================= + +This folder is used by `package:extension_discovery` to cache lists of +packages that contains extensions for other packages. + +DO NOT USE THIS FOLDER +---------------------- + + * Do not read (or rely) the contents of this folder. + * Do write to this folder. + +If you're interested in the lists of extensions stored in this folder use the +API offered by package `extension_discovery` to get this information. + +If this package doesn't work for your use-case, then don't try to read the +contents of this folder. It may change, and will not remain stable. + +Use package `extension_discovery` +--------------------------------- + +If you want to access information from this folder. + +Feel free to delete this folder +------------------------------- + +Files in this folder act as a cache, and the cache is discarded if the files +are older than the modification time of `.dart_tool/package_config.json`. + +Hence, it should never be necessary to clear this cache manually, if you find a +need to do please file a bug. diff --git a/.dart_tool/extension_discovery/vs_code.json b/.dart_tool/extension_discovery/vs_code.json new file mode 100644 index 00000000..ae1a36a6 --- /dev/null +++ b/.dart_tool/extension_discovery/vs_code.json @@ -0,0 +1 @@ +{"version":2,"entries":[{"package":"sf_app_platform_mono_repo","rootUri":"../","packageUri":"lib/"}]} \ No newline at end of file diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 00000000..3b00a9d9 --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,364 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "ansi_styles", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ansi_styles-0.3.2+1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "args", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/args-2.7.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "async", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.13.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "characters", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/characters-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "charcode", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/charcode-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "checked_yaml", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/checked_yaml-2.0.4", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "cli_launcher", + "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:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cli_util-0.4.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "collection", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/collection-1.19.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "conventional_commit", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/conventional_commit-0.6.1+1", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "ffi", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/ffi-2.1.4", + "packageUri": "lib/", + "languageVersion": "3.7" + }, + { + "name": "file", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/file-7.0.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "flutter", + "rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "flutter_secure_storage", + "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:///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:///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:///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:///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:///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:///Users/juliandalcalaf/Development/flutter/packages/flutter_web_plugins", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "glob", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/glob-2.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "graphs", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/graphs-2.3.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "http", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http-1.5.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "http_parser", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_parser-4.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "io", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/io-1.0.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "js", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/js-0.6.7", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "json_annotation", + "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:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "melos", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/melos-6.3.3", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "meta", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/meta-1.16.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mustache_template", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/mustache_template-2.0.2", + "packageUri": "lib/", + "languageVersion": "3.7" + }, + { + "name": "path", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path-1.9.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "path_provider", + "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:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.20", + "packageUri": "lib/", + "languageVersion": "3.9" + }, + { + "name": "path_provider_foundation", + "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:///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:///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:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "platform", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/platform-3.1.6", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "plugin_platform_interface", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "pool", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pool-1.5.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "process", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/process-5.0.5", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "prompts", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/prompts-2.0.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pub_semver", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pub_semver-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "pub_updater", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pub_updater-0.5.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "pubspec_parse", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/pubspec_parse-1.5.0", + "packageUri": "lib/", + "languageVersion": "3.6" + }, + { + "name": "sky_engine", + "rootUri": "file:///Users/juliandalcalaf/Development/flutter/bin/cache/pkg/sky_engine", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "source_span", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "stack_trace", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stack_trace-1.12.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "string_scanner", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.4.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "term_glyph", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "typed_data", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vector_math", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_math-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "web", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "win32", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/win32-5.15.0", + "packageUri": "lib/", + "languageVersion": "3.8" + }, + { + "name": "xdg_directories", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "yaml", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/yaml-3.1.3", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "yaml_edit", + "rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/yaml_edit-2.2.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "sf_app_platform_mono_repo", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.0" + } + ], + "generator": "pub", + "generatorVersion": "3.9.2", + "flutterRoot": "file:///Users/juliandalcalaf/Development/flutter", + "flutterVersion": "3.35.7", + "pubCache": "file:///Users/juliandalcalaf/.pub-cache" +} diff --git a/.dart_tool/package_graph.json b/.dart_tool/package_graph.json new file mode 100644 index 00000000..c8198228 --- /dev/null +++ b/.dart_tool/package_graph.json @@ -0,0 +1,491 @@ +{ + "roots": [ + "sf_app_platform_mono_repo" + ], + "packages": [ + { + "name": "sf_app_platform_mono_repo", + "version": "0.0.0", + "dependencies": [ + "flutter_secure_storage" + ], + "devDependencies": [ + "melos" + ] + }, + { + "name": "flutter_secure_storage", + "version": "9.2.4", + "dependencies": [ + "flutter", + "flutter_secure_storage_linux", + "flutter_secure_storage_macos", + "flutter_secure_storage_platform_interface", + "flutter_secure_storage_web", + "flutter_secure_storage_windows", + "meta" + ] + }, + { + "name": "melos", + "version": "6.3.3", + "dependencies": [ + "ansi_styles", + "args", + "async", + "cli_launcher", + "cli_util", + "collection", + "conventional_commit", + "file", + "glob", + "graphs", + "http", + "meta", + "mustache_template", + "path", + "platform", + "pool", + "prompts", + "pub_semver", + "pub_updater", + "pubspec_parse", + "string_scanner", + "yaml", + "yaml_edit" + ] + }, + { + "name": "meta", + "version": "1.16.0", + "dependencies": [] + }, + { + "name": "flutter_secure_storage_windows", + "version": "3.1.2", + "dependencies": [ + "ffi", + "flutter", + "flutter_secure_storage_platform_interface", + "path", + "path_provider", + "win32" + ] + }, + { + "name": "flutter_secure_storage_web", + "version": "1.2.1", + "dependencies": [ + "flutter", + "flutter_secure_storage_platform_interface", + "flutter_web_plugins", + "js" + ] + }, + { + "name": "flutter_secure_storage_platform_interface", + "version": "1.1.2", + "dependencies": [ + "flutter", + "plugin_platform_interface" + ] + }, + { + "name": "flutter_secure_storage_macos", + "version": "3.1.3", + "dependencies": [ + "flutter", + "flutter_secure_storage_platform_interface" + ] + }, + { + "name": "flutter_secure_storage_linux", + "version": "1.2.3", + "dependencies": [ + "flutter", + "flutter_secure_storage_platform_interface" + ] + }, + { + "name": "flutter", + "version": "0.0.0", + "dependencies": [ + "characters", + "collection", + "material_color_utilities", + "meta", + "sky_engine", + "vector_math" + ] + }, + { + "name": "yaml_edit", + "version": "2.2.2", + "dependencies": [ + "collection", + "meta", + "source_span", + "yaml" + ] + }, + { + "name": "yaml", + "version": "3.1.3", + "dependencies": [ + "collection", + "source_span", + "string_scanner" + ] + }, + { + "name": "string_scanner", + "version": "1.4.1", + "dependencies": [ + "source_span" + ] + }, + { + "name": "pubspec_parse", + "version": "1.5.0", + "dependencies": [ + "checked_yaml", + "collection", + "json_annotation", + "pub_semver", + "yaml" + ] + }, + { + "name": "pub_updater", + "version": "0.5.0", + "dependencies": [ + "http", + "json_annotation", + "process", + "pub_semver" + ] + }, + { + "name": "pub_semver", + "version": "2.2.0", + "dependencies": [ + "collection" + ] + }, + { + "name": "prompts", + "version": "2.0.0", + "dependencies": [ + "charcode", + "io" + ] + }, + { + "name": "pool", + "version": "1.5.2", + "dependencies": [ + "async", + "stack_trace" + ] + }, + { + "name": "platform", + "version": "3.1.6", + "dependencies": [] + }, + { + "name": "path", + "version": "1.9.1", + "dependencies": [] + }, + { + "name": "mustache_template", + "version": "2.0.2", + "dependencies": [] + }, + { + "name": "http", + "version": "1.5.0", + "dependencies": [ + "async", + "http_parser", + "meta", + "web" + ] + }, + { + "name": "graphs", + "version": "2.3.2", + "dependencies": [ + "collection" + ] + }, + { + "name": "glob", + "version": "2.1.3", + "dependencies": [ + "async", + "collection", + "file", + "path", + "string_scanner" + ] + }, + { + "name": "file", + "version": "7.0.1", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "conventional_commit", + "version": "0.6.1+1", + "dependencies": [] + }, + { + "name": "collection", + "version": "1.19.1", + "dependencies": [] + }, + { + "name": "cli_util", + "version": "0.4.2", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "cli_launcher", + "version": "0.3.2+1", + "dependencies": [ + "path", + "yaml" + ] + }, + { + "name": "async", + "version": "2.13.0", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "args", + "version": "2.7.0", + "dependencies": [] + }, + { + "name": "ansi_styles", + "version": "0.3.2+1", + "dependencies": [] + }, + { + "name": "win32", + "version": "5.15.0", + "dependencies": [ + "ffi" + ] + }, + { + "name": "path_provider", + "version": "2.1.5", + "dependencies": [ + "flutter", + "path_provider_android", + "path_provider_foundation", + "path_provider_linux", + "path_provider_platform_interface", + "path_provider_windows" + ] + }, + { + "name": "ffi", + "version": "2.1.4", + "dependencies": [] + }, + { + "name": "js", + "version": "0.6.7", + "dependencies": [ + "meta" + ] + }, + { + "name": "flutter_web_plugins", + "version": "0.0.0", + "dependencies": [ + "flutter" + ] + }, + { + "name": "plugin_platform_interface", + "version": "2.1.8", + "dependencies": [ + "meta" + ] + }, + { + "name": "sky_engine", + "version": "0.0.0", + "dependencies": [] + }, + { + "name": "vector_math", + "version": "2.2.0", + "dependencies": [] + }, + { + "name": "material_color_utilities", + "version": "0.11.1", + "dependencies": [ + "collection" + ] + }, + { + "name": "characters", + "version": "1.4.0", + "dependencies": [] + }, + { + "name": "source_span", + "version": "1.10.1", + "dependencies": [ + "collection", + "path", + "term_glyph" + ] + }, + { + "name": "json_annotation", + "version": "4.9.0", + "dependencies": [ + "meta" + ] + }, + { + "name": "checked_yaml", + "version": "2.0.4", + "dependencies": [ + "json_annotation", + "source_span", + "yaml" + ] + }, + { + "name": "process", + "version": "5.0.5", + "dependencies": [ + "file", + "path", + "platform" + ] + }, + { + "name": "io", + "version": "1.0.5", + "dependencies": [ + "meta", + "path", + "string_scanner" + ] + }, + { + "name": "charcode", + "version": "1.4.0", + "dependencies": [] + }, + { + "name": "stack_trace", + "version": "1.12.1", + "dependencies": [ + "path" + ] + }, + { + "name": "web", + "version": "1.1.1", + "dependencies": [] + }, + { + "name": "http_parser", + "version": "4.1.2", + "dependencies": [ + "collection", + "source_span", + "string_scanner", + "typed_data" + ] + }, + { + "name": "path_provider_windows", + "version": "2.3.0", + "dependencies": [ + "ffi", + "flutter", + "path", + "path_provider_platform_interface" + ] + }, + { + "name": "path_provider_platform_interface", + "version": "2.1.2", + "dependencies": [ + "flutter", + "platform", + "plugin_platform_interface" + ] + }, + { + "name": "path_provider_linux", + "version": "2.2.1", + "dependencies": [ + "ffi", + "flutter", + "path", + "path_provider_platform_interface", + "xdg_directories" + ] + }, + { + "name": "path_provider_foundation", + "version": "2.4.3", + "dependencies": [ + "flutter", + "path_provider_platform_interface" + ] + }, + { + "name": "path_provider_android", + "version": "2.2.20", + "dependencies": [ + "flutter", + "path_provider_platform_interface" + ] + }, + { + "name": "term_glyph", + "version": "1.2.2", + "dependencies": [] + }, + { + "name": "typed_data", + "version": "1.4.0", + "dependencies": [ + "collection" + ] + }, + { + "name": "xdg_directories", + "version": "1.1.0", + "dependencies": [ + "meta", + "path" + ] + } + ], + "configVersion": 1 +} \ No newline at end of file diff --git a/.dart_tool/pub/bin/melos/melos.dart-3.9.2.snapshot b/.dart_tool/pub/bin/melos/melos.dart-3.9.2.snapshot new file mode 100644 index 00000000..4d144da8 Binary files /dev/null and b/.dart_tool/pub/bin/melos/melos.dart-3.9.2.snapshot differ diff --git a/.dart_tool/pub/workspace_ref.json b/.dart_tool/pub/workspace_ref.json new file mode 100644 index 00000000..308baae2 --- /dev/null +++ b/.dart_tool/pub/workspace_ref.json @@ -0,0 +1,3 @@ +{ + "workspaceRoot": "../.." +} diff --git a/.dart_tool/version b/.dart_tool/version new file mode 100644 index 00000000..e119acda --- /dev/null +++ b/.dart_tool/version @@ -0,0 +1 @@ +3.35.7 \ No newline at end of file diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 00000000..13ad00d0 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_macos","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2025-11-10 13:39:20.696891","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..2408ee7f --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +sf-app-platform \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..48de06f6 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_bootstrap.xml b/.idea/runConfigurations/melos_bootstrap.xml new file mode 100644 index 00000000..0365420f --- /dev/null +++ b/.idea/runConfigurations/melos_bootstrap.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.idea/runConfigurations/melos_clean.xml b/.idea/runConfigurations/melos_clean.xml new file mode 100644 index 00000000..82bd9567 --- /dev/null +++ b/.idea/runConfigurations/melos_clean.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.idea/runConfigurations/melos_flutter_run_sf_app_platform.xml b/.idea/runConfigurations/melos_flutter_run_sf_app_platform.xml new file mode 100644 index 00000000..e2a9ffba --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_run_sf_app_platform.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_auth.xml b/.idea/runConfigurations/melos_flutter_test_auth.xml new file mode 100644 index 00000000..7ccb196b --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_auth.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_dashboard_shell.xml b/.idea/runConfigurations/melos_flutter_test_dashboard_shell.xml new file mode 100644 index 00000000..368577a4 --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_dashboard_shell.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_design_system.xml b/.idea/runConfigurations/melos_flutter_test_design_system.xml new file mode 100644 index 00000000..5f9f3264 --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_design_system.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_home.xml b/.idea/runConfigurations/melos_flutter_test_home.xml new file mode 100644 index 00000000..745b2563 --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_home.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_notifications.xml b/.idea/runConfigurations/melos_flutter_test_notifications.xml new file mode 100644 index 00000000..dbb9e750 --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_notifications.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_profile.xml b/.idea/runConfigurations/melos_flutter_test_profile.xml new file mode 100644 index 00000000..d725a00e --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_profile.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_sf_shared.xml b/.idea/runConfigurations/melos_flutter_test_sf_shared.xml new file mode 100644 index 00000000..0f8426a0 --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_sf_shared.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_flutter_test_utils.xml b/.idea/runConfigurations/melos_flutter_test_utils.xml new file mode 100644 index 00000000..4a2783eb --- /dev/null +++ b/.idea/runConfigurations/melos_flutter_test_utils.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/melos_run_bootstrap.xml b/.idea/runConfigurations/melos_run_bootstrap.xml new file mode 100644 index 00000000..10011a79 --- /dev/null +++ b/.idea/runConfigurations/melos_run_bootstrap.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..7f88519d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "sf_app_platform", + "cwd": "apps/mobile_app", + "request": "launch", + "type": "dart", + // "toolArgs": [ + // "--dart-define=ELEVENLABS_API_KEY=sk_2351c16102e66b5b5c26d022d73e8af203fda111f60516f6", + // "--dart-define=ELEVENLABS_VOICE_ID=kaOF79CUr1VcYoAoVbqa" + // ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..487fdbe0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "dart.flutterSdkPath": "/Users/juliandalcalaf/Development/flutter", + "dart.sdkPath": "/Users/juliandalcalaf/Development/flutter/bin/cache/dart-sdk", + "dart.enableSdkFormatter": true, + "dart.analysisExcludedFolders": [ + "**/build", + "**/.dart_tool" + ], + "editor.formatOnSave": true, + "editor.tabSize": 2 +} \ No newline at end of file diff --git a/README.md b/README.md index e7cc6955..d9d0db10 100644 --- a/README.md +++ b/README.md @@ -1,16 +1 @@ -# sf-app-platform - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +# SF-APP-PLATFORM \ No newline at end of file diff --git a/.gitignore b/apps/mobile_app/.gitignore similarity index 100% rename from .gitignore rename to apps/mobile_app/.gitignore diff --git a/.metadata b/apps/mobile_app/.metadata similarity index 100% rename from .metadata rename to apps/mobile_app/.metadata diff --git a/apps/mobile_app/README.md b/apps/mobile_app/README.md new file mode 100644 index 00000000..e7cc6955 --- /dev/null +++ b/apps/mobile_app/README.md @@ -0,0 +1,16 @@ +# sf-app-platform + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/analysis_options.yaml b/apps/mobile_app/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to apps/mobile_app/analysis_options.yaml diff --git a/android/.gitignore b/apps/mobile_app/android/.gitignore similarity index 100% rename from android/.gitignore rename to apps/mobile_app/android/.gitignore diff --git a/android/app/build.gradle.kts b/apps/mobile_app/android/app/build.gradle.kts similarity index 100% rename from android/app/build.gradle.kts rename to apps/mobile_app/android/app/build.gradle.kts diff --git a/android/app/src/debug/AndroidManifest.xml b/apps/mobile_app/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to apps/mobile_app/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/apps/mobile_app/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to apps/mobile_app/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/savefamily/sf_payments/MainActivity.kt b/apps/mobile_app/android/app/src/main/kotlin/com/savefamily/sf_payments/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/savefamily/sf_payments/MainActivity.kt rename to apps/mobile_app/android/app/src/main/kotlin/com/savefamily/sf_payments/MainActivity.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/apps/mobile_app/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to apps/mobile_app/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/apps/mobile_app/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to apps/mobile_app/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/mobile_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/mobile_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/mobile_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/mobile_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/mobile_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/mobile_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/mobile_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/mobile_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/mobile_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/mobile_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/apps/mobile_app/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to apps/mobile_app/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/styles.xml b/apps/mobile_app/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to apps/mobile_app/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/apps/mobile_app/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to apps/mobile_app/android/app/src/profile/AndroidManifest.xml diff --git a/android/build.gradle.kts b/apps/mobile_app/android/build.gradle.kts similarity index 100% rename from android/build.gradle.kts rename to apps/mobile_app/android/build.gradle.kts diff --git a/android/gradle.properties b/apps/mobile_app/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to apps/mobile_app/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/apps/mobile_app/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to apps/mobile_app/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle.kts b/apps/mobile_app/android/settings.gradle.kts similarity index 100% rename from android/settings.gradle.kts rename to apps/mobile_app/android/settings.gradle.kts diff --git a/assets/images/ui/ahorros.svg b/apps/mobile_app/assets/images/ui/ahorros.svg similarity index 100% rename from assets/images/ui/ahorros.svg rename to apps/mobile_app/assets/images/ui/ahorros.svg diff --git a/assets/images/ui/banco.svg b/apps/mobile_app/assets/images/ui/banco.svg similarity index 100% rename from assets/images/ui/banco.svg rename to apps/mobile_app/assets/images/ui/banco.svg diff --git a/assets/images/ui/bienvenida_paso1.svg b/apps/mobile_app/assets/images/ui/bienvenida_paso1.svg similarity index 100% rename from assets/images/ui/bienvenida_paso1.svg rename to apps/mobile_app/assets/images/ui/bienvenida_paso1.svg diff --git a/assets/images/ui/bienvenida_paso2.svg b/apps/mobile_app/assets/images/ui/bienvenida_paso2.svg similarity index 100% rename from assets/images/ui/bienvenida_paso2.svg rename to apps/mobile_app/assets/images/ui/bienvenida_paso2.svg diff --git a/assets/images/ui/bienvenida_paso3.svg b/apps/mobile_app/assets/images/ui/bienvenida_paso3.svg similarity index 100% rename from assets/images/ui/bienvenida_paso3.svg rename to apps/mobile_app/assets/images/ui/bienvenida_paso3.svg diff --git a/assets/images/ui/connection_error.svg b/apps/mobile_app/assets/images/ui/connection_error.svg similarity index 100% rename from assets/images/ui/connection_error.svg rename to apps/mobile_app/assets/images/ui/connection_error.svg diff --git a/assets/images/ui/face.svg b/apps/mobile_app/assets/images/ui/face.svg similarity index 100% rename from assets/images/ui/face.svg rename to apps/mobile_app/assets/images/ui/face.svg diff --git a/assets/images/ui/formulario.svg b/apps/mobile_app/assets/images/ui/formulario.svg similarity index 100% rename from assets/images/ui/formulario.svg rename to apps/mobile_app/assets/images/ui/formulario.svg diff --git a/assets/images/ui/logo_sf.svg b/apps/mobile_app/assets/images/ui/logo_sf.svg similarity index 100% rename from assets/images/ui/logo_sf.svg rename to apps/mobile_app/assets/images/ui/logo_sf.svg diff --git a/assets/images/ui/paypal.svg b/apps/mobile_app/assets/images/ui/paypal.svg similarity index 100% rename from assets/images/ui/paypal.svg rename to apps/mobile_app/assets/images/ui/paypal.svg diff --git a/assets/images/ui/qr.svg b/apps/mobile_app/assets/images/ui/qr.svg similarity index 100% rename from assets/images/ui/qr.svg rename to apps/mobile_app/assets/images/ui/qr.svg diff --git a/assets/images/ui/server_error.svg b/apps/mobile_app/assets/images/ui/server_error.svg similarity index 100% rename from assets/images/ui/server_error.svg rename to apps/mobile_app/assets/images/ui/server_error.svg diff --git a/assets/images/ui/tareas.svg b/apps/mobile_app/assets/images/ui/tareas.svg similarity index 100% rename from assets/images/ui/tareas.svg rename to apps/mobile_app/assets/images/ui/tareas.svg diff --git a/assets/images/ui/visa.svg b/apps/mobile_app/assets/images/ui/visa.svg similarity index 100% rename from assets/images/ui/visa.svg rename to apps/mobile_app/assets/images/ui/visa.svg diff --git a/apps/mobile_app/devtools_options.yaml b/apps/mobile_app/devtools_options.yaml new file mode 100644 index 00000000..fa0b357c --- /dev/null +++ b/apps/mobile_app/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/ios/.gitignore b/apps/mobile_app/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to apps/mobile_app/ios/.gitignore diff --git a/ios/Flutter/AppFrameworkInfo.plist b/apps/mobile_app/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from ios/Flutter/AppFrameworkInfo.plist rename to apps/mobile_app/ios/Flutter/AppFrameworkInfo.plist diff --git a/ios/Flutter/Debug.xcconfig b/apps/mobile_app/ios/Flutter/Debug.xcconfig similarity index 100% rename from ios/Flutter/Debug.xcconfig rename to apps/mobile_app/ios/Flutter/Debug.xcconfig diff --git a/ios/Flutter/Release.xcconfig b/apps/mobile_app/ios/Flutter/Release.xcconfig similarity index 100% rename from ios/Flutter/Release.xcconfig rename to apps/mobile_app/ios/Flutter/Release.xcconfig diff --git a/ios/Runner.xcodeproj/project.pbxproj b/apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from ios/Runner.xcodeproj/project.pbxproj rename to apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to apps/mobile_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/apps/mobile_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to apps/mobile_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/apps/mobile_app/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcworkspace/contents.xcworkspacedata rename to apps/mobile_app/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/apps/mobile_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to apps/mobile_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/apps/mobile_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to apps/mobile_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner/AppDelegate.swift b/apps/mobile_app/ios/Runner/AppDelegate.swift similarity index 100% rename from ios/Runner/AppDelegate.swift rename to apps/mobile_app/ios/Runner/AppDelegate.swift diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to apps/mobile_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/apps/mobile_app/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to apps/mobile_app/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/ios/Runner/Base.lproj/Main.storyboard b/apps/mobile_app/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to apps/mobile_app/ios/Runner/Base.lproj/Main.storyboard diff --git a/ios/Runner/Info.plist b/apps/mobile_app/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to apps/mobile_app/ios/Runner/Info.plist diff --git a/ios/Runner/Runner-Bridging-Header.h b/apps/mobile_app/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from ios/Runner/Runner-Bridging-Header.h rename to apps/mobile_app/ios/Runner/Runner-Bridging-Header.h diff --git a/ios/RunnerTests/RunnerTests.swift b/apps/mobile_app/ios/RunnerTests/RunnerTests.swift similarity index 100% rename from ios/RunnerTests/RunnerTests.swift rename to apps/mobile_app/ios/RunnerTests/RunnerTests.swift diff --git a/apps/mobile_app/lib/main.dart b/apps/mobile_app/lib/main.dart new file mode 100644 index 00000000..fc55dcc4 --- /dev/null +++ b/apps/mobile_app/lib/main.dart @@ -0,0 +1,49 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:design_system/design_system.dart'; +import 'package:sf_app_platform/navigation/app_router.dart'; +import 'package:navigation/navigation_module.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + navigationModule(); + configureAppRouter(); + themePackages(); + + runApp(const ProviderScope(child: PlatformApp())); +} + +class PlatformApp extends ConsumerWidget { + const PlatformApp({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + return MaterialApp.router( + title: 'SaveFamily', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Color(0xFF329E95)), + ), + routerConfig: appRouter, + debugShowCheckedModeBanner: false, + localizationsDelegates: const [ + SFLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + + supportedLocales: [for (final lang in supportedLanguages) Locale(lang)], + localeResolutionCallback: (locale, supportedLocales) { + if (locale == null) return supportedLocales.first; + for (var supportedLocale in supportedLocales) { + if (supportedLocale.languageCode == locale.languageCode) { + return supportedLocale; + } + } + return supportedLocales.first; + }, + ); + } +} diff --git a/apps/mobile_app/lib/navigation/app_router.dart b/apps/mobile_app/lib/navigation/app_router.dart new file mode 100644 index 00000000..29b62ad3 --- /dev/null +++ b/apps/mobile_app/lib/navigation/app_router.dart @@ -0,0 +1,94 @@ +import 'package:auth/auth.dart'; +import 'package:dashboard_shell/dashboard_builder.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:go_router/go_router.dart'; +import 'package:home/home.dart'; +import 'package:navigation/navigation.dart'; +import 'package:notifications/notifications.dart'; +import 'package:profile/profile.dart'; + +final GlobalKey rootNavigatorKey = GlobalKey(); + +late final GoRouter appRouter; + +void configureAppRouter() { + appRouter = GoRouter( + navigatorKey: rootNavigatorKey, + initialLocation: AppRoutes.login, + debugLogDiagnostics: true, + routes: [ + GoRoute( + path: AppRoutes.login, + name: 'login', + pageBuilder: LoginBuilder().buildPage, + ), + GoRoute( + path: AppRoutes.onboarding, + name: 'onboarding', + pageBuilder: OnboardingBuilder().buildPage, + ), + GoRoute( + path: AppRoutes.linkPhone, + name: 'link_phone', + pageBuilder: LinkPhoneBuilder().buildPage, + ), + GoRoute( + path: AppRoutes.phoneCode, + name: 'phone_code', + pageBuilder: PhoneCodeBuilder().buildPage, + ), + GoRoute( + path: AppRoutes.recoverPassword, + name: 'recover_password', + pageBuilder: RecoverPasswordBuilder().buildPage, + ), + + StatefulShellRoute.indexedStack( + builder: (context, state, navShell) { + return DashboardBuilder().build(context, navShell); + }, + branches: [ + StatefulShellBranch( + routes: [ + GoRoute( + path: AppRoutes.dashboardHome, + name: 'home', + pageBuilder: const HomeBuilder().buildPage, + ), + ], + ), + StatefulShellBranch( + routes: [ + GoRoute( + path: AppRoutes.dashboardActivity, + name: 'activity', + pageBuilder: const ActivityBuilder().buildPage, + ), + ], + ), + StatefulShellBranch( + routes: [ + GoRoute( + path: AppRoutes.dashboardNotifications, + name: 'notifications', + pageBuilder: const NotificationsBuilder().buildPage, + ), + ], + ), + StatefulShellBranch( + routes: [ + GoRoute( + path: AppRoutes.dashboardProfile, + name: 'profile', + pageBuilder: const ProfileBuilder().buildPage, + ), + ], + ), + ], + ), + ], + ); + + GetIt.I().setRouter(appRouter); +} diff --git a/linux/.gitignore b/apps/mobile_app/linux/.gitignore similarity index 100% rename from linux/.gitignore rename to apps/mobile_app/linux/.gitignore diff --git a/linux/CMakeLists.txt b/apps/mobile_app/linux/CMakeLists.txt similarity index 100% rename from linux/CMakeLists.txt rename to apps/mobile_app/linux/CMakeLists.txt diff --git a/linux/flutter/CMakeLists.txt b/apps/mobile_app/linux/flutter/CMakeLists.txt similarity index 100% rename from linux/flutter/CMakeLists.txt rename to apps/mobile_app/linux/flutter/CMakeLists.txt diff --git a/linux/flutter/generated_plugin_registrant.cc b/apps/mobile_app/linux/flutter/generated_plugin_registrant.cc similarity index 100% rename from linux/flutter/generated_plugin_registrant.cc rename to apps/mobile_app/linux/flutter/generated_plugin_registrant.cc diff --git a/linux/flutter/generated_plugin_registrant.h b/apps/mobile_app/linux/flutter/generated_plugin_registrant.h similarity index 100% rename from linux/flutter/generated_plugin_registrant.h rename to apps/mobile_app/linux/flutter/generated_plugin_registrant.h diff --git a/linux/flutter/generated_plugins.cmake b/apps/mobile_app/linux/flutter/generated_plugins.cmake similarity index 100% rename from linux/flutter/generated_plugins.cmake rename to apps/mobile_app/linux/flutter/generated_plugins.cmake diff --git a/linux/runner/CMakeLists.txt b/apps/mobile_app/linux/runner/CMakeLists.txt similarity index 100% rename from linux/runner/CMakeLists.txt rename to apps/mobile_app/linux/runner/CMakeLists.txt diff --git a/linux/runner/main.cc b/apps/mobile_app/linux/runner/main.cc similarity index 100% rename from linux/runner/main.cc rename to apps/mobile_app/linux/runner/main.cc diff --git a/linux/runner/my_application.cc b/apps/mobile_app/linux/runner/my_application.cc similarity index 100% rename from linux/runner/my_application.cc rename to apps/mobile_app/linux/runner/my_application.cc diff --git a/linux/runner/my_application.h b/apps/mobile_app/linux/runner/my_application.h similarity index 100% rename from linux/runner/my_application.h rename to apps/mobile_app/linux/runner/my_application.h diff --git a/apps/mobile_app/pubspec.lock b/apps/mobile_app/pubspec.lock new file mode 100644 index 00000000..50d39056 --- /dev/null +++ b/apps/mobile_app/pubspec.lock @@ -0,0 +1,877 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + url: "https://pub.dev" + source: hosted + version: "85.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "974859dc0ff5f37bc4313244b3218c791810d03ab3470a579580279ba971a48d" + url: "https://pub.dev" + source: hosted + version: "7.7.1" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + auth: + dependency: "direct main" + description: + path: "../../modules/auth" + relative: true + source: path + version: "0.0.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: ce76b1d48875e3233fde17717c23d1f60a91cc631597e49a400c89b475395b1d + url: "https://pub.dev" + source: hosted + version: "3.1.0" + build_config: + dependency: transitive + description: + name: build_config + sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957 + url: "https://pub.dev" + source: hosted + version: "4.1.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: d1d57f7807debd7349b4726a19fd32ec8bc177c71ad0febf91a20f84cd2d4b46 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + build_runner: + dependency: "direct main" + description: + name: build_runner + sha256: b24597fceb695969d47025c958f3837f9f0122e237c6a22cb082a5ac66c3ca30 + url: "https://pub.dev" + source: hosted + version: "2.7.1" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "066dda7f73d8eb48ba630a55acb50c4a84a2e6b453b1cb4567f581729e794f7b" + url: "https://pub.dev" + source: hosted + version: "9.3.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: a30f0a0e38671e89a492c44d005b5545b830a961575bbd8336d42869ff71066d + url: "https://pub.dev" + source: hosted + version: "8.12.0" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" + source: hosted + version: "0.2.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" + url: "https://pub.dev" + source: hosted + version: "4.11.0" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" + source: hosted + version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + dashboard_shell: + dependency: "direct main" + description: + path: "../../modules/dashboard_shell" + relative: true + source: path + version: "0.0.1" + design_system: + dependency: "direct main" + description: + path: "../../packages/design_system" + relative: true + source: path + version: "0.0.1" + equatable: + dependency: transitive + description: + name: equatable + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" + url: "https://pub.dev" + source: hosted + version: "2.0.7" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + fl_chart: + dependency: transitive + description: + name: fl_chart + sha256: "7ca9a40f4eb85949190e54087be8b4d6ac09dc4c54238d782a34cf1f7c011de9" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_riverpod: + dependency: "direct main" + description: + name: flutter_riverpod + sha256: "9e2d6907f12cc7d23a846847615941bddee8709bf2bfd274acdf5e80bcf22fde" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: transitive + description: + name: freezed + sha256: "13065f10e135263a4f5a4391b79a8efc5fb8106f8dd555a9e49b750b45393d77" + url: "https://pub.dev" + source: hosted + version: "3.2.3" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: "84792561b731b6463d053e9761a5236da967c369da10b134b8585a5e18429956" + url: "https://pub.dev" + source: hosted + version: "9.0.5" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: c92d18e1fe994cb06d48aa786c46b142a5633067e8297cff6b5a3ac742620104 + url: "https://pub.dev" + source: hosted + version: "17.0.0" + go_router_builder: + dependency: "direct main" + description: + name: go_router_builder + sha256: e0646fb5586e04e1df92678f539059f38e4314848f06dd4f3cd87fed434e16b5 + url: "https://pub.dev" + source: hosted + version: "4.1.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + home: + dependency: "direct main" + description: + path: "../../modules/home" + relative: true + source: path + version: "0.0.1" + http: + dependency: transitive + description: + name: http + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 + url: "https://pub.dev" + source: hosted + version: "1.5.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + intl: + dependency: transitive + description: + name: intl + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" + source: hosted + version: "0.20.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + navigation: + dependency: "direct main" + description: + path: "../../packages/navigation" + relative: true + source: path + version: "0.0.1" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + notifications: + dependency: "direct main" + description: + path: "../../modules/notifications" + relative: true + source: path + version: "0.0.1" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + url: "https://pub.dev" + source: hosted + version: "7.0.1" + pool: + dependency: transitive + description: + name: pool + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" + url: "https://pub.dev" + source: hosted + version: "1.5.2" + profile: + dependency: "direct main" + description: + path: "../../modules/profile" + relative: true + source: path + version: "0.0.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + riverpod: + dependency: transitive + description: + name: riverpod + sha256: c406de02bff19d920b832bddfb8283548bfa05ce41c59afba57ce643e116aa59 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + sf_localizations: + dependency: "direct main" + description: + path: "../../packages/sf_localizations" + relative: true + source: path + version: "0.0.1" + sf_shared: + dependency: "direct overridden" + description: + path: "../../packages/sf_shared" + relative: true + source: path + version: "0.0.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "800f12fb87434defa13432ab37e33051b43b290a174e15259563b043cda40c46" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6a3c6cc82073a8797f8c4dc4572146114a39652851c157db37e964d9c7038723" + url: "https://pub.dev" + source: hosted + version: "1.3.8" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + state_notifier: + dependency: transitive + description: + name: state_notifier + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb + url: "https://pub.dev" + source: hosted + version: "1.0.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test: + dependency: transitive + description: + name: test + sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb" + url: "https://pub.dev" + source: hosted + version: "1.26.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + url: "https://pub.dev" + source: hosted + version: "0.7.6" + test_core: + dependency: transitive + description: + name: test_core + sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a" + url: "https://pub.dev" + source: hosted + version: "0.6.11" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + utils: + dependency: "direct overridden" + description: + path: "../../packages/utils" + relative: true + source: path + version: "0.0.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" + source: hosted + version: "15.0.2" + watcher: + dependency: transitive + description: + name: watcher + sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + xml: + dependency: transitive + description: + name: xml + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" + url: "https://pub.dev" + source: hosted + version: "6.6.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.9.2 <4.0.0" + flutter: ">=3.29.0" diff --git a/apps/mobile_app/pubspec.yaml b/apps/mobile_app/pubspec.yaml new file mode 100644 index 00000000..08cf42f3 --- /dev/null +++ b/apps/mobile_app/pubspec.yaml @@ -0,0 +1,115 @@ +name: sf_app_platform +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# 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 is used as CFBundleVersion. +# Read more about iOS versioning at +# 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 + +environment: + sdk: ^3.9.2 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + flutter_localizations: + sdk: flutter + flutter_riverpod: ^3.0.3 + get_it: ^9.0.5 + go_router: ^17.0.0 + + #modules dependencies go here + auth: + path: ../../modules/auth + home: + path: ../../modules/home + profile: + path: ../../modules/profile + notifications: + path: ../../modules/notifications + dashboard_shell: + path: ../../modules/dashboard_shell + + #packages dependencies go here + navigation: + path: ../../packages/navigation + design_system: + path: ../../packages/design_system + sf_localizations: + path: ../../packages/sf_localizations + + #dependencies go here + cupertino_icons: ^1.0.8 + flutter_svg: ^2.2.1 + go_router_builder: ^4.1.1 + build_runner: ^2.7.1 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + 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 + +# The following section is specific to Flutter packages. +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 assets to your application, add an assets section, like this: + assets: + - assets/images/ui/ + + # 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 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 diff --git a/apps/mobile_app/pubspec_overrides.yaml b/apps/mobile_app/pubspec_overrides.yaml new file mode 100644 index 00000000..95453ac6 --- /dev/null +++ b/apps/mobile_app/pubspec_overrides.yaml @@ -0,0 +1,22 @@ +# melos_managed_dependency_overrides: auth,dashboard_shell,design_system,home,navigation,notifications,profile,sf_shared,utils,sf_localizations +dependency_overrides: + auth: + path: ../../modules/auth + dashboard_shell: + path: ../../modules/dashboard_shell + design_system: + path: ../../packages/design_system + home: + path: ../../modules/home + navigation: + path: ../../packages/navigation + notifications: + path: ../../modules/notifications + profile: + path: ../../modules/profile + sf_localizations: + path: ../../packages/sf_localizations + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/test/widget_test.dart b/apps/mobile_app/test/widget_test.dart similarity index 100% rename from test/widget_test.dart rename to apps/mobile_app/test/widget_test.dart diff --git a/web/favicon.png b/apps/mobile_app/web/favicon.png similarity index 100% rename from web/favicon.png rename to apps/mobile_app/web/favicon.png diff --git a/web/icons/Icon-192.png b/apps/mobile_app/web/icons/Icon-192.png similarity index 100% rename from web/icons/Icon-192.png rename to apps/mobile_app/web/icons/Icon-192.png diff --git a/web/icons/Icon-512.png b/apps/mobile_app/web/icons/Icon-512.png similarity index 100% rename from web/icons/Icon-512.png rename to apps/mobile_app/web/icons/Icon-512.png diff --git a/web/icons/Icon-maskable-192.png b/apps/mobile_app/web/icons/Icon-maskable-192.png similarity index 100% rename from web/icons/Icon-maskable-192.png rename to apps/mobile_app/web/icons/Icon-maskable-192.png diff --git a/web/icons/Icon-maskable-512.png b/apps/mobile_app/web/icons/Icon-maskable-512.png similarity index 100% rename from web/icons/Icon-maskable-512.png rename to apps/mobile_app/web/icons/Icon-maskable-512.png diff --git a/web/index.html b/apps/mobile_app/web/index.html similarity index 100% rename from web/index.html rename to apps/mobile_app/web/index.html diff --git a/web/manifest.json b/apps/mobile_app/web/manifest.json similarity index 100% rename from web/manifest.json rename to apps/mobile_app/web/manifest.json diff --git a/lib/main.dart b/lib/main.dart deleted file mode 100644 index 8bf97999..00000000 --- a/lib/main.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:sf_app_platform/payments/apps/di_container.dart'; -import 'package:sf_app_platform/payments/domain/ports/theme_port.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart' hide Provider; - -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/account_created_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/add_kid_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/alert_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/errors/connection_error_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/errors/no_plan_error_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/errors/server_error_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/kid_wallet_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/link_phone_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/loading_google_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/loading_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/restore_password/restore_password_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/settings_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/welcome_screen.dart'; - -Future main() async { - // DI bootstrap - final di = await DiContainer.bootstrap(); - - runApp(PlatformApp(di: di)); -} - -class PlatformApp extends StatelessWidget { - final DiContainer di; - const PlatformApp({super.key, required this.di}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MultiProvider( - providers: [ - // Puertos (desde DI) - Provider.value(value: di.theme) - ], - child: ProviderScope(child: MaterialApp( - title: 'SaveFamily', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: ColorScheme.fromSeed(seedColor: Color(0xFF329E95)), - ), - home: DashboardScreen(), - )) - ); - } -} \ No newline at end of file diff --git a/lib/payments/apps/di_container.dart b/lib/payments/apps/di_container.dart deleted file mode 100644 index 8dea0bd3..00000000 --- a/lib/payments/apps/di_container.dart +++ /dev/null @@ -1,17 +0,0 @@ -import '../domain/ports/theme_port.dart'; -import '../infrastructure/adapteres/theme_adapter/theme_sf_adapter.dart'; - -class DiContainer{ - final ThemePort theme; - - DiContainer._({ - required this.theme - }); - - static Future bootstrap({Map? overrides}) async { - //assets y temas - final ThemePort theme = ThemeSfAdapter(); - - return DiContainer._(theme: theme); - } -} \ No newline at end of file diff --git a/lib/payments/domain/ports/theme_port.dart b/lib/payments/domain/ports/theme_port.dart deleted file mode 100644 index 7d4999c3..00000000 --- a/lib/payments/domain/ports/theme_port.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'dart:ui'; - -enum ThemeCode{ - background_primary, - background_secondary, - background_tertiary, - text_primary, - text_secondary, - text_tertiary, - button_primary, - button_secondary -} - -abstract class ThemePort { - late Map theme; - late List> cardColors; - - Color getColorFor(ThemeCode code){ - Color? c = theme[code]; - if (c == null) { - throw Exception("Theme key not found"); - } - return c; - } - - List getCardColorFor(int index){ - return cardColors[index % cardColors.length]; - } - -} \ No newline at end of file diff --git a/lib/payments/infrastructure/adapteres/theme_adapter/theme_sf_adapter.dart b/lib/payments/infrastructure/adapteres/theme_adapter/theme_sf_adapter.dart deleted file mode 100644 index 4d77b721..00000000 --- a/lib/payments/infrastructure/adapteres/theme_adapter/theme_sf_adapter.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'dart:collection'; -import 'dart:ui'; - -import 'package:flutter/material.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class ThemeSfAdapter extends ThemePort{ - - @override - Map theme = HashMap.from( - { - ThemeCode.background_primary: Color(0xFFFFFFFF), - ThemeCode.background_secondary: Color(0xFFF7F7F7), - ThemeCode.background_tertiary: Color(0x4D329E95), - ThemeCode.text_primary: Color(0xFF4B4B4B), - ThemeCode.text_secondary: Color(0xFFFFFFFF), - ThemeCode.text_tertiary: Color(0xFFE0E0E0), - ThemeCode.button_primary: Color(0xFF329e95), - ThemeCode.button_secondary: Color(0xFF4B4B4B) - } - ); - - @override - List> cardColors = [ - [ - Color(0xFFFA5C9F), - Color(0xFFEB2579), - Color(0xFFE60866), - ], - [ - Color(0xFF00A1C6), - Color(0xFF00819E), - ], - ]; - -} \ No newline at end of file diff --git a/lib/payments/view/screens/account_created_screen.dart b/lib/payments/view/screens/account_created_screen.dart deleted file mode 100644 index 4d63d2ef..00000000 --- a/lib/payments/view/screens/account_created_screen.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/add_kid_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; - -import '../../domain/ports/theme_port.dart'; - -class AccountCreatedScreen extends StatelessWidget { - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final email = "usuario@example.com"; - final fullName = "Carlos Pérez Cruz"; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_primary), - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 20, - children: [ - Spacer(flex: 10), - Icon(Icons.check, color: theme.getColorFor(ThemeCode.background_primary), size: 50), - Text("Cuenta creada", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)), - Text.rich(TextSpan(text:"Has creado la cuenta para:\n", - children: [TextSpan(text: fullName, style: TextStyle(fontWeight: FontWeight.bold))])), - Text.rich(TextSpan(text:"Hemos enviado un email de verificación a:\n", - children: [TextSpan(text: email, style: TextStyle(fontWeight: FontWeight.bold))])), - Text("Crea la cuenta de tu peque e ingresa su \nprimera paga para utilizarla con su reloj"), - FilledButton(onPressed: ()=>{ - Navigator.pushReplacement(context, MaterialPageRoute(builder: (_)=>AddKidScreen())) - }, child: Text("Continuar")), - Spacer(flex: 8) - ], - ), - ) - ) - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/activity_screen.dart b/lib/payments/view/screens/activity_screen.dart deleted file mode 100644 index f47ba8e7..00000000 --- a/lib/payments/view/screens/activity_screen.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/activity_list.dart'; -import 'package:sf_app_platform/payments/view/screens/core/line_graph.dart'; - -import '../../domain/ports/theme_port.dart'; - -class ActivityScreen extends StatefulWidget{ - const ActivityScreen({super.key}); - - @override - State createState() => ActivityScreenState(); -} - -class ActivityScreenState extends State{ - final activity = [ - {"type": "goal"}, - {"type": "wage", "amount": 5}, - {"type": "lock"}, - {"type": "lock"} - ]; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final content = [ - Text("Movimientos recientes", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),), - Row( - spacing: 20, - children: [ - FilledButton(onPressed: ()=>{}, child: Text("Hoy")), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Última semana")), - TextButton(onPressed: ()=>{}, child: Text("Mes")) - ], - ), - SizedBox(height: 200, child: LineGraph()), - ActivityList(activity: activity, edit: false) - ]; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Container( - margin: EdgeInsets.fromLTRB(30, 30, 30, 0), - child: Center(child: ListView.separated( - itemBuilder: (BuildContext context, int index) {return content[index];}, - separatorBuilder: (BuildContext context, int index) { - return Divider(color: Colors.transparent, height: 30); - }, - itemCount: content.length) - ) - ) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/alert_screen.dart b/lib/payments/view/screens/alert_screen.dart deleted file mode 100644 index 2c7016e8..00000000 --- a/lib/payments/view/screens/alert_screen.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/domain/ports/theme_port.dart'; -import 'package:sf_app_platform/payments/view/screens/core/activity_list.dart'; - -class AlertScreen extends StatefulWidget { - const AlertScreen({super.key}); - - @override - State createState() => AlertScreenState(); -} - -class AlertScreenState extends State { - - final activity = [ - {"type": "goal"}, - {"type": "wage", "amount": 5}, - {"type": "lock"}, - {"type": "lock"} - ]; - bool edit = false; - - @override - void initState() { - edit = false; - super.initState(); - } - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Container( - margin: EdgeInsets.all(30), - child: Column( - children: [ - Row( - children: [ - Text("Alertas"), - Spacer(), - TextButton( - onPressed: () => setState(() {edit = !edit;}), - child: Text("Editar")) - ], - ), - ActivityList(activity: activity, edit: edit) - ], - ), - ), - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/contact_screen.dart b/lib/payments/view/screens/contact_screen.dart deleted file mode 100644 index d7fea3ee..00000000 --- a/lib/payments/view/screens/contact_screen.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -class ContactScreen extends StatelessWidget{ - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 10, - children: [ - Text("Contáctanos", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text("Trasládanos tus dudas e intentaremos responderte lo antes posible"), - DropdownMenu( - initialSelection: "es", - label: Text("País"), - dropdownMenuEntries: [ - DropdownMenuEntry(value: "es", label: "España"), - DropdownMenuEntry(value: "fr", label: "Francia"), - DropdownMenuEntry(value: "pt", label: "Portugal"), - ] - ), - DropdownMenu( - initialSelection: "online", - label: Text("Canal de compra"), - dropdownMenuEntries: [ - DropdownMenuEntry(value: "online", label: "SF online shop"), - ] - ), - Expanded(child: TextField( - decoration: InputDecoration( - labelText: "Nombre", - hintText: "Nombre y apellidos", - border: OutlineInputBorder() - ) - )), - Expanded(child: TextField( - decoration: InputDecoration( - labelText: "Correo electrónico", - hintText: "Correo electrónico", - border: OutlineInputBorder() - ) - )), - Expanded(child: TextField( - minLines: 3, - maxLines: 3, - decoration: InputDecoration( - labelText: "Asunto del mensaje", - hintText: "Escribe tu mensaje", - border: OutlineInputBorder() - ) - )), - Expanded(child: FilledButton(onPressed: ()=>Navigator.pop(context), child: Text("Enviar"))) - ], - ), - ), - ), - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/core/activity_list.dart b/lib/payments/view/screens/core/activity_list.dart deleted file mode 100644 index 7a7ef483..00000000 --- a/lib/payments/view/screens/core/activity_list.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'dart:developer'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class ActivityList extends StatefulWidget { - final List activity; - bool edit = false; - - ActivityList({super.key, required this.activity, required this.edit}); - - @override - State createState() => ActivityListState(); -} - -class ActivityListState extends State{ - - late List values; - - @override - void initState() { - values = List.generate(widget.activity.length, (_)=>false); - super.initState(); - } - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final colors = [Colors.cyan, Colors.pinkAccent, Colors.deepOrangeAccent, Colors.red]; - final icons = {"wage": Icons.wallet, "goal": Icons.emoji_events_outlined, "lock": Icons.lock_outline, "reload": Icons.attach_money_outlined}; - final titles = {"wage": "Entrega de paga", "goal": "¡Objetivo cumplido!", "lock": "Bloqueo de pago", "reload": "Recarga familiar"}; - - return Column( - spacing: 20, - children: List.generate(widget.activity.length, (int index) { - var logItem = Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - border: BoxBorder.fromLTRB(left: BorderSide( - color: colors[index % colors.length], width: 5)) - ), - child: Column( - spacing: 15, - children: [ - Row( - children: [ - Icon(icons[widget.activity[index]["type"]], - color: colors[index % colors.length]), - Text(titles[widget.activity[index]["type"]]!, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16)), - Spacer(), - Text("14/01/2005") - ] - ), - Align( - alignment: Alignment.topLeft, - child: Text("Ana ya tiene su paga de 5€ en el reloj"), - ) - ] - ) - ); - - if (widget.edit) { - return Row(children: [ - Checkbox( - value: values[index], - onChanged: (value) => { - setState(() { - values[index] = !values[index]; - })}, - activeColor: theme.getColorFor(ThemeCode.button_primary), - semanticLabel: "Eliminar"), - Expanded(child: logItem) - ]); - } else { - return logItem; - } - }) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/core/dashboard_screen.dart b/lib/payments/view/screens/core/dashboard_screen.dart deleted file mode 100644 index 65b699f2..00000000 --- a/lib/payments/view/screens/core/dashboard_screen.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/activity_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/alert_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/home_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/profile_screen.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class DashboardScreen extends StatefulWidget { - const DashboardScreen({super.key}); - - @override - State createState() => _DashboardScreenState(); -} - -class _DashboardScreenState extends State{ - - int currentPageIndex = 0; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final bodies = [ - HomeScreen(), - ActivityScreen(), - AlertScreen(), - ProfileScreen() - ]; - - return Scaffold( - bottomNavigationBar: NavigationBar( - backgroundColor: theme.getColorFor(ThemeCode.background_primary), - onDestinationSelected: (int index) { - setState(() { - currentPageIndex = index; - }); - }, - selectedIndex: currentPageIndex, - destinations: [ - NavigationDestination(icon: Icon(Icons.home_outlined), label: "Inicio"), - NavigationDestination(icon: Icon(Icons.watch_outlined), label: "Movimientos"), - NavigationDestination(icon: Icon(Icons.notifications_outlined), label: "Alertas"), - NavigationDestination(icon: Icon(Icons.person_outline_outlined), label: "Mi perfil"), - ] - ), - body: bodies[currentPageIndex], - ); - } - - -} \ No newline at end of file diff --git a/lib/payments/view/screens/core/deposit_block.dart b/lib/payments/view/screens/core/deposit_block.dart deleted file mode 100644 index cf5ed669..00000000 --- a/lib/payments/view/screens/core/deposit_block.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class DepositBlock extends StatelessWidget{ - final double max; - - const DepositBlock({super.key, required this.max}); - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration(color: theme.getColorFor(ThemeCode.background_primary), borderRadius: BorderRadius.all(Radius.circular(20))), - margin: EdgeInsets.only(top: 10), - child: Column( - children: [ - Text("Ingresar dinero en el wallet", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Row( - spacing: 10, - children: [ - Expanded( - child: TextField( - decoration: InputDecoration(labelText: "Cantidad", hintText: "0€", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly - ] - ) - ), - FilledButton( - onPressed: ()=>{}, - style: ButtonStyle(backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_primary))), - child: Text("Ingresar") - ) - ], - ), - Align( - alignment: Alignment.topLeft, - child: Text("Máximo que puedes añadir: $max€"), - ) - ], - ), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/core/line_graph.dart b/lib/payments/view/screens/core/line_graph.dart deleted file mode 100644 index 3b3b30b3..00000000 --- a/lib/payments/view/screens/core/line_graph.dart +++ /dev/null @@ -1,169 +0,0 @@ -import 'dart:developer'; - -import 'package:flutter/material.dart'; -import 'package:fl_chart/fl_chart.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class LineGraph extends StatefulWidget { - final lines = [[0,1,0,1,0,1,0],[1,0,1,0,1,0,1]]; - - LineGraph({super.key}); - - @override - State createState() => LineGraphState(); -} - -class LineGraphState extends State { - - final weekDays = ["L", "M", "X", "J", "V", "S", "D"]; - String? timeSpan; - late var days = weekDays; - - @override - void initState() { - timeSpan = "week"; - super.initState(); - } - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Container( - padding: EdgeInsets.all(15), - decoration: BoxDecoration( - border: BoxBorder.fromLTRB(left: BorderSide(color: Colors.cyan, width: 5)), - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column( - spacing: 10, - children: [ - Row(children: [ - Text("Gastos", style: TextStyle(fontWeight: FontWeight.bold)), - Spacer(), - Container( - padding: EdgeInsets.symmetric(horizontal: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10)), - color: theme.getColorFor(ThemeCode.background_secondary), - ), - child: DropdownButton( - underline: Container(), - value: timeSpan, - onChanged: (String? value) { - setState(() { - timeSpan = value; - }); - }, - dropdownColor: theme.getColorFor(ThemeCode.background_primary), - items: [ - DropdownMenuItem(value: "day", child: Text("Hoy")), - DropdownMenuItem(value: "week", child: Text("Esta semana")), - DropdownMenuItem(value: "month", child: Text("Este mes")), - ] - ), - ) - ]), - Expanded(child: LineChart(LineChartData( - gridData: FlGridData( - show: true, - drawHorizontalLine: false, - drawVerticalLine: true, - verticalInterval: 1 - ), - titlesData: FlTitlesData( - //show: false, - bottomTitles: AxisTitles( - sideTitles: SideTitles( - showTitles: true, - reservedSize: 40, - getTitlesWidget: (double value, TitleMeta meta)=>SideTitleWidget( - space: 4, - meta: meta, - /*fitInside: fitInsideBottomTitle - ? SideTitleFitInsideData.fromTitleMeta(meta, distanceFromEdge: 0) - : SideTitleFitInsideData.disable(),*/ - child: Text( - weekDays[value.toInt()] - ), - ), - ), - ), - leftTitles: AxisTitles(), - topTitles: AxisTitles(), - rightTitles: AxisTitles() - ), - lineTouchData: LineTouchData( - touchTooltipData: LineTouchTooltipData( - getTooltipColor: (touchedSpot) => theme.getColorFor(ThemeCode.button_secondary), - getTooltipItems: (List touchedBarSpots){ - return touchedBarSpots.map( - (barSpot) { - return LineTooltipItem("${barSpot.y} €", TextStyle(color: theme.getColorFor(ThemeCode.text_secondary))); - } - ).toList(); - } - ) - ), - borderData: FlBorderData( - show: true, - border: Border( - bottom: BorderSide( - color: Colors.lightBlue.withValues(alpha: 0.2), - width: 4 - ), - left: const BorderSide(color: Colors.transparent), - right: const BorderSide(color: Colors.transparent), - top: const BorderSide(color: Colors.transparent), - ), - ), - lineBarsData: [ - LineChartBarData( - isCurved: true, - color: Colors.pink, - barWidth: 5, - isStrokeCapRound: true, - dotData: const FlDotData(show: false), - belowBarData: BarAreaData(show: false), - spots: const [ - FlSpot(0, 1), - FlSpot(1, 0), - FlSpot(2, 1), - FlSpot(3, 0), - FlSpot(4, 1), - FlSpot(5, 0), - FlSpot(6, 1), - ], - ), - LineChartBarData( - isCurved: true, - color: Colors.cyan, - barWidth: 5, - isStrokeCapRound: true, - dotData: const FlDotData(show: false), - belowBarData: BarAreaData(show: false), - spots: const [ - FlSpot(0, 0), - FlSpot(1, 1), - FlSpot(2, 0), - FlSpot(3, 1), - FlSpot(4, 0), - FlSpot(5, 1), - FlSpot(6, 0), - ], - ), - ], - minX: 0, - maxX: days.length-1, - maxY: 1, - minY: 0, - ))) - ], - ), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/core/wallet_management_layout.dart b/lib/payments/view/screens/core/wallet_management_layout.dart deleted file mode 100644 index d66573ae..00000000 --- a/lib/payments/view/screens/core/wallet_management_layout.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/entities/kid.dart'; -import '../../../domain/ports/theme_port.dart'; - -class WalletManagementLayout extends StatefulWidget { - final List children; - final Widget footer; - final Kid kid; - - const WalletManagementLayout({super.key, required this.kid, required this.children, required this.footer}); - - @override - State createState() => WalletManagementLayoutState(); -} - -class WalletManagementLayoutState extends State{ - - @override - Widget build(BuildContext context) { - final theme = context.read(); - - final content = [ - Container( - padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20), - child: Stack( - children: [ - IconButton(onPressed: ()=>Navigator.pop(context), icon: Icon(Icons.arrow_back_ios_outlined, color: theme.getColorFor(ThemeCode.text_secondary))), - Expanded(child: Center(child: Column(children: [ - Text(widget.kid.name, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30, color: theme.getColorFor(ThemeCode.text_secondary))), - Text.rich(TextSpan( - text: "Saldo disponible: ", - style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary)), - children: [ - TextSpan(text: "${widget.kid.balance}", style: TextStyle(fontWeight: FontWeight.bold, color: theme.getColorFor(ThemeCode.text_secondary))), - TextSpan(text: "€", style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary))) - ])) - ]))) - ], - ) - ), - ...widget.children - ]; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Stack(children: [ - DecoratedBox( - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(30)), - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: theme.getCardColorFor(0) - ), - ), - child: SizedBox(width: double.infinity, height: 200), - ), - Column(children: [ - Expanded(child: ListView.separated( - itemBuilder: (BuildContext context, int index) {return Container(margin: EdgeInsets.symmetric(horizontal: 20), child: content[index]);}, - separatorBuilder: (BuildContext context, int index) {return Divider(height: 30, color: Colors.transparent);}, - itemCount: content.length)), - widget.footer - ]) - ]) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/deposit_screen.dart b/lib/payments/view/screens/deposit_screen.dart deleted file mode 100644 index d97f5611..00000000 --- a/lib/payments/view/screens/deposit_screen.dart +++ /dev/null @@ -1,183 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/wallet_management_layout.dart'; - -import '../../domain/entities/kid.dart'; -import '../../domain/ports/theme_port.dart'; - -class DepositScreen extends StatefulWidget{ - final Kid kid; - - const DepositScreen({super.key, required this.kid}); - - @override - State createState() => DepositScreenState(); - -} - -class DepositScreenState extends State{ - String reason = "other"; - bool program = false; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return WalletManagementLayout( - kid: widget.kid, - children: [ - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Ingresar dinero en el wallet", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - TextField( - decoration: InputDecoration(labelText: "Cantidad", hintText: "0€", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly - ] - ), - Align( - alignment: Alignment.topLeft, - child: Text("Saldo total disponible después: 30 €") - ) - ], - ), - ), - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Motivo", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Este dato aparecerá en el reloj del peque"), - CheckboxListTile( - title: Text('Paga semanal'), - controlAffinity: ListTileControlAffinity.leading, - value: reason=="weekly", - onChanged: (value) { - setState(() { - reason="weekly"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Objetivo semanal cumplido'), - controlAffinity: ListTileControlAffinity.leading, - value: reason=="goal", - onChanged: (value) { - setState(() { - reason="goal"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Gastos extraordinarios'), - controlAffinity: ListTileControlAffinity.leading, - value: reason=="extraordinary", - onChanged: (value) { - setState(() { - reason="extraordinary"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Otro'), - controlAffinity: ListTileControlAffinity.leading, - value: reason=="other", - onChanged: (value) { - setState(() { - reason="other"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - TextField( - minLines: 3, - maxLines: 3, - maxLength: 150, - decoration: InputDecoration( - labelText: "Escribir mensaje a ${widget.kid.name} del motivo del ingreso", - hintText: "Escribe tu mensaje", - border: OutlineInputBorder(), - ) - ), - Align( - alignment: Alignment.topLeft, - child: Text("Máximo 150 caracteres") - ) - ], - ), - ), - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Cuándo se envía el dinero", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Este dato aparecerá en el reloj del peque"), - CheckboxListTile( - title: Text('Ahora'), - controlAffinity: ListTileControlAffinity.leading, - value: program==false, - onChanged: (value) { - setState(() { - program=false; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Programar'), - controlAffinity: ListTileControlAffinity.leading, - value: program==true, - onChanged: (value) { - setState(() { - program=true; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - if (program) TextField() - ], - ), - ), - ], - footer: Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column(children: [ - FilledButton(onPressed: ()=>{}, child: Container( - width: double.infinity, - padding: EdgeInsets.all(20), - child: Center(child: Text("Añadir dinero")) - )), - TextButton(onPressed: ()=>Navigator.pop(context), child: Text("Cancelar")) - ]) - ) - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/errors/no_plan_error_screen.dart b/lib/payments/view/screens/errors/no_plan_error_screen.dart deleted file mode 100644 index 3fbbc4cf..00000000 --- a/lib/payments/view/screens/errors/no_plan_error_screen.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/domain/ports/theme_port.dart'; - -class NoPlanErrorScreen extends StatelessWidget{ - - const NoPlanErrorScreen({super.key}); - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - children: [ - Spacer(flex: 3), - Text("Estamos mejorando el servicio", - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25) - ), - Text("Asocia tu reloj a SaveFamily y ayuda a tus peques a aprender a usar el dinero con responsabilidad"), - Container( - margin: EdgeInsets.symmetric(vertical: 20), - child: Column( - children: [ - Row(children: [ - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)), - Text("Desarrollarán hábitos financieros sanos") - ]), - Row(children: [ - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)), - Text("Gestiona sus gastos") - ]), - ], - ), - ), - Text("Selecciona tu plan en nuestra web y empieza a enseñar a los peques a entender el valor del dinero"), - Spacer(flex: 1), - FilledButton( - onPressed: ()=>{}, - child: Container( - width: double.infinity, - padding: EdgeInsets.all(20), - child: Text("Seleccionar plan") - ) - ), - Spacer(flex: 3) - ] - ), - ) - ) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/home_screen.dart b/lib/payments/view/screens/home_screen.dart deleted file mode 100644 index fd3be2b1..00000000 --- a/lib/payments/view/screens/home_screen.dart +++ /dev/null @@ -1,210 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/deposit_block.dart'; -import 'package:sf_app_platform/payments/view/screens/core/money_text.dart'; -import 'package:sf_app_platform/payments/view/screens/link_watch/create_profile_screen.dart'; - -import '../../domain/entities/kid.dart'; -import '../../domain/ports/theme_port.dart'; -import 'deposit_screen.dart'; -import 'kid_wallet_screen.dart'; - - -class HomeScreen extends StatelessWidget{ - final String name = "Juan"; - final double total = 95.03; - final List kids = [ - Kid(name:"Carlos", balance:25.47), - Kid(name:"Ana", balance:25.47), - ]; - late final double available = double.parse(kids.fold(total, (t, e) => t - e.balance).toStringAsFixed(2)); - - HomeScreen({super.key}); - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return SingleChildScrollView( child: Container( - color: theme.getColorFor(ThemeCode.background_secondary), - margin: EdgeInsets.all(30), - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Text.rich( - TextSpan( - text: "Hola, ", - style: TextStyle(fontSize: 25), - children: [ - TextSpan(text: name, style: TextStyle(fontWeight: FontWeight.bold)), - ], - ), - ) - ), - walletsList(context, kids), - Align( - alignment: Alignment.topLeft, - child: TextButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>CreateProfileScreen())), - child: Text("+ Añadir otro peque", style: TextStyle( - fontWeight: FontWeight.bold, - color: theme.getColorFor(ThemeCode.text_primary) - )) - ) - ), - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration(color: theme.getColorFor(ThemeCode.background_primary), borderRadius: BorderRadius.all(Radius.circular(20))), - child: Column( - spacing: 5, - children: [ - Row( - children: [ - Text("Wallet", style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20 - )), - Spacer(), - MoneyText( - text: "$total€ total", - size: 25, - resize: true, - color: theme.getColorFor(ThemeCode.text_primary) - ) - ] - ), - Stack( - children: [ - LinearProgressIndicator( - value: available/total, - minHeight: 70, - borderRadius: BorderRadius.all(Radius.circular(16)), - color: theme.getColorFor(ThemeCode.button_primary), - backgroundColor: theme.getColorFor(ThemeCode.background_tertiary), - ), - FractionallySizedBox( - widthFactor: available/total, - child: Container( - padding: EdgeInsets.symmetric(vertical: 10), - child: Center( - child: MoneyText( - text: "$available€", - size: 35, - resize: true, - color: theme.getColorFor(ThemeCode.text_secondary) - ), - ) - ) - ), - ], - ), - Center(child: Text("Disponible")) - ], - ), - ), - DepositBlock(max: 150-total) - ] - ), - )); - } - - Widget walletsList(BuildContext context, List kids) { - final theme = context.read(); - - return Column( - spacing: 20, - children: List.generate(kids.length, (int index) { - return - GestureDetector( - onTap: ()=>{Navigator.push(context, MaterialPageRoute(builder: (_)=>KidWalletScreen(kid: kids[index])))}, - child: ClipRRect( - borderRadius: const BorderRadius.all(Radius.circular(16.0)), - child: Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 8), - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: theme.getCardColorFor(index) - ) - ), - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Text(kids[index].name, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - color: theme.getColorFor(ThemeCode.text_secondary) - ) - ) - ), - Row( - spacing: 10, - children: [ - SizedBox( - height: 60, - width: 60, - child: SvgPicture.asset("assets/images/ui/face.svg"), - ), - Spacer(), - Column(children: [ - MoneyText( - text: "${kids[index].balance}€", - size: 50, - resize: true, - color: theme.getColorFor(ThemeCode.text_secondary) - ), - Text("en su hucha", style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary))) - ]) - - ] - ), - Row( - children: [ - TextButton( - onPressed: ()=>showDialog( - context: context, - builder: (BuildContext context) => Dialog( - child: Container(height: 100, width: double.infinity, child: Column( - children: [ - FilledButton(onPressed: ()=>{}, child: Text("Cámara")), - OutlinedButton(onPressed: ()=>{}, child: Text("Galería de fotos")) - ], - )), - ) - ), - child: Row( - spacing: 10, - children: [ - Icon(Icons.edit, color: theme.getColorFor(ThemeCode.text_secondary)), - Text("Editar", style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary))) - ] - ) - ), - Spacer(), - FilledButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>DepositScreen(kid: kids[index]))), - style: ButtonStyle( - backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_secondary)), - ), - child: Container( - padding: EdgeInsets.symmetric(horizontal: 0,vertical: 10), - child: Text("+ Añadir dinero") - ) - ) - ], - ) - ] - ), - ) - ) - ); - }) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/kid_wallet_screen.dart b/lib/payments/view/screens/kid_wallet_screen.dart deleted file mode 100644 index 4679d7a6..00000000 --- a/lib/payments/view/screens/kid_wallet_screen.dart +++ /dev/null @@ -1,202 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/money_text.dart'; -import 'package:sf_app_platform/payments/view/screens/deposit_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/limits_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/wage_screen.dart'; - -import '../../domain/entities/kid.dart'; -import '../../domain/ports/theme_port.dart'; - -class KidWalletScreen extends StatefulWidget{ - final Kid kid; - - const KidWalletScreen({super.key, required this.kid}); - - @override - State createState() => _KidWalletScreenState(); -} - -class _KidWalletScreenState extends State { - - @override - Widget build(BuildContext context) { - - final theme = context.read(); - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Stack( - children: [ - DecoratedBox( - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(30)), - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: theme.getCardColorFor(0) - ), - ), - child: SizedBox(width: double.infinity, height: 300), - ), - Container( - margin: EdgeInsets.symmetric(vertical: 50, horizontal: 20), - child: Column( - spacing: 15, - children: [ - Row( - spacing: 7, - children: [ - IconButton( - onPressed: ()=>Navigator.pop(context), - icon: Icon(Icons.arrow_back_ios_new_outlined, color: theme.getColorFor(ThemeCode.background_primary),) - ), - SizedBox(height: 50, child: SvgPicture.asset("assets/images/ui/face.svg")), - Text(widget.kid.name, - style: TextStyle( - color: theme.getColorFor(ThemeCode.background_primary), - fontWeight: FontWeight.bold, - fontSize: 20 - ) - ), - Spacer(), - SizedBox(height: 30, child: SvgPicture.asset("assets/images/ui/face.svg")), - ], - ), - MoneyText( - text: "${widget.kid.balance.toString()}€", - size: 60, - resize: true, - color: theme.getColorFor(ThemeCode.text_secondary) - ), - Text("Saldo disponible", style: TextStyle(color: theme.getColorFor(ThemeCode.background_primary))), - LinearProgressIndicator( - value: 0.7, - color: theme.getColorFor(ThemeCode.background_primary), - backgroundColor: theme.getColorFor(ThemeCode.background_primary).withAlpha(0x4C), - minHeight: 10, - borderRadius: BorderRadius.all(Radius.circular(5)), - ), - Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.only(top: 30), - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - child: Expanded(child: Center( child: Row( - spacing: 10, - children: [ - TextButton(onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>DepositScreen(kid: widget.kid))), - child: Column( - spacing: 10, - children: [ - Icon(Icons.add_circle_outline, color: theme.getColorFor(ThemeCode.text_primary)), - Text("Añadir", style: TextStyle(color: theme.getColorFor(ThemeCode.text_primary))) - ] - ) - ), - Spacer(), - TextButton(onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>WageScreen(kid: widget.kid))), - child: Column( - spacing: 10, - children: [ - Icon(Icons.account_balance_wallet_outlined, color: theme.getColorFor(ThemeCode.text_primary)), - Text("Paga", style: TextStyle(color: theme.getColorFor(ThemeCode.text_primary))) - ] - ) - ), - Spacer(), - TextButton(onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>LimitsScreen(kid: widget.kid))), - child: Column( - spacing: 10, - children: [ - Icon(Icons.list_alt_outlined, color: theme.getColorFor(ThemeCode.text_primary)), - Text("Límites", style: TextStyle(color: theme.getColorFor(ThemeCode.text_primary))) - ] - ) - ), - Spacer(), - TextButton(onPressed: ()=>{}, - child: Column( - spacing: 10, - children: [ - Icon(Icons.emoji_events_outlined, color: theme.getColorFor(ThemeCode.text_primary)), - Text("Metas", style: TextStyle(color: theme.getColorFor(ThemeCode.text_primary))) - ] - ) - ) - ], - ) - ))), - Container( - padding: EdgeInsets.all(15), - height: 400, - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), child: Column( - children: [ - Text("Últimos movimientos"), - activityList(context), - TextButton(onPressed: ()=>{}, child: Text("Ver todos")) - ], - ) - ) - ], - ) - ) - ], - ), - ); - } - - Widget activityList(BuildContext context){ - final theme = context.read(); - - final activity = [{"date": "10/05", "payments": [1, 2, 3]}, {"date": "10/04", "payments":[1, 2]}, {"date": "10/02", "payments":[1, 2, 3, 4]}]; - - return Expanded(child: ListView( - children: List.generate(activity.length, (int index) { - return Column( - spacing: 20, - children: [ - Text(activity[index]["date"].toString()), - Column( - spacing: 15, - children: List.generate((activity[index]["payments"] as List).length, (int i) { - //var a = (activity[index]["payments"] as List)[i]; - return Row( - spacing: 7, - children: [ - Container( - padding: EdgeInsets.all(9), - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_tertiary), - borderRadius: BorderRadius.all(Radius.circular(16)) - ), - child: Icon(Icons.local_pizza_outlined, color: theme.getColorFor(ThemeCode.button_primary)), - ), - Column( - children: [ - Text("Vips", style: TextStyle(fontWeight: FontWeight.bold)), - Text("20:15"), - ], - ), - Spacer(), - MoneyText( - text: "5.1€", - size: 20, - resize: true, - color: theme.getColorFor(ThemeCode.text_primary) - ) - ], - ); - })) - ], - ); - }) - )); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/limits_screen.dart b/lib/payments/view/screens/limits_screen.dart deleted file mode 100644 index 36fd5a51..00000000 --- a/lib/payments/view/screens/limits_screen.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/wallet_management_layout.dart'; - -import '../../domain/entities/kid.dart'; -import '../../domain/ports/theme_port.dart'; - -class LimitsScreen extends StatefulWidget{ - final Kid kid; - - const LimitsScreen({super.key, required this.kid}); - - @override - State createState() => LimitsScreenState(); -} - -class LimitsScreenState extends State{ - late List dailyLimits; - late List timeLimits; - late List conditions; - late List blocks; - - @override - void initState() { - super.initState(); - dailyLimits = [{"title": "Diario L-V", "limit": "5", "edit": false}, - {"title": "Fines de semana", "limit": "8", "edit": false}, - {"title": "Semanal", "limit": "30", "edit": false}, - {"title": "Mensual", "limit": "1200", "edit": false},]; - timeLimits = [{"title": "Lunes a Viernes", "start": "08:00", "end": "20:00", "edit": false}, - {"title": "Fines de semana", "start": "10:00", "end": "21:00", "edit": false}, - {"title": "Vacaciones", "start": "09:00", "end": "22:00", "edit": false}]; - conditions = [{"title": "Alimentación", "limit": "10", "edit": false}, - {"title": "Transporte", "limit": "10", "edit": false}, - {"title": "Alimentación", "limit": "10", "edit": false},]; - blocks = []; - } - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return WalletManagementLayout( - kid: widget.kid, - children: [ - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary), - ), - child: Column( - spacing: 10, - children: [ - Text("Pon límite de gastos", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Libertad para ellos, tranquilidad para ti"), - ...List.generate(dailyLimits.length, (int index) { - return Column(children: [ - Row(children: [ - Text("${dailyLimits[index]["title"]}: ${dailyLimits[index]["limit"]} €"), - Spacer(), - TextButton(onPressed: ()=>{setState(() { - dailyLimits[index]["edit"] = !dailyLimits[index]["edit"]; - })}, child: Text("Editar")) - ]), - if (dailyLimits[index]["edit"]) TextField() - ]); - }), - - ], - ), - ), - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary), - ), - child: Column( - spacing: 10, - children: [ - Text("Horarios permitidos", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Controla cuándo pueden comprar"), - ...List.generate(timeLimits.length, (int index) { - return Column(children: [ - Row(children: [ - Text("${timeLimits[index]["title"]}: ${timeLimits[index]["start"]} - ${timeLimits[index]["end"]}"), - Spacer(), - TextButton(onPressed: ()=>{setState(() { - timeLimits[index]["edit"] = !timeLimits[index]["edit"]; - })}, child: Text("Editar")) - ]), - if (timeLimits[index]["edit"]) TextField() - ]); - }), - ], - ), - ) - ], - footer: Column(children: [ - FilledButton(onPressed: ()=>{}, child: SizedBox( - width: double.infinity, - child: Center(child: Text("Guardar límites")), - )) - ]), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/link_phone_screen.dart b/lib/payments/view/screens/link_phone_screen.dart deleted file mode 100644 index d3000949..00000000 --- a/lib/payments/view/screens/link_phone_screen.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:sf_app_platform/payments/view/screens/phone_code_screen.dart'; - -class LinkPhoneScreen extends StatelessWidget{ - - @override - Widget build(BuildContext context) { - TextEditingController phoneController = TextEditingController(); - String? phone; - - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Expanded(child: Center( - child: Column( - spacing: 10, - children: [ - Text("¡Nos alegra mucho tenerte por aquí!", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)), - Text("Para poder entrar de forma segura, te vamos a enviar un código al teléfono"), - Row( - spacing: 10, - children: [ - DropdownMenu( - initialSelection: "es", - dropdownMenuEntries: List.generate(3, (int index){ - return DropdownMenuEntry( - labelWidget: Icon(Icons.outlined_flag), - label: "es", - value: "es", - ); - }) - ), - Expanded(child: TextField( - onSubmitted: (String value){phone=value;}, - controller: phoneController, - decoration: InputDecoration(labelText: "Teléfono móvil", hintText: "Teléfono", border: OutlineInputBorder()), - keyboardType: TextInputType.number) - ) - ] - ), - SizedBox( - width: double.infinity, - child: FilledButton( - onPressed: ()=>{ - if (phone != null) - Navigator.push(context, MaterialPageRoute(builder: (_)=>PhoneCodeScreen(phone: phone!))) - }, - child: Text("Siguiente") - ) - ) - ] - ) - )) - ) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/link_watch/account_created_kid_screen.dart b/lib/payments/view/screens/link_watch/account_created_kid_screen.dart deleted file mode 100644 index 04a0512d..00000000 --- a/lib/payments/view/screens/link_watch/account_created_kid_screen.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/add_kid_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class AccountCreatedKidScreen extends StatelessWidget { - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final model = "SaveWatch Plus 2"; - final id = "1106652524"; - final fullName = "Carlos Pérez Cruz"; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_primary), - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 20, - children: [ - Spacer(flex: 2), - Icon(Icons.check, color: theme.getColorFor(ThemeCode.background_primary), size: 50), - Text("Cuenta creada", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)), - Text.rich(TextSpan(text:"Has creado la cuenta para:\n", - children: [TextSpan(text: fullName, style: TextStyle(fontWeight: FontWeight.bold))])), - Text("Reloj: $model"), - Text("ID del reloj: $id"), - Text("Ya puedes darle su primera paga paa que empiece a disfrutarla en su reloj", - style: TextStyle(fontWeight: FontWeight.bold)), - Spacer(flex: 6), - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)) - ), - child: Column(children: [ - Expanded(child: FilledButton(onPressed: ()=>{ - Navigator.pushReplacement(context, MaterialPageRoute(builder: (_)=>AddKidScreen())) - }, child: Text("Dale su primera paga"))), - TextButton(onPressed: ()=>{}, child: Text("Añadir otro peque")) - ]) - ) - ], - ), - ) - ) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/link_watch/create_profile_screen.dart b/lib/payments/view/screens/link_watch/create_profile_screen.dart deleted file mode 100644 index e9a7db0b..00000000 --- a/lib/payments/view/screens/link_watch/create_profile_screen.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class CreateProfileScreen extends StatefulWidget { - const CreateProfileScreen({super.key}); - - @override - State createState() => CreateProfileScreenState(); - -} - -class CreateProfileScreenState extends State{ - int currentStep = 0; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_primary), - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 10, - children: [ - Stepper( - type: StepperType.horizontal, - currentStep: currentStep, - onStepCancel: () => currentStep == 0 - ? null - : setState(() { - currentStep -= 1; - }), - controlsBuilder: (BuildContext context, ControlsDetails controls) { - return FilledButton( - style: ButtonStyle(backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_primary))), - onPressed: controls.onStepContinue, - child: const Text('Continuar'), - ); - }, - steps: [ - Step( - state: currentStep > 0 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 0, - stepStyle: currentStep >= 0 ? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.transparent, boxShadow: BoxShadow(spreadRadius: 5), indexStyle: TextStyle(color: Colors.transparent)), - title: Text(""), - content: Column( - spacing: 10, - children: [ - Text("Crea su perfil", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text("Necesitamos estos datos para crear su cuenta y gestionar sus pagas y gastos"), - Text("Comienza con un peque; luego podrás agregar más", style: TextStyle(fontWeight: FontWeight.bold)), - TextField(decoration: InputDecoration(labelText: "Nombre", hintText: "Nombre", border: OutlineInputBorder())), - TextField(decoration: InputDecoration(labelText: "Apellidos", hintText: "Apellidos", border: OutlineInputBorder())), - Row( - spacing: 10, - children: [ - Expanded( child: TextField( - decoration: InputDecoration(label: Text("Fecha de nacimiento"), hintText: "DD", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - )), - Expanded( child: TextField( - decoration: InputDecoration(hintText: "MM", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - )), - Expanded( child: TextField( - decoration: InputDecoration(hintText: "AAAA", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - )), - ], - ), - TextField(decoration: InputDecoration(labelText: "Dirección completa", hintText: "Nombre de la calle", border: OutlineInputBorder())), - TextButton(onPressed: ()=>{}, child: Text("Cambiar dirección", style: TextStyle(fontWeight: FontWeight.bold),)) - ], - ) - ), - Step( - state: currentStep > 1 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 1, - stepStyle: currentStep >= 1 ? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.transparent, boxShadow: BoxShadow(spreadRadius: 5), indexStyle: TextStyle(color: Colors.transparent)), - title: Text(""), - content: Column( - spacing: 10, - children: [ - Text("Vincula su correa y su reloj", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - SvgPicture.asset("assets/images/ui/formulario.svg"), - Row( - spacing: 10, - children: [ - Text("1"), - Column(children: [ - Text("Escanea la correa"), - Text("El peque podrá realizar pagos") - ]) - ], - ), - Row( - spacing: 10, - children: [ - Text("2"), - Column(children: [ - Text("Escanea el reloj"), - Text("Visualizarás los gastos que se hagan") - ]) - ], - ) - ], - ) - ), - Step( - state: currentStep > 2 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 2, - stepStyle: currentStep >= 2 ? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.transparent, boxShadow: BoxShadow(spreadRadius: 5), indexStyle: TextStyle(color: Colors.transparent)), - title: Text(""), - content: Column( - spacing: 10, - children: [ - Text("¡Dale su primera paga!", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text("Enséñales a gestionar su dinero recargando su reloj"), - TextField( - decoration: InputDecoration(labelText: "Cantidad de dinero de la paga", hintText: "0€", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly - ] - ), - Text("Cantidad mínima: 10€"), - Text("Por seguridad sólo se puede disponer de un máximo de 150€ por wallet"), - Text("Método de ingreso"), - Row( - spacing: 20, - children: [ - OutlinedButton(onPressed: ()=>{}, child: SvgPicture.asset("assets/images/ui/visa.svg")), - OutlinedButton(onPressed: ()=>{}, child: SvgPicture.asset("assets/images/ui/paypal.svg")), - OutlinedButton(onPressed: ()=>{}, child: Row(children: [ - SvgPicture.asset("assets/images/ui/banco.svg"), - Text("Transferencia") - ])), - ], - ), - Row( - children: [ - Icon(Icons.lock_outline), - Text("EL pago en esta app es seguro y cumple la normativa europea. Sólo se usará el dinero que decidas para las huchas de tus hijos.") - ], - ) - ], - ) - ) - ] - ) - ], - ), - ), - ), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/login_screen.dart b/lib/payments/view/screens/login_screen.dart deleted file mode 100644 index 1a426d89..00000000 --- a/lib/payments/view/screens/login_screen.dart +++ /dev/null @@ -1,102 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/loading_google_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/restore_password/restore_password_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_screen.dart'; - -class LoginScreen extends StatefulWidget { - - @override - State createState() => LoginScreenState(); - -} - -class LoginScreenState extends State{ - - bool passwordVisible = false; - - @override - void initState(){ - super.initState(); - passwordVisible = true; - } - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Expanded(child: Center( - child: Container( - margin: EdgeInsets.all(30), - child: Column( - spacing: 10, - children: [ - Icon(Icons.check, color: Color(0xFF329e95), size: 50), - Text("¡Te damos la bienvenida!", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),), - TextField( - decoration: InputDecoration( - hintText: "Nombre de usuario", - labelText: "Nombre de usuario", - border: OutlineInputBorder(), - ), - ), - TextField( - obscureText: passwordVisible, - enableSuggestions: false, - autocorrect: false, - decoration: InputDecoration( - labelText: "Contraseña", - hintText: "********", - border: OutlineInputBorder(), - suffixIcon: IconButton( - icon: Icon(passwordVisible - ? Icons.visibility - : Icons.visibility_off), - onPressed: () { - setState(() { - passwordVisible = !passwordVisible; - }); - }, - ), - ) - ), - TextButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>RestorePasswordScreen())), - child: Text("¿Has olvidado la contraseña?") - ), - FilledButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>DashboardScreen())), - child: Text("Iniciar sesión") - ), - Stack( - children: [ - Divider(), - Text("o continúa con"), - ], - ), - Row( - spacing: 20, - children: [ - OutlinedButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>LoadingGoogleScreen())), - child: Text("Google", semanticsLabel: "Google") - ), - OutlinedButton( - onPressed: ()=>{}, - child: Icon(Icons.apple, semanticLabel: "Apple") - ) - ], - ), - Text("¿No tienes cuenta?"), - TextButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>SignupScreen())), - child: Text("Crear una ahora") - ) - ], - ), - ), - )), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/phone_code_screen.dart b/lib/payments/view/screens/phone_code_screen.dart deleted file mode 100644 index 15b7e187..00000000 --- a/lib/payments/view/screens/phone_code_screen.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/login_screen.dart'; - -class PhoneCodeScreen extends StatefulWidget { - final String phone; - - const PhoneCodeScreen({super.key, required this.phone}); - - @override - State createState() => PhoneCodeScreenState(); - -} - -class PhoneCodeScreenState extends State { - final focusNodes = List.generate(6, (int i){ - return FocusNode(); - }); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Expanded(child: Center( - child: Column( - spacing: 15, - children: [ - Spacer(flex:8), - Text("Conéctate", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text.rich(TextSpan(text: "Hemos enviado el código al ", - children: [TextSpan( - text: widget.phone, style: TextStyle(fontWeight: FontWeight.bold))] - )), - Text("Introduce el código aquí"), - Row( - spacing: 20, - children: List.generate(6, (int i){ - return Expanded(child: TextField( - focusNode: focusNodes[i], - keyboardType: TextInputType.number, - decoration: InputDecoration(hintText: "0", counterText: "", border: OutlineInputBorder()), - maxLength: 1, - onChanged: (String value)=>{value!="" ? focusNodes[i+1].requestFocus() : focusNodes[i-1].requestFocus()}, - )); - }), - ), - FilledButton(onPressed: ()=>{Navigator.pushReplacement(context, MaterialPageRoute(builder: (_)=>LoginScreen()))}, child: Text("Entrar")), - Text("¿No lo has recibido?"), - TextButton(onPressed: ()=>{}, - child: Text("Volver a intentarlo", style: TextStyle(fontWeight: FontWeight.bold)) - ), - Spacer(flex:10) - ] - ), - )), - ) - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/profile_screen.dart b/lib/payments/view/screens/profile_screen.dart deleted file mode 100644 index 7dca5868..00000000 --- a/lib/payments/view/screens/profile_screen.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/activity_list.dart'; -import 'package:sf_app_platform/payments/view/screens/core/deposit_block.dart'; -import 'package:sf_app_platform/payments/view/screens/settings_screen.dart'; - -import '../../domain/ports/theme_port.dart'; -import 'core/line_graph.dart'; - -class ProfileScreen extends StatelessWidget{ - const ProfileScreen({super.key}); - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final activity = [ - {"type": "goal"}, - {"type": "wage", "amount": 5}, - {"type": "lock"}, - {"type": "lock"} - ]; - - final name = "Juan"; - final total = 95.03; - final available = 44.09; - - final content = [ - Row( - children: [ - Text(name, style: TextStyle( - color: theme.getColorFor(ThemeCode.text_secondary), - fontWeight: FontWeight.bold, - fontSize: 30) - ), - Spacer(), - TextButton( - onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>SettingsScreen())), - child: Text("Ajustes de la cuenta", style: TextStyle( - color: theme.getColorFor(ThemeCode.text_secondary)) - ) - ) - ], - ), - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration(color: theme.getColorFor(ThemeCode.background_primary), borderRadius: BorderRadius.all(Radius.circular(20))), - child: Column( - spacing: 5, - children: [ - Row( - children: [ - Text("Wallet", style: TextStyle(fontWeight: FontWeight.bold),), - Spacer(), - Text("$total€") - ] - ), - Stack( - children: [ - LinearProgressIndicator( - value: available/total, - minHeight: 70, - borderRadius: BorderRadius.all(Radius.circular(16)), - ), - FractionallySizedBox( - widthFactor: available/total, - child: Container( - padding: EdgeInsets.symmetric(vertical: 20), - child: Center( - child: Text( - "$available€", - style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary), fontSize: 20) - ) - ) - ) - ), - ], - ), - Center(child: Text("Disponible")) - ], - ), - ), - SizedBox( - height: 200, - child: LineGraph() - ), - DepositBlock(max: 150-total), - Row(), - ActivityList(activity: activity, edit: false) - ]; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Stack(children: [ - DecoratedBox( - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(30)), - color: Color(0xFF4B4B4B) - ), - child: SizedBox(width: double.infinity, height: 200), - ), - Column(children: [Expanded (child: Container( - margin: EdgeInsets.fromLTRB(20, 20, 20, 0), - child: ListView.separated( - itemBuilder: (BuildContext context, int index) {return content[index];}, - separatorBuilder: (BuildContext context, int index) { - return Divider(color: Colors.transparent, height: 20); - }, - itemCount: content.length - ) - ))]), - ]) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/restore_password/email_sent_screen.dart b/lib/payments/view/screens/restore_password/email_sent_screen.dart deleted file mode 100644 index 20729edd..00000000 --- a/lib/payments/view/screens/restore_password/email_sent_screen.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/domain/ports/theme_port.dart'; -import 'package:sf_app_platform/payments/view/screens/restore_password/new_password_screen.dart'; - -class EmailSentScreen extends StatefulWidget{ - final String email; - - const EmailSentScreen({super.key, required this.email}); - - @override - State createState() => EmailSentScreenState(); - -} - -class EmailSentScreenState extends State { - - @override - Widget build(BuildContext context) { - final theme = context.read(); - - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 20, - children: [ - Spacer(flex: 8), - Text("Recuperar contraseña", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Spacer(flex: 1), - Row( - spacing: 10, - children: [ - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)), - Text("Correo enviado correctamente", style: TextStyle(fontWeight: FontWeight.bold)) - ] - ), - Spacer(flex: 1), - Text("Revisa tu email y haz clic en el enlace para crear una nueva contraseña"), - Text("Si no recibes el correo en unos minutos, revisa tu carpeta de spam o pulsa \"Reenviar correo\""), - Row( - spacing: 10, - children: [ - Expanded(child: OutlinedButton(onPressed: ()=>{}, child: Text("Reenviar correo"))), - Expanded(child: FilledButton(onPressed: - ()=>{Navigator.push(context, MaterialPageRoute(builder: (_)=>NewPasswordScreen()))}, - style: ButtonStyle(backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_secondary))), - child: Text("Continuar") - ) - ) - ]), - Spacer(flex: 10) - ], - ), - ), - ), - ); - } -} - diff --git a/lib/payments/view/screens/restore_password/new_password_screen.dart b/lib/payments/view/screens/restore_password/new_password_screen.dart deleted file mode 100644 index 1277e3a5..00000000 --- a/lib/payments/view/screens/restore_password/new_password_screen.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class NewPasswordScreen extends StatefulWidget{ - const NewPasswordScreen({super.key}); - - @override - State createState() => NewPasswordScreenState(); - -} - -class NewPasswordScreenState extends State { - - bool passwordVisible = false; - bool equalPasswords = false; - String password = ""; - var securityChecks = {"min": false, "capital": false, "number": false, "special": false}; - - @override - void initState() { - passwordVisible = false; - equalPasswords = false; - String password = ""; - securityChecks = {"min": false, "capital": false, "number": false, "special": false}; - super.initState(); - } - - @override - Widget build(BuildContext context) { - final theme = context.read(); - - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Center( - child: Column( - spacing: 10, - children: [ - Spacer(flex: 4), - Text("Recuperar contraseña", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - TextField( - obscureText: passwordVisible, - enableSuggestions: false, - autocorrect: false, - decoration: InputDecoration( - labelText: "Nueva contraseña", - hintText: "********", - border: OutlineInputBorder(), - suffixIcon: IconButton( - icon: Icon(passwordVisible - ? Icons.visibility - : Icons.visibility_off), - onPressed: () { - setState(() { - passwordVisible = !passwordVisible; - }); - }, - ), - ), - onChanged: (value)=>{ - setState(() { - password = value; - securityChecks = checkSecurity(value); - }) - }, - ), - TextField( - obscureText: passwordVisible, - enableSuggestions: false, - autocorrect: false, - decoration: InputDecoration( - labelText: "Repetir contraseña", - hintText: "********", - border: OutlineInputBorder(), - suffixIcon: IconButton( - icon: Icon(passwordVisible - ? Icons.visibility - : Icons.visibility_off), - onPressed: () { - setState(() { - passwordVisible = !passwordVisible; - }); - }, - ), - ), - onChanged: (value)=>{setState(() { - equalPasswords = password == value; - })}, - ), - Row(children: [ - securityChecks["min"]! ? - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)) : - Icon(Icons.cancel_outlined, color: theme.getColorFor(ThemeCode.button_secondary)), - Text("Al menos 8 caracteres") - ]), - Row(children: [ - securityChecks["capital"]! ? - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)) : - Icon(Icons.cancel_outlined, color: theme.getColorFor(ThemeCode.button_secondary)), - Text("Una mayúscula") - ]), - Row(children: [ - securityChecks["number"]! ? - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)) : - Icon(Icons.cancel_outlined, color: theme.getColorFor(ThemeCode.button_secondary)), - Text("Un número") - ]), - Row(children: [ - securityChecks["special"]! ? - Icon(Icons.check, color: theme.getColorFor(ThemeCode.button_primary)) : - Icon(Icons.cancel_outlined, color: theme.getColorFor(ThemeCode.button_secondary)), - Text("Un carácter especial") - ]), - Spacer(flex: 1), - FilledButton( - onPressed: ()=>{}, - child: Container( - width: double.infinity, - padding: EdgeInsets.all(20), - child: Text("Aceptar") - ) - ), - Spacer(flex: 4) - ], - ), - ), - ), - ); - } - - //TODO: Extraer de la vista - Map checkSecurity(String value) { - Map checks = {}; - - checks["min"] = value.length >= 8; - checks["capital"] = RegExp(r'[A-Z]').hasMatch(value); - checks["number"] = RegExp(r'[0-9]').hasMatch(value); - checks["special"] = RegExp(r'[^A-Za-z0-9]').hasMatch(value); - - return checks; - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/restore_password/restore_password_screen.dart b/lib/payments/view/screens/restore_password/restore_password_screen.dart deleted file mode 100644 index 26ecb231..00000000 --- a/lib/payments/view/screens/restore_password/restore_password_screen.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/domain/ports/theme_port.dart'; -import 'package:sf_app_platform/payments/view/screens/restore_password/email_sent_screen.dart'; - -class RestorePasswordScreen extends StatelessWidget{ - const RestorePasswordScreen({super.key}); - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return Scaffold( - body: Container( - margin: EdgeInsets.all(30), - child: Center(child: - Column( - spacing: 30, - children: [ - Spacer(flex: 8), - Text("Recuperar contaseña", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text("Introduce tu email para enviarte un enlace de recuperación"), - TextField(decoration: InputDecoration(labelText: "Correo electrónico", hintText: "Correo electrónico", border: OutlineInputBorder())), - Row( - spacing: 20, - children: [ - Expanded(child: OutlinedButton(onPressed: ()=>{Navigator.pop(context)}, child: Text("Volver"))), - Expanded(child: FilledButton( - onPressed: ()=>{Navigator.push(context, MaterialPageRoute(builder: (_)=>EmailSentScreen(email: "")))}, - style: ButtonStyle(backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_secondary))), - child: Text("Enviar") - )) - ], - ), - Spacer(flex: 10) - ], - ) - ), - ), - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/settings_screen.dart b/lib/payments/view/screens/settings_screen.dart deleted file mode 100644 index 4a5b8a1d..00000000 --- a/lib/payments/view/screens/settings_screen.dart +++ /dev/null @@ -1,231 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../domain/ports/theme_port.dart'; - -class SettingsScreen extends StatefulWidget{ - @override - State createState() => SettingsScreenState(); - -} - -class SettingsScreenState extends State{ - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - final name = "Juan"; - final balance = 50; - final fullName = "Juan Pérez Cruz"; - final birthDate = "08/03/1976"; - final relation = "Padre"; - final address = "Calle Gran Vía 30 6º, 28013"; - final country = "España"; - final nationality = "Español"; - final email = "juanpcruz@gmail.com"; - final phone = "123456789"; - - final content = [ - Center(child: Column(children: [ - Text("Ajustes de la cuenta", style: TextStyle(fontSize: 30, color: theme.getColorFor(ThemeCode.text_secondary))), - Text("Saldo: $balance€", style: TextStyle(color: theme.getColorFor(ThemeCode.text_secondary))), - ])), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column(children: [ - Row( - spacing: 10, - children: [ - Text(name, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar wallet")), - Icon(Icons.attach_money), - ], - ), - Text(relation) - ]), - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column(children: [ - Row( - spacing: 10, - children: [ - Text("Datos personales", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar")) - ], - ), - Text.rich(TextSpan(text:"Nombre: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: fullName, style: TextStyle(fontWeight: FontWeight.normal)) - ])), - Text.rich(TextSpan(text:"Fecha de nacimiento: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: birthDate, style: TextStyle(fontWeight: FontWeight.normal)) - ])), - Text.rich(TextSpan(text:"Familiar: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: relation, style: TextStyle(fontWeight: FontWeight.normal)) - ])) - ]), - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column(children: [ - Row( - spacing: 10, - children: [ - Text("Dirección", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar")) - ], - ), - Text.rich(TextSpan(text:"Dirección: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: address, style: TextStyle(fontWeight: FontWeight.normal)) - ])), - Text.rich(TextSpan(text:"País: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: country, style: TextStyle(fontWeight: FontWeight.normal)) - ])), - Text.rich(TextSpan(text:"Nacionalidad: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: nationality, style: TextStyle(fontWeight: FontWeight.normal)) - ])) - ]), - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column(children: [ - Row( - spacing: 10, - children: [ - Text("Usuario", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar")) - ], - ), - Text.rich(TextSpan(text:"Correo: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: email, style: TextStyle(fontWeight: FontWeight.normal)) - ])), - Text.rich(TextSpan(text:"Teléfono: ", style: TextStyle(fontWeight: FontWeight.bold), - children: [TextSpan(text: phone, style: TextStyle(fontWeight: FontWeight.normal)) - ])) - ]), - ), - - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Row( - spacing: 10, - children: [ - Text("Cambio de contraseña", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar")) - ], - ), - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary) - ), - child: Column( - children: [ - Row( - spacing: 10, - children: [ - Text("Método de pago", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Editar")) - ], - ), - Text("Puedes cambiar el método de pago en cualquier momento") - ] - ) - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_tertiary) - ), - child: Column( - children: [ - Row( - spacing: 10, - children: [ - Text("Plan anual", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Spacer(), - TextButton(onPressed: ()=>{}, child: Text("Cambiar Plan")) - ], - ), - Text("Sin permanencia"), - Text("Llamadas y datos ilimitados"), - Text("2 meses gratis"), - ] - ) - ), - - TextButton(onPressed: ()=>{}, child: Text("Contáctanos")), - TextButton(onPressed: ()=>{}, child: Text("Preguntas frecuentes")), - ]; - - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.background_secondary), - body: Stack(children: [ - DecoratedBox( - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(30)), - color: Color(0xFF4B4B4B) - ), - child: SizedBox(width: double.infinity, height: 200), - ), - Column(children: [Expanded (child: Container( - margin: EdgeInsets.all(20), - child: ListView.separated( - itemBuilder: (BuildContext context, int index) {return content[index];}, - separatorBuilder: (BuildContext context, int index) { - return Divider(color: Colors.transparent, height: 20); - }, - itemCount: content.length))), - Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)), - color: theme.getColorFor(ThemeCode.background_primary), - ), - child: Column( - children: [ - FilledButton(onPressed: ()=>{}, child: Container( - width: double.infinity, - padding: EdgeInsets.all(20), - child: Center(child: Text("Guardar cambios")) - )), - TextButton(onPressed: ()=>Navigator.pop(context), child: Text("Cancelar")) - ], - ), - ), - ]) - ]) - ); - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/signup/signup_address_screen.dart b/lib/payments/view/screens/signup/signup_address_screen.dart deleted file mode 100644 index d2c713ed..00000000 --- a/lib/payments/view/screens/signup/signup_address_screen.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/material.dart'; - -class SignupAddressScreen extends StatelessWidget{ - - @override - Widget build(BuildContext context) { - return Column( - spacing: 30, - children: [ - Text("Domicilio"), - Text("Tu dirección", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), - Text("Tu dirección nos ayuda a verificar y mantener la seguridad de tu cuenta"), - TextField(decoration: InputDecoration(hintText: "Dirección completa", border: OutlineInputBorder())), - TextField(decoration: InputDecoration(hintText: "Ciudad", border: OutlineInputBorder())), - DropdownMenu( - dropdownMenuEntries: List.generate(3, (int index) { - return DropdownMenuEntry(value: "España", label: "España"); - }), - hintText: "País", - width: double.infinity, - ), - TextField(decoration: InputDecoration(hintText: "Nacionalidad", border: OutlineInputBorder())) - ], - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/signup/signup_screen.dart b/lib/payments/view/screens/signup/signup_screen.dart deleted file mode 100644 index cded314a..00000000 --- a/lib/payments/view/screens/signup/signup_screen.dart +++ /dev/null @@ -1,100 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/account_created_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_address_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_personal_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_user_screen.dart'; - -import '../../../domain/ports/theme_port.dart'; - -class SignupScreen extends StatefulWidget { - const SignupScreen({super.key}); - - @override - _SignupScreenState createState() => _SignupScreenState(); -} - -class _SignupScreenState extends State { - int currentStep = 0; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return MaterialApp( - home: Scaffold( - body: Center(child: Container( - color: theme.getColorFor(ThemeCode.background_primary), - padding: const EdgeInsets.all(20), - child: SizedBox( - child: Stepper( - controlsBuilder: (BuildContext context, ControlsDetails controls) { - return Row( - children: [ - Expanded(child: OutlinedButton( - onPressed: controls.onStepCancel, - child: const Text('Atrás'), - )), - Expanded(child: FilledButton( - style: ButtonStyle( - backgroundColor: WidgetStatePropertyAll(theme.getColorFor(ThemeCode.button_secondary)) - ), - onPressed: controls.onStepContinue, - child: const Text('Siguiente'), - )), - ], - ); - }, - type: StepperType.horizontal, - currentStep: currentStep, - onStepCancel: () => currentStep == 0 - ? null - : setState(() { - currentStep -= 1; - }), - onStepContinue: () { - bool isLastStep = (currentStep == getSteps().length - 1); - if (isLastStep) { - Navigator.pushReplacement(context, MaterialPageRoute( - builder: (_) => AccountCreatedScreen(), - )); - } else { - setState(() { - currentStep += 1; - }); - } - }, - steps: getSteps(), - ) - )), - )), - ); - } - - List getSteps() { - return [ - Step( - state: currentStep > 0 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 0, - stepStyle: currentStep >= 0? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.transparent, boxShadow: BoxShadow(spreadRadius: 5), indexStyle: TextStyle(color: Colors.transparent)), - title: const Text(""), - content: SignupPersonalScreen() - ), - Step( - state: currentStep > 1 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 1, - stepStyle: currentStep >= 1? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.white, boxShadow: BoxShadow(spreadRadius: 1), indexStyle: TextStyle(color: Colors.transparent)), - title: const Text(""), - content: SignupAddressScreen() - ), - Step( - state: currentStep > 2 ? StepState.complete : StepState.indexed, - isActive: currentStep >= 2, - stepStyle: currentStep >= 2? StepStyle(connectorThickness: 0, color: Color(0xFF329e95), indexStyle: TextStyle(color: Colors.transparent)) : StepStyle(connectorThickness: 0, color: Colors.white, boxShadow: BoxShadow(spreadRadius: 1), indexStyle: TextStyle(color: Colors.transparent)), - title: const Text(""), - content: SignupUserScreen() - ), - ]; - } -} \ No newline at end of file diff --git a/lib/payments/view/screens/wage_screen.dart b/lib/payments/view/screens/wage_screen.dart deleted file mode 100644 index dd114c0f..00000000 --- a/lib/payments/view/screens/wage_screen.dart +++ /dev/null @@ -1,197 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:provider/provider.dart'; -import 'package:sf_app_platform/payments/view/screens/core/wallet_management_layout.dart'; - -import '../../domain/entities/kid.dart'; -import '../../domain/ports/theme_port.dart'; - -class WageScreen extends StatefulWidget{ - final Kid kid; - - const WageScreen({super.key, required this.kid}); - - @override - State createState() => WageScreenState(); - -} - -class WageScreenState extends State{ - String frequence = "weekly"; - var conditions = {"weeklyLimits": false, "incidences": false, "holidays": false}; - - @override - Widget build(BuildContext context) { - ThemePort theme = context.read(); - - return WalletManagementLayout( - kid: widget.kid, - children: [ - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Paga automática", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - TextField( - decoration: InputDecoration(labelText: "Cantidad", hintText: "0€", border: OutlineInputBorder()), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly - ] - ), - Text("Saldo total disponible después: 30 €") - ], - ), - ), - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Frecuencia", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Cuándo se envía el dinero"), - CheckboxListTile( - title: Text('Semanal'), - controlAffinity: ListTileControlAffinity.leading, - value: frequence=="weekly", - onChanged: (value) { - setState(() { - frequence="weekly"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Cada dos semanas'), - controlAffinity: ListTileControlAffinity.leading, - value: frequence=="biweekly", - onChanged: (value) { - setState(() { - frequence="biweekly"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Mensual'), - controlAffinity: ListTileControlAffinity.leading, - value: frequence=="monthly", - onChanged: (value) { - setState(() { - frequence="monthly"; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - Container(width: double.infinity, child: DropdownMenu( - label: Text("Día de la semana"), - initialSelection: "Domingo", - dropdownMenuEntries: List.generate(7, (int index){ - final days = ["Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"]; - return DropdownMenuEntry(value: days[index], label: days[index]); - }) - )), - DropdownMenu( - label: Text("Hora del día"), - initialSelection: 9, - dropdownMenuEntries: List.generate(24, (int index){ - return DropdownMenuEntry(value: index, label: "$index:00"); - }) - ), - TextField( - minLines: 3, - maxLines: 3, - maxLength: 150, - decoration: InputDecoration( - labelText: "Escribir mensaje a ${widget.kid.name} del motivo del ingreso", - hintText: "Escribe tu mensaje", - border: OutlineInputBorder(), - ) - ), - Align( - alignment: Alignment.topLeft, - child: Text("Máximo 150 caracteres"), - ) - ], - ), - ), - Container( - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - padding: EdgeInsets.all(10), - child: Column( - spacing: 10, - children: [ - Text("Condiciones", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)), - Text("Este dato aparecerá en el reloj del peque"), - CheckboxListTile( - title: Text('Sólo si cumple límites semanales'), - controlAffinity: ListTileControlAffinity.leading, - value: conditions["weeklyLimits"], - onChanged: (value) { - setState(() { - conditions["weeklyLimits"] = !conditions["weeklyLimits"]!; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Sólo si no ha tenido incidencias'), - controlAffinity: ListTileControlAffinity.leading, - value: conditions["incidences"], - onChanged: (value) { - setState(() { - conditions["incidences"] = !conditions["incidences"]!; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - CheckboxListTile( - title: Text('Pausar durante vacaciones'), - controlAffinity: ListTileControlAffinity.leading, - value: conditions["holidays"], - onChanged: (value) { - setState(() { - conditions["holidays"] = !conditions["holidays"]!; - }); - }, - activeColor: theme.getColorFor(ThemeCode.button_primary), - ), - ], - ), - ), - ], - footer: Container( - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.background_primary), - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)) - ), - child: Column( - spacing: 10, - children: [ - FilledButton(onPressed: ()=>{}, child: Container( - width:double.infinity, - padding: EdgeInsets.all(20), - child: Center(child: Text("Activar paga automática")) - )), - TextButton(onPressed: ()=>{}, child: Text("Cancelar")) - ], - ), - ) - ); - } - -} \ No newline at end of file diff --git a/lib/payments/view/screens/welcome_screen.dart b/lib/payments/view/screens/welcome_screen.dart deleted file mode 100644 index cc3a3dcb..00000000 --- a/lib/payments/view/screens/welcome_screen.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:sf_app_platform/payments/view/screens/link_phone_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/signup/signup_screen.dart'; - -import 'core/dashboard_screen.dart'; - -class WelcomeScreen extends StatelessWidget { - const WelcomeScreen({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold( body: Center( - child:Column( - children:[ - Spacer(), - Expanded( - child: CarouselView( - scrollDirection: Axis.horizontal, - itemExtent: double.infinity, - itemSnapping: true, - shrinkExtent: 400, - children: generateSteps(), - ) - ), - FilledButton(onPressed: ()=>{jumpToNext(context)}, child: const Text('Continuar')), - Spacer() - ] - ), - )); - } - - void jumpToNext(BuildContext context){ - Navigator.pushReplacement( - context, - MaterialPageRoute( - builder: (_) => LinkPhoneScreen(), - ), - ); - return; - } - - List generateSteps(){ - return [ - Column( - spacing: 30, - children: [ - SvgPicture.asset("assets/images/ui/bienvenida_paso1.svg"), - Text("Aprende a gestionar su dinero", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),), - Text("Tu peque crea hábitos y se divierte mientras lo hace") - ] - ), - Column( - children: [ - SvgPicture.asset("assets/images/ui/bienvenida_paso2.svg"), - Text("Tranquilidad en cada pago que hacen"), - Text("Supervisa gastos, fija límites y acompáñalos en cada paso") - ] - ), - Column( - children: [ - SvgPicture.asset("assets/images/ui/bienvenida_paso3.svg"), - Text("Pagos fáciles y seguros en sus manos"), - Text("Podrá pagar desde su reloj.\n Sin móvil ni efectivo") - ] - ), - ]; - } -} \ No newline at end of file diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index cccf817a..00000000 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { -} diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 2387e1e3..00000000 --- a/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,705 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* sf_payments.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "sf_payments.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* sf_payments.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* sf_payments.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.savefamily.sfPayments.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sf_payments.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sf_payments"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.savefamily.sfPayments.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sf_payments.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sf_payments"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.savefamily.sfPayments.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sf_payments.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sf_payments"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 6ac51937..00000000 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift deleted file mode 100644 index b3c17614..00000000 --- a/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } - - override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { - return true - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d9..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eba..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa4..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb57226..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318e..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e72..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632cf..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 7c50e6ed..00000000 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = sf_payments - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.savefamily.sfPayments - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2025 com.savefamily. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a30..00000000 --- a/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 3cc05eb2..00000000 --- a/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift deleted file mode 100644 index 61f3bd1f..00000000 --- a/macos/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Cocoa -import FlutterMacOS -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 00000000..49ecf8a6 --- /dev/null +++ b/melos.yaml @@ -0,0 +1,11 @@ +name: sf-app-platform +packages: + - apps/** + - packages/** + - modules/** + - sf_shared/** + +scripts: + bootstrap: + run: melos bootstrap + description: Instala las dependencias de todos los paquetes diff --git a/melos_sf-app-platform.iml b/melos_sf-app-platform.iml new file mode 100644 index 00000000..96815595 --- /dev/null +++ b/melos_sf-app-platform.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/melos_sf_app_platform_mono_repo.iml b/melos_sf_app_platform_mono_repo.iml new file mode 100644 index 00000000..96815595 --- /dev/null +++ b/melos_sf_app_platform_mono_repo.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/modules/auth/.gitignore b/modules/auth/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/modules/auth/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/modules/auth/.metadata b/modules/auth/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/modules/auth/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/modules/auth/CHANGELOG.md b/modules/auth/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/modules/auth/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/modules/auth/LICENSE b/modules/auth/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/modules/auth/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/modules/auth/README.md b/modules/auth/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/modules/auth/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/modules/auth/analysis_options.yaml b/modules/auth/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/modules/auth/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/modules/auth/lib/auth.dart b/modules/auth/lib/auth.dart new file mode 100644 index 00000000..03108e74 --- /dev/null +++ b/modules/auth/lib/auth.dart @@ -0,0 +1,6 @@ +export 'src/device_sign_up/link_watch/create_profile_screen.dart'; +export 'src/onboarding/onboarding_builder.dart'; +export 'src/login/link_phone_builder.dart'; +export 'src/login/phone_code_builder.dart'; +export 'src/login/login_builder.dart'; +export 'src/recover_password/recover_password_builder.dart'; diff --git a/lib/payments/view/screens/add_kid_screen.dart b/modules/auth/lib/src/device_sign_up/add_kid_screen.dart similarity index 51% rename from lib/payments/view/screens/add_kid_screen.dart rename to modules/auth/lib/src/device_sign_up/add_kid_screen.dart index 9bc5a29d..476e77bb 100644 --- a/lib/payments/view/screens/add_kid_screen.dart +++ b/modules/auth/lib/src/device_sign_up/add_kid_screen.dart @@ -1,9 +1,8 @@ -import 'package:flutter/cupertino.dart'; +import 'package:auth/src/device_sign_up/link_watch/create_profile_screen.dart'; import 'package:flutter/material.dart'; -import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; -import 'package:sf_app_platform/payments/view/screens/link_watch/create_profile_screen.dart'; -class AddKidScreen extends StatelessWidget{ +class AddKidScreen extends StatelessWidget { + const AddKidScreen({super.key}); @override Widget build(BuildContext context) { @@ -15,40 +14,43 @@ class AddKidScreen extends StatelessWidget{ children: [ Spacer(flex: 6), Text("Añade a tu peque"), - Text("Controla su gasto a la vez que aprende hábitos financieros responsables"), + Text( + "Controla su gasto a la vez que aprende hábitos financieros responsables", + ), Container( margin: EdgeInsets.symmetric(vertical: 30, horizontal: 50), child: Row( children: [ - Column( - children: [ - Text("1"), - Text("2"), - Text("3") - ], - ), + Column(children: [Text("1"), Text("2"), Text("3")]), Column( children: [ Text("Crea su perfil"), Text("Vincula su correa y su reloj"), - Text("Carga su hucha") + Text("Carga su hucha"), ], - ) + ), ], ), ), Text("¡Y todo listo para que tenga su dinero!"), Text("Recuerda que necesitas tener un Plan SaveFamily"), - Text("Si aún no lo tienes, puedes conseguirlo a través de nuestra web"), + Text( + "Si aún no lo tienes, puedes conseguirlo a través de nuestra web", + ), Spacer(flex: 8), - Container( + SizedBox( width: double.infinity, - child: FilledButton(onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>CreateProfileScreen())), child: Text("¡Empezar!")) - ) + child: FilledButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => CreateProfileScreen()), + ), + child: Text("¡Empezar!"), + ), + ), ], - ) - ) + ), + ), ); } - -} \ No newline at end of file +} diff --git a/modules/auth/lib/src/device_sign_up/contact_screen.dart b/modules/auth/lib/src/device_sign_up/contact_screen.dart new file mode 100644 index 00000000..e7f7852c --- /dev/null +++ b/modules/auth/lib/src/device_sign_up/contact_screen.dart @@ -0,0 +1,79 @@ +import 'package:flutter/material.dart'; + +class ContactScreen extends StatelessWidget { + const ContactScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 10, + children: [ + Text( + "Contáctanos", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Text( + "Trasládanos tus dudas e intentaremos responderte lo antes posible", + ), + DropdownMenu( + initialSelection: "es", + label: Text("País"), + dropdownMenuEntries: [ + DropdownMenuEntry(value: "es", label: "España"), + DropdownMenuEntry(value: "fr", label: "Francia"), + DropdownMenuEntry(value: "pt", label: "Portugal"), + ], + ), + DropdownMenu( + initialSelection: "online", + label: Text("Canal de compra"), + dropdownMenuEntries: [ + DropdownMenuEntry(value: "online", label: "SF online shop"), + ], + ), + Expanded( + child: TextField( + decoration: InputDecoration( + labelText: "Nombre", + hintText: "Nombre y apellidos", + border: OutlineInputBorder(), + ), + ), + ), + Expanded( + child: TextField( + decoration: InputDecoration( + labelText: "Correo electrónico", + hintText: "Correo electrónico", + border: OutlineInputBorder(), + ), + ), + ), + Expanded( + child: TextField( + minLines: 3, + maxLines: 3, + decoration: InputDecoration( + labelText: "Asunto del mensaje", + hintText: "Escribe tu mensaje", + border: OutlineInputBorder(), + ), + ), + ), + Expanded( + child: FilledButton( + onPressed: () => Navigator.pop(context), + child: Text("Enviar"), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/device_sign_up/link_watch/account_created_kid_screen.dart b/modules/auth/lib/src/device_sign_up/link_watch/account_created_kid_screen.dart new file mode 100644 index 00000000..ca63a267 --- /dev/null +++ b/modules/auth/lib/src/device_sign_up/link_watch/account_created_kid_screen.dart @@ -0,0 +1,87 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:auth/src/device_sign_up/add_kid_screen.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class AccountCreatedKidScreen extends ConsumerWidget { + const AccountCreatedKidScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final model = "SaveWatch Plus 2"; + final id = "1106652524"; + final fullName = "Carlos Pérez Cruz"; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 20, + children: [ + Spacer(flex: 2), + Icon( + Icons.check, + color: theme.getColorFor(ThemeCode.backgroundPrimary), + size: 50, + ), + Text( + "Cuenta creada", + style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), + ), + Text.rich( + TextSpan( + text: "Has creado la cuenta para:\n", + children: [ + TextSpan( + text: fullName, + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + ), + Text("Reloj: $model"), + Text("ID del reloj: $id"), + Text( + "Ya puedes darle su primera paga paa que empiece a disfrutarla en su reloj", + style: TextStyle(fontWeight: FontWeight.bold), + ), + Spacer(flex: 6), + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topRight: Radius.circular(20), + topLeft: Radius.circular(20), + ), + ), + child: Column( + children: [ + Expanded( + child: FilledButton( + onPressed: () => { + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (_) => AddKidScreen()), + ), + }, + child: Text("Dale su primera paga"), + ), + ), + TextButton( + onPressed: () => {}, + child: Text("Añadir otro peque"), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/device_sign_up/link_watch/create_profile_screen.dart b/modules/auth/lib/src/device_sign_up/link_watch/create_profile_screen.dart new file mode 100644 index 00000000..23b2973c --- /dev/null +++ b/modules/auth/lib/src/device_sign_up/link_watch/create_profile_screen.dart @@ -0,0 +1,304 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class CreateProfileScreen extends ConsumerWidget { + const CreateProfileScreen({super.key}); + + final int currentStep = 0; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 10, + children: [ + Stepper( + type: StepperType.horizontal, + currentStep: currentStep, + onStepCancel: () => currentStep == 0, + // ? null + // : + // setState(() { + // currentStep -= 1; + // }), + controlsBuilder: + (BuildContext context, ControlsDetails controls) { + return FilledButton( + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonPrimary), + ), + ), + onPressed: controls.onStepContinue, + child: const Text('Continuar'), + ); + }, + steps: [ + Step( + state: currentStep > 0 + ? StepState.complete + : StepState.indexed, + isActive: currentStep >= 0, + stepStyle: currentStep >= 0 + ? StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : StepStyle( + connectorThickness: 0, + color: Colors.transparent, + boxShadow: BoxShadow(spreadRadius: 5), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: Text(""), + content: Column( + spacing: 10, + children: [ + Text( + "Crea su perfil", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + Text( + "Necesitamos estos datos para crear su cuenta y gestionar sus pagas y gastos", + ), + Text( + "Comienza con un peque; luego podrás agregar más", + style: TextStyle(fontWeight: FontWeight.bold), + ), + TextField( + decoration: InputDecoration( + labelText: "Nombre", + hintText: "Nombre", + border: OutlineInputBorder(), + ), + ), + TextField( + decoration: InputDecoration( + labelText: "Apellidos", + hintText: "Apellidos", + border: OutlineInputBorder(), + ), + ), + Row( + spacing: 10, + children: [ + Expanded( + child: TextField( + decoration: InputDecoration( + label: Text("Fecha de nacimiento"), + hintText: "DD", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + ), + ), + Expanded( + child: TextField( + decoration: InputDecoration( + hintText: "MM", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + ), + ), + Expanded( + child: TextField( + decoration: InputDecoration( + hintText: "AAAA", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + ), + ), + ], + ), + TextField( + decoration: InputDecoration( + labelText: "Dirección completa", + hintText: "Nombre de la calle", + border: OutlineInputBorder(), + ), + ), + TextButton( + onPressed: () => {}, + child: Text( + "Cambiar dirección", + style: TextStyle(fontWeight: FontWeight.bold), + ), + ), + ], + ), + ), + Step( + state: currentStep > 1 + ? StepState.complete + : StepState.indexed, + isActive: currentStep >= 1, + stepStyle: currentStep >= 1 + ? StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : StepStyle( + connectorThickness: 0, + color: Colors.transparent, + boxShadow: BoxShadow(spreadRadius: 5), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: Text(""), + content: Column( + spacing: 10, + children: [ + Text( + "Vincula su correa y su reloj", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + SvgPicture.asset("assets/images/ui/formulario.svg"), + Row( + spacing: 10, + children: [ + Text("1"), + Column( + children: [ + Text("Escanea la correa"), + Text("El peque podrá realizar pagos"), + ], + ), + ], + ), + Row( + spacing: 10, + children: [ + Text("2"), + Column( + children: [ + Text("Escanea el reloj"), + Text("Visualizarás los gastos que se hagan"), + ], + ), + ], + ), + ], + ), + ), + Step( + state: currentStep > 2 + ? StepState.complete + : StepState.indexed, + isActive: currentStep >= 2, + stepStyle: currentStep >= 2 + ? StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : StepStyle( + connectorThickness: 0, + color: Colors.transparent, + boxShadow: BoxShadow(spreadRadius: 5), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: Text(""), + content: Column( + spacing: 10, + children: [ + Text( + "¡Dale su primera paga!", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + Text( + "Enséñales a gestionar su dinero recargando su reloj", + ), + TextField( + decoration: InputDecoration( + labelText: "Cantidad de dinero de la paga", + hintText: "0€", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + ), + Text("Cantidad mínima: 10€"), + Text( + "Por seguridad sólo se puede disponer de un máximo de 150€ por wallet", + ), + Text("Método de ingreso"), + Row( + spacing: 20, + children: [ + OutlinedButton( + onPressed: () => {}, + child: SvgPicture.asset( + "assets/images/ui/visa.svg", + ), + ), + OutlinedButton( + onPressed: () => {}, + child: SvgPicture.asset( + "assets/images/ui/paypal.svg", + ), + ), + OutlinedButton( + onPressed: () => {}, + child: Row( + children: [ + SvgPicture.asset( + "assets/images/ui/banco.svg", + ), + Text("Transferencia"), + ], + ), + ), + ], + ), + Row( + children: [ + Icon(Icons.lock_outline), + Text( + "EL pago en esta app es seguro y cumple la normativa europea. Sólo se usará el dinero que decidas para las huchas de tus hijos.", + ), + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/login/link_phone_builder.dart b/modules/auth/lib/src/login/link_phone_builder.dart new file mode 100644 index 00000000..ee261810 --- /dev/null +++ b/modules/auth/lib/src/login/link_phone_builder.dart @@ -0,0 +1,18 @@ +import 'package:auth/src/login/presentation/link_phone_screen.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class LinkPhoneBuilder { + const LinkPhoneBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + final NavigationContract navigationContract = GetIt.I(); + + return MaterialPage( + key: state.pageKey, + child: LinkPhoneScreen(navigationContract: navigationContract), + ); + } +} diff --git a/modules/auth/lib/src/login/login_builder.dart b/modules/auth/lib/src/login/login_builder.dart new file mode 100644 index 00000000..c72a184e --- /dev/null +++ b/modules/auth/lib/src/login/login_builder.dart @@ -0,0 +1,18 @@ +import 'package:auth/src/login/presentation/login_screen.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class LoginBuilder { + const LoginBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + final NavigationContract navigationContract = GetIt.I(); + + return MaterialPage( + key: state.pageKey, + child: LoginScreen(navigationContract: navigationContract), + ); + } +} diff --git a/modules/auth/lib/src/login/phone_code_builder.dart b/modules/auth/lib/src/login/phone_code_builder.dart new file mode 100644 index 00000000..47a63946 --- /dev/null +++ b/modules/auth/lib/src/login/phone_code_builder.dart @@ -0,0 +1,18 @@ +import 'package:auth/src/login/presentation/phone_code_screen.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class PhoneCodeBuilder { + const PhoneCodeBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + final NavigationContract navigationContract = GetIt.I(); + + return MaterialPage( + key: state.pageKey, + child: PhoneCodeScreen(navigationContract: navigationContract), + ); + } +} diff --git a/modules/auth/lib/src/login/presentation/link_phone_screen.dart b/modules/auth/lib/src/login/presentation/link_phone_screen.dart new file mode 100644 index 00000000..413d949f --- /dev/null +++ b/modules/auth/lib/src/login/presentation/link_phone_screen.dart @@ -0,0 +1,76 @@ +import 'package:flutter/material.dart'; +import 'package:navigation/navigation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class LinkPhoneScreen extends ConsumerWidget { + final NavigationContract navigationContract; + + const LinkPhoneScreen({super.key, required this.navigationContract}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + TextEditingController phoneController = TextEditingController(); + // String? phone; + + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Expanded( + child: Center( + child: Column( + spacing: 10, + children: [ + Text( + "¡Nos alegra mucho tenerte por aquí!", + style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), + ), + Text( + "Para poder entrar de forma segura, te vamos a enviar un código al teléfono", + ), + Row( + spacing: 10, + children: [ + DropdownMenu( + initialSelection: "es", + dropdownMenuEntries: List.generate(3, ( + int index, + ) { + return DropdownMenuEntry( + labelWidget: Icon(Icons.outlined_flag), + label: "es", + value: "es", + ); + }), + ), + Expanded( + child: TextField( + onSubmitted: (String value) { + // phone = value; + }, + controller: phoneController, + decoration: InputDecoration( + labelText: "Teléfono móvil", + hintText: "Teléfono", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + ), + ), + ], + ), + SizedBox( + width: double.infinity, + child: FilledButton( + onPressed: () => + navigationContract.pushTo(AppRoutes.phoneCode), + child: Text("Siguiente"), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/payments/view/screens/loading_google_screen.dart b/modules/auth/lib/src/login/presentation/loading_google_screen.dart similarity index 63% rename from lib/payments/view/screens/loading_google_screen.dart rename to modules/auth/lib/src/login/presentation/loading_google_screen.dart index f21edf97..62223b22 100644 --- a/lib/payments/view/screens/loading_google_screen.dart +++ b/modules/auth/lib/src/login/presentation/loading_google_screen.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -class LoadingGoogleScreen extends StatelessWidget{ +class LoadingGoogleScreen extends StatelessWidget { const LoadingGoogleScreen({super.key}); @override @@ -13,14 +12,17 @@ class LoadingGoogleScreen extends StatelessWidget{ spacing: 50, children: [ Spacer(flex: 8), - Text("Continuar con Google", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)), + Text( + "Continuar con Google", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), CircularProgressIndicator(), Text("Redirigiendo a Google"), - Spacer(flex: 10) + Spacer(flex: 10), ], ), - ) + ), ), ); } -} \ No newline at end of file +} diff --git a/lib/payments/view/screens/loading_screen.dart b/modules/auth/lib/src/login/presentation/loading_screen.dart similarity index 100% rename from lib/payments/view/screens/loading_screen.dart rename to modules/auth/lib/src/login/presentation/loading_screen.dart diff --git a/modules/auth/lib/src/login/presentation/login_screen.dart b/modules/auth/lib/src/login/presentation/login_screen.dart new file mode 100644 index 00000000..d169799f --- /dev/null +++ b/modules/auth/lib/src/login/presentation/login_screen.dart @@ -0,0 +1,107 @@ +import 'package:auth/src/login/presentation/loading_google_screen.dart'; +import 'package:auth/src/sign_up/signup_screen.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'; + +class LoginScreen extends ConsumerStatefulWidget { + final NavigationContract navigationContract; + + const LoginScreen({super.key, required this.navigationContract}); + + @override + ConsumerState createState() => _LoginScreenState(); +} + +class _LoginScreenState extends ConsumerState { + bool passwordVisible = false; + + @override + Widget build(BuildContext context) { + // final l10n = SfLocalizations.of(context); + + return Scaffold( + body: Center( + child: Container( + margin: const EdgeInsets.all(30), + child: Column( + spacing: 10, + children: [ + const Icon(Icons.check, color: Color(0xFF329e95), size: 50), + const Text( + // context.translate(I18n.example) + '¡Te damos la bienvenida!', + style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), + ), + const TextField( + decoration: InputDecoration( + hintText: 'Nombre de usuario', + labelText: 'Nombre de usuario', + border: OutlineInputBorder(), + ), + ), + TextField( + obscureText: !passwordVisible, + enableSuggestions: false, + autocorrect: false, + decoration: InputDecoration( + labelText: 'Contraseña', + hintText: '********', + border: const OutlineInputBorder(), + suffixIcon: IconButton( + icon: Icon( + passwordVisible ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + passwordVisible = !passwordVisible; + }); + }, + ), + ), + ), + TextButton( + onPressed: () => + widget.navigationContract.pushTo(AppRoutes.recoverPassword), + child: const Text('¿Has olvidado la contraseña?'), + ), + FilledButton( + onPressed: () => + widget.navigationContract.pushTo(AppRoutes.dashboardHome), + child: const Text('Iniciar sesión'), + ), + const Stack(children: [Divider(), Text('o continúa con')]), + Row( + spacing: 20, + children: [ + OutlinedButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => const LoadingGoogleScreen(), + ), + ), + child: const Text('Google', semanticsLabel: 'Google'), + ), + OutlinedButton( + onPressed: () {}, + child: const Icon(Icons.apple, semanticLabel: 'Apple'), + ), + ], + ), + const Text('¿No tienes cuenta?'), + TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SignupScreen()), + ), + child: const Text('Crear una ahora'), + ), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/login/presentation/phone_code_screen.dart b/modules/auth/lib/src/login/presentation/phone_code_screen.dart new file mode 100644 index 00000000..7c2ba156 --- /dev/null +++ b/modules/auth/lib/src/login/presentation/phone_code_screen.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; +import 'package:navigation/navigation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; +// import 'package:sf_app_platform/payments/view/screens/login_screen.dart'; + +class PhoneCodeScreen extends ConsumerWidget { + // final String phone; + final NavigationContract navigationContract; + + PhoneCodeScreen({super.key, required this.navigationContract}); + // const PhoneCodeScreen({super.key, required this.phone}); + + // class PhoneCodeScreenState extends State { + final focusNodes = List.generate(6, (int i) { + return FocusNode(); + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Expanded( + child: Center( + child: Column( + spacing: 15, + children: [ + Spacer(flex: 8), + Text( + "Conéctate", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Text.rich( + TextSpan( + text: "Hemos enviado el código al ", + children: [ + TextSpan( + // text: widget.phone, + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + ), + Text("Introduce el código aquí"), + Row( + spacing: 20, + children: List.generate(6, (int i) { + return Expanded( + child: TextField( + focusNode: focusNodes[i], + keyboardType: TextInputType.number, + decoration: InputDecoration( + hintText: "0", + counterText: "", + border: OutlineInputBorder(), + ), + maxLength: 1, + onChanged: (String value) => { + value != "" + ? focusNodes[i + 1].requestFocus() + : focusNodes[i - 1].requestFocus(), + }, + ), + ); + }), + ), + FilledButton( + onPressed: () => {navigationContract.pushTo(AppRoutes.login)}, + child: Text("Entrar"), + ), + Text("¿No lo has recibido?"), + TextButton( + onPressed: () => {}, + child: Text( + "Volver a intentarlo", + style: TextStyle(fontWeight: FontWeight.bold), + ), + ), + Spacer(flex: 10), + ], + ), + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/onboarding/onboarding_builder.dart b/modules/auth/lib/src/onboarding/onboarding_builder.dart new file mode 100644 index 00000000..a1299a53 --- /dev/null +++ b/modules/auth/lib/src/onboarding/onboarding_builder.dart @@ -0,0 +1,18 @@ +import 'package:auth/src/onboarding/presentation/welcome_screen.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class OnboardingBuilder { + const OnboardingBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + final NavigationContract navigationContract = GetIt.I(); + + return MaterialPage( + key: state.pageKey, + child: WelcomeScreen(navigationContract: navigationContract), + ); + } +} diff --git a/modules/auth/lib/src/onboarding/presentation/welcome_screen.dart b/modules/auth/lib/src/onboarding/presentation/welcome_screen.dart new file mode 100644 index 00000000..b236327f --- /dev/null +++ b/modules/auth/lib/src/onboarding/presentation/welcome_screen.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:navigation/navigation.dart'; + +class WelcomeScreen extends ConsumerWidget { + final NavigationContract navigationContract; + + const WelcomeScreen({super.key, required this.navigationContract}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + return Scaffold( + body: Center( + child: Column( + children: [ + Spacer(), + Expanded( + child: CarouselView( + scrollDirection: Axis.horizontal, + itemExtent: double.infinity, + itemSnapping: true, + shrinkExtent: 400, + children: generateSteps(), + ), + ), + FilledButton( + onPressed: () => navigationContract.goTo(AppRoutes.linkPhone), + child: const Text('Continuar'), + ), + Spacer(), + ], + ), + ), + ); + } + + void jumpToNext(BuildContext context) { + // Navigator.pushReplacement( + // context, + // MaterialPageRoute(builder: (_) => LinkPhoneScreen()), + // ); + return; + } + + List generateSteps() { + return [ + Column( + spacing: 30, + children: [ + SvgPicture.asset("assets/images/ui/bienvenida_paso1.svg"), + Text( + "Aprende a gestionar su dinero", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Text("Tu peque crea hábitos y se divierte mientras lo hace"), + ], + ), + Column( + children: [ + SvgPicture.asset("assets/images/ui/bienvenida_paso2.svg"), + Text("Tranquilidad en cada pago que hacen"), + Text("Supervisa gastos, fija límites y acompáñalos en cada paso"), + ], + ), + Column( + children: [ + SvgPicture.asset("assets/images/ui/bienvenida_paso3.svg"), + Text("Pagos fáciles y seguros en sus manos"), + Text("Podrá pagar desde su reloj.\n Sin móvil ni efectivo"), + ], + ), + ]; + } +} diff --git a/modules/auth/lib/src/recover_password/presentation/email_sent_screen.dart b/modules/auth/lib/src/recover_password/presentation/email_sent_screen.dart new file mode 100644 index 00000000..58694e37 --- /dev/null +++ b/modules/auth/lib/src/recover_password/presentation/email_sent_screen.dart @@ -0,0 +1,83 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class EmailSentScreen extends ConsumerWidget { + final String email; + + const EmailSentScreen({super.key, required this.email}); + + @override + Widget build(BuildContext contex, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 20, + children: [ + Spacer(flex: 8), + Text( + "Recuperar contraseña", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Spacer(flex: 1), + Row( + spacing: 10, + children: [ + Icon( + Icons.check, + color: theme.getColorFor(ThemeCode.buttonPrimary), + ), + Text( + "Correo enviado correctamente", + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + Spacer(flex: 1), + Text( + "Revisa tu email y haz clic en el enlace para crear una nueva contraseña", + ), + Text( + "Si no recibes el correo en unos minutos, revisa tu carpeta de spam o pulsa \"Reenviar correo\"", + ), + Row( + spacing: 10, + children: [ + Expanded( + child: OutlinedButton( + onPressed: () => {}, + child: Text("Reenviar correo"), + ), + ), + Expanded( + child: FilledButton( + onPressed: () => { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => NewPasswordScreen(), + // ), + // ), + }, + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonSecondary), + ), + ), + child: Text("Continuar"), + ), + ), + ], + ), + Spacer(flex: 10), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/recover_password/presentation/new_password_screen.dart b/modules/auth/lib/src/recover_password/presentation/new_password_screen.dart new file mode 100644 index 00000000..53893d67 --- /dev/null +++ b/modules/auth/lib/src/recover_password/presentation/new_password_screen.dart @@ -0,0 +1,191 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class NewPasswordScreen extends ConsumerStatefulWidget { + const NewPasswordScreen({super.key}); + + @override + ConsumerState createState() => NewPasswordScreenState(); +} + +class NewPasswordScreenState extends ConsumerState { + bool passwordVisible = false; + bool equalPasswords = false; + String password = ''; + + Map securityChecks = { + 'min': false, + 'capital': false, + 'number': false, + 'special': false, + }; + + @override + void initState() { + super.initState(); + passwordVisible = false; + equalPasswords = false; + password = ''; + securityChecks = { + 'min': false, + 'capital': false, + 'number': false, + 'special': false, + }; + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + body: Container( + margin: const EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 10, + children: [ + const Spacer(flex: 4), + const Text( + 'Recuperar contraseña', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + TextField( + obscureText: !passwordVisible, + enableSuggestions: false, + autocorrect: false, + decoration: InputDecoration( + labelText: 'Nueva contraseña', + hintText: '********', + border: const OutlineInputBorder(), + suffixIcon: IconButton( + icon: Icon( + passwordVisible ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + passwordVisible = !passwordVisible; + }); + }, + ), + ), + onChanged: (value) { + setState(() { + password = value; + securityChecks = checkSecurity(value); + }); + }, + ), + TextField( + obscureText: !passwordVisible, + enableSuggestions: false, + autocorrect: false, + decoration: InputDecoration( + labelText: 'Repetir contraseña', + hintText: '********', + border: const OutlineInputBorder(), + suffixIcon: IconButton( + icon: Icon( + passwordVisible ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + passwordVisible = !passwordVisible; + }); + }, + ), + ), + onChanged: (value) { + setState(() { + equalPasswords = password == value; + }); + }, + ), + Row( + children: [ + Icon( + securityChecks['min']! + ? Icons.check + : Icons.cancel_outlined, + color: securityChecks['min']! + ? theme.getColorFor(ThemeCode.buttonPrimary) + : theme.getColorFor(ThemeCode.buttonSecondary), + ), + const SizedBox(width: 8), + const Text('Al menos 8 caracteres'), + ], + ), + Row( + children: [ + Icon( + securityChecks['capital']! + ? Icons.check + : Icons.cancel_outlined, + color: securityChecks['capital']! + ? theme.getColorFor(ThemeCode.buttonPrimary) + : theme.getColorFor(ThemeCode.buttonSecondary), + ), + const SizedBox(width: 8), + const Text('Una mayúscula'), + ], + ), + Row( + children: [ + Icon( + securityChecks['number']! + ? Icons.check + : Icons.cancel_outlined, + color: securityChecks['number']! + ? theme.getColorFor(ThemeCode.buttonPrimary) + : theme.getColorFor(ThemeCode.buttonSecondary), + ), + const SizedBox(width: 8), + const Text('Un número'), + ], + ), + Row( + children: [ + Icon( + securityChecks['special']! + ? Icons.check + : Icons.cancel_outlined, + color: securityChecks['special']! + ? theme.getColorFor(ThemeCode.buttonPrimary) + : theme.getColorFor(ThemeCode.buttonSecondary), + ), + const SizedBox(width: 8), + const Text('Un carácter especial'), + ], + ), + const Spacer(flex: 1), + FilledButton( + onPressed: + equalPasswords && + securityChecks.values.every((check) => check) + ? () {} + : null, + child: Container( + width: double.infinity, + padding: const EdgeInsets.all(20), + child: const Center(child: Text('Aceptar')), + ), + ), + const Spacer(flex: 4), + ], + ), + ), + ), + ); + } + + //TODO: Extraer de la vista + Map checkSecurity(String value) { + return { + 'min': value.length >= 8, + 'capital': RegExp(r'[A-Z]').hasMatch(value), + 'number': RegExp(r'[0-9]').hasMatch(value), + 'special': RegExp(r'[^A-Za-z0-9]').hasMatch(value), + }; + } +} diff --git a/modules/auth/lib/src/recover_password/presentation/restore_password_screen.dart b/modules/auth/lib/src/recover_password/presentation/restore_password_screen.dart new file mode 100644 index 00000000..7dc81a88 --- /dev/null +++ b/modules/auth/lib/src/recover_password/presentation/restore_password_screen.dart @@ -0,0 +1,74 @@ +import 'package:auth/src/recover_password/presentation/email_sent_screen.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:navigation/navigation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class RestorePasswordScreen extends ConsumerWidget { + final NavigationContract navigationContract; + + const RestorePasswordScreen({super.key, required this.navigationContract}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 30, + children: [ + Spacer(flex: 8), + Text( + "Recuperar contaseña", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Text( + "Introduce tu email para enviarte un enlace de recuperación", + ), + TextField( + decoration: InputDecoration( + labelText: "Correo electrónico", + hintText: "Correo electrónico", + border: OutlineInputBorder(), + ), + ), + Row( + spacing: 20, + children: [ + Expanded( + child: OutlinedButton( + onPressed: () => {Navigator.pop(context)}, + child: Text("Volver"), + ), + ), + Expanded( + child: FilledButton( + onPressed: () => { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => EmailSentScreen(email: ""), + ), + ), + }, + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonSecondary), + ), + ), + child: Text("Enviar"), + ), + ), + ], + ), + Spacer(flex: 10), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/recover_password/recover_password_builder.dart b/modules/auth/lib/src/recover_password/recover_password_builder.dart new file mode 100644 index 00000000..9741c4fc --- /dev/null +++ b/modules/auth/lib/src/recover_password/recover_password_builder.dart @@ -0,0 +1,18 @@ +import 'package:auth/src/recover_password/presentation/restore_password_screen.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class RecoverPasswordBuilder { + const RecoverPasswordBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + final NavigationContract navigationContract = GetIt.I(); + + return MaterialPage( + key: state.pageKey, + child: RestorePasswordScreen(navigationContract: navigationContract), + ); + } +} diff --git a/modules/auth/lib/src/sign_up/account_created_screen.dart b/modules/auth/lib/src/sign_up/account_created_screen.dart new file mode 100644 index 00000000..263202ff --- /dev/null +++ b/modules/auth/lib/src/sign_up/account_created_screen.dart @@ -0,0 +1,75 @@ +import 'package:auth/src/device_sign_up/add_kid_screen.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class AccountCreatedScreen extends ConsumerWidget { + const AccountCreatedScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final email = "usuario@example.com"; + final fullName = "Carlos Pérez Cruz"; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + spacing: 20, + children: [ + Spacer(flex: 10), + Icon( + Icons.check, + color: theme.getColorFor(ThemeCode.backgroundPrimary), + size: 50, + ), + Text( + "Cuenta creada", + style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), + ), + Text.rich( + TextSpan( + text: "Has creado la cuenta para:\n", + children: [ + TextSpan( + text: fullName, + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "Hemos enviado un email de verificación a:\n", + children: [ + TextSpan( + text: email, + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + ), + Text( + "Crea la cuenta de tu peque e ingresa su \nprimera paga para utilizarla con su reloj", + ), + FilledButton( + onPressed: () => { + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (_) => AddKidScreen()), + ), + }, + child: Text("Continuar"), + ), + Spacer(flex: 8), + ], + ), + ), + ), + ); + } +} diff --git a/modules/auth/lib/src/sign_up/signup_address_screen.dart b/modules/auth/lib/src/sign_up/signup_address_screen.dart new file mode 100644 index 00000000..d9cbc557 --- /dev/null +++ b/modules/auth/lib/src/sign_up/signup_address_screen.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; + +class SignupAddressScreen extends StatelessWidget { + const SignupAddressScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + spacing: 30, + children: [ + Text("Domicilio"), + Text( + "Tu dirección", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Text( + "Tu dirección nos ayuda a verificar y mantener la seguridad de tu cuenta", + ), + TextField( + decoration: InputDecoration( + hintText: "Dirección completa", + border: OutlineInputBorder(), + ), + ), + TextField( + decoration: InputDecoration( + hintText: "Ciudad", + border: OutlineInputBorder(), + ), + ), + DropdownMenu( + dropdownMenuEntries: List.generate(3, (int index) { + return DropdownMenuEntry(value: "España", label: "España"); + }), + hintText: "País", + width: double.infinity, + ), + TextField( + decoration: InputDecoration( + hintText: "Nacionalidad", + border: OutlineInputBorder(), + ), + ), + ], + ); + } +} diff --git a/lib/payments/view/screens/signup/signup_personal_screen.dart b/modules/auth/lib/src/sign_up/signup_personal_screen.dart similarity index 100% rename from lib/payments/view/screens/signup/signup_personal_screen.dart rename to modules/auth/lib/src/sign_up/signup_personal_screen.dart diff --git a/modules/auth/lib/src/sign_up/signup_screen.dart b/modules/auth/lib/src/sign_up/signup_screen.dart new file mode 100644 index 00000000..e662c053 --- /dev/null +++ b/modules/auth/lib/src/sign_up/signup_screen.dart @@ -0,0 +1,147 @@ +import 'package:auth/src/sign_up/account_created_screen.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:auth/src/sign_up/signup_address_screen.dart'; +import 'package:auth/src/sign_up/signup_personal_screen.dart'; +import 'package:auth/src/sign_up/signup_user_screen.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class SignupScreen extends ConsumerStatefulWidget { + const SignupScreen({super.key}); + + @override + ConsumerState createState() => _SignupScreenState(); +} + +class _SignupScreenState extends ConsumerState { + int currentStep = 0; + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + body: Center( + child: Container( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + padding: const EdgeInsets.all(20), + child: SizedBox( + child: Stepper( + type: StepperType.horizontal, + currentStep: currentStep, + steps: getSteps(), + controlsBuilder: + (BuildContext context, ControlsDetails controls) { + final canGoBack = currentStep > 0; + + return Row( + children: [ + Expanded( + child: OutlinedButton( + onPressed: canGoBack ? controls.onStepCancel : null, + child: const Text('Atrás'), + ), + ), + Expanded( + child: FilledButton( + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonSecondary), + ), + ), + onPressed: controls.onStepContinue, + child: const Text('Siguiente'), + ), + ), + ], + ); + }, + onStepCancel: () { + if (currentStep > 0) { + setState(() { + currentStep -= 1; + }); + } + }, + onStepContinue: () { + final isLastStep = currentStep == getSteps().length - 1; + + if (isLastStep) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (_) => const AccountCreatedScreen(), + ), + ); + } else { + setState(() { + currentStep += 1; + }); + } + }, + ), + ), + ), + ), + ); + } + + List getSteps() { + return [ + Step( + state: currentStep > 0 ? StepState.complete : StepState.indexed, + isActive: currentStep >= 0, + stepStyle: currentStep >= 0 + ? const StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : const StepStyle( + connectorThickness: 0, + color: Colors.transparent, + boxShadow: BoxShadow(spreadRadius: 5), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: const Text(""), + content: const SignupPersonalScreen(), + ), + Step( + state: currentStep > 1 ? StepState.complete : StepState.indexed, + isActive: currentStep >= 1, + stepStyle: currentStep >= 1 + ? const StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : const StepStyle( + connectorThickness: 0, + color: Colors.white, + boxShadow: BoxShadow(spreadRadius: 1), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: const Text(""), + content: const SignupAddressScreen(), + ), + Step( + state: currentStep > 2 ? StepState.complete : StepState.indexed, + isActive: currentStep >= 2, + stepStyle: currentStep >= 2 + ? const StepStyle( + connectorThickness: 0, + color: Color(0xFF329e95), + indexStyle: TextStyle(color: Colors.transparent), + ) + : const StepStyle( + connectorThickness: 0, + color: Colors.white, + boxShadow: BoxShadow(spreadRadius: 1), + indexStyle: TextStyle(color: Colors.transparent), + ), + title: const Text(""), + content: const SignupUserScreen(), + ), + ]; + } +} diff --git a/lib/payments/view/screens/signup/signup_user_screen.dart b/modules/auth/lib/src/sign_up/signup_user_screen.dart similarity index 100% rename from lib/payments/view/screens/signup/signup_user_screen.dart rename to modules/auth/lib/src/sign_up/signup_user_screen.dart diff --git a/modules/auth/pubspec.yaml b/modules/auth/pubspec.yaml new file mode 100644 index 00000000..53e47f0d --- /dev/null +++ b/modules/auth/pubspec.yaml @@ -0,0 +1,71 @@ +name: auth +# resolution: workspace +description: "A new Flutter package project." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + #modules dependencies go here + dashboard_shell: + path: ../../modules/dashboard_shell + #packages dependencies go here + design_system: + path: ../../packages/design_system + navigation: + path: ../../packages/navigation + sf_localizations: + path: ../../packages/sf_localizations + #dependencies go here + flutter_svg: ^2.2.1 + get_it: ^9.0.5 + go_router: ^17.0.0 + flutter_riverpod: ^3.0.3 + +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/modules/auth/pubspec_overrides.yaml b/modules/auth/pubspec_overrides.yaml new file mode 100644 index 00000000..3fce356d --- /dev/null +++ b/modules/auth/pubspec_overrides.yaml @@ -0,0 +1,20 @@ +# melos_managed_dependency_overrides: dashboard_shell,design_system,home,notifications,profile,sf_shared,navigation,utils,sf_localizations +dependency_overrides: + dashboard_shell: + path: ../dashboard_shell + design_system: + path: ../../packages/design_system + home: + path: ../home + navigation: + path: ../../packages/navigation + notifications: + path: ../notifications + profile: + path: ../profile + sf_localizations: + path: ../../packages/sf_localizations + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/modules/dashboard_shell/.gitignore b/modules/dashboard_shell/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/modules/dashboard_shell/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/modules/dashboard_shell/.metadata b/modules/dashboard_shell/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/modules/dashboard_shell/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/modules/dashboard_shell/CHANGELOG.md b/modules/dashboard_shell/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/modules/dashboard_shell/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/modules/dashboard_shell/LICENSE b/modules/dashboard_shell/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/modules/dashboard_shell/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/modules/dashboard_shell/README.md b/modules/dashboard_shell/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/modules/dashboard_shell/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/modules/dashboard_shell/analysis_options.yaml b/modules/dashboard_shell/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/modules/dashboard_shell/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/modules/dashboard_shell/lib/dashboard_builder.dart b/modules/dashboard_shell/lib/dashboard_builder.dart new file mode 100644 index 00000000..e3950561 --- /dev/null +++ b/modules/dashboard_shell/lib/dashboard_builder.dart @@ -0,0 +1,18 @@ +import 'package:dashboard_shell/dashboard_shell.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +class DashboardBuilder { + const DashboardBuilder(); + + Widget build(BuildContext context, StatefulNavigationShell navShell) { + final NavigationContract navigationContract = GetIt.I(); + + return DashboardScreen( + navigationShell: navShell, + navigationContract: navigationContract, + ); + } +} diff --git a/modules/dashboard_shell/lib/dashboard_shell.dart b/modules/dashboard_shell/lib/dashboard_shell.dart new file mode 100644 index 00000000..98603c17 --- /dev/null +++ b/modules/dashboard_shell/lib/dashboard_shell.dart @@ -0,0 +1,2 @@ +export 'src/presentation/main_shell_screen.dart'; +export 'dashboard_builder.dart'; diff --git a/modules/dashboard_shell/lib/src/presentation/main_shell_screen.dart b/modules/dashboard_shell/lib/src/presentation/main_shell_screen.dart new file mode 100644 index 00000000..6357823e --- /dev/null +++ b/modules/dashboard_shell/lib/src/presentation/main_shell_screen.dart @@ -0,0 +1,57 @@ +import 'package:dashboard_shell/src/presentation/main_shell_view_model.dart'; +import 'package:dashboard_shell/src/presentation/main_shell_view_state.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:go_router/go_router.dart'; +import 'package:navigation/navigation.dart'; + +final mainShellViewModelProvider = + NotifierProvider.autoDispose( + () => MainShellViewModel(), + ); + +class DashboardScreen extends ConsumerWidget { + final NavigationContract navigationContract; + final StatefulNavigationShell navigationShell; + + const DashboardScreen({ + super.key, + required this.navigationContract, + required this.navigationShell, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + final viewState = ref.watch(mainShellViewModelProvider); + final viewModel = ref.read(mainShellViewModelProvider.notifier); + + return Scaffold( + body: navigationShell, + bottomNavigationBar: NavigationBar( + backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), + selectedIndex: viewState.selectedIndex, + onDestinationSelected: (index) { + viewModel.onTabChanged(index); + navigationShell.goBranch(index); + }, + destinations: const [ + NavigationDestination(icon: Icon(Icons.home_outlined), label: "Home"), + NavigationDestination( + icon: Icon(Icons.watch_outlined), + label: "Activity", + ), + NavigationDestination( + icon: Icon(Icons.notifications_outlined), + label: "Notifications", + ), + NavigationDestination( + icon: Icon(Icons.person_outline_outlined), + label: "Profile", + ), + ], + ), + ); + } +} diff --git a/modules/dashboard_shell/lib/src/presentation/main_shell_view_model.dart b/modules/dashboard_shell/lib/src/presentation/main_shell_view_model.dart new file mode 100644 index 00000000..55892d01 --- /dev/null +++ b/modules/dashboard_shell/lib/src/presentation/main_shell_view_model.dart @@ -0,0 +1,13 @@ +import 'package:dashboard_shell/src/presentation/main_shell_view_state.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class MainShellViewModel extends Notifier { + @override + MainShellViewState build() { + return MainShellViewState(); + } + + void onTabChanged(int index) { + state = state.copyWith(selectedIndex: index); + } +} diff --git a/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.dart b/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.dart new file mode 100644 index 00000000..ed1e0175 --- /dev/null +++ b/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.dart @@ -0,0 +1,16 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +part 'main_shell_view_state.freezed.dart'; + +@freezed +abstract class MainShellViewState with _$MainShellViewState { + const factory MainShellViewState({ + @Default(0) int selectedIndex, + @Default(false) bool isLoading, + @Default(false) bool isComplete, + String? error, + }) = _MainShellViewState; + + + + +} diff --git a/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.freezed.dart b/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.freezed.dart new file mode 100644 index 00000000..aacd734d --- /dev/null +++ b/modules/dashboard_shell/lib/src/presentation/main_shell_view_state.freezed.dart @@ -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 'main_shell_view_state.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$MainShellViewState { + + int get selectedIndex; bool get isLoading; bool get isComplete; String? get error; +/// Create a copy of MainShellViewState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MainShellViewStateCopyWith get copyWith => _$MainShellViewStateCopyWithImpl(this as MainShellViewState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MainShellViewState&&(identical(other.selectedIndex, selectedIndex) || other.selectedIndex == selectedIndex)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.error, error) || other.error == error)); +} + + +@override +int get hashCode => Object.hash(runtimeType,selectedIndex,isLoading,isComplete,error); + +@override +String toString() { + return 'MainShellViewState(selectedIndex: $selectedIndex, isLoading: $isLoading, isComplete: $isComplete, error: $error)'; +} + + +} + +/// @nodoc +abstract mixin class $MainShellViewStateCopyWith<$Res> { + factory $MainShellViewStateCopyWith(MainShellViewState value, $Res Function(MainShellViewState) _then) = _$MainShellViewStateCopyWithImpl; +@useResult +$Res call({ + int selectedIndex, bool isLoading, bool isComplete, String? error +}); + + + + +} +/// @nodoc +class _$MainShellViewStateCopyWithImpl<$Res> + implements $MainShellViewStateCopyWith<$Res> { + _$MainShellViewStateCopyWithImpl(this._self, this._then); + + final MainShellViewState _self; + final $Res Function(MainShellViewState) _then; + +/// Create a copy of MainShellViewState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? selectedIndex = null,Object? isLoading = null,Object? isComplete = null,Object? error = freezed,}) { + return _then(_self.copyWith( +selectedIndex: null == selectedIndex ? _self.selectedIndex : selectedIndex // ignore: cast_nullable_to_non_nullable +as int,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,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [MainShellViewState]. +extension MainShellViewStatePatterns on MainShellViewState { +/// 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 Function( _MainShellViewState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MainShellViewState() 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 Function( _MainShellViewState value) $default,){ +final _that = this; +switch (_that) { +case _MainShellViewState(): +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? Function( _MainShellViewState value)? $default,){ +final _that = this; +switch (_that) { +case _MainShellViewState() 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 Function( int selectedIndex, bool isLoading, bool isComplete, String? error)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MainShellViewState() when $default != null: +return $default(_that.selectedIndex,_that.isLoading,_that.isComplete,_that.error);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 Function( int selectedIndex, bool isLoading, bool isComplete, String? error) $default,) {final _that = this; +switch (_that) { +case _MainShellViewState(): +return $default(_that.selectedIndex,_that.isLoading,_that.isComplete,_that.error);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? Function( int selectedIndex, bool isLoading, bool isComplete, String? error)? $default,) {final _that = this; +switch (_that) { +case _MainShellViewState() when $default != null: +return $default(_that.selectedIndex,_that.isLoading,_that.isComplete,_that.error);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _MainShellViewState implements MainShellViewState { + const _MainShellViewState({this.selectedIndex = 0, this.isLoading = false, this.isComplete = false, this.error}); + + +@override@JsonKey() final int selectedIndex; +@override@JsonKey() final bool isLoading; +@override@JsonKey() final bool isComplete; +@override final String? error; + +/// Create a copy of MainShellViewState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MainShellViewStateCopyWith<_MainShellViewState> get copyWith => __$MainShellViewStateCopyWithImpl<_MainShellViewState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MainShellViewState&&(identical(other.selectedIndex, selectedIndex) || other.selectedIndex == selectedIndex)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isComplete, isComplete) || other.isComplete == isComplete)&&(identical(other.error, error) || other.error == error)); +} + + +@override +int get hashCode => Object.hash(runtimeType,selectedIndex,isLoading,isComplete,error); + +@override +String toString() { + return 'MainShellViewState(selectedIndex: $selectedIndex, isLoading: $isLoading, isComplete: $isComplete, error: $error)'; +} + + +} + +/// @nodoc +abstract mixin class _$MainShellViewStateCopyWith<$Res> implements $MainShellViewStateCopyWith<$Res> { + factory _$MainShellViewStateCopyWith(_MainShellViewState value, $Res Function(_MainShellViewState) _then) = __$MainShellViewStateCopyWithImpl; +@override @useResult +$Res call({ + int selectedIndex, bool isLoading, bool isComplete, String? error +}); + + + + +} +/// @nodoc +class __$MainShellViewStateCopyWithImpl<$Res> + implements _$MainShellViewStateCopyWith<$Res> { + __$MainShellViewStateCopyWithImpl(this._self, this._then); + + final _MainShellViewState _self; + final $Res Function(_MainShellViewState) _then; + +/// Create a copy of MainShellViewState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? selectedIndex = null,Object? isLoading = null,Object? isComplete = null,Object? error = freezed,}) { + return _then(_MainShellViewState( +selectedIndex: null == selectedIndex ? _self.selectedIndex : selectedIndex // ignore: cast_nullable_to_non_nullable +as int,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,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + +// dart format on diff --git a/modules/dashboard_shell/pubspec.yaml b/modules/dashboard_shell/pubspec.yaml new file mode 100644 index 00000000..ffbf6a8b --- /dev/null +++ b/modules/dashboard_shell/pubspec.yaml @@ -0,0 +1,79 @@ +name: dashboard_shell +resoluction: workspace +description: "A new Flutter package project." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + + #modules dependencies go here + home: + path: ../../modules/home + notifications: + path: ../../modules/notifications + profile: + path: ../../modules/profile + #packages dependencies go here + design_system: + path: ../../packages/design_system + + #dependencies go here + navigation: ^0.0.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 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + riverpod_generator: ^3.0.3 + build_runner: ^2.7.1 + riverpod_lint: ^3.0.3 + + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/modules/dashboard_shell/pubspec_overrides.yaml b/modules/dashboard_shell/pubspec_overrides.yaml new file mode 100644 index 00000000..09ed4b3d --- /dev/null +++ b/modules/dashboard_shell/pubspec_overrides.yaml @@ -0,0 +1,20 @@ +# melos_managed_dependency_overrides: auth,design_system,home,notifications,profile,sf_shared,navigation,utils,sf_localizations +dependency_overrides: + auth: + path: ../auth + design_system: + path: ../../packages/design_system + home: + path: ../home + navigation: + path: ../../packages/navigation + notifications: + path: ../notifications + profile: + path: ../profile + sf_localizations: + path: ../../packages/sf_localizations + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/modules/home/.gitignore b/modules/home/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/modules/home/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/modules/home/.metadata b/modules/home/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/modules/home/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/modules/home/CHANGELOG.md b/modules/home/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/modules/home/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/modules/home/LICENSE b/modules/home/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/modules/home/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/modules/home/README.md b/modules/home/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/modules/home/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/modules/home/analysis_options.yaml b/modules/home/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/modules/home/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/modules/home/lib/home.dart b/modules/home/lib/home.dart new file mode 100644 index 00000000..93a3c53e --- /dev/null +++ b/modules/home/lib/home.dart @@ -0,0 +1,2 @@ +export 'src/presentation/home_screen.dart'; +export 'src/home_builder.dart'; diff --git a/modules/home/lib/src/home_builder.dart b/modules/home/lib/src/home_builder.dart new file mode 100644 index 00000000..2cfc9bee --- /dev/null +++ b/modules/home/lib/src/home_builder.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:home/home.dart'; + +class HomeBuilder { + const HomeBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + return MaterialPage(child: HomeScreen()); + } +} diff --git a/modules/home/lib/src/presentation/deposit_screen.dart b/modules/home/lib/src/presentation/deposit_screen.dart new file mode 100644 index 00000000..4f16724a --- /dev/null +++ b/modules/home/lib/src/presentation/deposit_screen.dart @@ -0,0 +1,207 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:home/src/presentation/wallet_management_layout.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class DepositScreen extends ConsumerStatefulWidget { + final Kid kid; + + const DepositScreen({super.key, required this.kid}); + + @override + ConsumerState createState() => _DepositScreenState(); +} + +class _DepositScreenState extends ConsumerState { + String reason = 'other'; + bool program = false; + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return WalletManagementLayout( + kid: widget.kid, + footer: Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + children: [ + FilledButton( + onPressed: () {}, + child: Container( + width: double.infinity, + padding: const EdgeInsets.all(20), + child: const Center(child: Text('Añadir dinero')), + ), + ), + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Cancelar'), + ), + ], + ), + ), + children: [ + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Ingresar dinero en el wallet', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + TextField( + decoration: const InputDecoration( + labelText: 'Cantidad', + hintText: '0€', + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + ), + const Align( + alignment: Alignment.topLeft, + child: Text('Saldo total disponible después: 30 €'), + ), + ], + ), + ), + + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Motivo', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + const Text('Este dato aparecerá en el reloj del peque'), + CheckboxListTile( + title: const Text('Paga semanal'), + controlAffinity: ListTileControlAffinity.leading, + value: reason == 'weekly', + onChanged: (_) { + setState(() { + reason = 'weekly'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Objetivo semanal cumplido'), + controlAffinity: ListTileControlAffinity.leading, + value: reason == 'goal', + onChanged: (_) { + setState(() { + reason = 'goal'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Gastos extraordinarios'), + controlAffinity: ListTileControlAffinity.leading, + value: reason == 'extraordinary', + onChanged: (_) { + setState(() { + reason = 'extraordinary'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Otro'), + controlAffinity: ListTileControlAffinity.leading, + value: reason == 'other', + onChanged: (_) { + setState(() { + reason = 'other'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + TextField( + minLines: 3, + maxLines: 3, + maxLength: 150, + decoration: InputDecoration( + labelText: + 'Escribir mensaje a ${widget.kid.name} del motivo del ingreso', + hintText: 'Escribe tu mensaje', + border: const OutlineInputBorder(), + ), + ), + const Align( + alignment: Alignment.topLeft, + child: Text('Máximo 150 caracteres'), + ), + ], + ), + ), + + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Cuándo se envía el dinero', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + const Text('Este dato aparecerá en el reloj del peque'), + CheckboxListTile( + title: const Text('Ahora'), + controlAffinity: ListTileControlAffinity.leading, + value: !program, + onChanged: (_) { + setState(() { + program = false; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Programar'), + controlAffinity: ListTileControlAffinity.leading, + value: program, + onChanged: (_) { + setState(() { + program = true; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + if (program) + const TextField( + decoration: InputDecoration( + labelText: 'Fecha / hora (placeholder)', + border: OutlineInputBorder(), + ), + ), + ], + ), + ), + ], + ); + } +} diff --git a/modules/home/lib/src/presentation/home_screen.dart b/modules/home/lib/src/presentation/home_screen.dart new file mode 100644 index 00000000..c16f67dc --- /dev/null +++ b/modules/home/lib/src/presentation/home_screen.dart @@ -0,0 +1,274 @@ +import 'package:auth/auth.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:home/src/presentation/deposit_screen.dart'; +import 'package:home/src/presentation/kid_wallet_screen.dart'; +import 'package:home/src/presentation/money_text.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class HomeScreen extends ConsumerWidget { + final String name = "Juan"; + final double total = 95.03; + final List kids = [ + Kid(name: "Carlos", balance: 25.47), + Kid(name: "Ana", balance: 25.47), + ]; + late final double available = double.parse( + kids.fold(total, (t, e) => t - e.balance).toStringAsFixed(2), + ); + + HomeScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return SafeArea( + child: SingleChildScrollView( + child: Container( + color: theme.getColorFor(ThemeCode.backgroundSecondary), + margin: EdgeInsets.all(30), + child: Column( + children: [ + Align( + alignment: Alignment.topLeft, + child: Text.rich( + TextSpan( + text: "Hola, ", + style: TextStyle(fontSize: 25), + children: [ + TextSpan( + text: name, + style: TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + ), + ), + walletsList(context, kids, ref), + Align( + alignment: Alignment.topLeft, + child: TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => CreateProfileScreen()), + ), + child: Text( + "+ Añadir otro peque", + style: TextStyle( + fontWeight: FontWeight.bold, + color: theme.getColorFor(ThemeCode.textPrimary), + ), + ), + ), + ), + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.all(Radius.circular(20)), + ), + child: Column( + spacing: 5, + children: [ + Row( + children: [ + Text( + "Wallet", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + Spacer(), + MoneyText( + text: "$total€ total", + size: 25, + resize: true, + color: theme.getColorFor(ThemeCode.textPrimary), + ), + ], + ), + Stack( + children: [ + LinearProgressIndicator( + value: available / total, + minHeight: 70, + borderRadius: BorderRadius.all(Radius.circular(16)), + color: theme.getColorFor(ThemeCode.buttonPrimary), + backgroundColor: theme.getColorFor( + ThemeCode.backgroundTertiary, + ), + ), + FractionallySizedBox( + widthFactor: available / total, + child: Container( + padding: EdgeInsets.symmetric(vertical: 10), + child: Center( + child: MoneyText( + text: "$available€", + size: 35, + resize: true, + color: theme.getColorFor( + ThemeCode.textSecondary, + ), + ), + ), + ), + ), + ], + ), + Center(child: Text("Disponible")), + ], + ), + ), + DepositBlock(max: 150 - total), + ], + ), + ), + ), + ); + } + + Widget walletsList(BuildContext context, List kids, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Column( + spacing: 20, + children: List.generate(kids.length, (int index) { + return GestureDetector( + onTap: () => { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => KidWalletScreen(kid: kids[index]), + ), + ), + }, + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(16.0)), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 8), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: theme.getCardColorFor(index), + ), + ), + child: Column( + children: [ + Align( + alignment: Alignment.topLeft, + child: Text( + kids[index].name, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 25, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + ), + Row( + spacing: 10, + children: [ + SizedBox( + height: 60, + width: 60, + child: SvgPicture.asset("assets/images/ui/face.svg"), + ), + Spacer(), + Column( + children: [ + MoneyText( + text: "${kids[index].balance}€", + size: 50, + resize: true, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + Text( + "en su hucha", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + ], + ), + ], + ), + Row( + children: [ + TextButton( + onPressed: () => showDialog( + context: context, + builder: (BuildContext context) => Dialog( + child: SizedBox( + height: 100, + width: double.infinity, + child: Column( + children: [ + FilledButton( + onPressed: () => {}, + child: Text("Cámara"), + ), + OutlinedButton( + onPressed: () => {}, + child: Text("Galería de fotos"), + ), + ], + ), + ), + ), + ), + child: Row( + spacing: 10, + children: [ + Icon( + Icons.edit, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + Text( + "Editar", + style: TextStyle( + color: theme.getColorFor( + ThemeCode.textSecondary, + ), + ), + ), + ], + ), + ), + Spacer(), + FilledButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => DepositScreen(kid: kids[index]), + ), + ), + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonSecondary), + ), + ), + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 0, + vertical: 10, + ), + child: Text("+ Añadir dinero"), + ), + ), + ], + ), + ], + ), + ), + ), + ); + }), + ); + } +} diff --git a/modules/home/lib/src/presentation/kid_wallet_screen.dart b/modules/home/lib/src/presentation/kid_wallet_screen.dart new file mode 100644 index 00000000..7519dc04 --- /dev/null +++ b/modules/home/lib/src/presentation/kid_wallet_screen.dart @@ -0,0 +1,308 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:home/src/presentation/deposit_screen.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:home/src/presentation/limits_screen.dart'; +import 'package:home/src/presentation/money_text.dart'; +import 'package:home/src/presentation/wage_screen.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class KidWalletScreen extends ConsumerWidget { + final Kid kid; + + const KidWalletScreen({super.key, required this.kid}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Stack( + children: [ + DecoratedBox( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(30)), + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: theme.getCardColorFor(0), + ), + ), + child: SizedBox(width: double.infinity, height: 300), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 50, horizontal: 20), + child: Column( + spacing: 15, + children: [ + Row( + spacing: 7, + children: [ + IconButton( + onPressed: () => Navigator.pop(context), + icon: Icon( + Icons.arrow_back_ios_new_outlined, + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + ), + SizedBox( + height: 50, + child: SvgPicture.asset("assets/images/ui/face.svg"), + ), + Text( + kid.name, + style: TextStyle( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + Spacer(), + SizedBox( + height: 30, + child: SvgPicture.asset("assets/images/ui/face.svg"), + ), + ], + ), + MoneyText( + text: "${kid.balance.toString()}€", + size: 60, + resize: true, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + Text( + "Saldo disponible", + style: TextStyle( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + ), + LinearProgressIndicator( + value: 0.7, + color: theme.getColorFor(ThemeCode.backgroundPrimary), + backgroundColor: theme + .getColorFor(ThemeCode.backgroundPrimary) + .withAlpha(0x4C), + minHeight: 10, + borderRadius: BorderRadius.all(Radius.circular(5)), + ), + Container( + padding: EdgeInsets.all(10), + margin: EdgeInsets.only(top: 30), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.all(Radius.circular(20)), + ), + child: Expanded( + child: Center( + child: Row( + spacing: 10, + children: [ + TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => DepositScreen(kid: kid), + ), + ), + child: Column( + spacing: 10, + children: [ + Icon( + Icons.add_circle_outline, + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + Text( + "Añadir", + style: TextStyle( + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + ), + ], + ), + ), + Spacer(), + TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => WageScreen(kid: kid), + ), + ), + child: Column( + spacing: 10, + children: [ + Icon( + Icons.account_balance_wallet_outlined, + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + Text( + "Paga", + style: TextStyle( + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + ), + ], + ), + ), + Spacer(), + TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => LimitsScreen(kid: kid), + ), + ), + child: Column( + spacing: 10, + children: [ + Icon( + Icons.list_alt_outlined, + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + Text( + "Límites", + style: TextStyle( + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + ), + ], + ), + ), + Spacer(), + TextButton( + onPressed: () => {}, + child: Column( + spacing: 10, + children: [ + Icon( + Icons.emoji_events_outlined, + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + Text( + "Metas", + style: TextStyle( + color: theme.getColorFor( + ThemeCode.textPrimary, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + Container( + padding: EdgeInsets.all(15), + height: 400, + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.all(Radius.circular(20)), + ), + child: Column( + children: [ + Text("Últimos movimientos"), + activityList(context, theme), + TextButton(onPressed: () => {}, child: Text("Ver todos")), + ], + ), + ), + ], + ), + ), + ], + ), + ); + } + + Widget activityList(BuildContext context, theme) { + final activity = [ + { + "date": "10/05", + "payments": [1, 2, 3], + }, + { + "date": "10/04", + "payments": [1, 2], + }, + { + "date": "10/02", + "payments": [1, 2, 3, 4], + }, + ]; + + return Expanded( + child: ListView( + children: List.generate(activity.length, (int index) { + return Column( + spacing: 20, + children: [ + Text(activity[index]["date"].toString()), + Column( + spacing: 15, + children: List.generate( + (activity[index]["payments"] as List).length, + (int i) { + //var a = (activity[index]["payments"] as List)[i]; + return Row( + spacing: 7, + children: [ + Container( + padding: EdgeInsets.all(9), + decoration: BoxDecoration( + color: theme.getColorFor( + ThemeCode.backgroundTertiary, + ), + borderRadius: BorderRadius.all(Radius.circular(16)), + ), + child: Icon( + Icons.local_pizza_outlined, + color: theme.getColorFor(ThemeCode.buttonPrimary), + ), + ), + Column( + children: [ + Text( + "Vips", + style: TextStyle(fontWeight: FontWeight.bold), + ), + Text("20:15"), + ], + ), + Spacer(), + MoneyText( + text: "5.1€", + size: 20, + resize: true, + color: theme.getColorFor(ThemeCode.textPrimary), + ), + ], + ); + }, + ), + ), + ], + ); + }), + ), + ); + } +} diff --git a/modules/home/lib/src/presentation/limits_screen.dart b/modules/home/lib/src/presentation/limits_screen.dart new file mode 100644 index 00000000..7b0866f9 --- /dev/null +++ b/modules/home/lib/src/presentation/limits_screen.dart @@ -0,0 +1,157 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:home/src/presentation/wallet_management_layout.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class LimitsScreen extends ConsumerStatefulWidget { + final Kid kid; + + const LimitsScreen({super.key, required this.kid}); + + @override + ConsumerState createState() => LimitsScreenState(); +} + +class LimitsScreenState extends ConsumerState { + late List dailyLimits; + late List timeLimits; + late List conditions; + late List blocks; + + @override + void initState() { + super.initState(); + dailyLimits = [ + {"title": "Diario L-V", "limit": "5", "edit": false}, + {"title": "Fines de semana", "limit": "8", "edit": false}, + {"title": "Semanal", "limit": "30", "edit": false}, + {"title": "Mensual", "limit": "1200", "edit": false}, + ]; + timeLimits = [ + { + "title": "Lunes a Viernes", + "start": "08:00", + "end": "20:00", + "edit": false, + }, + { + "title": "Fines de semana", + "start": "10:00", + "end": "21:00", + "edit": false, + }, + {"title": "Vacaciones", "start": "09:00", "end": "22:00", "edit": false}, + ]; + conditions = [ + {"title": "Alimentación", "limit": "10", "edit": false}, + {"title": "Transporte", "limit": "10", "edit": false}, + {"title": "Alimentación", "limit": "10", "edit": false}, + ]; + blocks = []; + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return WalletManagementLayout( + kid: widget.kid, + footer: Column( + children: [ + FilledButton( + onPressed: () => {}, + child: SizedBox( + width: double.infinity, + child: Center(child: Text("Guardar límites")), + ), + ), + ], + ), + children: [ + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + spacing: 10, + children: [ + Text( + "Pon límite de gastos", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Text("Libertad para ellos, tranquilidad para ti"), + ...List.generate(dailyLimits.length, (int index) { + return Column( + children: [ + Row( + children: [ + Text( + "${dailyLimits[index]["title"]}: ${dailyLimits[index]["limit"]} €", + ), + Spacer(), + TextButton( + onPressed: () => { + setState(() { + dailyLimits[index]["edit"] = + !dailyLimits[index]["edit"]; + }), + }, + child: Text("Editar"), + ), + ], + ), + if (dailyLimits[index]["edit"]) TextField(), + ], + ); + }), + ], + ), + ), + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + spacing: 10, + children: [ + Text( + "Horarios permitidos", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Text("Controla cuándo pueden comprar"), + ...List.generate(timeLimits.length, (int index) { + return Column( + children: [ + Row( + children: [ + Text( + "${timeLimits[index]["title"]}: ${timeLimits[index]["start"]} - ${timeLimits[index]["end"]}", + ), + Spacer(), + TextButton( + onPressed: () => { + setState(() { + timeLimits[index]["edit"] = + !timeLimits[index]["edit"]; + }), + }, + child: Text("Editar"), + ), + ], + ), + if (timeLimits[index]["edit"]) TextField(), + ], + ); + }), + ], + ), + ), + ], + ); + } +} diff --git a/lib/payments/view/screens/core/money_text.dart b/modules/home/lib/src/presentation/money_text.dart similarity index 100% rename from lib/payments/view/screens/core/money_text.dart rename to modules/home/lib/src/presentation/money_text.dart diff --git a/modules/home/lib/src/presentation/wage_screen.dart b/modules/home/lib/src/presentation/wage_screen.dart new file mode 100644 index 00000000..27895f44 --- /dev/null +++ b/modules/home/lib/src/presentation/wage_screen.dart @@ -0,0 +1,239 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:home/src/presentation/wallet_management_layout.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class WageScreen extends ConsumerStatefulWidget { + final Kid kid; + + const WageScreen({super.key, required this.kid}); + + @override + ConsumerState createState() => _WageScreenState(); +} + +class _WageScreenState extends ConsumerState { + String frequence = 'weekly'; + + final Map conditions = { + 'weeklyLimits': false, + 'incidences': false, + 'holidays': false, + }; + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return WalletManagementLayout( + kid: widget.kid, + footer: Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + ), + ), + child: Column( + spacing: 10, + children: [ + FilledButton( + onPressed: () {}, + child: Container( + width: double.infinity, + padding: const EdgeInsets.all(20), + child: const Center(child: Text('Activar paga automática')), + ), + ), + TextButton(onPressed: () {}, child: const Text('Cancelar')), + ], + ), + ), + children: [ + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Paga automática', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + TextField( + decoration: const InputDecoration( + labelText: 'Cantidad', + hintText: '0€', + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + ), + const Text('Saldo total disponible después: 30 €'), + ], + ), + ), + + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Frecuencia', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + const Text('Cuándo se envía el dinero'), + CheckboxListTile( + title: const Text('Semanal'), + controlAffinity: ListTileControlAffinity.leading, + value: frequence == 'weekly', + onChanged: (_) { + setState(() { + frequence = 'weekly'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Cada dos semanas'), + controlAffinity: ListTileControlAffinity.leading, + value: frequence == 'biweekly', + onChanged: (_) { + setState(() { + frequence = 'biweekly'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Mensual'), + controlAffinity: ListTileControlAffinity.leading, + value: frequence == 'monthly', + onChanged: (_) { + setState(() { + frequence = 'monthly'; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + SizedBox( + width: double.infinity, + child: DropdownMenu( + label: const Text('Día de la semana'), + initialSelection: 'Domingo', + dropdownMenuEntries: () { + const days = [ + 'Lunes', + 'Martes', + 'Miércoles', + 'Jueves', + 'Viernes', + 'Sábado', + 'Domingo', + ]; + return List>.generate( + days.length, + (index) => DropdownMenuEntry( + value: days[index], + label: days[index], + ), + ); + }(), + ), + ), + DropdownMenu( + label: const Text('Hora del día'), + initialSelection: 9, + dropdownMenuEntries: List>.generate( + 24, + (index) => + DropdownMenuEntry(value: index, label: '$index:00'), + ), + ), + TextField( + minLines: 3, + maxLines: 3, + maxLength: 150, + decoration: InputDecoration( + labelText: + 'Escribir mensaje a ${widget.kid.name} del motivo del ingreso', + hintText: 'Escribe tu mensaje', + border: const OutlineInputBorder(), + ), + ), + const Align( + alignment: Alignment.topLeft, + child: Text('Máximo 150 caracteres'), + ), + ], + ), + ), + + Container( + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + padding: const EdgeInsets.all(10), + child: Column( + spacing: 10, + children: [ + const Text( + 'Condiciones', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + const Text('Este dato aparecerá en el reloj del peque'), + CheckboxListTile( + title: const Text('Sólo si cumple límites semanales'), + controlAffinity: ListTileControlAffinity.leading, + value: conditions['weeklyLimits'], + onChanged: (_) { + setState(() { + conditions['weeklyLimits'] = + !(conditions['weeklyLimits'] ?? false); + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Sólo si no ha tenido incidencias'), + controlAffinity: ListTileControlAffinity.leading, + value: conditions['incidences'], + onChanged: (_) { + setState(() { + conditions['incidences'] = + !(conditions['incidences'] ?? false); + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + CheckboxListTile( + title: const Text('Pausar durante vacaciones'), + controlAffinity: ListTileControlAffinity.leading, + value: conditions['holidays'], + onChanged: (_) { + setState(() { + conditions['holidays'] = !(conditions['holidays'] ?? false); + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + ), + ], + ), + ), + ], + ); + } +} diff --git a/modules/home/lib/src/presentation/wallet_management_layout.dart b/modules/home/lib/src/presentation/wallet_management_layout.dart new file mode 100644 index 00000000..a2d0deab --- /dev/null +++ b/modules/home/lib/src/presentation/wallet_management_layout.dart @@ -0,0 +1,117 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class WalletManagementLayout extends ConsumerWidget { + final List children; + final Widget footer; + final Kid kid; + + const WalletManagementLayout({ + super.key, + required this.kid, + required this.children, + required this.footer, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final content = [ + Container( + padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20), + child: Stack( + children: [ + IconButton( + onPressed: () => Navigator.pop(context), + icon: Icon( + Icons.arrow_back_ios_outlined, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + Expanded( + child: Center( + child: Column( + children: [ + Text( + kid.name, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + Text.rich( + TextSpan( + text: "Saldo disponible: ", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + children: [ + TextSpan( + text: "${kid.balance}", + style: TextStyle( + fontWeight: FontWeight.bold, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + TextSpan( + text: "€", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ...children, + ]; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Stack( + children: [ + DecoratedBox( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(30)), + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: theme.getCardColorFor(0), + ), + ), + child: SizedBox(width: double.infinity, height: 200), + ), + Column( + children: [ + Expanded( + child: ListView.separated( + itemBuilder: (BuildContext context, int index) { + return Container( + margin: EdgeInsets.symmetric(horizontal: 20), + child: content[index], + ); + }, + separatorBuilder: (BuildContext context, int index) { + return Divider(height: 30, color: Colors.transparent); + }, + itemCount: content.length, + ), + ), + footer, + ], + ), + ], + ), + ); + } +} diff --git a/modules/home/pubspec.yaml b/modules/home/pubspec.yaml new file mode 100644 index 00000000..8cd79e9b --- /dev/null +++ b/modules/home/pubspec.yaml @@ -0,0 +1,71 @@ +name: home +# resolution: workspace +description: "A new Flutter package project." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + #modules dependencies go here + auth: + path: ../../modules/auth + notifications: + path: ../../modules/notifications + + #packages dependencies go here + design_system: + path: ../../packages/design_system + sf_shared: + path: ../../packages/sf_shared + #dependencies go here + flutter_svg: ^2.2.1 + flutter_riverpod: ^3.0.3 + get_it: ^9.0.5 + go_router: ^17.0.0 +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/modules/home/pubspec_overrides.yaml b/modules/home/pubspec_overrides.yaml new file mode 100644 index 00000000..1edeb755 --- /dev/null +++ b/modules/home/pubspec_overrides.yaml @@ -0,0 +1,20 @@ +# melos_managed_dependency_overrides: auth,dashboard_shell,design_system,notifications,profile,sf_shared,navigation,utils,sf_localizations +dependency_overrides: + auth: + path: ../auth + dashboard_shell: + path: ../dashboard_shell + design_system: + path: ../../packages/design_system + navigation: + path: ../../packages/navigation + notifications: + path: ../notifications + profile: + path: ../profile + sf_localizations: + path: ../../packages/sf_localizations + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/modules/notifications/.gitignore b/modules/notifications/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/modules/notifications/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/modules/notifications/.metadata b/modules/notifications/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/modules/notifications/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/modules/notifications/CHANGELOG.md b/modules/notifications/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/modules/notifications/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/modules/notifications/LICENSE b/modules/notifications/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/modules/notifications/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/modules/notifications/README.md b/modules/notifications/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/modules/notifications/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/modules/notifications/analysis_options.yaml b/modules/notifications/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/modules/notifications/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/modules/notifications/lib/notifications.dart b/modules/notifications/lib/notifications.dart new file mode 100644 index 00000000..ea47e63c --- /dev/null +++ b/modules/notifications/lib/notifications.dart @@ -0,0 +1,5 @@ +export 'src/presentation/alert_screen.dart'; +export 'src/presentation/activity_screen.dart'; +export 'src/core/activity_list.dart'; +export 'src/activity_builder.dart'; +export 'src/notifications_builder.dart'; diff --git a/modules/notifications/lib/src/activity_builder.dart b/modules/notifications/lib/src/activity_builder.dart new file mode 100644 index 00000000..3b9f6a3e --- /dev/null +++ b/modules/notifications/lib/src/activity_builder.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:notifications/notifications.dart'; + +class ActivityBuilder { + const ActivityBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + return MaterialPage(child: ActivityScreen()); + } +} diff --git a/modules/notifications/lib/src/core/activity_list.dart b/modules/notifications/lib/src/core/activity_list.dart new file mode 100644 index 00000000..3a680af5 --- /dev/null +++ b/modules/notifications/lib/src/core/activity_list.dart @@ -0,0 +1,110 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class ActivityList extends ConsumerStatefulWidget { + final List activity; + final bool edit; + + const ActivityList({super.key, required this.activity, this.edit = false}); + + @override + ConsumerState createState() => ActivityListState(); +} + +class ActivityListState extends ConsumerState { + late List values; + + @override + void initState() { + super.initState(); + values = List.generate(widget.activity.length, (_) => false); + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + const colors = [ + Colors.cyan, + Colors.pinkAccent, + Colors.deepOrangeAccent, + Colors.red, + ]; + + const icons = { + "wage": Icons.wallet, + "goal": Icons.emoji_events_outlined, + "lock": Icons.lock_outline, + "reload": Icons.attach_money_outlined, + }; + + const titles = { + "wage": "Entrega de paga", + "goal": "¡Objetivo cumplido!", + "lock": "Bloqueo de pago", + "reload": "Recarga familiar", + }; + + return Column( + spacing: 20, + children: List.generate(widget.activity.length, (int index) { + final color = colors[index % colors.length]; + final type = widget.activity[index]["type"] as String; + + final logItem = Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: const BorderRadius.all(Radius.circular(20)), + border: Border(left: BorderSide(color: color, width: 5)), + ), + child: Column( + spacing: 15, + children: [ + Row( + children: [ + Icon(icons[type], color: color), + const SizedBox(width: 8), + Text( + titles[type]!, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + const Spacer(), + const Text("14/01/2005"), + ], + ), + const Align( + alignment: Alignment.topLeft, + child: Text("Ana ya tiene su paga de 5€ en el reloj"), + ), + ], + ), + ); + + if (widget.edit) { + return Row( + children: [ + Checkbox( + value: values[index], + onChanged: (_) { + setState(() { + values[index] = !values[index]; + }); + }, + activeColor: theme.getColorFor(ThemeCode.buttonPrimary), + semanticLabel: "Eliminar", + ), + Expanded(child: logItem), + ], + ); + } else { + return logItem; + } + }), + ); + } +} diff --git a/modules/notifications/lib/src/notifications_builder.dart b/modules/notifications/lib/src/notifications_builder.dart new file mode 100644 index 00000000..7a9b1624 --- /dev/null +++ b/modules/notifications/lib/src/notifications_builder.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:notifications/notifications.dart'; + +class NotificationsBuilder { + const NotificationsBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + return MaterialPage(child: AlertScreen()); + } +} diff --git a/modules/notifications/lib/src/presentation/activity_screen.dart b/modules/notifications/lib/src/presentation/activity_screen.dart new file mode 100644 index 00000000..c0fe189d --- /dev/null +++ b/modules/notifications/lib/src/presentation/activity_screen.dart @@ -0,0 +1,57 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:notifications/src/core/activity_list.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_shared/sf_shared.dart'; + +class ActivityScreen extends ConsumerWidget { + ActivityScreen({super.key}); + + final activity = [ + {"type": "goal"}, + {"type": "wage", "amount": 5}, + {"type": "lock"}, + {"type": "lock"}, + ]; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final content = [ + Text( + "Movimientos recientes", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), + ), + Row( + spacing: 20, + children: [ + FilledButton(onPressed: () => {}, child: Text("Hoy")), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Última semana")), + TextButton(onPressed: () => {}, child: Text("Mes")), + ], + ), + SizedBox(height: 200, child: LineGraph()), + ActivityList(activity: activity, edit: false), + ]; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Container( + margin: EdgeInsets.fromLTRB(30, 30, 30, 0), + child: Center( + child: ListView.separated( + itemBuilder: (BuildContext context, int index) { + return content[index]; + }, + separatorBuilder: (BuildContext context, int index) { + return Divider(color: Colors.transparent, height: 30); + }, + itemCount: content.length, + ), + ), + ), + ); + } +} diff --git a/modules/notifications/lib/src/presentation/alert_screen.dart b/modules/notifications/lib/src/presentation/alert_screen.dart new file mode 100644 index 00000000..4f46d168 --- /dev/null +++ b/modules/notifications/lib/src/presentation/alert_screen.dart @@ -0,0 +1,56 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:notifications/src/core/activity_list.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class AlertScreen extends ConsumerStatefulWidget { + const AlertScreen({super.key}); + + @override + ConsumerState createState() => AlertScreenState(); +} + +class AlertScreenState extends ConsumerState { + final activity = [ + {"type": "goal"}, + {"type": "wage", "amount": 5}, + {"type": "lock"}, + {"type": "lock"}, + ]; + bool edit = false; + + @override + void initState() { + edit = false; + super.initState(); + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Container( + margin: EdgeInsets.all(30), + child: Column( + children: [ + Row( + children: [ + Text("Alertas"), + Spacer(), + TextButton( + onPressed: () => setState(() { + edit = !edit; + }), + child: Text("Editar"), + ), + ], + ), + ActivityList(activity: activity, edit: edit), + ], + ), + ), + ); + } +} diff --git a/modules/notifications/pubspec.yaml b/modules/notifications/pubspec.yaml new file mode 100644 index 00000000..d45d707d --- /dev/null +++ b/modules/notifications/pubspec.yaml @@ -0,0 +1,66 @@ +name: notifications +# resolution: workspace +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +description: "A new Flutter package project." +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + + #modules dependencies go here + design_system: + path: ../../packages/design_system + #packages dependencies go here + sf_shared: + path: ../../packages/sf_shared + #dependencies go here + flutter_riverpod: ^3.0.3 + get_it: ^9.0.5 + go_router: ^17.0.0 +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/modules/notifications/pubspec_overrides.yaml b/modules/notifications/pubspec_overrides.yaml new file mode 100644 index 00000000..780fb0f0 --- /dev/null +++ b/modules/notifications/pubspec_overrides.yaml @@ -0,0 +1,8 @@ +# melos_managed_dependency_overrides: design_system,sf_shared,utils +dependency_overrides: + design_system: + path: ../../packages/design_system + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/modules/profile/.gitignore b/modules/profile/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/modules/profile/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/modules/profile/.metadata b/modules/profile/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/modules/profile/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/modules/profile/CHANGELOG.md b/modules/profile/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/modules/profile/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/modules/profile/LICENSE b/modules/profile/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/modules/profile/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/modules/profile/README.md b/modules/profile/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/modules/profile/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/modules/profile/analysis_options.yaml b/modules/profile/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/modules/profile/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/modules/profile/lib/profile.dart b/modules/profile/lib/profile.dart new file mode 100644 index 00000000..357976e9 --- /dev/null +++ b/modules/profile/lib/profile.dart @@ -0,0 +1,2 @@ +export 'src/presentation/profile_screen.dart'; +export 'src/profile_builder.dart'; diff --git a/modules/profile/lib/src/presentation/profile_screen.dart b/modules/profile/lib/src/presentation/profile_screen.dart new file mode 100644 index 00000000..71af4c7d --- /dev/null +++ b/modules/profile/lib/src/presentation/profile_screen.dart @@ -0,0 +1,135 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:notifications/notifications.dart'; +import 'package:profile/src/settings_screen.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class ProfileScreen extends ConsumerWidget { + const ProfileScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final activity = [ + {"type": "goal"}, + {"type": "wage", "amount": 5}, + {"type": "lock"}, + {"type": "lock"}, + ]; + + final name = "Juan"; + final total = 95.03; + final available = 44.09; + + final content = [ + Row( + children: [ + Text( + name, + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + Spacer(), + TextButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => SettingsScreen()), + ), + child: Text( + "Ajustes de la cuenta", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + ), + ], + ), + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.all(Radius.circular(20)), + ), + child: Column( + spacing: 5, + children: [ + Row( + children: [ + Text("Wallet", style: TextStyle(fontWeight: FontWeight.bold)), + Spacer(), + Text("$total€"), + ], + ), + Stack( + children: [ + LinearProgressIndicator( + value: available / total, + minHeight: 70, + borderRadius: BorderRadius.all(Radius.circular(16)), + ), + FractionallySizedBox( + widthFactor: available / total, + child: Container( + padding: EdgeInsets.symmetric(vertical: 20), + child: Center( + child: Text( + "$available€", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + fontSize: 20, + ), + ), + ), + ), + ), + ], + ), + Center(child: Text("Disponible")), + ], + ), + ), + SizedBox(height: 200, child: LineGraph()), + DepositBlock(max: 150 - total), + Row(), + ActivityList(activity: activity, edit: false), + ]; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Stack( + children: [ + DecoratedBox( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(30)), + color: Color(0xFF4B4B4B), + ), + child: SizedBox(width: double.infinity, height: 200), + ), + Column( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.fromLTRB(20, 20, 20, 0), + child: ListView.separated( + itemBuilder: (BuildContext context, int index) { + return content[index]; + }, + separatorBuilder: (BuildContext context, int index) { + return Divider(color: Colors.transparent, height: 20); + }, + itemCount: content.length, + ), + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/modules/profile/lib/src/profile_builder.dart b/modules/profile/lib/src/profile_builder.dart new file mode 100644 index 00000000..27308ff0 --- /dev/null +++ b/modules/profile/lib/src/profile_builder.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:profile/profile.dart'; + +class ProfileBuilder { + const ProfileBuilder(); + + Page buildPage(BuildContext context, GoRouterState state) { + return MaterialPage(child: ProfileScreen()); + } +} diff --git a/modules/profile/lib/src/settings_screen.dart b/modules/profile/lib/src/settings_screen.dart new file mode 100644 index 00000000..42f9477b --- /dev/null +++ b/modules/profile/lib/src/settings_screen.dart @@ -0,0 +1,360 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class SettingsScreen extends ConsumerWidget { + const SettingsScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + final name = "Juan"; + final balance = 50; + final fullName = "Juan Pérez Cruz"; + final birthDate = "08/03/1976"; + final relation = "Padre"; + final address = "Calle Gran Vía 30 6º, 28013"; + final country = "España"; + final nationality = "Español"; + final email = "juanpcruz@gmail.com"; + final phone = "123456789"; + + final content = [ + Center( + child: Column( + children: [ + Text( + "Ajustes de la cuenta", + style: TextStyle( + fontSize: 30, + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + Text( + "Saldo: $balance€", + style: TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + name, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar wallet")), + Icon(Icons.attach_money), + ], + ), + Text(relation), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + "Datos personales", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar")), + ], + ), + Text.rich( + TextSpan( + text: "Nombre: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: fullName, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "Fecha de nacimiento: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: birthDate, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "Familiar: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: relation, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + "Dirección", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar")), + ], + ), + Text.rich( + TextSpan( + text: "Dirección: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: address, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "País: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: country, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "Nacionalidad: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: nationality, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + "Usuario", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar")), + ], + ), + Text.rich( + TextSpan( + text: "Correo: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: email, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + Text.rich( + TextSpan( + text: "Teléfono: ", + style: TextStyle(fontWeight: FontWeight.bold), + children: [ + TextSpan( + text: phone, + style: TextStyle(fontWeight: FontWeight.normal), + ), + ], + ), + ), + ], + ), + ), + + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Row( + spacing: 10, + children: [ + Text( + "Cambio de contraseña", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar")), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + "Método de pago", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Editar")), + ], + ), + Text("Puedes cambiar el método de pago en cualquier momento"), + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundTertiary), + ), + child: Column( + children: [ + Row( + spacing: 10, + children: [ + Text( + "Plan anual", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Spacer(), + TextButton(onPressed: () => {}, child: Text("Cambiar Plan")), + ], + ), + Text("Sin permanencia"), + Text("Llamadas y datos ilimitados"), + Text("2 meses gratis"), + ], + ), + ), + + TextButton(onPressed: () => {}, child: Text("Contáctanos")), + TextButton(onPressed: () => {}, child: Text("Preguntas frecuentes")), + ]; + + return Scaffold( + backgroundColor: theme.getColorFor(ThemeCode.backgroundSecondary), + body: Stack( + children: [ + DecoratedBox( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(30)), + color: Color(0xFF4B4B4B), + ), + child: SizedBox(width: double.infinity, height: 200), + ), + Column( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(20), + child: ListView.separated( + itemBuilder: (BuildContext context, int index) { + return content[index]; + }, + separatorBuilder: (BuildContext context, int index) { + return Divider(color: Colors.transparent, height: 20); + }, + itemCount: content.length, + ), + ), + ), + Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + ), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + children: [ + FilledButton( + onPressed: () => {}, + child: Container( + width: double.infinity, + padding: EdgeInsets.all(20), + child: Center(child: Text("Guardar cambios")), + ), + ), + TextButton( + onPressed: () => Navigator.pop(context), + child: Text("Cancelar"), + ), + ], + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/modules/profile/pubspec.yaml b/modules/profile/pubspec.yaml new file mode 100644 index 00000000..bddcae03 --- /dev/null +++ b/modules/profile/pubspec.yaml @@ -0,0 +1,69 @@ +name: profile +# resolution: workspace +description: "A new Flutter package project." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + #modules dependencies go here + notifications: + path: ../../modules/notifications + #packages dependencies go here + design_system: + path: ../../packages/design_system + sf_shared: + path: ../../packages/sf_shared + + #dependencies go here + flutter_riverpod: ^3.0.3 + get_it: ^9.0.5 + go_router: ^17.0.0 + +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/modules/profile/pubspec_overrides.yaml b/modules/profile/pubspec_overrides.yaml new file mode 100644 index 00000000..c0dcf19b --- /dev/null +++ b/modules/profile/pubspec_overrides.yaml @@ -0,0 +1,10 @@ +# melos_managed_dependency_overrides: design_system,notifications,sf_shared,utils +dependency_overrides: + design_system: + path: ../../packages/design_system + notifications: + path: ../notifications + sf_shared: + path: ../../packages/sf_shared + utils: + path: ../../packages/utils diff --git a/packages/design_system/.gitignore b/packages/design_system/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/packages/design_system/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/packages/design_system/.metadata b/packages/design_system/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/packages/design_system/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/packages/design_system/CHANGELOG.md b/packages/design_system/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/packages/design_system/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/design_system/LICENSE b/packages/design_system/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/packages/design_system/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/design_system/README.md b/packages/design_system/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/packages/design_system/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/design_system/analysis_options.yaml b/packages/design_system/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/packages/design_system/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/design_system/lib/design_system.dart b/packages/design_system/lib/design_system.dart new file mode 100644 index 00000000..2c741c6a --- /dev/null +++ b/packages/design_system/lib/design_system.dart @@ -0,0 +1,3 @@ +export 'src/theme/theme_port.dart'; +export 'src/theme/theme_sf_adapter.dart'; +export 'src/icons/sf_icons.dart'; diff --git a/packages/design_system/lib/fonts/SFIcons.ttf b/packages/design_system/lib/fonts/SFIcons.ttf new file mode 100755 index 00000000..8c2c553f Binary files /dev/null and b/packages/design_system/lib/fonts/SFIcons.ttf differ diff --git a/packages/design_system/lib/fonts/config.json b/packages/design_system/lib/fonts/config.json new file mode 100755 index 00000000..d22f8855 --- /dev/null +++ b/packages/design_system/lib/fonts/config.json @@ -0,0 +1,828 @@ +{ + "name": "SFIcons", + "css_prefix_text": "", + "css_use_suffix": false, + "hinting": true, + "units_per_em": 1000, + "ascent": 850, + "glyphs": [ + { + "uid": "80467896abfe490373668bdb4909ddd7", + "css": "back", + "code": 59392, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M791.7 458.3H326.2L529.6 255C545.8 238.7 545.8 212.1 529.6 195.8 513.3 179.6 487.1 179.6 470.8 195.8L196.2 470.4C180 486.7 180 512.9 196.2 529.2L470.8 803.7C487.1 820 513.3 820 529.6 803.7 545.8 787.5 545.8 761.2 529.6 745L326.2 541.7H791.7C814.6 541.7 833.3 522.9 833.3 500 833.3 477.1 814.6 458.3 791.7 458.3Z", + "width": 1000 + }, + "search": [ + "back" + ] + }, + { + "uid": "7020f118c6f162d5002177079f20969f", + "css": "close", + "code": 59396, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M762.5 237.9C746.2 221.7 720 221.7 703.7 237.9L500 441.2 296.2 237.5C280 221.2 253.7 221.2 237.5 237.5 221.2 253.7 221.2 280 237.5 296.2L441.2 500 237.5 703.8C221.2 720 221.2 746.3 237.5 762.5 253.7 778.8 280 778.8 296.2 762.5L500 558.8 703.7 762.5C720 778.8 746.2 778.8 762.5 762.5 778.7 746.3 778.7 720 762.5 703.8L558.7 500 762.5 296.2C778.3 280.4 778.3 253.7 762.5 237.9Z", + "width": 1000 + }, + "search": [ + "close" + ] + }, + { + "uid": "a73f3bb9665babbc258fa0098f8be4a5", + "css": "search", + "code": 59400, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M645.8 583.3H612.9L601.3 572.1C651.3 513.7 677.1 434.2 662.9 349.6 643.3 233.7 546.7 141.2 430 127.1 253.7 105.4 105.4 253.7 127.1 430 141.2 546.7 233.7 643.3 349.6 662.9 434.2 677.1 513.7 651.3 572.1 601.3L583.3 612.9V645.8L760.4 822.9C777.5 840 805.4 840 822.5 822.9 839.6 805.8 839.6 777.9 822.5 760.8L645.8 583.3ZM395.8 583.3C292.1 583.3 208.3 499.6 208.3 395.8 208.3 292.1 292.1 208.3 395.8 208.3 499.6 208.3 583.3 292.1 583.3 395.8 583.3 499.6 499.6 583.3 395.8 583.3Z", + "width": 1000 + }, + "search": [ + "search" + ] + }, + { + "uid": "1c154f180fc24294989ee9933d22f2fd", + "css": "location", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M350 21.8C156.5 21.8 0 178.3 0 371.8 0 580.3 221 867.8 312 977.3 332 1001.3 368.5 1001.3 388.5 977.3 479 867.8 700 580.3 700 371.8 700 178.3 543.5 21.8 350 21.8ZM350 496.8C281 496.8 225 440.8 225 371.8 225 302.8 281 246.8 350 246.8 419 246.8 475 302.8 475 371.8 475 440.8 419 496.8 350 496.8Z", + "width": 700 + }, + "search": [ + "vector" + ] + }, + { + "uid": "1dc6465d446812f557c185a3c06faa2a", + "css": "alert", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 291.7C522.9 291.7 541.7 310.4 541.7 333.3V500C541.7 522.9 522.9 541.7 500 541.7 477.1 541.7 458.3 522.9 458.3 500V333.3C458.3 310.4 477.1 291.7 500 291.7ZM499.6 83.3C269.6 83.3 83.3 270 83.3 500 83.3 730 269.6 916.7 499.6 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 499.6 83.3ZM500 833.3C315.8 833.3 166.7 684.2 166.7 500 166.7 315.8 315.8 166.7 500 166.7 684.2 166.7 833.3 315.8 833.3 500 833.3 684.2 684.2 833.3 500 833.3ZM541.7 708.3H458.3V625H541.7V708.3Z", + "width": 1000 + }, + "search": [ + "alert" + ] + }, + { + "uid": "9096ef3bce8ed7879cf4ba44f3754f8b", + "css": "forward", + "code": 59398, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M208.3 541.6H673.8L470.4 745C454.2 761.2 454.2 787.9 470.4 804.1 486.7 820.4 512.9 820.4 529.2 804.1L803.8 529.5C820 513.3 820 487 803.8 470.8L529.6 195.8C513.3 179.5 487.1 179.5 470.8 195.8 454.6 212 454.6 238.3 470.8 254.5L673.8 458.3H208.3C185.4 458.3 166.7 477 166.7 499.9 166.7 522.9 185.4 541.6 208.3 541.6Z", + "width": 1000 + }, + "search": [ + "icon" + ] + }, + { + "uid": "8e0c0151ef7dcb62d2d883630704859b", + "css": "email", + "code": 59408, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M833.3 166.7H166.7C120.8 166.7 83.8 204.2 83.8 250L83.3 750C83.3 795.8 120.8 833.3 166.7 833.3H833.3C879.2 833.3 916.7 795.8 916.7 750V250C916.7 204.2 879.2 166.7 833.3 166.7ZM816.7 343.8L522.1 527.9C508.8 536.3 491.3 536.3 477.9 527.9L183.3 343.8C172.9 337.1 166.7 325.8 166.7 313.8 166.7 285.8 197.1 269.2 220.8 283.8L500 458.3 779.2 283.8C802.9 269.2 833.3 285.8 833.3 313.8 833.3 325.8 827.1 337.1 816.7 343.8Z", + "width": 1000 + }, + "search": [ + "email" + ] + }, + { + "uid": "511685198096daf1cee473ff96a455c7", + "css": "video", + "code": 59409, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M708.3 437.5V291.7C708.3 268.8 689.6 250 666.7 250H166.7C143.8 250 125 268.8 125 291.7V708.3C125 731.3 143.8 750 166.7 750H666.7C689.6 750 708.3 731.3 708.3 708.3V562.5L803.8 657.9C830 684.2 875 665.4 875 628.3V371.3C875 334.2 830 315.4 803.8 341.7L708.3 437.5Z", + "width": 1000 + }, + "search": [ + "video" + ] + }, + { + "uid": "1b88a0b309ea853a54ddc7c2a57cd523", + "css": "phone", + "code": 59410, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M801.3 635.8L695.4 623.7C670 620.8 645 629.6 627.1 647.5L550.4 724.2C432.5 664.2 335.8 567.9 275.8 449.6L352.9 372.5C370.8 354.6 379.6 329.6 376.7 304.2L364.6 199.2C359.6 157.1 324.2 125.4 281.7 125.4H209.6C162.5 125.4 123.3 164.6 126.3 211.7 148.3 567.5 432.9 851.7 788.3 873.7 835.4 876.7 874.6 837.5 874.6 790.4V718.3C875 676.2 843.3 640.8 801.3 635.8Z", + "width": 1000 + }, + "search": [ + "phone" + ] + }, + { + "uid": "ffa2149028e63b1492e2570309d8639d", + "css": "checkCircle", + "code": 59412, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM387.1 678.7L237.5 529.2C221.2 512.9 221.2 486.7 237.5 470.4 253.7 454.2 280 454.2 296.3 470.4L416.7 590.4 703.3 303.8C719.6 287.5 745.8 287.5 762.1 303.8 778.3 320 778.3 346.3 762.1 362.5L445.8 678.7C430 695 403.3 695 387.1 678.7Z", + "width": 1000 + }, + "search": [ + "check_circle" + ] + }, + { + "uid": "9ce455fa589eb12f4d351d1590c2ea7b", + "css": "filter", + "code": 59401, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M648.3 450.4L550.4 576.3 485.4 497.9C477.1 487.5 461.3 487.9 452.9 498.3L380.4 591.3C369.6 605 379.6 625 396.7 625H770.8C787.9 625 797.9 605.4 787.5 591.7L681.3 450.4C673.3 439.6 656.7 439.6 648.3 450.4ZM83.3 208.3C60.4 208.3 41.7 227.1 41.7 250V875C41.7 920.8 79.2 958.3 125 958.3H750C772.9 958.3 791.7 939.6 791.7 916.7 791.7 893.7 772.9 875 750 875H166.7C143.8 875 125 856.3 125 833.3V250C125 227.1 106.2 208.3 83.3 208.3ZM875 41.7H291.7C245.8 41.7 208.3 79.2 208.3 125V708.3C208.3 754.2 245.8 791.7 291.7 791.7H875C920.8 791.7 958.3 754.2 958.3 708.3V125C958.3 79.2 920.8 41.7 875 41.7ZM833.3 708.3H333.3C310.4 708.3 291.7 689.6 291.7 666.7V166.7C291.7 143.8 310.4 125 333.3 125H833.3C856.3 125 875 143.8 875 166.7V666.7C875 689.6 856.3 708.3 833.3 708.3Z", + "width": 1000 + }, + "search": [ + "filter" + ] + }, + { + "uid": "9617871d36cf88e402ea69d0fae9a57e", + "css": "cookie", + "code": 59407, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 916.7C442.4 916.7 388.2 905.8 337.5 883.9 286.8 862 242.7 832.4 205.2 794.9 167.7 757.4 138 713.3 116.1 662.6 94.3 611.9 83.3 557.7 83.3 500.1 83.3 448 93.4 396.9 113.5 346.9 133.7 296.9 161.8 252.3 197.9 213.1 234 173.8 277.4 142.3 328.1 118.3 378.8 94.3 434.4 82.4 494.8 82.4 509.4 82.4 524.3 83.1 539.6 84.4 554.9 85.8 570.5 88.3 586.5 91.7 580.2 123 582.3 152.5 592.7 180.3 603.1 208.1 618.8 231.1 639.6 249.5 660.4 267.9 685.2 280.6 714.1 287.6 742.9 294.5 772.6 292.8 803.1 282.4 785.1 323.3 787.7 362.6 810.9 400.1 834.2 437.6 868.8 457 914.6 458.4 915.3 466 915.8 473.2 916.1 479.8 916.5 486.3 916.7 493.5 916.7 501.1 916.7 558 905.7 611.7 883.9 662 862 712.4 832.3 756.5 794.8 794.3 757.3 832.2 713.2 862 662.5 883.9 611.8 905.8 557.6 916.7 500 916.7ZM437.5 416.7C454.9 416.7 469.6 410.7 481.8 398.5 493.9 386.3 500 371.6 500 354.2 500 336.9 493.9 322.1 481.8 310 469.6 297.8 454.9 291.7 437.5 291.7 420.1 291.7 405.4 297.8 393.2 310 381.1 322.1 375 336.9 375 354.2 375 371.6 381.1 386.3 393.2 398.5 405.4 410.7 420.1 416.7 437.5 416.7ZM354.2 625.1C371.5 625.1 386.3 619 398.4 606.8 410.6 594.7 416.7 579.9 416.7 562.6 416.7 545.2 410.6 530.4 398.4 518.3 386.3 506.1 371.5 500.1 354.2 500.1 336.8 500.1 322 506.1 309.9 518.3 297.7 530.4 291.7 545.2 291.7 562.6 291.7 579.9 297.7 594.7 309.9 606.8 322 619 336.8 625.1 354.2 625.1ZM625 666.7C636.8 666.7 646.7 662.7 654.7 654.8 662.7 646.8 666.7 636.9 666.7 625.1 666.7 613.3 662.7 603.4 654.7 595.4 646.7 587.4 636.8 583.4 625 583.4 613.2 583.4 603.3 587.4 595.3 595.4 587.3 603.4 583.3 613.3 583.3 625.1 583.3 636.9 587.3 646.8 595.3 654.8 603.3 662.7 613.2 666.7 625 666.7Z", + "width": 1000 + }, + "search": [ + "cookie" + ] + }, + { + "uid": "6a3f9d6be8d628faa2dc67f8f60a2469", + "css": "filterList", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M177.1 233.7C273.8 357.9 416.7 541.7 416.7 541.7V750C416.7 795.8 454.2 833.3 500 833.3 545.8 833.3 583.3 795.8 583.3 750V541.7C583.3 541.7 726.3 357.9 822.9 233.7 844.2 206.3 824.6 166.7 789.6 166.7H210C175.4 166.7 155.8 206.3 177.1 233.7Z", + "width": 1000 + }, + "search": [ + "filter_list" + ] + }, + { + "uid": "d9d1602b64bb2a2f6e856ef6245c1307", + "css": "offline", + "code": 59418, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M856.6 422.5C880 441.7 914.1 440 935.4 418.8 960 394.2 958.3 353.3 931.2 331.3 781.6 208.8 589.5 163.3 408.3 195.4L516.2 303.3C636.6 302.1 757.9 341.7 856.6 422.5ZM762 498.8C729.5 475 694.1 457.1 657 444.6L780 567.5C790 543.3 784.1 514.6 762 498.8ZM602 676.3C551.2 650 490.4 650 439.1 676.3 414.5 689.2 410 722.9 429.5 742.5L490.8 803.8C507 820 533.3 820 549.5 803.8L610.8 742.5C631.2 722.9 627 689.2 602 676.3ZM840.8 745.8L192.5 97.5C176.2 81.3 150 81.3 133.7 97.5 117.5 113.8 117.5 140 133.7 156.3L231.2 254.2C189.1 275 148.3 300.4 110.8 331.3 83.7 353.3 82 394.2 106.6 418.8 127.9 440 161.6 442.1 184.5 422.9 226.2 388.8 272 362.1 320 342.5L412.9 435.4C365.8 447.9 320.8 468.8 280 498.3 251.2 519.2 249.5 561.3 274.5 586.3L275 586.7C295.4 607.1 327.5 609.2 351.2 592.1 400.8 557.1 458.7 539.6 516.6 538.3L782 803.8C798.3 820 824.5 820 840.8 803.8 857 788.3 857 762.1 840.8 745.8Z", + "width": 1042 + }, + "search": [ + "offline" + ] + }, + { + "uid": "c5b66a88331fa921322690fbc3c304b2", + "css": "euro", + "code": 59393, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M625 770.8C520.4 770.8 430 711.7 385 625H583.3C606.3 625 625 606.3 625 583.3 625 560.4 606.3 541.7 583.3 541.7H357.5C355.4 527.9 354.2 514.2 354.2 500 354.2 485.8 355.4 472.1 357.5 458.3H583.3C606.3 458.3 625 439.6 625 416.7 625 393.7 606.3 375 583.3 375H385C430 288.3 520.8 229.2 625 229.2 677.1 229.2 725.8 244.2 767.5 269.6 788.3 282.5 815.4 280.4 832.9 262.9 857.1 238.8 851.7 199.2 822.5 181.2 765 145.8 697.1 125 625 125 461.7 125 323.3 229.6 271.7 375H166.7C143.8 375 125 393.7 125 416.7 125 439.6 143.8 458.3 166.7 458.3H252.5C250.8 472.1 250 485.8 250 500 250 514.2 250.8 527.9 252.5 541.7H166.7C143.8 541.7 125 560.4 125 583.3 125 606.3 143.8 625 166.7 625H271.7C323.3 770.4 461.7 875 625 875 697.5 875 765 854.6 822.5 818.7 851.2 800.8 856.7 760.8 832.5 736.7 815 719.2 787.9 717.1 767.1 730.4 725.8 756.2 677.5 770.8 625 770.8Z", + "width": 1000 + }, + "search": [ + "euro" + ] + }, + { + "uid": "a88e3aed58026ea015a5bec40dc8227d", + "css": "arrowRightAlt", + "code": 59417, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M687.9 458.3H229.2C206.3 458.3 187.5 477.1 187.5 500 187.5 522.9 206.3 541.6 229.2 541.6H687.9V616.2C687.9 635 710.4 644.1 723.3 630.8L839.2 514.6C847.1 506.2 847.1 493.3 839.2 485L723.3 368.7C710.4 355.4 687.9 365 687.9 383.3V458.3Z", + "width": 1042 + }, + "search": [ + "arrow_right_alt" + ] + }, + { + "uid": "2741dd87b57f503e1e0345e4581f3970", + "css": "infoCircle", + "code": 59436, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM500 541.7C477.1 541.7 458.3 522.9 458.3 500V333.3C458.3 310.4 477.1 291.7 500 291.7 522.9 291.7 541.7 310.4 541.7 333.3V500C541.7 522.9 522.9 541.7 500 541.7ZM541.7 708.3H458.3V625H541.7V708.3Z", + "width": 1000 + }, + "search": [ + "infocircle" + ] + }, + { + "uid": "2206661a36ad3359642b55909c3dc855", + "css": "cursorClick", + "code": 59419, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M332.9 45.7C325.2 17.1 295.9 0.1 267.3 7.8 238.7 15.4 221.8 44.8 229.4 73.4L261.4 192.9C269.1 221.5 298.5 238.4 327 230.8 355.6 223.1 372.6 193.7 364.9 165.2L332.9 45.7ZM19.7 255.4C12 284 29 313.3 57.6 321L177.1 353C205.6 360.7 235 343.7 242.7 315.1 250.3 286.6 233.4 257.2 204.8 249.5L85.3 217.5C56.7 209.9 27.3 226.8 19.7 255.4ZM84.3 594.6C105.2 615.6 139.1 615.6 160 594.6L247.5 507.2C268.4 486.2 268.4 452.3 247.5 431.4 226.6 410.5 192.7 410.5 171.8 431.4L84.3 518.9C63.4 539.8 63.4 573.7 84.3 594.6ZM606.5 72.4C627.4 93.3 627.4 127.2 606.5 148.2L519 235.6C498.1 256.5 464.2 256.5 443.3 235.6 422.4 214.7 422.4 180.8 443.3 159.9L530.8 72.4C551.7 51.5 585.6 51.5 606.5 72.4ZM559.1 948.6C401.2 758.8 365.5 525.7 376.3 410.9 378.7 385.9 397.8 366.7 422.9 364.4 537.6 353.6 770.7 389.3 960.5 547.2 989.8 571.6 987.1 611.6 952.2 626.9 912.5 644.2 860.5 662.5 815.7 677.2L955.9 817.4C990.9 852.3 990.9 909 955.9 944 920.9 979 864.2 979 829.3 944L689.1 803.8C674.4 848.6 656.1 900.6 638.8 940.3 623.5 975.2 583.5 977.9 559.1 948.6Z", + "width": 1000 + }, + "search": [ + "cursor_click" + ] + }, + { + "uid": "aab69ee57b8bbf88d46d9a14fc5a6a79", + "css": "wand", + "code": 59420, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M419.2 67.1C429.3 12.5 488.6-15.8 537.5 9.2 590.7 36.4 637.1 70.8 680 113.1 734.7 83.6 790.4 64.9 851.2 56.6 905.2 49.4 950.8 94.9 943.4 148.9 935.2 209.7 916.4 265.4 886.9 320 929.2 362.9 963.6 409.3 990.8 462.5 1015.8 511.4 987.5 570.6 932.9 580.8 872.8 591.9 814.4 591.4 753.6 579.6 726.1 632.3 692.5 678.2 651.6 720 612.5 759.9 545.8 751.3 519.4 701 501.7 667.4 488.2 633.1 478.7 597.1L91.5 984.3C70.5 1005.2 36.6 1005.2 15.7 984.3-5.2 963.4-5.2 929.5 15.7 908.5L402.9 521.3C366.9 511.7 332.6 498.3 299 480.6 248.7 454.2 240.1 387.5 280 348.4 321.8 307.5 367.6 273.9 420.4 246.4 408.6 185.5 408.1 127.2 419.2 67.1Z", + "width": 1000 + }, + "search": [ + "wand" + ] + }, + { + "uid": "7adfe7b282a5201d2736987a1c2520af", + "css": "arrowLeftAlt", + "code": 59405, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M323.8 541.3L782.6 541.3C805.5 541.3 824.3 522.6 824.3 499.7 824.3 476.8 805.5 458 782.6 458L323.8 458 323.8 383.4C323.8 364.7 301.3 355.5 288.4 368.8L172.6 485.1C164.7 493.4 164.7 506.3 172.6 514.7L288.4 630.9C301.3 644.3 323.8 634.7 323.8 616.3L323.8 541.3Z", + "width": 1000 + }, + "search": [ + "arrow_left_alt" + ] + }, + { + "uid": "325cf485696fb7dcdcf448ea54e4c0d0", + "css": "chevronRight", + "code": 59411, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M387.9 279.6C371.7 295.8 371.7 322.1 387.9 338.3L549.6 500 387.9 661.7C371.7 677.9 371.7 704.2 387.9 720.4 404.2 736.7 430.4 736.7 446.7 720.4L637.9 529.2C654.2 512.9 654.2 486.7 637.9 470.4L446.7 279.2C430.8 263.3 404.2 263.3 387.9 279.6Z", + "width": 1000 + }, + "search": [ + "chevron_right" + ] + }, + { + "uid": "b797f5b7000a5e56b6054b90eea30dc0", + "css": "bank", + "code": 59416, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M732.5 297.5L412.5 122.5C405 117.5 395 117.5 387.5 122.5L67.5 297.5C60 300 55 310 55 320V407.5C55 422.5 65 432.5 80 432.5H722.5C737.5 432.5 747.5 422.5 747.5 407.5V320C745 310 740 300 732.5 297.5ZM695 380H105V332.5L400 172.5 695 335V380ZM162.5 670V495C162.5 480 152.5 470 137.5 470S112.5 480 112.5 495V670C112.5 685 122.5 695 137.5 695S162.5 682.5 162.5 670ZM337.5 670V495C337.5 480 327.5 470 312.5 470S287.5 480 287.5 495V670C287.5 685 297.5 695 312.5 695S337.5 682.5 337.5 670ZM512.5 670V495C512.5 480 502.5 470 487.5 470S462.5 480 462.5 495V670C462.5 685 472.5 695 487.5 695S512.5 682.5 512.5 670ZM687.5 670V495C687.5 480 677.5 470 662.5 470S637.5 480 637.5 495V670C637.5 685 647.5 695 662.5 695S687.5 682.5 687.5 670ZM720 730H80C65 730 55 740 55 755S65 780 80 780H722.5C737.5 780 747.5 770 747.5 755S735 730 720 730ZM370 290C370 305 382.5 320 400 320S430 307.5 430 290C430 275 417.5 260 400 260S370 272.5 370 290Z", + "width": 1000 + }, + "search": [ + "bank" + ] + }, + { + "uid": "d5236adff579dfb3ddd9aa80808db695", + "css": "notifications", + "code": 59422, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M411.8 960.8C465.7 960.8 509.8 916.7 509.8 862.7H313.7C313.7 916.7 357.3 960.8 411.8 960.8ZM705.9 666.7V421.6C705.9 271.1 625.5 145.1 485.3 111.8V78.4C485.3 37.7 452.4 4.9 411.8 4.9 371.1 4.9 338.2 37.7 338.2 78.4V111.8C197.5 145.1 117.6 270.6 117.6 421.6V666.7L54.4 729.9C23.5 760.8 45.1 813.7 88.7 813.7H734.3C777.9 813.7 800 760.8 769.1 729.9L705.9 666.7Z", + "width": 824 + }, + "search": [ + "notifications" + ] + }, + { + "uid": "75be9d662d8ef6ae70733508992d1bef", + "css": "loginOutlined", + "code": 59439, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M125 982.1C95.5 982.1 70.3 971.6 49.3 950.7 28.3 929.7 17.9 904.5 17.9 875V125C17.9 95.5 28.3 70.3 49.3 49.3 70.3 28.3 95.5 17.9 125 17.9H446.4C461.6 17.9 474.3 23 484.6 33.3 494.9 43.5 500 56.3 500 71.4 500 86.6 494.9 99.3 484.6 109.6 474.3 119.9 461.6 125 446.4 125H125V875H446.4C461.6 875 474.3 880.1 484.6 890.4 494.9 900.7 500 913.4 500 928.6 500 943.8 494.9 956.5 484.6 966.7 474.3 977 461.6 982.1 446.4 982.1H125ZM777.2 553.6H392.9C377.7 553.6 365 548.4 354.7 538.2 344.4 527.9 339.3 515.2 339.3 500 339.3 484.8 344.4 472.1 354.7 461.8 365 451.6 377.7 446.4 392.9 446.4H777.2L676.8 346C667 336.2 662.1 324.1 662.1 309.8 662.1 295.5 667 283 676.8 272.3 686.6 261.6 699.1 256 714.3 255.6 729.5 255.1 742.4 260.3 753.1 271L944.6 462.5C955.4 473.2 960.7 485.7 960.7 500 960.7 514.3 955.4 526.8 944.6 537.5L753.1 729C742.4 739.7 729.7 744.9 715 744.4 700.2 744 687.5 738.4 676.8 727.7 667 717 662.3 704.2 662.7 689.5 663.2 674.8 668.3 662.5 678.1 652.7L777.2 553.6Z", + "width": 1000 + }, + "search": [ + "login_outlined" + ] + }, + { + "uid": "cc6c6674b6bb2c5946bcc08a3f69a3ae", + "css": "helpOutlined", + "code": 59423, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM500 833.3C316.3 833.3 166.7 683.8 166.7 500 166.7 316.3 316.3 166.7 500 166.7 683.8 166.7 833.3 316.3 833.3 500 833.3 683.8 683.8 833.3 500 833.3ZM458.3 666.7H541.7V750H458.3V666.7ZM525.4 251.7C439.6 239.2 363.8 292.1 340.8 367.9 333.3 392.1 351.7 416.7 377.1 416.7H385.4C402.5 416.7 416.3 404.6 422.1 388.8 435.4 351.7 475 326.3 517.9 335.4 557.5 343.8 586.7 382.5 583.3 422.9 579.2 478.8 515.8 490.8 481.3 542.9 481.3 543.3 480.8 543.3 480.8 543.8 480.4 544.6 480 545 479.6 545.8 475.8 552.1 472.1 559.2 469.2 566.7 468.8 567.9 467.9 568.8 467.5 570 467.1 570.8 467.1 571.7 466.7 572.9 461.7 587.1 458.3 604.2 458.3 625H541.7C541.7 607.5 546.3 592.9 553.3 580.4 554.2 579.2 554.6 577.9 555.4 576.7 558.8 570.8 562.9 565.4 567.1 560.4 567.5 560 567.9 559.2 568.3 558.8 572.5 553.8 577.1 549.2 582.1 544.6 622.1 506.7 676.3 475.8 665 396.3 655 323.8 597.9 262.5 525.4 251.7Z", + "width": 1000 + }, + "search": [ + "help_outline" + ] + }, + { + "uid": "e15c5154b2960472d77047189fa122aa", + "css": "externalLink", + "code": 59414, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M821.4 875H178.6C149.1 875 125 850.9 125 821.4V178.6C125 149.1 149.1 125 178.6 125H446.4C475.9 125 500 100.9 500 71.4 500 42 475.9 17.9 446.4 17.9H125C65.5 17.9 17.9 66.1 17.9 125V875C17.9 933.9 66.1 982.1 125 982.1H875C933.9 982.1 982.1 933.9 982.1 875V553.6C982.1 524.1 958 500 928.6 500 899.1 500 875 524.1 875 553.6V821.4C875 850.9 850.9 875 821.4 875ZM607.1 71.4C607.1 100.9 631.3 125 660.7 125H799.5L310.4 614.1C289.5 635 289.5 668.8 310.4 689.6 331.3 710.5 365 710.5 385.9 689.6L875 200.5V339.3C875 368.8 899.1 392.9 928.6 392.9 958 392.9 982.1 368.8 982.1 339.3V17.9H660.7C631.3 17.9 607.1 42 607.1 71.4Z", + "width": 1000 + }, + "search": [ + "external_link" + ] + }, + { + "uid": "a02a88e9845483cb9b4242e4993c2c07", + "css": "contentCopy", + "code": 59424, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M625 833.3H208.3V291.7C208.3 268.8 189.6 250 166.7 250 143.8 250 125 268.8 125 291.7V833.3C125 879.2 162.5 916.7 208.3 916.7H625C647.9 916.7 666.7 897.9 666.7 875 666.7 852.1 647.9 833.3 625 833.3ZM833.3 666.7V166.7C833.3 120.8 795.8 83.3 750 83.3H375C329.2 83.3 291.7 120.8 291.7 166.7V666.7C291.7 712.5 329.2 750 375 750H750C795.8 750 833.3 712.5 833.3 666.7ZM750 666.7H375V166.7H750V666.7Z", + "width": 1000 + }, + "search": [ + "content_copy" + ] + }, + { + "uid": "87dd15d5862aa9b7aec5c97da6cfffba", + "css": "favoriteOutlined", + "code": 59481, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M819.2 166.3C709.2 91.3 573.3 126.3 500 212.1 426.7 126.3 290.8 90.9 180.8 166.3 122.5 206.3 85.8 273.8 83.3 345 77.5 506.7 220.8 636.3 439.6 835L443.8 838.8C475.4 867.5 524.2 867.5 555.8 838.4L560.4 834.2C779.2 635.9 922.1 506.3 916.7 344.6 914.2 273.8 877.5 206.3 819.2 166.3ZM504.2 772.9L500 777.1 495.8 772.9C297.5 593.4 166.7 474.6 166.7 354.2 166.7 270.9 229.2 208.4 312.5 208.4 376.7 208.4 439.2 249.6 461.3 306.7H539.2C560.8 249.6 623.3 208.4 687.5 208.4 770.8 208.4 833.3 270.9 833.3 354.2 833.3 474.6 702.5 593.4 504.2 772.9Z", + "width": 1000 + }, + "search": [ + "favorite_border" + ] + }, + { + "uid": "fee413ab50aa94061b2dea5dfb2378f6", + "css": "walletAddMoney", + "code": 59426, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M740.5 17.9C675.2 4.6 529.7 0 445.4 0 374.5 0 306 11.3 236.9 25.4 154.7 42.2 99.5 125.8 87.7 215.9 77.6 292.5 71.4 368.7 71.4 445.9 71.4 463.4 71.6 479.5 72 494.6 71.6 506.1 71.4 518.3 71.4 531.3 71.4 552.7 72 571.7 72.9 588.9 97.7 546.4 143.7 517.9 196.4 517.9 275.3 517.9 339.3 581.8 339.3 660.7 418.2 660.7 482.1 724.7 482.1 803.6 482.1 840.8 467.9 874.8 444.5 900.2 465.8 901.2 488.6 901.8 513.5 901.8 612.7 901.8 679.4 892.5 748.7 882.9L760.2 881.3C831.9 871.3 893.8 825.6 922.6 762.3 932.1 741.4 914.2 720.2 891.2 720.1 882.8 720 874.4 719.9 866 719.9 854.9 719.7 843.8 719.6 832.7 719.6 728.9 719.6 644.8 637.3 644.8 535.7 644.8 434.1 728.9 351.8 832.7 351.8 843.7 351.8 854.7 351.7 865.7 351.6 873 351.6 880.4 351.5 887.7 351.5 911.2 351.4 928.8 329.3 917.9 308.5 900.6 275.2 873.5 247.3 840.3 227.8 786.2 199.9 716.3 194 617.6 194 538.2 194 461.8 200 402.8 204.6 386.8 205.9 372.1 207 359 207.9 334.7 209.6 313.7 191.7 312 168 310.3 144.2 328.5 123.6 352.8 122 364.8 121.2 378.6 120.1 394 118.9 453 114.2 534.2 107.9 617.6 107.9 675.4 107.9 730.8 109.5 782.1 119 807.3 123.7 831.3 103.3 819.6 80.5 803.8 49.8 776.5 25.3 740.5 17.9ZM832.7 633.5H929.6C968.5 633.5 1000 602.7 1000 564.6V506.9C1000 468.9 968.5 438 929.6 438H832.7C777.5 438 732.8 481.8 732.8 535.8 732.8 589.8 777.5 633.5 832.7 633.5ZM196.4 607.1C226 607.1 250 631.1 250 660.7V750H339.3C368.9 750 392.9 774 392.9 803.6 392.9 833.2 368.9 857.1 339.3 857.1H250V946.4C250 976 226 1000 196.4 1000 166.8 1000 142.9 976 142.9 946.4V857.1H53.6C24 857.1 0 833.2 0 803.6 0 774 24 750 53.6 750H142.9V660.7C142.9 631.1 166.8 607.1 196.4 607.1Z", + "width": 1000 + }, + "search": [ + "income_icon" + ] + }, + { + "uid": "8936a65b272aef1d00194728f05f3074", + "css": "walletSubtractMoney", + "code": 59427, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M735.8 75.7C671.8 62.7 529.1 58.1 446.5 58.1 377.1 58.1 309.9 69.2 242.2 83 161.7 99.4 107.5 181.4 95.9 269.7 86.1 344.8 80 419.4 80 495.1 80 512.2 80.2 528.1 80.6 542.9 80.2 554.1 80 566 80 578.8 80 633.3 83.6 671.9 88.6 705.6H342.5C419.8 705.6 482.5 768.3 482.5 845.6 482.5 882.1 468.5 915.4 445.7 940.3 466.5 941.3 488.9 941.9 513.2 941.9 610.4 941.9 675.8 932.8 743.7 923.3L755 921.8C825.3 912 886 867.2 914.2 805.2 923.5 784.6 906 763.9 883.4 763.8 875.2 763.8 866.9 763.7 858.7 763.6 847.8 763.4 836.9 763.3 826.1 763.3 724.4 763.3 642 682.6 642 583.1 642 483.6 724.4 402.9 826.1 402.9 836.8 402.9 847.6 402.8 858.4 402.7 865.6 402.7 872.8 402.6 880 402.6 903 402.5 920.3 380.8 909.6 360.4 892.6 327.9 866 300.5 833.5 281.4 780.5 254 712 248.2 615.2 248.2 537.5 248.2 462.6 254.1 404.7 258.6 389.1 259.9 374.7 261 361.8 261.9 338 263.5 317.4 246 315.8 222.7 314.1 199.5 332 179.3 355.7 177.7 367.5 176.8 381.1 175.8 396.1 174.6 454 170.1 533.6 163.8 615.2 163.8 671.9 163.8 726.2 165.4 776.5 174.7 801.2 179.3 824.7 159.4 813.3 137.1 797.8 106.9 771 82.9 735.8 75.7ZM826 679H921C959.1 679 990 648.7 990 611.4V554.9C990 517.6 959.1 487.4 921 487.4H826C772 487.4 728.2 530.3 728.2 583.2 728.2 636.1 772 679 826 679ZM62.5 793.1C33.5 793.1 10 816.6 10 845.6 10 874.6 33.5 898.1 62.5 898.1H342.5C371.5 898.1 395 874.6 395 845.6 395 816.6 371.5 793.1 342.5 793.1H62.5Z", + "width": 1000 + }, + "search": [ + "expense_icon" + ] + }, + { + "uid": "234e08e0ba62aae4b87aac29b77f7189", + "css": "preferences", + "code": 59415, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M53.6 821.4C53.6 850.9 77.7 875 107.1 875H375V767.9H107.1C77.7 767.9 53.6 792 53.6 821.4ZM53.6 178.6C53.6 208 77.7 232.1 107.1 232.1H589.3V125H107.1C77.7 125 53.6 149.1 53.6 178.6ZM589.3 928.6V875H964.3C993.8 875 1017.9 850.9 1017.9 821.4 1017.9 792 993.8 767.9 964.3 767.9H589.3V714.3C589.3 684.8 565.2 660.7 535.7 660.7 506.3 660.7 482.1 684.8 482.1 714.3V928.6C482.1 958 506.3 982.1 535.7 982.1 565.2 982.1 589.3 958 589.3 928.6ZM267.9 392.9V446.4H107.1C77.7 446.4 53.6 470.5 53.6 500 53.6 529.5 77.7 553.6 107.1 553.6H267.9V607.1C267.9 636.6 292 660.7 321.4 660.7 350.9 660.7 375 636.6 375 607.1V392.9C375 363.4 350.9 339.3 321.4 339.3 292 339.3 267.9 363.4 267.9 392.9ZM1017.9 500C1017.9 470.5 993.8 446.4 964.3 446.4H482.1V553.6H964.3C993.8 553.6 1017.9 529.5 1017.9 500ZM750 339.3C779.5 339.3 803.6 315.2 803.6 285.7V232.1H964.3C993.8 232.1 1017.9 208 1017.9 178.6 1017.9 149.1 993.8 125 964.3 125H803.6V71.4C803.6 42 779.5 17.9 750 17.9 720.5 17.9 696.4 42 696.4 71.4V285.7C696.4 315.2 720.5 339.3 750 339.3Z", + "width": 1071 + }, + "search": [ + "preferences" + ] + }, + { + "uid": "2d02314f37b222850d4a6c12340c7954", + "css": "home", + "code": 59450, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M416.7 791.7V583.3H583.3V791.7C583.3 814.6 602.1 833.3 625 833.3H750C772.9 833.3 791.6 814.6 791.6 791.7V500H862.5C881.6 500 890.8 476.2 876.2 463.8L527.9 150C512.1 135.8 487.9 135.8 472.1 150L123.7 463.8C109.6 476.2 118.3 500 137.5 500H208.3V791.7C208.3 814.6 227.1 833.3 250 833.3H375C397.9 833.3 416.7 814.6 416.7 791.7Z", + "width": 1000 + }, + "search": [ + "home" + ] + }, + { + "uid": "09bb61c642f4a5bfcbe8fb7ee5e24023", + "css": "apartment", + "code": 59451, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M708.3 458.3V208.3C708.3 162.5 670.8 125 625 125H375C329.2 125 291.7 162.5 291.7 208.3V291.7H208.3C162.5 291.7 125 329.2 125 375V791.7C125 837.5 162.5 875 208.3 875H416.7C439.6 875 458.3 856.3 458.3 833.3V708.3H541.7V833.3C541.7 856.3 560.4 875 583.3 875H791.7C837.5 875 875 837.5 875 791.7V541.7C875 495.8 837.5 458.3 791.7 458.3H708.3ZM291.7 791.7H208.3V708.3H291.7V791.7ZM291.7 625H208.3V541.7H291.7V625ZM291.7 458.3H208.3V375H291.7V458.3ZM458.3 625H375V541.7H458.3V625ZM458.3 458.3H375V375H458.3V458.3ZM458.3 291.7H375V208.3H458.3V291.7ZM625 625H541.7V541.7H625V625ZM625 458.3H541.7V375H625V458.3ZM625 291.7H541.7V208.3H625V291.7ZM791.7 791.7H708.3V708.3H791.7V791.7ZM791.7 625H708.3V541.7H791.7V625Z", + "width": 1000 + }, + "search": [ + "apartment" + ] + }, + { + "uid": "cf2354d9a3f105613ba97943d75ef620", + "css": "radioButtonUncheckedRounded", + "code": 59452, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM500 833.3C315.8 833.3 166.7 684.2 166.7 500 166.7 315.8 315.8 166.7 500 166.7 684.2 166.7 833.3 315.8 833.3 500 833.3 684.2 684.2 833.3 500 833.3Z", + "width": 1000 + }, + "search": [ + "radio_button_unchecked_rounded" + ] + }, + { + "uid": "116e3fb0c5393bed77dd56897408d886", + "css": "radioButtonCheckedRounded", + "code": 59453, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM500 833.3C315.8 833.3 166.7 684.2 166.7 500 166.7 315.8 315.8 166.7 500 166.7 684.2 166.7 833.3 315.8 833.3 500 833.3 684.2 684.2 833.3 500 833.3ZM500 708.3C615.1 708.3 708.3 615.1 708.3 500 708.3 384.9 615.1 291.7 500 291.7 384.9 291.7 291.7 384.9 291.7 500 291.7 615.1 384.9 708.3 500 708.3Z", + "width": 1000 + }, + "search": [ + "radio_button_checked_rounded" + ] + }, + { + "uid": "6eff87c591df2f015ffd8c0ccd46bd4d", + "css": "share", + "code": 59480, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M750 670C718.3 670 690 682.5 668.3 702.1L371.3 529.2C373.3 519.6 375 510 375 500 375 490 373.3 480.4 371.3 470.8L665 299.6C687.5 320.4 717.1 333.3 750 333.3 819.2 333.3 875 277.5 875 208.3 875 139.2 819.2 83.3 750 83.3 680.8 83.3 625 139.2 625 208.3 625 218.3 626.7 227.9 628.8 237.5L335 408.8C312.5 387.9 282.9 375 250 375 180.8 375 125 430.8 125 500 125 569.2 180.8 625 250 625 282.9 625 312.5 612.1 335 591.3L631.7 764.6C629.6 773.3 628.3 782.5 628.3 791.7 628.3 858.7 682.9 913.3 750 913.3 817.1 913.3 871.7 858.7 871.7 791.7 871.7 724.6 817.1 670 750 670Z", + "width": 1000 + }, + "search": [ + "share-(1)" + ] + }, + { + "uid": "67897933d14dccc8984781dbdaff21af", + "css": "edit", + "code": 59406, + "src": "material" + }, + { + "uid": "a78660671887c492073e542fdce08e52", + "css": "favorite", + "code": 59399, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M556.3 838.8C524.6 867.5 475.8 867.5 444.2 838.3L439.6 834.2C220.8 636.3 77.9 506.7 83.3 345 85.8 274.2 122.1 206.3 180.8 166.3 290.8 91.3 426.7 126.3 500 212.1 573.3 126.3 709.2 90.8 819.2 166.3 877.9 206.3 914.2 274.2 916.7 345 922.5 506.7 779.2 636.3 560.4 835L556.3 838.8Z", + "width": 1000 + }, + "search": [ + "heart" + ] + }, + { + "uid": "7fea598763ae669e50c0a2349103e9cb", + "css": "apartmentScene", + "code": 59425, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M833.3 958.3V333.3C833.3 310.4 825.2 290.8 808.9 274.5 792.5 258.2 772.9 250 750 250H708.3V304.2C708.3 312.5 705.6 319.4 700 325 694.4 330.6 687.5 333.3 679.2 333.3H445.8C436.1 333.3 428.3 328.1 422.4 317.7 416.5 307.3 416 297.2 420.8 287.5L500 116.7C504.9 106.2 512 98.1 521.4 92.2 530.7 86.3 541.7 83.3 554.2 83.3H650C666.7 83.3 680.6 89.6 691.7 102.1 702.8 114.6 708.3 129.2 708.3 145.8V166.7H750C795.8 166.7 835.1 183 867.7 215.6 900.3 248.3 916.7 287.5 916.7 333.3V958.3H833.3ZM208.3 958.3C172.9 958.3 143.2 946.4 119.3 922.4 95.3 898.4 83.3 868.8 83.3 833.3V729.2C83.3 711.8 89.4 697 101.6 684.9 113.7 672.7 128.5 666.7 145.8 666.7 163.2 666.7 178 672.7 190.1 684.9 202.3 697 208.3 711.8 208.3 729.2V833.3H625V729.2C625 711.8 631.1 697 643.2 684.9 655.4 672.7 670.1 666.7 687.5 666.7 704.9 666.7 719.6 672.7 731.8 684.9 743.9 697 750 711.8 750 729.2V833.3C750 868.8 738 898.4 714.1 922.4 690.1 946.4 660.4 958.3 625 958.3H208.3ZM250 791.7V729.2C250 706.9 242.7 685.8 228.1 665.6 213.5 645.5 193.1 632.6 166.7 627.1V541.7C166.7 518.7 174.8 499.1 191.1 482.8 207.5 466.5 227.1 458.3 250 458.3H583.3C606.3 458.3 625.9 466.5 642.2 482.8 658.5 499.1 666.7 518.7 666.7 541.7V627.1C640.3 632.6 619.8 645.5 605.2 665.6 590.6 685.8 583.3 706.9 583.3 729.2V791.7H250Z", + "width": 1000 + }, + "search": [ + "apartment_scene" + ] + }, + { + "uid": "080acd76b242057625e38e4c10e9eccb", + "css": "star", + "code": 59434, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M538.5 842.5L777.9 987.3C821.7 1013.8 875.4 974.6 863.9 925L800.4 652.7 1012.1 469.2C1050.8 435.8 1030 372.3 979.2 368.3L700.6 344.6 591.6 87.3C571.9 40.6 505 40.6 485.4 87.3L376.4 344 97.7 367.7C46.9 371.7 26.2 435.2 64.8 468.7L276.6 652.1 213.1 924.4C201.6 974 255.2 1013.3 299.1 986.7L538.5 842.5Z", + "width": 1077 + }, + "search": [ + "star" + ] + }, + { + "uid": "695c8c6b6e326fb4af934a49c22699f8", + "css": "infoOutlined", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M458.3 291.7H541.7V375H458.3V291.7ZM500 708.3C522.9 708.3 541.7 689.6 541.7 666.7V500C541.7 477.1 522.9 458.3 500 458.3 477.1 458.3 458.3 477.1 458.3 500V666.7C458.3 689.6 477.1 708.3 500 708.3ZM500 83.3C270 83.3 83.3 270 83.3 500 83.3 730 270 916.7 500 916.7 730 916.7 916.7 730 916.7 500 916.7 270 730 83.3 500 83.3ZM500 833.3C316.3 833.3 166.7 683.8 166.7 500 166.7 316.3 316.3 166.7 500 166.7 683.8 166.7 833.3 316.3 833.3 500 833.3 683.8 683.8 833.3 500 833.3Z", + "width": 1000 + }, + "search": [ + "infooutline" + ] + }, + { + "uid": "047074ef7962a4fe82ed66c7c3122891", + "css": "immo", + "code": 59433, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M710.9 93.8H1148.4C1165.6 93.8 1179.7 107.8 1179.7 125V875C1179.7 892.2 1165.6 906.3 1148.4 906.3H835.9C835.9 941.4 824.2 973.8 804.7 1000H1148.4C1217.4 1000 1273.4 943.9 1273.4 875V125C1273.4 56.1 1217.4 0 1148.4 0H710.9C642 0 585.9 56.1 585.9 125V243.4L679.7 329.3V125C679.7 107.8 693.8 93.8 710.9 93.8ZM830.5 500H867.2C884.4 500 898.4 485.9 898.4 468.8V406.3C898.4 389.1 884.4 375 867.2 375H804.7C787.5 375 773.4 389.1 773.4 406.3V415.2L785.4 426.2C807.2 446.3 822.9 471.9 830.5 500.2V500ZM835.9 687.5H867.2C884.4 687.5 898.4 673.4 898.4 656.3V593.8C898.4 576.6 884.4 562.5 867.2 562.5H835.9V687.5ZM960.9 406.3V468.8C960.9 485.9 975 500 992.2 500H1054.7C1071.9 500 1085.9 485.9 1085.9 468.8V406.3C1085.9 389.1 1071.9 375 1054.7 375H992.2C975 375 960.9 389.1 960.9 406.3ZM992.2 562.5C975 562.5 960.9 576.6 960.9 593.8V656.3C960.9 673.4 975 687.5 992.2 687.5H1054.7C1071.9 687.5 1085.9 673.4 1085.9 656.3V593.8C1085.9 576.6 1071.9 562.5 1054.7 562.5H992.2ZM804.7 187.5C787.5 187.5 773.4 201.6 773.4 218.8V281.3C773.4 298.4 787.5 312.5 804.7 312.5H867.2C884.4 312.5 898.4 298.4 898.4 281.3V218.8C898.4 201.6 884.4 187.5 867.2 187.5H804.7ZM960.9 218.8V281.3C960.9 298.4 975 312.5 992.2 312.5H1054.7C1071.9 312.5 1085.9 298.4 1085.9 281.3V218.8C1085.9 201.6 1071.9 187.5 1054.7 187.5H992.2C975 187.5 960.9 201.6 960.9 218.8ZM64.1 462.9C38.1 486.5 23.4 519.9 23.4 555.1V875C23.4 943.9 79.5 1000 148.4 1000H648.4C717.4 1000 773.4 943.9 773.4 875V555.1C773.4 520.1 758.8 486.5 732.8 462.9L482.8 233.8C435 190 361.7 190 313.9 233.8L64.1 462.9ZM117.2 555.1C117.2 546.3 120.9 537.9 127.3 532L377.3 302.7C389.3 291.8 407.6 291.8 419.5 302.7L669.5 531.8C676 537.7 679.7 546.1 679.7 554.9V875C679.7 892.2 665.6 906.3 648.4 906.3H148.4C131.3 906.3 117.2 892.2 117.2 875V555.1ZM304.7 578.1V671.9C304.7 697.9 325.6 718.8 351.6 718.8H445.3C471.3 718.8 492.2 697.9 492.2 671.9V578.1C492.2 552.1 471.3 531.3 445.3 531.3H351.6C325.6 531.3 304.7 552.1 304.7 578.1Z", + "width": 1313 + }, + "search": [ + "immo" + ] + }, + { + "uid": "a848537497d1a7a3c38bd63d215da682", + "css": "immoSelected", + "code": 59397, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M742.2 0C690.4 0 648.4 42 648.4 93.8V300.6L773.4 415.2V406.3C773.4 389.1 787.5 375 804.7 375H867.2C884.4 375 898.4 389.1 898.4 406.3V468.8C898.4 485.9 884.4 500 867.2 500H830.5C834.2 513.3 835.9 527.1 835.9 541.2V562.5H867.2C884.4 562.5 898.4 576.6 898.4 593.8V656.3C898.4 673.4 884.4 687.5 867.2 687.5H835.9V906.3C835.9 941.4 824.2 973.8 804.7 1000H1179.7C1231.4 1000 1273.4 958 1273.4 906.3V93.8C1273.4 42 1231.4 0 1179.7 0H742.2ZM1023.4 406.3C1023.4 389.1 1037.5 375 1054.7 375H1117.2C1134.4 375 1148.4 389.1 1148.4 406.3V468.8C1148.4 485.9 1134.4 500 1117.2 500H1054.7C1037.5 500 1023.4 485.9 1023.4 468.8V406.3ZM1054.7 562.5H1117.2C1134.4 562.5 1148.4 576.6 1148.4 593.8V656.3C1148.4 673.4 1134.4 687.5 1117.2 687.5H1054.7C1037.5 687.5 1023.4 673.4 1023.4 656.3V593.8C1023.4 576.6 1037.5 562.5 1054.7 562.5ZM804.7 187.5H867.2C884.4 187.5 898.4 201.6 898.4 218.8V281.3C898.4 298.4 884.4 312.5 867.2 312.5H804.7C787.5 312.5 773.4 298.4 773.4 281.3V218.8C773.4 201.6 787.5 187.5 804.7 187.5ZM1023.4 218.8C1023.4 201.6 1037.5 187.5 1054.7 187.5H1117.2C1134.4 187.5 1148.4 201.6 1148.4 218.8V281.3C1148.4 298.4 1134.4 312.5 1117.2 312.5H1054.7C1037.5 312.5 1023.4 298.4 1023.4 281.3V218.8ZM23.4 541.2V906.3C23.4 958 65.4 1000 117.2 1000H679.7C731.4 1000 773.4 958 773.4 906.3V541.2C773.4 514.8 762.5 489.8 743 472.1L461.7 214.3C425.8 181.4 370.9 181.4 335 214.3L53.7 472.1C34.4 489.8 23.4 515 23.4 541.2ZM304.7 578.1C304.7 552.1 325.6 531.3 351.6 531.3H445.3C471.3 531.3 492.2 552.1 492.2 578.1V671.9C492.2 697.9 471.3 718.8 445.3 718.8H351.6C325.6 718.8 304.7 697.9 304.7 671.9V578.1Z", + "width": 1313 + }, + "search": [ + "immo_selected" + ] + }, + { + "uid": "5baa679d976c1b815a462dd5eac8df61", + "css": "startSelected", + "code": 59435, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1179.2 499C1179.2 534.2 1149.9 561.7 1116.7 561.7H1054.2L1055.6 874.6C1055.6 879.9 1055.2 885.2 1054.6 890.4V922.1C1054.6 965.2 1019.7 1000.2 976.5 1000.2H945.2C943.1 1000.2 940.9 1000.2 938.8 1000 936.1 1000.2 933.3 1000.2 930.6 1000.2L867.1 1000H820.2C777.1 1000 742.1 965 742.1 921.9V875 750C742.1 715.4 714.2 687.5 679.6 687.5H554.6C520 687.5 492.1 715.4 492.1 750V875 921.9C492.1 965 457.2 1000 414 1000H367.1 304.8C301.9 1000 298.9 999.8 296 999.6 293.7 999.8 291.3 1000 289 1000H257.7C214.6 1000 179.6 965 179.6 921.9V703.1C179.6 701.4 179.6 699.4 179.8 697.7V561.5H117.3C82.2 561.5 54.8 534.2 54.8 498.8 54.8 481.3 60.7 465.6 74.3 452L574.9 15.6C588.6 2 604.2 0 617.9 0 631.6 0 647.2 3.9 658.9 13.7L1157.7 452.1C1173.4 465.8 1181.2 481.4 1179.2 499Z", + "width": 1188 + }, + "search": [ + "home_selected" + ] + }, + { + "uid": "238167a2279361a96ea0cea82934e3d4", + "css": "start", + "code": 59432, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M647.6 11.1C630-3.7 604.4-3.7 586.8 11.1L71.2 448.6C51.5 465.4 49.1 494.9 65.7 514.6 82.3 534.4 112 536.7 131.7 520.1L179.8 479.5V843.8C179.8 930.1 249.7 1000 336 1000H898.5C984.9 1000 1054.8 930.1 1054.8 843.8V479.5L1102.6 520.1C1122.4 536.9 1152.1 534.4 1168.7 514.6 1185.3 494.9 1182.9 465.2 1163.2 448.6L647.6 11.1ZM273.5 843.8V400L617.3 108.4 961 400V843.8C961 878.3 933.1 906.3 898.5 906.3H804.8V609.4C804.8 566.2 769.8 531.3 726.7 531.3H507.9C464.8 531.3 429.8 566.2 429.8 609.4V906.3H336C301.5 906.3 273.5 878.3 273.5 843.8ZM523.5 906.3V625H711V906.3H523.5Z", + "width": 1188 + }, + "search": [ + "home" + ] + }, + { + "uid": "d754a4bdbfb614f66897dcaca4f9edbb", + "css": "finance", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M382.8 171.9C382.8 172.1 383 173 384 174.8 385.2 177.1 387.9 180.9 393.2 185.5 393.9 186.1 394.7 186.9 395.5 187.5 359 188.3 323.4 190.8 289.3 195.5L289.1 171.9C289.1 136.7 308 108.6 330.3 88.5 352.5 68.4 382.4 52.3 415.2 39.8 481.3 14.6 569.3 0 664.1 0 758.8 0 846.9 14.6 912.7 39.6 945.5 52.1 975.4 68.2 997.7 88.3 1019.9 108.4 1039.1 136.7 1039.1 171.9V375 578.1C1039.1 613.3 1020.1 641.4 997.9 661.5 975.6 681.6 945.7 697.7 912.9 710.2 894.1 717.4 873.6 723.6 851.8 728.9V631.8C861.7 628.9 870.9 625.8 879.5 622.5 906.1 612.3 924.4 601.4 935.2 591.8 940.4 587.1 943.2 583.4 944.3 581.1 945.5 578.9 945.5 578.1 945.5 578.1V493C935.2 498 924.2 502.7 912.9 507 894.1 514.3 873.6 520.5 851.8 525.8V428.7C861.7 425.8 870.9 422.7 879.5 419.3 906.1 409.2 924.4 398.2 935.2 388.7 940.4 384 943.2 380.3 944.3 377.9 945.3 376.2 945.5 375.2 945.5 375V289.8C935.2 294.9 924.2 299.6 912.9 303.9 886.1 314.1 855.5 322.7 822.5 329.1 812.5 314.5 801 302 789.6 291.8 769.9 274 747.1 259.6 723.2 247.7 785.2 243.2 839.1 231.6 879.5 216.2 906.1 206.1 924.4 195.1 935.2 185.5 940.4 180.9 943.2 177.1 944.3 174.8 945.3 173 945.5 172.1 945.5 171.9 945.5 171.9 945.5 170.9 944.3 168.9 943.2 166.6 940.4 162.9 935.2 158.2 924.4 148.4 906.1 137.5 879.5 127.5 826.6 107.2 750.4 93.8 664.1 93.8 577.7 93.8 501.6 107.2 448.8 127.3 422.3 137.5 403.9 148.4 393.2 158 387.9 162.7 385.2 166.4 384 168.8 382.8 170.9 382.8 171.7 382.8 171.7V171.9ZM132.8 421.9C132.8 422.1 133 423 134 424.8 135.2 427.1 137.9 430.9 143.2 435.5 153.9 445.3 172.3 456.3 198.8 466.2 251.6 486.3 327.7 499.8 414.1 499.8 500.4 499.8 576.6 486.3 629.3 466.2 655.9 456.1 674.2 445.1 685 435.5 690.2 430.9 693 427.1 694.1 424.8 695.1 423 695.3 422.1 695.3 421.9 695.3 421.9 695.3 420.9 694.1 418.9 693 416.6 690.2 412.9 685 408.2 674.2 398.4 655.9 387.5 629.3 377.5 576.6 357.4 500.4 343.9 414.1 343.9 327.7 343.9 251.6 357.4 198.8 377.5 172.3 387.7 153.9 398.6 143.2 408.2 137.9 412.9 135.2 416.6 134 418.9 132.8 421.1 132.8 421.9 132.8 421.9ZM39.1 421.9C39.1 386.7 58 358.6 80.3 338.5 102.5 318.4 132.4 302.3 165.2 289.8 231.3 264.6 319.3 250 414.1 250 508.8 250 596.9 264.6 662.7 289.6 695.5 302.1 725.4 318.2 747.7 338.3 769.9 358.4 789.1 386.7 789.1 421.9V625 828.1C789.1 863.3 770.1 891.4 747.9 911.5 725.6 931.6 695.7 947.7 662.9 960.2 596.9 985.3 508.8 1000 414.1 1000 319.3 1000 231.3 985.3 165.4 960.4 132.6 947.9 102.9 931.8 80.5 911.7 58 891.6 39.1 863.3 39.1 828.1V625 421.9ZM695.3 625V539.8C685 544.9 674 549.6 662.7 553.9 596.9 579.1 508.8 593.8 414.1 593.8 319.3 593.8 231.3 579.1 165.4 554.1 154.1 549.8 143.2 545.1 132.8 540V625C132.8 625.2 133 626.2 134 627.9 135.2 630.3 137.9 634 143.2 638.7 153.9 648.4 172.3 659.4 198.8 669.3 251.6 689.5 327.7 702.9 414.1 702.9 500.4 702.9 576.6 689.5 629.3 669.3 655.9 659.2 674.2 648.2 685 638.7 690.2 634 693 630.3 694.1 627.9 695.1 626.2 695.3 625.2 695.3 625ZM165.4 757.2C154.1 752.9 143.2 748.2 132.8 743.2V828.1C132.8 828.1 132.8 829.1 134 831.1 135.2 833.4 137.9 837.1 143.2 841.8 153.9 851.6 172.3 862.5 198.8 872.5 251.6 892.6 327.7 906.1 414.1 906.1 500.4 906.1 576.6 892.6 629.3 872.5 655.9 862.3 674.2 851.4 685 841.8 690.2 837.1 693 833.4 694.1 831.1 695.3 828.9 695.3 828.1 695.3 828.1V743C685 748 674 752.7 662.7 757 596.9 782.2 508.8 796.9 414.1 796.9 319.3 796.9 231.3 782.2 165.4 757.2Z", + "width": 1063 + }, + "search": [ + "finance" + ] + }, + { + "uid": "c57c4305310ea4a975783c93b5cf8f68", + "css": "financeSelected", + "code": 59437, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1039.1 156.3C1039.1 191.4 1011.1 223.8 964.1 250 907.2 281.4 822.5 303.7 725.2 310.4 718 306.8 710.7 303.5 703.1 300.6 626.2 268.4 523.8 250 414.1 250 397.9 250 382 250.4 366.2 251.2L364.1 250C317 223.8 289.1 191.4 289.1 156.3 289.1 69.9 457 0 664.1 0 871.1 0 1039.1 69.9 1039.1 156.3ZM352.9 314.6C372.9 313.3 393.4 312.5 414.1 312.5 535.5 312.5 643.4 336.5 711.9 373.8 760.4 400.2 789.1 433 789.1 468.8 789.1 476.6 787.7 484.2 785 491.6 776 517.4 751.8 541 716.6 560.9 716.4 561.1 716 561.1 715.8 561.3 715.2 561.7 714.6 561.9 714.1 562.3 645.7 600.2 536.7 624.8 414.1 624.8 297.7 624.8 193.6 602.7 124.6 568 120.9 566.2 117.4 564.3 113.9 562.3 67 536.3 39.1 503.9 39.1 468.8 39.1 400.8 143.4 342.8 289.1 321.5 309.6 318.6 330.9 316.2 352.9 314.6ZM851.6 468.8C851.6 426 830.9 390.8 804.5 364.5 859.8 355.9 910.4 342.2 953.3 324.4 985.2 311.1 1014.8 294.7 1039.1 274.6V343.8C1039.1 381.4 1006.8 416.2 953.5 443.2 925 457.6 890.2 469.9 851.2 479.3 851.4 475.8 851.6 472.5 851.6 468.9V468.8ZM789.1 656.3C789.1 691.4 761.1 723.8 714.1 750 710.6 752 707 753.7 703.3 755.7 634.6 790.4 530.5 812.5 414.1 812.5 291.4 812.5 182.4 787.9 114.1 750 67 723.8 39.1 691.4 39.1 656.3V587.1C63.5 607.2 93 623.6 124.8 636.9 202 669.1 304.3 687.5 414.1 687.5 523.8 687.5 626.2 669.1 703.3 636.9 718.6 630.7 733.2 623.4 747.1 615.6 759 609 770.1 601.6 780.7 593.8 783.6 591.6 786.3 589.3 789.1 587.1V593.8 604.9 656.3ZM851.6 656.3V593.8 543.2C888.7 535 922.8 524.6 953.3 511.9 985.2 498.6 1014.8 482.2 1039.1 462.1V531.3C1039.1 551.8 1029.3 572.3 1010 591.6 978.1 623.4 922.1 649.6 851.2 666.6 851.4 663.3 851.6 659.8 851.6 656.3ZM414.1 875C523.8 875 626.2 856.6 703.3 824.4 735.2 811.1 764.8 794.7 789.1 774.6V843.8C789.1 930.1 621.1 1000 414.1 1000 207 1000 39.1 930.1 39.1 843.8V774.6C63.5 794.7 93 811.1 124.8 824.4 202 856.6 304.3 875 414.1 875Z", + "width": 1063 + }, + "search": [ + "finance_selected" + ] + }, + { + "uid": "df40d4c78c91faf1e3e0fb9ef9dd0f8e", + "css": "lightbulbOn", + "code": 59413, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M108.3 131.3C91.1 119.8 67.8 124.5 56.3 141.7 44.7 158.9 49.4 182.2 66.7 193.8L141.7 243.7C158.9 255.3 182.2 250.6 193.8 233.3 205.3 215.9 200.6 192.8 183.3 181.2L108.3 131.3ZM933.3 193.8C950.5 182.2 955.2 158.9 943.7 141.7 932.3 124.5 908.9 119.8 891.7 131.3L816.7 181.2C799.5 192.8 794.8 216.1 806.3 233.3 817.7 250.5 841.1 255.2 858.3 243.7L933.3 193.8ZM37.5 375C16.7 375 0 391.7 0 412.5 0 433.3 16.7 450 37.5 450H137.5C158.3 450 175 433.3 175 412.5 175 391.7 158.3 375 137.5 375H37.5ZM862.5 375C841.7 375 825 391.7 825 412.5 825 433.3 841.7 450 862.5 450H962.5C983.3 450 1000 433.3 1000 412.5 1000 391.7 983.3 375 962.5 375H862.5ZM183.3 643.7C200.5 632.2 205.2 608.9 193.8 591.7 182.3 574.5 158.9 569.8 141.7 581.2L66.7 631.3C49.5 642.8 44.8 666.1 56.3 683.3 67.7 700.5 91.1 705.2 108.3 693.7L183.3 643.7ZM858.3 581.4C841.1 569.8 817.8 574.5 806.3 591.9 794.7 609.2 799.4 632.3 816.7 643.9L891.7 693.9C908.9 705.5 932.2 700.8 943.7 683.4 955.3 666.1 950.6 643 933.3 631.4L858.3 581.4ZM700 400C700 442.5 686.9 481.7 664.4 513.9 658.6 522.2 651.9 531.6 644.5 541.6 624.4 569.2 600.3 602.3 582.3 635 566.1 664.7 557.8 695.6 553.7 724.8H629.7C633.1 706.1 638.9 687.8 648.1 670.9 663.6 642.8 682.8 616.4 702 590 710.2 578.9 718.3 567.8 726.1 556.6 757 512 775.2 458.1 775.2 399.8 775 248.1 651.9 125 500 125 348.1 125 225 248.1 225 400 225 458.3 243.1 512.3 274.1 556.7 281.9 568 290 579.1 298.1 590.2 317.3 616.4 336.6 642.8 352 671.1 361.3 688 367 706.2 370.5 725H446.4C442.3 695.8 434.1 664.7 417.8 635.2 399.8 602.5 375.8 569.4 355.6 541.7 348.3 531.7 341.6 522.3 335.6 514.1 313.1 481.7 300 442.5 300 400 300 289.5 389.5 200 500 200 610.5 200 700 289.5 700 400ZM425 400C425 358.6 458.6 325 500 325 513.8 325 525 313.8 525 300 525 286.3 513.8 275 500 275 430.9 275 375 330.9 375 400 375 413.7 386.2 425 400 425 413.7 425 425 413.7 425 400ZM625 800V775H375V800C375 869.1 430.9 925 500 925 569.1 925 625 869.1 625 800Z", + "width": 1000 + }, + "search": [ + "lightbulb-on" + ] + }, + { + "uid": "e5565dff486f85800c858518ff12d4e4", + "css": "help", + "code": 59421, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M192.6 192.6C265.5 119.8 370.7 83.3 500 83.3 629.3 83.3 734.5 119.8 807.4 192.6 880.2 265.5 916.7 370.7 916.7 500 916.7 629.3 880.2 734.5 807.4 807.4 734.5 880.2 629.3 916.7 500 916.7 370.7 916.7 265.5 880.2 192.6 807.4 119.8 734.5 83.3 629.3 83.3 500 83.3 370.7 119.8 265.5 192.6 192.6ZM509 362.1C481.4 356.6 454 379.1 454 407.3 454 431.9 434 451.9 409.3 451.9 384.7 451.9 364.7 431.9 364.7 407.3 364.7 322.8 443.6 258 526.5 274.5 579.4 285 622.3 327.9 632.8 380.9 638.1 407.5 635 433 623.4 456 612.1 478.2 594.3 494.9 575.3 507.7 567.3 513 561 517.3 555.7 521.2 550.5 525.2 547.3 528 545.4 530 545.1 530.3 544.8 530.6 544.6 530.8 543.3 554.3 523.8 572.9 500 572.9 475.4 572.9 455.4 552.9 455.4 528.2 455.4 502.4 466.8 482.9 481 468.1 493.5 455.1 510.3 443.7 525.6 433.4 536.4 426.2 541.5 420.1 543.8 415.6 545.6 411.8 547 406.9 545.2 398.3 541.8 380.8 526.5 365.5 509 362.1ZM500 623.3C524.7 623.3 544.6 643.3 544.6 667.9V683.4C544.6 708.1 524.7 728.1 500 728.1 475.4 728.1 455.4 708.1 455.4 683.4V667.9C455.4 643.3 475.4 623.3 500 623.3Z", + "width": 1000 + }, + "search": [ + "help" + ] + }, + { + "uid": "53bb81b7880f1ae77287e75a4ff62db1", + "css": "bank1", + "code": 59440, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M522.7 5.9C508.6-2 491.4-2 477.3 5.9L34.4 250.2C13.1 261.9 0 284.2 0 308.4 0 345.3 29.7 375 66.6 375H933.6C970.3 375 1000.2 345.3 1000.2 308.4 1000.2 284.2 987.1 261.9 965.8 250.2L522.7 5.9ZM445.9 281.3H172.3L500 100.4 827.7 281.3H554.1C559.4 272.1 562.5 261.3 562.5 250 562.5 215.4 534.6 187.5 500 187.5 465.4 187.5 437.5 215.4 437.5 250 437.5 261.3 440.6 272.1 445.9 281.3ZM125 437.5V750C99 750 78.1 770.9 78.1 796.9 78.1 822.8 99 843.8 125 843.8H890.6C916.6 843.8 937.5 822.8 937.5 796.9 937.5 770.9 916.6 750 890.6 750H875V437.5H781.3V750H656.3V437.5H562.5V750H437.5V437.5H343.8V750H218.8V437.5H125ZM62.5 906.3C36.5 906.3 15.6 927.1 15.6 953.1 15.6 979.1 36.5 1000 62.5 1000H953.1C979.1 1000 1000 979.1 1000 953.1 1000 927.1 979.1 906.3 953.1 906.3H62.5Z", + "width": 1000 + }, + "search": [ + "bank" + ] + }, + { + "uid": "f6617fea4dab46c0d0e25e9b1859d6a1", + "css": "gavel", + "code": 59441, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M611.3 13.7C629.5 31.8 629.7 61.1 611.7 79.5L920.5 388.3C938.9 370.3 968.2 370.5 986.3 388.7 1004.7 407 1004.7 436.7 986.3 454.9L953.7 487.7 767.6 673.8 736.3 705.1C718 723.4 688.3 723.4 670.1 705.1 652.5 687.5 651.8 659.2 668.4 640.8L359.4 331.8C341 348.2 312.7 347.7 295.1 330.1 276.8 311.7 276.8 282 295.1 263.9L326.4 232.6 512.3 46.5 544.9 13.7C563.3-4.7 593-4.7 611.1 13.7H611.3ZM545.3 145.9L425.6 265.6 734.4 574.4 854.1 454.7 545.3 145.9ZM436.3 497.3L502.5 563.5 405.3 660.7 418.9 674.4C443.4 698.8 443.4 738.5 418.9 762.9L200.2 981.6C175.8 1006 136.1 1006 111.7 981.6L18 887.9C-6.4 863.5-6.4 823.8 18 799.4L236.7 580.7C261.1 556.2 300.8 556.2 325.2 580.7L338.9 594.3 436.1 497.1 436.3 497.3ZM281.2 669.1L106.6 843.7 156.2 893.4 330.9 718.7 281.2 669.1Z", + "width": 1000 + }, + "search": [ + "gavel" + ] + }, + { + "uid": "7879d17e0928290a1b24d980f9b10a9d", + "css": "timer", + "code": 59442, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M453.1 46.9C453.1 20.9 474 0 500 0 776.2 0 1000 223.8 1000 500 1000 776.2 776.2 1000 500 1000 223.8 1000 0 776.2 0 500 0 426 16 355.9 44.9 292.8 56.6 267 70.5 242.4 86.3 219.3L86.5 218.9C104.3 192.8 124.2 168.6 146.5 146.5 164.8 128.1 194.5 128.1 212.7 146.5 230.9 164.8 231.1 194.5 212.7 212.7 194.7 230.7 178.3 250.4 163.9 271.5L163.7 271.9C122.3 332.8 96.9 405.7 93.9 484.2 93.8 489.5 93.6 494.7 93.6 500 93.6 724.4 275.4 906.3 499.8 906.3 724.2 906.3 906.1 724.4 906.1 500 906.1 291.4 749 119.7 546.7 96.5V203.1C546.7 229.1 525.8 250 499.8 250 473.8 250 452.9 229.1 452.9 203.1V46.9H453.1ZM310.5 310.5C328.9 292.2 358.6 292.2 376.8 310.5L533 466.8C551.4 485.2 551.4 514.8 533 533 514.6 551.2 485 551.4 466.8 533L310.5 376.8C292.2 358.4 292.2 328.7 310.5 310.5Z", + "width": 1000 + }, + "search": [ + "timer" + ] + }, + { + "uid": "a9a1d224245a7c5ffe11f279a633b702", + "css": "renovationSelected", + "code": 59490, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M276 166.7C172.5 166.7 88.5 250.7 88.5 354.2 88.5 361.3 92.3 368.1 98.4 371.9 104.6 375.7 112.2 376 118.8 372.8L185.5 339.5C203.6 361.7 230.9 375 260.3 375H346.6C375.1 375 401.3 358.9 414.1 333.3H463.7C463.7 356.4 482.3 375 505.3 375 528.4 375 547 356.4 547 333.3V208.3C547 185.3 528.4 166.7 505.3 166.7 482.3 166.7 463.7 185.3 463.7 208.3H414.1C401.2 182.8 375 166.7 346.5 166.7H276ZM234.4 416.7L217.7 750.1C215.5 795.4 251.6 833.3 296.9 833.3 342.2 833.3 378.3 795.4 376 750.1L359.4 416.7H234.4ZM633.1 824.7L660 743.9C663.8 732.4 679.9 732.4 683.7 743.9L710.7 824.7C712.4 829.8 717.2 833.3 722.5 833.3H859.4C893.9 833.3 921.9 805.3 921.9 770.8V583.3H546.9V770.8C546.9 805.3 574.9 833.3 609.4 833.3H621.2C626.6 833.3 631.4 829.9 633.1 824.7ZM584 475.3C561.6 490.2 547.9 515 546.9 541.7H921.9C921 515 907.2 490.2 884.8 475.3L800 418.8C799 418.1 797.9 417.6 796.9 417.2V229.2C796.9 194.7 768.9 166.7 734.4 166.7 699.9 166.7 671.9 194.7 671.9 229.2V417.3C670.7 417.7 669.7 418.2 668.8 418.9L584 475.3ZM734.4 250C728.8 250 723.6 247.8 719.6 243.9 715.7 240 713.5 234.7 713.5 229.2 713.5 223.6 715.7 218.3 719.6 214.4 723.6 210.5 728.8 208.3 734.4 208.3 739.9 208.3 745.2 210.5 749.1 214.4 753 218.3 755.2 223.6 755.2 229.2 755.2 234.7 753 240 749.1 243.9 745.2 247.8 739.9 250 734.4 250Z", + "width": 1042 + }, + "search": [ + "renovation" + ] + }, + { + "uid": "f37f4a3c21356f0858cfcd9311d0e83e", + "css": "renovation", + "code": 59496, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M286.5 166.7C177.2 166.7 88.5 255.3 88.5 364.6V385.4C88.5 396.2 94.1 406.3 103.4 412 112.6 417.7 124.1 418.2 133.9 413.4L193.4 383.6C206.6 397.5 223.6 407.7 242.2 412.9L219.3 750.1C216.1 795.2 251.8 833.3 296.9 833.3 341.9 833.3 377.6 795.2 374.5 750.1L351.8 416.4C382.3 414.2 410.3 399 428.6 375H484.4V385.4C484.4 402.7 498.3 416.7 515.6 416.7 532.9 416.7 546.9 402.7 546.9 385.4V344 343.8 239.6 239.3 197.9C546.9 180.6 532.9 166.7 515.6 166.7 498.3 166.7 484.4 180.6 484.4 197.9V208.3H428.6C408.6 182.4 377.5 166.7 344 166.7H286.5ZM484.4 312.5H411.5C399.6 312.5 388.8 319.1 383.5 329.8 376 344.8 360.7 354.2 344 354.2H270.6C253.9 354.2 238.5 344.7 231.1 329.8 223.4 314.3 204.7 308.1 189.2 315.9L154.7 332.9C169 273.4 222.5 229.2 286.5 229.2H344C360.7 229.2 376 238.7 383.5 253.5 388.8 264.2 399.6 270.8 411.5 270.8H484.4V312.5ZM859.4 770.8H713.5V708.3C713.5 696.9 704.2 687.5 692.7 687.5 681.3 687.5 671.9 696.9 671.9 708.3V770.8H609.4V583.3H859.4V770.8ZM584 475.3C560.8 490.8 546.9 516.8 546.9 544.7V770.8C546.9 805.3 574.9 833.3 609.4 833.3H859.4C893.9 833.3 921.9 805.3 921.9 770.8V544.7C921.9 516.8 907.9 490.8 884.8 475.3L796.9 416.7V229.2C796.9 194.7 768.9 166.7 734.4 166.7 699.9 166.7 671.9 194.7 671.9 229.2V416.7L584 475.3ZM713.5 229.2C713.5 223.6 715.7 218.3 719.6 214.4 723.6 210.5 728.8 208.3 734.4 208.3 739.9 208.3 745.2 210.5 749.1 214.4 753 218.3 755.2 223.6 755.2 229.2 755.2 234.7 753 240 749.1 243.9 745.2 247.8 739.9 250 734.4 250 728.8 250 723.6 247.8 719.6 243.9 715.7 240 713.5 234.7 713.5 229.2Z", + "width": 1042 + }, + "search": [ + "renovation" + ] + }, + { + "uid": "b36ccfefe052983d49cfd7ae7f58b3a5", + "css": "rotate_left", + "code": 59445, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M301.1 332.5C281.9 313.3 249 316.7 236.1 340.4 224.4 361.7 215.3 383.3 208.2 406.3 200.3 432.5 221.1 458.3 248.2 458.3H248.6C266.5 458.3 282.8 446.7 287.8 429.2 292.8 412.5 299.4 396.3 307.8 380.4 316.9 365 314 345.4 301.1 332.5ZM249 541.7H248.2C221.1 541.7 200.3 567.5 208.2 593.8 214.9 616.3 224 638.3 235.7 659.6 248.6 683.3 281.9 687.1 301.1 667.9 313.6 655 316.9 635.8 308.2 620 299.9 604.6 293.2 588.3 288.2 571.7 283.2 553.3 266.9 541.7 249 541.7ZM367.8 792.5C389 804.2 411.1 813.3 434 820 459.9 827.5 485.7 806.7 485.7 780V778.8C485.7 760.8 474 744.6 456.5 739.6 439.9 734.6 424 727.9 408.6 719.6 392.8 710.8 372.8 713.8 360.3 726.7L359 727.9C340.3 746.7 344 779.6 367.8 792.5ZM569.4 169.6V142.1C569.4 105 524.4 86.3 498.2 112.5L409.9 201.3C393.2 217.9 393.2 244.6 409.9 260.8L498.6 347.5C524.9 373.3 569.4 354.6 569.4 317.5V253.8C687.8 273.8 777.8 376.3 777.8 500 777.8 613.8 701.9 709.2 597.8 739.6 580.7 744.6 569.4 760.8 569.4 778.8V779.6C569.4 806.7 594.9 827.1 620.7 819.6 759.9 779.6 861.1 651.7 861.1 500 861.1 330 734 190 569.4 169.6Z", + "width": 1056 + }, + "search": [ + "rotate_left" + ] + }, + { + "uid": "cabeacc899655d5d6aa14c91a35a4aaf", + "css": "options", + "code": 59503, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M93.8 875V125C93.8 107.8 107.8 93.8 125 93.8H437.5V250C437.5 284.6 465.4 312.5 500 312.5H656.3V875C656.3 892.2 642.2 906.3 625 906.3H125C107.8 906.3 93.8 892.2 93.8 875ZM125 0C56.1 0 0 56.1 0 125V875C0 943.9 56.1 1000 125 1000H625C693.9 1000 750 943.9 750 875V301.8C750 268.6 736.9 236.7 713.5 213.3L536.5 36.5C513.1 13.1 481.4 0 448.2 0H125ZM421.9 546.9C421.9 520.9 401 500 375 500 349 500 328.1 520.9 328.1 546.9V796.9C328.1 822.9 349 843.8 375 843.8 401 843.8 421.9 822.9 421.9 796.9V546.9ZM593.8 609.4C593.8 583.4 572.9 562.5 546.9 562.5 520.9 562.5 500 583.4 500 609.4V796.9C500 822.9 520.9 843.8 546.9 843.8 572.9 843.8 593.8 822.9 593.8 796.9V609.4ZM250 671.9C250 645.9 229.1 625 203.1 625 177.1 625 156.3 645.9 156.3 671.9V796.9C156.3 822.9 177.1 843.8 203.1 843.8 229.1 843.8 250 822.9 250 796.9V671.9Z", + "width": 750 + }, + "search": [ + "options" + ] + }, + { + "uid": "00e8cd1fee80bcc3b395780158908b42", + "css": "service", + "code": 59504, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M53.7 91.6L245.5 379.1C266.5 357.3 289.9 338 315.4 321.7L174.2 110H295.2L398.1 281.6C427.7 271.2 458.9 264.5 491.1 261.7L479.7 242.7 363.4 49.1C352.6 31.1 333.1 20 312.1 20H92.1C66.6 20 46 40.6 46 66.1 46 75.1 48.6 84.1 53.7 91.6ZM572.3 242.6L560.9 261.5C593.1 264.3 624.2 271.2 653.9 281.4L757 110H877.9L736.7 321.7C762.2 338 785.7 357.3 806.7 379.1L998.3 91.6C1003.4 84.1 1006 75.1 1006 66.1 1006 40.6 985.4 20 959.9 20H739.9C718.9 20 699.2 31.1 688.6 49.1L572.5 242.6H572.3ZM526 410C589.6 410 650.7 435.3 695.7 480.3 740.7 525.3 766 586.3 766 650 766 713.6 740.7 774.7 695.7 819.7 650.7 864.7 589.6 890 526 890 462.3 890 401.3 864.7 356.3 819.7 311.3 774.7 286 713.6 286 650 286 586.3 311.3 525.3 356.3 480.3 401.3 435.3 462.3 410 526 410ZM526 980C613.5 980 697.5 945.2 759.3 883.3 821.2 821.5 856 737.5 856 650 856 562.5 821.2 478.5 759.3 416.7 697.5 354.8 613.5 320 526 320 438.5 320 354.5 354.8 292.7 416.7 230.8 478.5 196 562.5 196 650 196 737.5 230.8 821.5 292.7 883.3 354.5 945.2 438.5 980 526 980ZM539.5 497.2C534.1 486.1 518.1 486.1 512.7 497.2L476.7 570.1C474.4 574.6 470.3 577.6 465.4 578.4L384.8 590C372.4 591.9 367.6 606.9 376.6 615.5L434.7 672.1C438.2 675.5 439.7 680.6 439 685.4L425.3 765.5C423.2 777.7 436 787.1 447.1 781.2L519.1 743.7C523.4 741.5 528.6 741.5 532.9 743.7L604.9 781.6C616 787.4 628.7 778.1 626.7 765.9L613 685.6C612.2 680.7 613.7 675.9 617.3 672.3L675.4 615.7C684.2 607.1 679.4 591.9 667.2 590.2L586.7 578.6C581.9 577.8 577.6 574.8 575.5 570.3L539.5 497.4V497.2Z", + "width": 1050 + }, + "search": [ + "service" + ] + }, + { + "uid": "a5aeb93d77f3fda0baac09a354c218f3", + "css": "question", + "code": 59505, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M165.3 619.6C183.7 585.3 178.1 543.1 151.3 514.9 111.3 472.9 89.9 422.5 89.9 370 89.9 250.9 209.6 130 389.9 130 570.3 130 689.9 250.9 689.9 370 689.9 489.1 570.3 610 389.9 610 365.4 610 341.6 607.6 319.1 603.3 299.6 599.5 279.3 602.1 261.5 611.1 253.8 615.1 245.9 618.8 237.9 622.4 207.9 635.9 176.2 647.7 144.3 656.1 149.6 647.5 154.4 639.1 159.1 630.6 161.2 627.1 163.3 623.3 165.1 619.6H165.3ZM389.9 700C605.4 700 779.9 552.3 779.9 370 779.9 187.8 605.4 40 389.9 40 174.5 40-0.1 187.8-0.1 370-0.1 448.4 32.2 520.2 86 576.8 84.3 580 82.4 583.4 80.8 586.4 61.4 620.9 38.9 654.8 12.1 684.1-0.2 697.2-3.4 716.3 3.5 732.6 10.8 749.3 26.9 760 44.9 760 125.6 760 207.1 735.1 275 704.3 284 700.2 293 695.9 301.6 691.6 329.9 697.2 359.6 700 389.9 700ZM809.9 940C840.3 940 869.8 937 898.3 931.6 906.9 935.9 915.9 940.2 924.9 944.3 992.8 975.1 1074.3 1000 1154.9 1000 1172.9 1000 1189.1 989.3 1196.2 972.8 1203.3 956.3 1199.9 937.2 1187.6 924.3 1160.9 895 1138.4 861.1 1118.9 826.6 1117.3 823.4 1115.4 820.2 1113.7 817 1167.7 760.2 1199.9 688.4 1199.9 610 1199.9 433 1035.1 288.4 828.3 280.4 836 308.9 839.9 338.9 839.9 370V371.1C1003.4 383.7 1109.9 497.7 1109.9 610 1109.9 662.5 1088.6 712.9 1048.6 754.8 1021.8 782.9 1016.2 825.3 1034.6 859.4 1036.6 863.1 1038.7 866.9 1040.6 870.4 1045.3 878.9 1050.3 887.3 1055.4 895.9 1023.5 887.5 991.8 875.9 961.8 862.2 953.8 858.6 945.9 854.9 938.2 850.9 920.4 841.9 900.1 839.3 880.6 843.1 857.9 847.6 834.1 849.8 809.8 849.8 694.1 849.8 603.5 800.1 553.3 733 523.3 743.1 491.8 750.6 459.5 755.1 523.1 864.6 656.2 940 809.9 940ZM345.5 201.8C314.8 201.8 287.4 221.1 277.3 250L276.7 251.7C271.1 267.3 279.3 284.5 294.9 289.9 310.4 295.4 327.7 287.3 333.1 271.8L333.7 270.1C335.4 265 340.3 261.8 345.5 261.8H422.9C435.1 261.8 444.9 271.8 444.9 283.8 444.9 291.6 440.8 298.9 433.8 302.9L374.9 336.6C365.6 342.1 359.9 351.8 359.9 362.7V380.5C359.9 397 373.4 410.5 389.9 410.5 406.4 410.5 419.9 397 419.9 380.5V379.9L463.8 355C489.3 340.4 505.1 313.2 505.1 283.9 505.1 238.6 468.3 202 423.1 202H345.7L345.5 201.8ZM389.9 540.1C395.8 540.4 401.6 539.6 407.1 537.7 412.6 535.7 417.6 532.7 421.8 528.7 426.1 524.7 429.5 519.9 431.8 514.5 434.1 509.2 435.3 503.4 435.3 497.6 435.3 491.8 434.1 486 431.8 480.7 429.5 475.3 426.1 470.5 421.8 466.5 417.6 462.5 412.6 459.5 407.1 457.5 401.6 455.6 395.8 454.7 389.9 455.1 384.1 454.7 378.3 455.6 372.8 457.5 367.3 459.5 362.3 462.5 358 466.5 353.8 470.5 350.4 475.3 348.1 480.7 345.8 486 344.6 491.8 344.6 497.6 344.6 503.4 345.8 509.2 348.1 514.5 350.4 519.9 353.8 524.7 358 528.7 362.3 532.7 367.3 535.7 372.8 537.7 378.3 539.6 384.1 540.4 389.9 540.1ZM1011.1 581.3C1022.8 569.7 1022.8 550.6 1011.1 538.9 999.5 527.3 980.4 527.3 968.8 538.9L830 677.7 771.1 618.8C759.5 607.2 740.4 607.2 728.8 618.8 717.1 630.4 717.1 649.6 728.8 661.2L808.8 741.3C820.4 752.9 839.6 752.9 851.2 741.3L1011.1 581.3Z", + "width": 1200 + }, + "search": [ + "question" + ] + }, + { + "uid": "7d3bd648eb78250690b1fe3b70e5dd92", + "css": "lightbulb_outline", + "code": 59560, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M375 875C375 897.9 393.7 916.7 416.7 916.7H583.3C606.3 916.7 625 897.9 625 875V833.3H375V875ZM500 83.3C339.2 83.3 208.3 214.2 208.3 375 208.3 474.2 257.9 561.3 333.3 614.2V708.3C333.3 731.3 352.1 750 375 750H625C647.9 750 666.7 731.3 666.7 708.3V614.2C742.1 561.3 791.7 474.2 791.7 375 791.7 214.2 660.8 83.3 500 83.3ZM618.8 545.8L583.3 570.8V666.7H416.7V570.8L381.3 545.8C325 506.7 291.7 442.9 291.7 375 291.7 260 385 166.7 500 166.7 615 166.7 708.3 260 708.3 375 708.3 442.9 675 506.7 618.8 545.8Z", + "width": 1000 + }, + "search": [ + "lightbulb_outline" + ] + } + ] +} \ No newline at end of file diff --git a/packages/design_system/lib/src/icons/sf_icons.dart b/packages/design_system/lib/src/icons/sf_icons.dart new file mode 100644 index 00000000..5460df53 --- /dev/null +++ b/packages/design_system/lib/src/icons/sf_icons.dart @@ -0,0 +1,326 @@ +/// Flutter icons SFIcons +/// Copyright (C) 2025 by original authors @ fluttericon.com, fontello.com +/// This font was generated by FlutterIcon.com, which is derived from Fontello. +/// +/// To use this font, place it in your fonts/ directory and include the +/// following in your pubspec.yaml +/// +/// flutter: +/// fonts: +/// - family: SFIcons +/// fonts: +/// - asset: fonts/SFIcons.ttf +/// +/// +/// * Material Design Icons, Copyright (C) Google, Inc +/// Author: Google +/// License: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) +/// Homepage: https://design.google.com/icons/ +/// +library; + +import 'package:flutter/widgets.dart'; +import 'package:utils/utils.dart'; + +class SFIcons { + SFIcons._(); + + static const _kFontFam = 'SFIcons'; + static const _kFontPkg = isTest ? null : 'sf_components_package'; + + static const IconData back = IconData( + 0xe800, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData euro = IconData( + 0xe801, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData location = IconData( + 0xe802, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData alert = IconData( + 0xe803, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData close = IconData( + 0xe804, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData immoSelected = IconData( + 0xe805, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData forward = IconData( + 0xe806, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData favorite = IconData( + 0xe807, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData search = IconData( + 0xe808, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData filter = IconData( + 0xe809, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData filterList = IconData( + 0xe80a, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData finance = IconData( + 0xe80b, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData infoOutlined = IconData( + 0xe80c, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData arrowLeftAlt = IconData( + 0xe80d, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData edit = IconData( + 0xe80e, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData cookie = IconData( + 0xe80f, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData email = IconData( + 0xe810, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData video = IconData( + 0xe811, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData phone = IconData( + 0xe812, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData chevronRight = IconData( + 0xe813, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData checkCircle = IconData( + 0xe814, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData lightbulbOn = IconData( + 0xe815, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData externalLink = IconData( + 0xe816, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData preferences = IconData( + 0xe817, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData bank = IconData( + 0xe818, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData arrowRightAlt = IconData( + 0xe819, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData offline = IconData( + 0xe81a, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData cursorClick = IconData( + 0xe81b, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData wand = IconData( + 0xe81c, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData help = IconData( + 0xe81d, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData notifications = IconData( + 0xe81e, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData helpOutlined = IconData( + 0xe81f, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData contentCopy = IconData( + 0xe820, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData apartmentScene = IconData( + 0xe821, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData walletAddMoney = IconData( + 0xe822, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData walletSubtractMoney = IconData( + 0xe823, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData start = IconData( + 0xe828, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData immo = IconData( + 0xe829, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData star = IconData( + 0xe82a, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData startSelected = IconData( + 0xe82b, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData infoCircle = IconData( + 0xe82c, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData financeSelected = IconData( + 0xe82d, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData loginOutlined = IconData( + 0xe82f, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData bank1 = IconData( + 0xe830, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData gavel = IconData( + 0xe831, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData timer = IconData( + 0xe832, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData home = IconData( + 0xe83a, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData apartment = IconData( + 0xe83b, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData radioButtonUncheckedRounded = IconData( + 0xe83c, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData radioButtonCheckedRounded = IconData( + 0xe83d, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData share = IconData( + 0xe858, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData favoriteOutlined = IconData( + 0xe859, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData renovationSelected = IconData( + 0xe862, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData renovation = IconData( + 0xe868, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData rotateLeft = IconData( + 0xe835, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData options = IconData( + 0xe86f, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData service = IconData( + 0xe870, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData question = IconData( + 0xe871, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); + static const IconData lightbulbOutline = IconData( + 0xe8a8, + fontFamily: _kFontFam, + fontPackage: _kFontPkg, + ); +} diff --git a/packages/design_system/lib/src/theme/theme_port.dart b/packages/design_system/lib/src/theme/theme_port.dart new file mode 100644 index 00000000..19b06231 --- /dev/null +++ b/packages/design_system/lib/src/theme/theme_port.dart @@ -0,0 +1,40 @@ +import 'dart:ui'; +import 'package:design_system/design_system.dart'; +import 'package:get_it/get_it.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +final GetIt getIt = GetIt.instance; + +void themePackages() { + getIt.registerSingleton(ThemeSfAdapter()); +} + +final themePortProvider = Provider((ref) => getIt()); + +enum ThemeCode { + backgroundPrimary, + backgroundSecondary, + backgroundTertiary, + textPrimary, + textSecondary, + textTertiary, + buttonPrimary, + buttonSecondary, +} + +abstract class ThemePort { + late Map theme; + late List> cardColors; + + Color getColorFor(ThemeCode code) { + Color? c = theme[code]; + if (c == null) { + throw Exception("Theme key not found"); + } + return c; + } + + List getCardColorFor(int index) { + return cardColors[index % cardColors.length]; + } +} diff --git a/packages/design_system/lib/src/theme/theme_sf_adapter.dart b/packages/design_system/lib/src/theme/theme_sf_adapter.dart new file mode 100644 index 00000000..846e3a90 --- /dev/null +++ b/packages/design_system/lib/src/theme/theme_sf_adapter.dart @@ -0,0 +1,28 @@ +import 'dart:ui'; + +import 'package:design_system/src/theme/theme_port.dart'; +import 'package:flutter/material.dart'; + +class ThemeSfAdapter extends ThemePort { + final Map _theme = { + ThemeCode.backgroundPrimary: Color(0xFFFFFFFF), + ThemeCode.backgroundSecondary: Color(0xFFF7F7F7), + ThemeCode.backgroundTertiary: Color(0x4D329E95), + ThemeCode.textPrimary: Color(0xFF4B4B4B), + ThemeCode.textSecondary: Color(0xFFFFFFFF), + ThemeCode.textTertiary: Color(0xFFE0E0E0), + ThemeCode.buttonPrimary: Color(0xFF329e95), + ThemeCode.buttonSecondary: Color(0xFF4B4B4B), + }; + + @override + Map get theme => _theme; + + final List> _cardColors = [ + [Color(0xFFFA5C9F), Color(0xFFEB2579), Color(0xFFE60866)], + [Color(0xFF00A1C6), Color(0xFF00819E)], + ]; + + @override + List> get cardColors => _cardColors; +} diff --git a/packages/design_system/pubspec.yaml b/packages/design_system/pubspec.yaml new file mode 100644 index 00000000..5ba661bf --- /dev/null +++ b/packages/design_system/pubspec.yaml @@ -0,0 +1,60 @@ +name: design_system +# resolution: workspace +description: "A new Flutter package project." +version: 0.0.1 +homepage: +publish_to: "none" +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + + utils: + path: ../utils + flutter_riverpod: ^3.0.3 + get_it: ^9.0.5 + +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/packages/design_system/pubspec_overrides.yaml b/packages/design_system/pubspec_overrides.yaml new file mode 100644 index 00000000..d20fd735 --- /dev/null +++ b/packages/design_system/pubspec_overrides.yaml @@ -0,0 +1,4 @@ +# melos_managed_dependency_overrides: utils +dependency_overrides: + utils: + path: ../utils diff --git a/packages/navigation/.gitignore b/packages/navigation/.gitignore new file mode 100644 index 00000000..eb6c05cd --- /dev/null +++ b/packages/navigation/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +build/ diff --git a/packages/navigation/.metadata b/packages/navigation/.metadata new file mode 100644 index 00000000..231eccaf --- /dev/null +++ b/packages/navigation/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "b25305a8832cfc6ba632a7f87ad455e319dccce8" + channel: "stable" + +project_type: package diff --git a/packages/navigation/CHANGELOG.md b/packages/navigation/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/packages/navigation/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/navigation/LICENSE b/packages/navigation/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/packages/navigation/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/navigation/README.md b/packages/navigation/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/packages/navigation/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/navigation/analysis_options.yaml b/packages/navigation/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/packages/navigation/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/navigation/lib/app_routes.dart b/packages/navigation/lib/app_routes.dart new file mode 100644 index 00000000..58fe7cba --- /dev/null +++ b/packages/navigation/lib/app_routes.dart @@ -0,0 +1,14 @@ +class AppRoutes { + static const login = '/login'; + static const onboarding = '/onboarding'; + static const linkPhone = '/link_phone'; + static const phoneCode = '/phone_code'; + static const recoverPassword = '/recover_password'; + + static const dashboard = '/dashboard'; + + static const dashboardHome = '$dashboard/home'; + static const dashboardActivity = '$dashboard/activity'; + static const dashboardNotifications = '$dashboard/notifications'; + static const dashboardProfile = '$dashboard/profile'; +} diff --git a/packages/navigation/lib/navigation.dart b/packages/navigation/lib/navigation.dart new file mode 100644 index 00000000..432899fb --- /dev/null +++ b/packages/navigation/lib/navigation.dart @@ -0,0 +1,3 @@ +export 'navigation_contract.dart'; +export 'navigation_module.dart'; +export 'app_routes.dart'; diff --git a/packages/navigation/lib/navigation_contract.dart b/packages/navigation/lib/navigation_contract.dart new file mode 100644 index 00000000..1c7c7d6a --- /dev/null +++ b/packages/navigation/lib/navigation_contract.dart @@ -0,0 +1,34 @@ +import 'package:go_router/go_router.dart'; + +abstract class NavigationContract { + void setRouter(GoRouter goRouter); + void goTo(String path); + void pushTo(String path); + void goBack(); +} + +class Navigation implements NavigationContract { + late final GoRouter router; + + @override + void setRouter(GoRouter goRouter) { + router = goRouter; + } + + @override + void goTo(String path) { + router.go(path); + } + + @override + void pushTo(String path) { + router.push(path); + } + + @override + void goBack() { + if (router.canPop()) { + router.pop(); + } + } +} \ No newline at end of file diff --git a/packages/navigation/lib/navigation_module.dart b/packages/navigation/lib/navigation_module.dart new file mode 100644 index 00000000..393c64bf --- /dev/null +++ b/packages/navigation/lib/navigation_module.dart @@ -0,0 +1,8 @@ +import 'package:get_it/get_it.dart'; +import 'package:navigation/navigation.dart'; + +final GetIt getIt = GetIt.instance; + +void navigationModule() { + getIt.registerLazySingleton(() => Navigation()); +} \ No newline at end of file diff --git a/packages/navigation/pubspec.yaml b/packages/navigation/pubspec.yaml new file mode 100644 index 00000000..405f20fa --- /dev/null +++ b/packages/navigation/pubspec.yaml @@ -0,0 +1,57 @@ +name: navigation +# resolution: workspace +description: "A new Flutter package project." +version: 0.0.1 +homepage: + +environment: + sdk: ^3.8.1 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + get_it: ^9.0.5 + go_router: ^17.0.0 + +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/packages/sf_localizations/.gitignore b/packages/sf_localizations/.gitignore new file mode 100755 index 00000000..ac5aa989 --- /dev/null +++ b/packages/sf_localizations/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/sf_localizations/.metadata b/packages/sf_localizations/.metadata new file mode 100755 index 00000000..24472f12 --- /dev/null +++ b/packages/sf_localizations/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/packages/sf_localizations/CHANGELOG.md b/packages/sf_localizations/CHANGELOG.md new file mode 100755 index 00000000..41cc7d81 --- /dev/null +++ b/packages/sf_localizations/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/sf_localizations/LICENSE b/packages/sf_localizations/LICENSE new file mode 100755 index 00000000..ba75c69f --- /dev/null +++ b/packages/sf_localizations/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/sf_localizations/README.md b/packages/sf_localizations/README.md new file mode 100755 index 00000000..4a260d8d --- /dev/null +++ b/packages/sf_localizations/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/sf_localizations/analysis_options.yaml b/packages/sf_localizations/analysis_options.yaml new file mode 100755 index 00000000..289609cf --- /dev/null +++ b/packages/sf_localizations/analysis_options.yaml @@ -0,0 +1,6 @@ +# include: package:utils/analysis_options.yaml + +# # Additional information about this file can be found at +# # https://dart.dev/guides/language/analysis-options + + diff --git a/packages/sf_localizations/assets/l10n/de.json b/packages/sf_localizations/assets/l10n/de.json new file mode 100644 index 00000000..ffca1395 --- /dev/null +++ b/packages/sf_localizations/assets/l10n/de.json @@ -0,0 +1,3 @@ +{ + "example": "Beispiel" +} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/en.json b/packages/sf_localizations/assets/l10n/en.json new file mode 100755 index 00000000..9003e9e5 --- /dev/null +++ b/packages/sf_localizations/assets/l10n/en.json @@ -0,0 +1,3 @@ +{ + "example": "example" +} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/es.json b/packages/sf_localizations/assets/l10n/es.json new file mode 100644 index 00000000..09c9ad94 --- /dev/null +++ b/packages/sf_localizations/assets/l10n/es.json @@ -0,0 +1,3 @@ +{ + "example": "ejemplo" +} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/fr.json b/packages/sf_localizations/assets/l10n/fr.json new file mode 100644 index 00000000..ddd38b2d --- /dev/null +++ b/packages/sf_localizations/assets/l10n/fr.json @@ -0,0 +1,3 @@ +{ + "example": "exemple" +} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/it.json b/packages/sf_localizations/assets/l10n/it.json new file mode 100644 index 00000000..1d4d871f --- /dev/null +++ b/packages/sf_localizations/assets/l10n/it.json @@ -0,0 +1,3 @@ +{ + "example": "esempio" +} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/pt.json b/packages/sf_localizations/assets/l10n/pt.json new file mode 100644 index 00000000..86dc85c3 --- /dev/null +++ b/packages/sf_localizations/assets/l10n/pt.json @@ -0,0 +1,3 @@ +{ + "example": "exemplo" +} \ No newline at end of file diff --git a/packages/sf_localizations/lib/sf_localizations.dart b/packages/sf_localizations/lib/sf_localizations.dart new file mode 100755 index 00000000..de2c2808 --- /dev/null +++ b/packages/sf_localizations/lib/sf_localizations.dart @@ -0,0 +1,6 @@ +export 'src/sf_delegate.dart'; +export 'src/generated/i18n.dart'; +export 'src/utils/constants.dart'; +export 'src/utils/context_extension.dart'; +export 'src/utils/string_extension.dart'; +export 'src/utils/locale_extension.dart'; diff --git a/packages/sf_localizations/lib/src/asset_loaders/asset_loader.dart b/packages/sf_localizations/lib/src/asset_loaders/asset_loader.dart new file mode 100755 index 00000000..1054529c --- /dev/null +++ b/packages/sf_localizations/lib/src/asset_loaders/asset_loader.dart @@ -0,0 +1,14 @@ +import 'dart:ui'; + +import 'package:flutter/foundation.dart'; +import '../utils/locale_extension.dart'; + +abstract class AssetLoader { + const AssetLoader(); + + Future> load(Locale locale); + + @protected + String getAssetPath(Locale locale) => + 'packages/sf_localizations/assets/l10n/${locale.fileName}.json'; +} diff --git a/packages/sf_localizations/lib/src/asset_loaders/root_bundle_asset_loader.dart b/packages/sf_localizations/lib/src/asset_loaders/root_bundle_asset_loader.dart new file mode 100755 index 00000000..5860de69 --- /dev/null +++ b/packages/sf_localizations/lib/src/asset_loaders/root_bundle_asset_loader.dart @@ -0,0 +1,18 @@ +import 'dart:convert'; +import 'dart:ui'; + +import 'package:flutter/services.dart'; +import 'asset_loader.dart'; + +class RootBundleAssetLoader extends AssetLoader { + const RootBundleAssetLoader(); + + @override + Future> load(Locale locale) async { + final assetAsString = await rootBundle.loadString(getAssetPath(locale)); + + final translations = jsonDecode(assetAsString) as Map; + + return translations; + } +} diff --git a/packages/sf_localizations/lib/src/asset_loaders/test_asset_loader.dart b/packages/sf_localizations/lib/src/asset_loaders/test_asset_loader.dart new file mode 100755 index 00000000..f61329cd --- /dev/null +++ b/packages/sf_localizations/lib/src/asset_loaders/test_asset_loader.dart @@ -0,0 +1,20 @@ +import 'dart:convert'; +import 'dart:ui'; + +import 'package:flutter/services.dart'; +import 'asset_loader.dart'; + +class TestAssetLoader extends AssetLoader { + const TestAssetLoader(); + + @override + Future> load(Locale locale) async { + final data = await rootBundle.load(getAssetPath(locale)); + final bytes = + data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes); + + final strings = utf8.decode(bytes); + + return json.decode(strings) as Map; + } +} diff --git a/packages/sf_localizations/lib/src/generated/i18n.dart b/packages/sf_localizations/lib/src/generated/i18n.dart new file mode 100755 index 00000000..5afd221a --- /dev/null +++ b/packages/sf_localizations/lib/src/generated/i18n.dart @@ -0,0 +1,7 @@ +// Generated code - do not modify by hand + +class I18n { + const I18n._(); + + static const String example = 'example'; +} diff --git a/packages/sf_localizations/lib/src/sf_delegate.dart b/packages/sf_localizations/lib/src/sf_delegate.dart new file mode 100755 index 00000000..893f4ca3 --- /dev/null +++ b/packages/sf_localizations/lib/src/sf_delegate.dart @@ -0,0 +1,166 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:intl/intl.dart'; +import 'package:sf_localizations/sf_localizations.dart'; +import 'package:sf_localizations/src/asset_loaders/root_bundle_asset_loader.dart'; +import 'package:sf_localizations/src/asset_loaders/test_asset_loader.dart'; +import 'asset_loaders/asset_loader.dart'; +import 'package:utils/utils.dart'; + +class SFLocalizations { + SFLocalizations._init(this._locale) { + _instance = this; + } + + @visibleForTesting + SFLocalizations.testInit() : _locale = const Locale('es') { + _instance = this; + } + + static SFLocalizations? _instance; + final _translationCache = {}; + final Locale _locale; + + Locale get locale => _locale; + + // Static getter for accessing translations without context + static SFLocalizations get current { + if (_instance == null) { + throw Exception('$SFLocalizations not initialized yet'); + } + + return _instance!; + } + + Future load(AssetLoader assetLoader) async { + _translationCache.clear(); + try { + final translations = await assetLoader.load(_locale); + _translationCache.addAll(translations); + } catch (e) { + if (kDebugMode) print('Error loading locale $_locale: $e'); + } + } + + String tr(String key, [Map? args]) => _resolve(key, args); + + String plural(String key, [Map? args, int? howMany]) => + _resolvePlural(key, args, howMany); + + static SFLocalizations of(BuildContext context) { + final translator = Localizations.of( + context, + SFLocalizations, + ); + + if (translator == null) { + throw Exception('$SFLocalizations not in the context'); + } + + return translator; + } + + // Add support for more languages by adding their respective message files + static const LocalizationsDelegate delegate = + _SFLocalizationsDelegate(); + + String _resolve(String key, [Map? args]) { + if (!_translationCache.containsKey(key)) { + return key; + } + + final translationValue = _translationCache[key] as String; + + return _format(translationValue, args); + } + + String _resolvePlural( + String key, [ + Map? args, + int? howMany, + ]) { + if (!_translationCache.containsKey(key)) { + return key; + } + + final translationValue = _translationCache[key]!; + + if (translationValue is! Map) { + return key; + } + + if (!translationValue.containsKey('other')) { + return key; + } + + if (howMany == null) { + return _format(translationValue['other'] as String, args); + } + + return _format( + Intl.withLocale( + _locale.languageCode, + () => Intl.plural( + howMany, + zero: _getPluralValue(translationValue, 'zero'), + one: _getPluralValue(translationValue, 'one'), + two: _getPluralValue(translationValue, 'two'), + few: _getPluralValue(translationValue, 'few'), + many: _getPluralValue(translationValue, 'many'), + other: translationValue['other'] as String, + ), + ) + as String, + args, + ); + } + + String _getPluralValue(Map translationValue, String key) { + if (translationValue[key] != null && + (translationValue[key] as String).isEmpty) { + return translationValue['other'] as String; + } + return translationValue[key] as String; + } + + String _format(String value, [Map? args]) { + return (args?.isNotEmpty ?? false) ? _sprintf(value, args!) : value; + } + + String _sprintf(String format, Map values) { + return format.replaceAllMapped(RegExp(r'\{(\w+)\}'), (match) { + final key = match.group(1)!; + if (!values.containsKey(key)) { + throw ArgumentError('Missing value for placeholder {$key}'); + } + return values[key].toString(); + }); + } +} + +class _SFLocalizationsDelegate extends LocalizationsDelegate { + const _SFLocalizationsDelegate(); + + static const _assetLoader = isTest + ? TestAssetLoader() + : RootBundleAssetLoader(); + + @override + bool isSupported(Locale locale) { + return supportedLanguages.contains(locale.languageCode); + } + + @override + Future load(Locale locale) async { + final localizations = SFLocalizations._init(locale); + + await localizations.load(_assetLoader); + + return localizations; + } + + @override + bool shouldReload(_SFLocalizationsDelegate old) => false; +} diff --git a/packages/sf_localizations/lib/src/utils/constants.dart b/packages/sf_localizations/lib/src/utils/constants.dart new file mode 100755 index 00000000..aed3eb93 --- /dev/null +++ b/packages/sf_localizations/lib/src/utils/constants.dart @@ -0,0 +1 @@ +const supportedLanguages = ['en', 'es', 'fr', 'de', 'it', 'pt']; diff --git a/packages/sf_localizations/lib/src/utils/context_extension.dart b/packages/sf_localizations/lib/src/utils/context_extension.dart new file mode 100755 index 00000000..d753ddb7 --- /dev/null +++ b/packages/sf_localizations/lib/src/utils/context_extension.dart @@ -0,0 +1,11 @@ +import 'package:flutter/widgets.dart'; +import '../sf_delegate.dart'; + +extension LocalizationContextExtension on BuildContext { + Locale get locale => translator.locale; + + String translate(String key, {Map? args}) => + translator.tr(key, args); + + SFLocalizations get translator => SFLocalizations.of(this); +} diff --git a/packages/sf_localizations/lib/src/utils/locale_extension.dart b/packages/sf_localizations/lib/src/utils/locale_extension.dart new file mode 100755 index 00000000..8732ebae --- /dev/null +++ b/packages/sf_localizations/lib/src/utils/locale_extension.dart @@ -0,0 +1,5 @@ +import 'dart:ui' show Locale; + +extension ExpandLocale on Locale { + String get fileName => countryCode != null ? '$languageCode-$countryCode' : languageCode; +} diff --git a/packages/sf_localizations/lib/src/utils/string_extension.dart b/packages/sf_localizations/lib/src/utils/string_extension.dart new file mode 100755 index 00000000..e758684b --- /dev/null +++ b/packages/sf_localizations/lib/src/utils/string_extension.dart @@ -0,0 +1,9 @@ +import 'package:flutter/cupertino.dart'; +import '../sf_delegate.dart'; + +extension StringLocalizationExtension on String { + String tr({BuildContext? context, Map? args}) => + context != null + ? SFLocalizations.of(context).tr(this, args) + : SFLocalizations.current.tr(this, args); +} diff --git a/packages/sf_localizations/pubspec.yaml b/packages/sf_localizations/pubspec.yaml new file mode 100755 index 00000000..53ec7a80 --- /dev/null +++ b/packages/sf_localizations/pubspec.yaml @@ -0,0 +1,28 @@ +name: sf_localizations +description: "A new Flutter package project." +version: 0.0.1 +homepage: none +publish_to: none + +environment: + sdk: ^3.8.0 + flutter: ">=1.17.0" +# resolution: workspace + +dependencies: + flutter: + sdk: flutter + intl: ^0.20.2 + utils: + path: ../utils + build_runner: ^2.7.1 + +dev_dependencies: + flutter_test: + sdk: flutter + + +flutter: + assets: + - assets/l10n/ + diff --git a/packages/sf_localizations/pubspec_overrides.yaml b/packages/sf_localizations/pubspec_overrides.yaml new file mode 100644 index 00000000..d20fd735 --- /dev/null +++ b/packages/sf_localizations/pubspec_overrides.yaml @@ -0,0 +1,4 @@ +# melos_managed_dependency_overrides: utils +dependency_overrides: + utils: + path: ../utils diff --git a/packages/sf_localizations/scripts/i18n_generator.dart b/packages/sf_localizations/scripts/i18n_generator.dart new file mode 100755 index 00000000..5577da7a --- /dev/null +++ b/packages/sf_localizations/scripts/i18n_generator.dart @@ -0,0 +1,58 @@ +// ignore_for_file: avoid_print + +import 'dart:convert'; +import 'dart:io'; + +const inputPath = 'assets/l10n/en.json'; +const outputPath = 'lib/src/generated/i18n.dart'; + +void main() { + try { + generateI18n(); + } catch (e) { + print('Error generating I18n: $e'); + exit(1); + } +} + +void generateI18n() { + // Ensure input file exists + final inputFile = File(inputPath); + if (!inputFile.existsSync()) { + throw 'Input file not found: $inputPath'; + } + + // Create output directory if it doesn't exist + final outputDir = Directory(outputPath.substring(0, outputPath.lastIndexOf('/'))); + if (!outputDir.existsSync()) { + outputDir.createSync(recursive: true); + } + + // Read and parse JSON + final jsonString = inputFile.readAsStringSync(); + final jsonMap = json.decode(jsonString) as Map; + + // Generate Dart class + final buffer = StringBuffer(); + buffer.writeln('// Generated code - do not modify by hand'); + buffer.writeln(); + buffer.writeln('class I18n {'); + buffer.writeln(' const I18n._();'); + buffer.writeln(); + + // Process JSON and write parent keys + final parentKeys = jsonMap.keys.toList()..sort(); + for (final key in parentKeys) { + final keyName = key[0].toLowerCase() + key.substring(1); + + buffer.writeln(" static const String $keyName = '$key';"); + } + + buffer.writeln('}'); + + // Write to output file + final outputFile = File(outputPath); + outputFile.writeAsStringSync(buffer.toString()); + + print('Successfully generated I18n class at: $outputPath'); +} diff --git a/packages/sf_shared/.gitignore b/packages/sf_shared/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/packages/sf_shared/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/packages/sf_shared/.metadata b/packages/sf_shared/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/packages/sf_shared/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/packages/sf_shared/CHANGELOG.md b/packages/sf_shared/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/packages/sf_shared/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/sf_shared/LICENSE b/packages/sf_shared/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/packages/sf_shared/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/sf_shared/README.md b/packages/sf_shared/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/packages/sf_shared/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/sf_shared/analysis_options.yaml b/packages/sf_shared/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/packages/sf_shared/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/sf_shared/lib/sf_shared.dart b/packages/sf_shared/lib/sf_shared.dart new file mode 100644 index 00000000..513ec32e --- /dev/null +++ b/packages/sf_shared/lib/sf_shared.dart @@ -0,0 +1,6 @@ +export 'src/models/kid.dart'; +export 'src/widgets/line_graph.dart'; +export 'src/widgets/deposit_block.dart'; +export 'src/screens/connection_error_screen.dart'; +export 'src/screens/server_error_screen.dart'; +export 'src/screens/no_plan_error_screen.dart'; diff --git a/lib/payments/domain/entities/kid.dart b/packages/sf_shared/lib/src/models/kid.dart similarity index 100% rename from lib/payments/domain/entities/kid.dart rename to packages/sf_shared/lib/src/models/kid.dart diff --git a/lib/payments/view/screens/errors/connection_error_screen.dart b/packages/sf_shared/lib/src/screens/connection_error_screen.dart similarity index 100% rename from lib/payments/view/screens/errors/connection_error_screen.dart rename to packages/sf_shared/lib/src/screens/connection_error_screen.dart diff --git a/packages/sf_shared/lib/src/screens/no_plan_error_screen.dart b/packages/sf_shared/lib/src/screens/no_plan_error_screen.dart new file mode 100644 index 00000000..a4a43f2a --- /dev/null +++ b/packages/sf_shared/lib/src/screens/no_plan_error_screen.dart @@ -0,0 +1,70 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class NoPlanErrorScreen extends ConsumerWidget { + const NoPlanErrorScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Scaffold( + body: Container( + margin: EdgeInsets.all(30), + child: Center( + child: Column( + children: [ + Spacer(flex: 3), + Text( + "Estamos mejorando el servicio", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25), + ), + Text( + "Asocia tu reloj a SaveFamily y ayuda a tus peques a aprender a usar el dinero con responsabilidad", + ), + Container( + margin: EdgeInsets.symmetric(vertical: 20), + child: Column( + children: [ + Row( + children: [ + Icon( + Icons.check, + color: theme.getColorFor(ThemeCode.buttonPrimary), + ), + Text("Desarrollarán hábitos financieros sanos"), + ], + ), + Row( + children: [ + Icon( + Icons.check, + color: theme.getColorFor(ThemeCode.buttonPrimary), + ), + Text("Gestiona sus gastos"), + ], + ), + ], + ), + ), + Text( + "Selecciona tu plan en nuestra web y empieza a enseñar a los peques a entender el valor del dinero", + ), + Spacer(flex: 1), + FilledButton( + onPressed: () => {}, + child: Container( + width: double.infinity, + padding: EdgeInsets.all(20), + child: Text("Seleccionar plan"), + ), + ), + Spacer(flex: 3), + ], + ), + ), + ), + ); + } +} diff --git a/lib/payments/view/screens/errors/server_error_screen.dart b/packages/sf_shared/lib/src/screens/server_error_screen.dart similarity index 100% rename from lib/payments/view/screens/errors/server_error_screen.dart rename to packages/sf_shared/lib/src/screens/server_error_screen.dart diff --git a/packages/sf_shared/lib/src/widgets/deposit_block.dart b/packages/sf_shared/lib/src/widgets/deposit_block.dart new file mode 100644 index 00000000..b4f564a6 --- /dev/null +++ b/packages/sf_shared/lib/src/widgets/deposit_block.dart @@ -0,0 +1,61 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class DepositBlock extends ConsumerWidget { + final double max; + + const DepositBlock({super.key, required this.max}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.watch(themePortProvider); + + return Container( + padding: EdgeInsets.all(20), + decoration: BoxDecoration( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.all(Radius.circular(20)), + ), + margin: EdgeInsets.only(top: 10), + child: Column( + children: [ + Text( + "Ingresar dinero en el wallet", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Row( + spacing: 10, + children: [ + Expanded( + child: TextField( + decoration: InputDecoration( + labelText: "Cantidad", + hintText: "0€", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + ), + ), + FilledButton( + onPressed: () => {}, + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + theme.getColorFor(ThemeCode.buttonPrimary), + ), + ), + child: Text("Ingresar"), + ), + ], + ), + Align( + alignment: Alignment.topLeft, + child: Text("Máximo que puedes añadir: $max€"), + ), + ], + ), + ); + } +} diff --git a/packages/sf_shared/lib/src/widgets/line_graph.dart b/packages/sf_shared/lib/src/widgets/line_graph.dart new file mode 100644 index 00000000..4e42da11 --- /dev/null +++ b/packages/sf_shared/lib/src/widgets/line_graph.dart @@ -0,0 +1,178 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class LineGraph extends ConsumerStatefulWidget { + final lines = [ + [0, 1, 0, 1, 0, 1, 0], + [1, 0, 1, 0, 1, 0, 1], + ]; + + LineGraph({super.key}); + + @override + ConsumerState createState() => LineGraphState(); +} + +class LineGraphState extends ConsumerState { + final weekDays = ["L", "M", "X", "J", "V", "S", "D"]; + String? timeSpan; + late var days = weekDays; + + @override + void initState() { + timeSpan = "week"; + super.initState(); + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + + return Container( + padding: EdgeInsets.all(15), + decoration: BoxDecoration( + border: BoxBorder.fromLTRB( + left: BorderSide(color: Colors.cyan, width: 5), + ), + borderRadius: BorderRadius.all(Radius.circular(20)), + color: theme.getColorFor(ThemeCode.backgroundPrimary), + ), + child: Column( + spacing: 10, + children: [ + Row( + children: [ + Text("Gastos", style: TextStyle(fontWeight: FontWeight.bold)), + Spacer(), + Container( + padding: EdgeInsets.symmetric(horizontal: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10)), + color: theme.getColorFor(ThemeCode.backgroundSecondary), + ), + child: DropdownButton( + underline: Container(), + value: timeSpan, + onChanged: (String? value) { + setState(() { + timeSpan = value; + }); + }, + dropdownColor: theme.getColorFor(ThemeCode.backgroundPrimary), + items: [ + DropdownMenuItem(value: "day", child: Text("Hoy")), + DropdownMenuItem(value: "week", child: Text("Esta semana")), + DropdownMenuItem(value: "month", child: Text("Este mes")), + ], + ), + ), + ], + ), + Expanded( + child: LineChart( + LineChartData( + gridData: FlGridData( + show: true, + drawHorizontalLine: false, + drawVerticalLine: true, + verticalInterval: 1, + ), + titlesData: FlTitlesData( + //show: false, + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + reservedSize: 40, + getTitlesWidget: (double value, TitleMeta meta) => + SideTitleWidget( + space: 4, + meta: meta, + /*fitInside: fitInsideBottomTitle + ? SideTitleFitInsideData.fromTitleMeta(meta, distanceFromEdge: 0) + : SideTitleFitInsideData.disable(),*/ + child: Text(weekDays[value.toInt()]), + ), + ), + ), + leftTitles: AxisTitles(), + topTitles: AxisTitles(), + rightTitles: AxisTitles(), + ), + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + getTooltipColor: (touchedSpot) => + theme.getColorFor(ThemeCode.buttonSecondary), + getTooltipItems: (List touchedBarSpots) { + return touchedBarSpots.map((barSpot) { + return LineTooltipItem( + "${barSpot.y} €", + TextStyle( + color: theme.getColorFor(ThemeCode.textSecondary), + ), + ); + }).toList(); + }, + ), + ), + borderData: FlBorderData( + show: true, + border: Border( + bottom: BorderSide( + color: Colors.lightBlue.withValues(alpha: 0.2), + width: 4, + ), + left: const BorderSide(color: Colors.transparent), + right: const BorderSide(color: Colors.transparent), + top: const BorderSide(color: Colors.transparent), + ), + ), + lineBarsData: [ + LineChartBarData( + isCurved: true, + color: Colors.pink, + barWidth: 5, + isStrokeCapRound: true, + dotData: const FlDotData(show: false), + belowBarData: BarAreaData(show: false), + spots: const [ + FlSpot(0, 1), + FlSpot(1, 0), + FlSpot(2, 1), + FlSpot(3, 0), + FlSpot(4, 1), + FlSpot(5, 0), + FlSpot(6, 1), + ], + ), + LineChartBarData( + isCurved: true, + color: Colors.cyan, + barWidth: 5, + isStrokeCapRound: true, + dotData: const FlDotData(show: false), + belowBarData: BarAreaData(show: false), + spots: const [ + FlSpot(0, 0), + FlSpot(1, 1), + FlSpot(2, 0), + FlSpot(3, 1), + FlSpot(4, 0), + FlSpot(5, 1), + FlSpot(6, 0), + ], + ), + ], + minX: 0, + maxX: days.length - 1, + maxY: 1, + minY: 0, + ), + ), + ), + ], + ), + ); + } +} diff --git a/packages/sf_shared/pubspec.yaml b/packages/sf_shared/pubspec.yaml new file mode 100644 index 00000000..d1925106 --- /dev/null +++ b/packages/sf_shared/pubspec.yaml @@ -0,0 +1,63 @@ +name: sf_shared +description: "A new Flutter package project." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + + #packages dependencies go here + design_system: + path: ../design_system + + #dependencies go here + fl_chart: ^1.1.1 + flutter_svg: ^2.2.1 + flutter_riverpod: ^3.0.3 +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/packages/sf_shared/pubspec_overrides.yaml b/packages/sf_shared/pubspec_overrides.yaml new file mode 100644 index 00000000..5db6d664 --- /dev/null +++ b/packages/sf_shared/pubspec_overrides.yaml @@ -0,0 +1,6 @@ +# melos_managed_dependency_overrides: design_system,utils +dependency_overrides: + design_system: + path: ../design_system + utils: + path: ../utils diff --git a/packages/utils/.gitignore b/packages/utils/.gitignore new file mode 100644 index 00000000..dd5eb989 --- /dev/null +++ b/packages/utils/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/packages/utils/.metadata b/packages/utils/.metadata new file mode 100644 index 00000000..d7469f07 --- /dev/null +++ b/packages/utils/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: package diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/packages/utils/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/utils/LICENSE b/packages/utils/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/packages/utils/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/utils/analysis_options.yaml b/packages/utils/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/packages/utils/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/utils/lib/src/size_utils.dart b/packages/utils/lib/src/size_utils.dart new file mode 100755 index 00000000..576cebc0 --- /dev/null +++ b/packages/utils/lib/src/size_utils.dart @@ -0,0 +1,91 @@ +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + +// class MainConstants { +// static const double minWebAppRatio = 9.0 / 21.0; +// static const double maxWebAppRatio = 9.0 / 18.0; +// } + +/// Utils for dynamic sizes +class SizeUtils { + static double height = 0.0; + static double width = 0.0; + static double physicalHeight = 0.0; + static double physicalWidth = 0.0; + + // Real value of aspect ratio height obtained through the display itself and not from calculating using the height and width + static double aspectRatioWidth = 9; + static double devicePixelRatio = 0.0; + static double physicalAspectRatioHeight = 0; + static double visibleAspectRatioHeight = 0; + + // Padding of the screen where we cannot render elements without the SafeArea + static EdgeInsets padding = const EdgeInsets.all(0); + + // static const double kWebDesiredAspectRatio = MainConstants.minWebAppRatio; + + const SizeUtils(); + + /// init method which instantiates the class using MediaQuery. If a size is provided, it will use that size instead of the MediaQuery + static void init({required BuildContext context, Size? size}) { + if (size != null) { + padding = EdgeInsets.zero; + devicePixelRatio = MediaQuery.of(context).devicePixelRatio; + height = size.height; + width = size.width; + visibleAspectRatioHeight = (height / width) * aspectRatioWidth; + physicalWidth = width; + physicalHeight = height; + physicalAspectRatioHeight = + (physicalHeight / physicalWidth) * aspectRatioWidth; + } else { + height = MediaQuery.sizeOf(context).height; + width = MediaQuery.sizeOf(context).width; + padding = MediaQuery.of(context).padding; + devicePixelRatio = MediaQuery.of(context).devicePixelRatio; + visibleAspectRatioHeight = (height / width) * aspectRatioWidth; + + final FlutterView view = + WidgetsBinding.instance.platformDispatcher.views.first; + final Size realSize = view.display.size; + + // Dimensions in physical pixels (px) + physicalWidth = realSize.width / devicePixelRatio; + physicalHeight = realSize.height / devicePixelRatio; + physicalAspectRatioHeight = + (physicalHeight / physicalWidth) * aspectRatioWidth; + } + } + + /// Calculate percentatge of screen height, for example: '5' would be a '5%' of the total screen size + static double heightByPercent(double percent) => height * (percent / 100); + + static double physicalHeightByPercent(double percent) => + physicalHeight * (percent / 100); + + static double widthByPercent(double percent) => width * (percent / 100); + + static bool get isSmallerScreen => visibleAspectRatioHeight <= 16; + + static bool get isMediumScreen => physicalAspectRatioHeight <= 18.0; + + static bool get isXLScreen => physicalAspectRatioHeight >= 20.0; + + static Size get screenSize => Size(width, height); + + static T getByScreen({ + required T small, + T? medium, + required T big, + T? xl, + }) { + if (isSmallerScreen) return small; + if (isMediumScreen) return medium ?? small; + if (isXLScreen && xl != null) return xl; + return big; + } + + static double getDefaultTopBarHeight() { + return getByScreen(small: 40.0, big: 55.0); + } +} diff --git a/packages/utils/lib/src/test.dart b/packages/utils/lib/src/test.dart new file mode 100755 index 00000000..efbdbdea --- /dev/null +++ b/packages/utils/lib/src/test.dart @@ -0,0 +1,6 @@ +import 'package:flutter/foundation.dart'; + +const isTest = + !kIsWeb && + !kProfileMode && + bool.fromEnvironment('FLUTTER_TEST', defaultValue: false); diff --git a/packages/utils/lib/utils.dart b/packages/utils/lib/utils.dart new file mode 100644 index 00000000..528c3a6c --- /dev/null +++ b/packages/utils/lib/utils.dart @@ -0,0 +1,2 @@ +export 'src/size_utils.dart'; +export 'src/test.dart'; diff --git a/packages/utils/pubspec.yaml b/packages/utils/pubspec.yaml new file mode 100644 index 00000000..5d7855ad --- /dev/null +++ b/packages/utils/pubspec.yaml @@ -0,0 +1,54 @@ +name: utils +description: "A new Flutter package project." +version: 0.0.1 +homepage: + +environment: + sdk: ^3.9.2 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + +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 + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, 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 in packages, see + # https://flutter.dev/to/font-from-package diff --git a/pubspec.lock b/pubspec.lock index 4350a545..e6bd178d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,22 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _fe_analyzer_shared: + ansi_styles: dependency: transitive description: - name: _fe_analyzer_shared - sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + name: ansi_styles + sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a" url: "https://pub.dev" source: hosted - version: "85.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "974859dc0ff5f37bc4313244b3218c791810d03ab3470a579580279ba971a48d" - url: "https://pub.dev" - source: hosted - version: "7.7.1" + version: "0.3.2+1" args: dependency: transitive description: @@ -33,14 +25,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.13.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" characters: dependency: transitive description: @@ -49,22 +33,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" - cli_config: + charcode: dependency: transitive description: - name: cli_config - sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a url: "https://pub.dev" source: hosted - version: "0.2.0" - clock: + version: "1.4.0" + checked_yaml: dependency: transitive description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "2.0.4" + cli_launcher: + dependency: transitive + description: + name: cli_launcher + sha256: "17d2744fb9a254c49ec8eda582536abe714ea0131533e24389843a4256f82eac" + url: "https://pub.dev" + source: hosted + version: "0.3.2+1" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" collection: dependency: transitive description: @@ -73,54 +73,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" - convert: + conventional_commit: dependency: transitive description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + name: conventional_commit + sha256: c40b1b449ce2a63fa2ce852f35e3890b1e182f5951819934c0e4a66254bc0dc3 url: "https://pub.dev" source: hosted - version: "3.1.2" - coverage: + version: "0.6.1+1" + ffi: dependency: transitive description: - name: coverage - sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - equatable: - dependency: transitive - description: - name: equatable - sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" - url: "https://pub.dev" - source: hosted - version: "2.0.7" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" + version: "2.1.4" file: dependency: transitive description: @@ -129,56 +97,64 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" - fl_chart: - dependency: "direct main" - description: - name: fl_chart - sha256: "7ca9a40f4eb85949190e54087be8b4d6ac09dc4c54238d782a34cf1f7c011de9" - url: "https://pub.dev" - source: hosted - version: "1.1.1" flutter: - dependency: "direct main" + dependency: transitive description: flutter source: sdk version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_riverpod: + flutter_secure_storage: dependency: "direct main" description: - name: flutter_riverpod - sha256: "9e2d6907f12cc7d23a846847615941bddee8709bf2bfd274acdf5e80bcf22fde" + name: flutter_secure_storage + sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea" url: "https://pub.dev" source: hosted - version: "3.0.3" - flutter_svg: - dependency: "direct main" - description: - name: flutter_svg - sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: + version: "9.2.4" + flutter_secure_storage_linux: dependency: transitive description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + name: flutter_secure_storage_linux + sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688 url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "1.2.3" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" glob: dependency: transitive description: @@ -187,6 +163,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.3" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" http: dependency: transitive description: @@ -195,14 +179,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" http_parser: dependency: transitive description: @@ -223,58 +199,18 @@ packages: dependency: transitive description: name: js - sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.7.2" - leak_tracker: + version: "0.6.7" + json_annotation: dependency: transitive description: - name: leak_tracker - sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "11.0.2" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" - url: "https://pub.dev" - source: hosted - version: "3.0.10" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.dev" - source: hosted - version: "5.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" + version: "4.9.0" material_color_utilities: dependency: transitive description: @@ -283,6 +219,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.11.1" + melos: + dependency: "direct dev" + description: + name: melos + sha256: "4280dc46bd5b741887cce1e67e5c1a6aaf3c22310035cf5bd33dceeeda62ed22" + url: "https://pub.dev" + source: hosted + version: "6.3.3" meta: dependency: transitive description: @@ -291,38 +235,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" - mime: + mustache_template: dependency: transitive description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + name: mustache_template + sha256: daa42be75f2ccfb287c24a75e7ac594f2ea0b32bf9ebe7c15154aa45b2dfb2de url: "https://pub.dev" source: hosted version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc - url: "https://pub.dev" - source: hosted - version: "2.2.0" path: dependency: transitive description: @@ -331,22 +251,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" - path_parsing: + path_provider: dependency: transitive description: - name: path_parsing - sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "1.1.0" - petitparser: + version: "2.1.5" + path_provider_android: dependency: transitive description: - name: petitparser - sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + name: path_provider_android + sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "2.2.20" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" pool: dependency: transitive description: @@ -355,14 +323,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.2" - provider: - dependency: "direct main" + process: + dependency: transitive description: - name: provider - sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" + name: process + sha256: c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744 url: "https://pub.dev" source: hosted - version: "6.1.5+1" + version: "5.0.5" + prompts: + dependency: transitive + description: + name: prompts + sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1" + url: "https://pub.dev" + source: hosted + version: "2.0.0" pub_semver: dependency: transitive description: @@ -371,67 +347,27 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - riverpod: + pub_updater: dependency: transitive description: - name: riverpod - sha256: c406de02bff19d920b832bddfb8283548bfa05ce41c59afba57ce643e116aa59 + name: pub_updater + sha256: "739a0161d73a6974c0675b864fb0cf5147305f7b077b7f03a58fa7a9ab3e7e7d" url: "https://pub.dev" source: hosted - version: "3.0.3" - shelf: + version: "0.5.0" + pubspec_parse: dependency: transitive description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.4.2" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 - url: "https://pub.dev" - source: hosted - version: "1.1.3" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" - url: "https://pub.dev" - source: hosted - version: "3.0.0" + version: "1.5.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.0" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b - url: "https://pub.dev" - source: hosted - version: "2.1.2" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" - url: "https://pub.dev" - source: hosted - version: "0.10.13" source_span: dependency: transitive description: @@ -448,22 +384,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.12.1" - state_notifier: - dependency: transitive - description: - name: state_notifier - sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb - url: "https://pub.dev" - source: hosted - version: "1.0.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" string_scanner: dependency: transitive description: @@ -480,30 +400,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.2" - test: - dependency: transitive - description: - name: test - sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb" - url: "https://pub.dev" - source: hosted - version: "1.26.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - test_core: - dependency: transitive - description: - name: test_core - sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a" - url: "https://pub.dev" - source: hosted - version: "0.6.11" typed_data: dependency: transitive description: @@ -512,30 +408,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" - vector_graphics: - dependency: transitive - description: - name: vector_graphics - sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 - url: "https://pub.dev" - source: hosted - version: "1.1.19" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" - url: "https://pub.dev" - source: hosted - version: "1.1.13" - vector_graphics_compiler: - dependency: transitive - description: - name: vector_graphics_compiler - sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc - url: "https://pub.dev" - source: hosted - version: "1.1.19" vector_math: dependency: transitive description: @@ -544,22 +416,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" - source: hosted - version: "15.0.2" - watcher: - dependency: transitive - description: - name: watcher - sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" - url: "https://pub.dev" - source: hosted - version: "1.1.4" web: dependency: transitive description: @@ -568,38 +424,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - web_socket: + win32: dependency: transitive description: - name: web_socket - sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + name: win32 + sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e url: "https://pub.dev" source: hosted - version: "1.0.1" - web_socket_channel: + version: "5.15.0" + xdg_directories: dependency: transitive description: - name: web_socket_channel - sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "3.0.3" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - xml: - dependency: transitive - description: - name: xml - sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" - url: "https://pub.dev" - source: hosted - version: "6.6.1" + version: "1.1.0" yaml: dependency: transitive description: @@ -608,6 +448,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.3" + yaml_edit: + dependency: transitive + description: + name: yaml_edit + sha256: fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5 + url: "https://pub.dev" + source: hosted + version: "2.2.2" sdks: - dart: ">=3.9.2 <4.0.0" - flutter: ">=3.29.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml index 576b594f..cccb07d7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,92 +1,20 @@ -name: sf_app_platform -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# 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 is used as CFBundleVersion. -# Read more about iOS versioning at -# 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 +name: sf_app_platform_mono_repo +description: Monorepo for sf app platform, packages and modules included. +publish_to: "none" environment: - sdk: ^3.9.2 - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - provider: ^6.1.5+1 - flutter_riverpod: ^3.0.3 - fl_chart: ^1.1.1 - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.8 - flutter_svg: ^2.2.1 + sdk: ">=3.0.0 <4.0.0" +# workspace: +# - packages/navigation +# - modules/auth +# - modules/home +# - modules/profile +# - modules/notifications +# - modules/dashboard_shell dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - 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 - -# The following section is specific to Flutter packages. -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 assets to your application, add an assets section, like this: - assets: - - assets/images/ui/ - - # 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 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 + melos: ^6.3.3 +dependencies: + flutter_secure_storage: ^9.2.4 +dependency_overrides: + flutter_secure_storage: 9.2.4 \ No newline at end of file diff --git a/windows/.gitignore b/windows/.gitignore deleted file mode 100644 index d492d0d9..00000000 --- a/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt deleted file mode 100644 index 2772271e..00000000 --- a/windows/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(sf_payments LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "sf_payments") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(VERSION 3.14...3.25) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt deleted file mode 100644 index 903f4899..00000000 --- a/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# Set fallback configurations for older versions of the flutter tool. -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) - set(FLUTTER_TARGET_PLATFORM "windows-x64") -endif() - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - ${FLUTTER_TARGET_PLATFORM} $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8b6d4680..00000000 --- a/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void RegisterPlugins(flutter::PluginRegistry* registry) { -} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85..00000000 --- a/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake deleted file mode 100644 index b93c4c30..00000000 --- a/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt deleted file mode 100644 index 394917c0..00000000 --- a/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the build version. -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc deleted file mode 100644 index daac6b80..00000000 --- a/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) -#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD -#else -#define VERSION_AS_NUMBER 1,0,0,0 -#endif - -#if defined(FLUTTER_VERSION) -#define VERSION_AS_STRING FLUTTER_VERSION -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.savefamily" "\0" - VALUE "FileDescription", "sf_payments" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "sf_payments" "\0" - VALUE "LegalCopyright", "Copyright (C) 2025 com.savefamily. All rights reserved." "\0" - VALUE "OriginalFilename", "sf_payments.exe" "\0" - VALUE "ProductName", "sf_payments" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp deleted file mode 100644 index 955ee303..00000000 --- a/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - - flutter_controller_->engine()->SetNextFrameCallback([&]() { - this->Show(); - }); - - // Flutter can complete the first frame before the "show window" callback is - // registered. The following call ensures a frame is pending to ensure the - // window is shown. It is a no-op if the first frame hasn't completed yet. - flutter_controller_->ForceRedraw(); - - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f..00000000 --- a/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp deleted file mode 100644 index 1388624b..00000000 --- a/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.Create(L"sf_payments", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/windows/runner/resource.h b/windows/runner/resource.h deleted file mode 100644 index 66a65d1e..00000000 --- a/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20ca..00000000 Binary files a/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest deleted file mode 100644 index 153653e8..00000000 --- a/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,14 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp deleted file mode 100644 index 3a0b4651..00000000 --- a/windows/runner/utils.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - unsigned int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr) - -1; // remove the trailing null character - int input_length = (int)wcslen(utf16_string); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - input_length, utf8_string.data(), target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/windows/runner/utils.h b/windows/runner/utils.h deleted file mode 100644 index 3879d547..00000000 --- a/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp deleted file mode 100644 index 60608d0f..00000000 --- a/windows/runner/win32_window.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "win32_window.h" - -#include -#include - -#include "resource.h" - -namespace { - -/// Window attribute that enables dark mode window decorations. -/// -/// Redefined in case the developer's machine has a Windows SDK older than -/// version 10.0.22000.0. -/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute -#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE -#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 -#endif - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -/// Registry key for app theme preference. -/// -/// A value of 0 indicates apps should use dark mode. A non-zero or missing -/// value indicates apps should use light mode. -constexpr const wchar_t kGetPreferredBrightnessRegKey[] = - L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; -constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - } - FreeLibrary(user32_module); -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registrar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::Create(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - UpdateTheme(window); - - return OnCreate(); -} - -bool Win32Window::Show() { - return ShowWindow(window_handle_, SW_SHOWNORMAL); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - - case WM_DWMCOLORIZATIONCOLORCHANGED: - UpdateTheme(hwnd); - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} - -void Win32Window::UpdateTheme(HWND const window) { - DWORD light_mode; - DWORD light_mode_size = sizeof(light_mode); - LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, - kGetPreferredBrightnessRegValue, - RRF_RT_REG_DWORD, nullptr, &light_mode, - &light_mode_size); - - if (result == ERROR_SUCCESS) { - BOOL enable_dark_mode = light_mode == 0; - DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, - &enable_dark_mode, sizeof(enable_dark_mode)); - } -} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h deleted file mode 100644 index e901dde6..00000000 --- a/windows/runner/win32_window.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates a win32 window with |title| that is positioned and sized using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size this function will scale the inputted width and height as - // as appropriate for the default monitor. The window is invisible until - // |Show| is called. Returns true if the window was created successfully. - bool Create(const std::wstring& title, const Point& origin, const Size& size); - - // Show the current window. Returns true if the window was successfully shown. - bool Show(); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - // Update the window frame's theme to match the system theme. - static void UpdateTheme(HWND const window); - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_