Compare commits
No commits in common. "main" and "swiper-bottom-nav-bar" have entirely different histories.
main
...
swiper-bot
|
@ -0,0 +1,8 @@
|
||||||
|
// Flutter web plugin registrant file.
|
||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
|
||||||
|
void registerPlugins() {}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
{"inputs":["/Users/bogdan/IdeaProjects/ernaehrung/.dart_tool/flutter_build/c27655c010e9dca425e442f7862f55d5/app.dill","/usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/internal/engine.version","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/internal/engine.version","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/internal/engine.version","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/internal/engine.version","/Users/bogdan/IdeaProjects/ernaehrung/pubspec.yaml","/Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/assets/CupertinoIcons.ttf","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/artifacts/material_fonts/MaterialIcons-Regular.otf","/usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag","/Users/bogdan/.pub-cache/hosted/pub.dev/async-2.10.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/characters-1.2.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/clock-1.1.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/collection-1.17.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/fake_async-1.3.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/js-0.6.5/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/lints-2.0.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/matcher-0.12.13/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/meta-1.8.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/path-1.8.2/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/source_span-1.9.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/test_api-0.4.16/LICENSE","/Users/bogdan/.pub-cache/hosted/pub.dev/vector_math-2.1.4/LICENSE","/usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/pkg/sky_engine/LICENSE","/usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/LICENSE"],"outputs":["/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/vm_snapshot_data","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/isolate_snapshot_data","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/kernel_blob.bin","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.otf","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/shaders/ink_sparkle.frag","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/AssetManifest.json","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/FontManifest.json","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/NOTICES.Z"]}
|
|
@ -0,0 +1 @@
|
||||||
|
/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf /Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.otf /Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/shaders/ink_sparkle.frag /Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/AssetManifest.json /Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/FontManifest.json /Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/NOTICES.Z: /Users/bogdan/IdeaProjects/ernaehrung/pubspec.yaml /Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/assets/CupertinoIcons.ttf /usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/artifacts/material_fonts/MaterialIcons-Regular.otf /usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag /Users/bogdan/.pub-cache/hosted/pub.dev/async-2.10.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/characters-1.2.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/clock-1.1.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/collection-1.17.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/fake_async-1.3.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/js-0.6.5/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/lints-2.0.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/matcher-0.12.13/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/meta-1.8.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/path-1.8.2/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/source_span-1.9.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/test_api-0.4.16/LICENSE /Users/bogdan/.pub-cache/hosted/pub.dev/vector_math-2.1.4/LICENSE /usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/pkg/sky_engine/LICENSE /usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/LICENSE
|
|
@ -0,0 +1 @@
|
||||||
|
{"inputs":["/Users/bogdan/IdeaProjects/ernaehrung/.dart_tool/package_config_subset"],"outputs":[]}
|
|
@ -0,0 +1 @@
|
||||||
|
{"inputs":[],"outputs":[]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
["/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/vm_snapshot_data","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/isolate_snapshot_data","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/kernel_blob.bin","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.otf","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/shaders/ink_sparkle.frag","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/AssetManifest.json","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/FontManifest.json","/Users/bogdan/IdeaProjects/ernaehrung/build/app/intermediates/flutter/debug/flutter_assets/NOTICES.Z"]
|
|
@ -1,666 +1,156 @@
|
||||||
{
|
{
|
||||||
"configVersion": 2,
|
"configVersion": 2,
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
|
||||||
"name": "_fe_analyzer_shared",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-61.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "adaptive_dialog",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/adaptive_dialog-1.8.3+1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "analyzer",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-5.13.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "animate_gradient",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animate_gradient-0.0.2+1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "animations",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animations-2.0.7",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "args",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.4.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "assorted_layout_widgets",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/assorted_layout_widgets-8.0.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "async",
|
"name": "async",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.10.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/async-2.10.0",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "basic_utils",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/basic_utils-5.5.4",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.18"
|
"languageVersion": "2.18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "boolean_selector",
|
"name": "boolean_selector",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.17"
|
"languageVersion": "2.17"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "bs_flutter_modal",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_modal-1.0.6",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "bs_flutter_utils",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_utils-1.0.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build-2.3.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build_config",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_config-1.1.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build_daemon",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_daemon-3.1.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build_resolvers",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_resolvers-2.2.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build_runner",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner-2.3.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "build_runner_core",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner_core-7.2.7+1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "built_collection",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_collection-5.1.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "built_value",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_value-8.6.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "card_swiper",
|
"name": "card_swiper",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/card_swiper-2.0.4",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/card_swiper-2.0.4",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "characters",
|
"name": "characters",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.2.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/characters-1.2.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "checked_yaml",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/checked_yaml-2.0.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "clock",
|
"name": "clock",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/clock-1.1.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/clock-1.1.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "code_builder",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/code_builder-4.5.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "collection",
|
"name": "collection",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.17.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/collection-1.17.0",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "convert",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crypto",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "cupertino_icons",
|
"name": "cupertino_icons",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/cupertino_icons-1.0.5",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dart_style",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dart_style-2.3.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dynamic_color",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dynamic_color-1.6.5",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "empty_widget",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/empty_widget-0.0.5",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "equatable",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/equatable-2.0.5",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fake_async",
|
"name": "fake_async",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fake_async-1.3.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/fake_async-1.3.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "ffi",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/ffi-2.0.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "file",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fixnum",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fixnum-1.1.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fl_chart",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.62.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "flutter",
|
"name": "flutter",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/flutter/packages/flutter",
|
"rootUri": "file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.17"
|
"languageVersion": "2.17"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "flutter_dotenv",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_dotenv-5.1.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "flutter_form_builder",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_form_builder-8.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "flutter_lints",
|
"name": "flutter_lints",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_lints-2.0.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.17"
|
"languageVersion": "2.17"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "flutter_localizations",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/flutter/packages/flutter_localizations",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "flutter_profile_picture",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_profile_picture-2.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "flutter_test",
|
"name": "flutter_test",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/flutter/packages/flutter_test",
|
"rootUri": "file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter_test",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.17"
|
"languageVersion": "2.17"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "flutter_web_plugins",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/flutter/packages/flutter_web_plugins",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fluttertoast",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fluttertoast-8.2.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "form_builder_validators",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/form_builder_validators-8.6.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "frontend_server_client",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-3.2.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "glob",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "graphs",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/graphs-2.3.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hive",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive-2.2.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hive_flutter",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_flutter-1.1.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hive_generator",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_generator-2.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "http",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "http_multi_server",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "http_parser",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "intersperse",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intersperse-2.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "intl",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.17.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "io",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "js",
|
"name": "js",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.6.5",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/js-0.6.5",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.16"
|
"languageVersion": "2.16"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "json_annotation",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/json_annotation-4.8.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "lints",
|
"name": "lints",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/lints-2.0.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/lints-2.0.1",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "logging",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.2.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos_ui",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/macos_ui-1.12.2",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.17"
|
"languageVersion": "2.17"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "matcher",
|
"name": "matcher",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.13",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/matcher-0.12.13",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.18"
|
"languageVersion": "2.18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "material_color_utilities",
|
"name": "material_color_utilities",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/material_color_utilities-0.2.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.13"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "matrix4_transform",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matrix4_transform-2.0.1",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.13"
|
"languageVersion": "2.13"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "meta",
|
"name": "meta",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.8.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/meta-1.8.0",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mime",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/mime-1.0.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "package_config",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.1.0",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.8.2",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/path-1.8.2",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.0.15",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider_android",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.0.27",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider_foundation",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.2.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider_linux",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.11",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider_platform_interface",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.0.6",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path_provider_windows",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.1.7",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "percent_indicator",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/percent_indicator-4.2.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "platform",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "plugin_platform_interface",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pointycastle",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pointycastle-3.7.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pool",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "process",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/process-4.2.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pub_semver",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.1.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pubspec_parse",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pubspec_parse-1.2.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "responsive_framework",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/responsive_framework-1.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "searchable_listview",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/searchable_listview-2.4.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "shelf",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "shelf_web_socket",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-1.0.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "sizer",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/sizer-2.0.15",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sky_engine",
|
"name": "sky_engine",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/flutter/bin/cache/pkg/sky_engine",
|
"rootUri": "file:///usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/pkg/sky_engine",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "source_gen",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_gen-1.3.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "source_helper",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_helper-1.3.3",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "source_span",
|
"name": "source_span",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.9.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/source_span-1.9.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.14"
|
"languageVersion": "2.14"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stack_trace",
|
"name": "stack_trace",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.11.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/stack_trace-1.11.0",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.18"
|
"languageVersion": "2.18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stream_channel",
|
"name": "stream_channel",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/stream_channel-2.1.1",
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stream_transform",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_transform-2.1.0",
|
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.14"
|
"languageVersion": "2.14"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "string_scanner",
|
"name": "string_scanner",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.2.0",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/string_scanner-1.2.0",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.18"
|
"languageVersion": "2.18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "term_glyph",
|
"name": "term_glyph",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.1",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.12"
|
"languageVersion": "2.12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "test_api",
|
"name": "test_api",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/test_api-0.4.16",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.18"
|
"languageVersion": "2.18"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "timing",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.1",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "typed_data",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.3.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "universal_io",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/universal_io-2.2.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.15"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vector_math",
|
"name": "vector_math",
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.1.4",
|
"rootUri": "file:///Users/bogdan/.pub-cache/hosted/pub.dev/vector_math-2.1.4",
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "2.14"
|
"languageVersion": "2.14"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "watcher",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.0.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.14"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "web_socket_channel",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-2.4.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.15"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "win32",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/win32-4.1.4",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "xdg_directories",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.0.0",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "yaml",
|
|
||||||
"rootUri": "file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.2",
|
|
||||||
"packageUri": "lib/",
|
|
||||||
"languageVersion": "2.19"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "ernaehrung",
|
"name": "ernaehrung",
|
||||||
"rootUri": "../",
|
"rootUri": "../",
|
||||||
|
@ -668,7 +158,7 @@
|
||||||
"languageVersion": "2.19"
|
"languageVersion": "2.19"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"generated": "2023-06-25T12:05:16.357241Z",
|
"generated": "2023-04-17T20:45:45.108623Z",
|
||||||
"generator": "pub",
|
"generator": "pub",
|
||||||
"generatorVersion": "2.19.6"
|
"generatorVersion": "2.19.6"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,445 +1,105 @@
|
||||||
_fe_analyzer_shared
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-61.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-61.0.0/lib/
|
|
||||||
adaptive_dialog
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/adaptive_dialog-1.8.3+1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/adaptive_dialog-1.8.3+1/lib/
|
|
||||||
analyzer
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-5.13.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-5.13.0/lib/
|
|
||||||
animate_gradient
|
|
||||||
2.16
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animate_gradient-0.0.2+1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animate_gradient-0.0.2+1/lib/
|
|
||||||
animations
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animations-2.0.7/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/animations-2.0.7/lib/
|
|
||||||
args
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.4.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.4.2/lib/
|
|
||||||
assorted_layout_widgets
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/assorted_layout_widgets-8.0.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/assorted_layout_widgets-8.0.4/lib/
|
|
||||||
async
|
async
|
||||||
2.18
|
2.18
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.10.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/async-2.10.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.10.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/async-2.10.0/lib/
|
||||||
basic_utils
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/basic_utils-5.5.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/basic_utils-5.5.4/lib/
|
|
||||||
boolean_selector
|
boolean_selector
|
||||||
2.17
|
2.17
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/
|
||||||
bs_flutter_modal
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_modal-1.0.6/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_modal-1.0.6/lib/
|
|
||||||
bs_flutter_utils
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_utils-1.0.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/bs_flutter_utils-1.0.2/lib/
|
|
||||||
build
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build-2.3.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build-2.3.1/lib/
|
|
||||||
build_config
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_config-1.1.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_config-1.1.1/lib/
|
|
||||||
build_daemon
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_daemon-3.1.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_daemon-3.1.1/lib/
|
|
||||||
build_resolvers
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_resolvers-2.2.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_resolvers-2.2.0/lib/
|
|
||||||
build_runner
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner-2.3.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner-2.3.3/lib/
|
|
||||||
build_runner_core
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner_core-7.2.7+1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner_core-7.2.7+1/lib/
|
|
||||||
built_collection
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_collection-5.1.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_collection-5.1.1/lib/
|
|
||||||
built_value
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_value-8.6.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/built_value-8.6.1/lib/
|
|
||||||
card_swiper
|
card_swiper
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/card_swiper-2.0.4/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/card_swiper-2.0.4/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/card_swiper-2.0.4/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/card_swiper-2.0.4/lib/
|
||||||
characters
|
characters
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.2.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/characters-1.2.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.2.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/characters-1.2.1/lib/
|
||||||
checked_yaml
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/checked_yaml-2.0.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/checked_yaml-2.0.3/lib/
|
|
||||||
clock
|
clock
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/clock-1.1.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/clock-1.1.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/clock-1.1.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/
|
||||||
code_builder
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/code_builder-4.5.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/code_builder-4.5.0/lib/
|
|
||||||
collection
|
collection
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.17.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/collection-1.17.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.17.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/collection-1.17.0/lib/
|
||||||
convert
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.1/lib/
|
|
||||||
crypto
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.3/lib/
|
|
||||||
cupertino_icons
|
cupertino_icons
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/cupertino_icons-1.0.5/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/cupertino_icons-1.0.5/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/lib/
|
||||||
dart_style
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dart_style-2.3.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dart_style-2.3.1/lib/
|
|
||||||
dynamic_color
|
|
||||||
2.16
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dynamic_color-1.6.5/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/dynamic_color-1.6.5/lib/
|
|
||||||
empty_widget
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/empty_widget-0.0.5/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/empty_widget-0.0.5/lib/
|
|
||||||
equatable
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/equatable-2.0.5/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/equatable-2.0.5/lib/
|
|
||||||
fake_async
|
fake_async
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fake_async-1.3.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/fake_async-1.3.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fake_async-1.3.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/
|
||||||
ffi
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/ffi-2.0.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/ffi-2.0.2/lib/
|
|
||||||
file
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.4/lib/
|
|
||||||
fixnum
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fixnum-1.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fixnum-1.1.0/lib/
|
|
||||||
fl_chart
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.62.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.62.0/lib/
|
|
||||||
flutter_dotenv
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_dotenv-5.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_dotenv-5.1.0/lib/
|
|
||||||
flutter_form_builder
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_form_builder-8.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_form_builder-8.0.0/lib/
|
|
||||||
flutter_lints
|
flutter_lints
|
||||||
2.17
|
2.17
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_lints-2.0.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_lints-2.0.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1/lib/
|
||||||
flutter_profile_picture
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_profile_picture-2.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_profile_picture-2.0.0/lib/
|
|
||||||
fluttertoast
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fluttertoast-8.2.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/fluttertoast-8.2.2/lib/
|
|
||||||
form_builder_validators
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/form_builder_validators-8.6.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/form_builder_validators-8.6.1/lib/
|
|
||||||
frontend_server_client
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-3.2.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-3.2.0/lib/
|
|
||||||
glob
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.2/lib/
|
|
||||||
graphs
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/graphs-2.3.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/graphs-2.3.1/lib/
|
|
||||||
hive
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive-2.2.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive-2.2.3/lib/
|
|
||||||
hive_flutter
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_flutter-1.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_flutter-1.1.0/lib/
|
|
||||||
hive_generator
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_generator-2.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/hive_generator-2.0.0/lib/
|
|
||||||
http
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/
|
|
||||||
http_multi_server
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.1/lib/
|
|
||||||
http_parser
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2/lib/
|
|
||||||
intersperse
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intersperse-2.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intersperse-2.0.0/lib/
|
|
||||||
intl
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.17.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.17.0/lib/
|
|
||||||
io
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4/lib/
|
|
||||||
js
|
js
|
||||||
2.16
|
2.16
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.6.5/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/js-0.6.5/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.6.5/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/js-0.6.5/lib/
|
||||||
json_annotation
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/json_annotation-4.8.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/json_annotation-4.8.1/lib/
|
|
||||||
lints
|
lints
|
||||||
2.17
|
2.17
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/lints-2.0.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/lints-2.0.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/lints-2.0.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/lints-2.0.1/lib/
|
||||||
logging
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.2.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.2.0/lib/
|
|
||||||
macos_ui
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/macos_ui-1.12.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/macos_ui-1.12.2/lib/
|
|
||||||
matcher
|
matcher
|
||||||
2.18
|
2.18
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.13/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/matcher-0.12.13/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.13/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/matcher-0.12.13/lib/
|
||||||
material_color_utilities
|
material_color_utilities
|
||||||
2.13
|
2.13
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/material_color_utilities-0.2.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/material_color_utilities-0.2.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/lib/
|
||||||
matrix4_transform
|
|
||||||
2.13
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matrix4_transform-2.0.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/matrix4_transform-2.0.1/lib/
|
|
||||||
meta
|
meta
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.8.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/meta-1.8.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.8.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/meta-1.8.0/lib/
|
||||||
mime
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/mime-1.0.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/mime-1.0.4/lib/
|
|
||||||
package_config
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.1.0/lib/
|
|
||||||
path
|
path
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.8.2/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/path-1.8.2/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.8.2/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/path-1.8.2/lib/
|
||||||
path_provider
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.0.15/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.0.15/lib/
|
|
||||||
path_provider_android
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.0.27/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.0.27/lib/
|
|
||||||
path_provider_foundation
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.2.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.2.3/lib/
|
|
||||||
path_provider_linux
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.11/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.11/lib/
|
|
||||||
path_provider_platform_interface
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/lib/
|
|
||||||
path_provider_windows
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.1.7/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.1.7/lib/
|
|
||||||
percent_indicator
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/percent_indicator-4.2.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/percent_indicator-4.2.3/lib/
|
|
||||||
platform
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.0/lib/
|
|
||||||
plugin_platform_interface
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.4/lib/
|
|
||||||
pointycastle
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pointycastle-3.7.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pointycastle-3.7.3/lib/
|
|
||||||
pool
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1/lib/
|
|
||||||
process
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/process-4.2.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/process-4.2.4/lib/
|
|
||||||
pub_semver
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.1.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.1.4/lib/
|
|
||||||
pubspec_parse
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pubspec_parse-1.2.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/pubspec_parse-1.2.3/lib/
|
|
||||||
responsive_framework
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/responsive_framework-1.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/responsive_framework-1.0.0/lib/
|
|
||||||
searchable_listview
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/searchable_listview-2.4.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/searchable_listview-2.4.0/lib/
|
|
||||||
shelf
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.1/lib/
|
|
||||||
shelf_web_socket
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-1.0.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-1.0.4/lib/
|
|
||||||
sizer
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/sizer-2.0.15/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/sizer-2.0.15/lib/
|
|
||||||
source_gen
|
|
||||||
2.18
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_gen-1.3.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_gen-1.3.2/lib/
|
|
||||||
source_helper
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_helper-1.3.3/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_helper-1.3.3/lib/
|
|
||||||
source_span
|
source_span
|
||||||
2.14
|
2.14
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.9.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/source_span-1.9.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.9.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/source_span-1.9.1/lib/
|
||||||
stack_trace
|
stack_trace
|
||||||
2.18
|
2.18
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.11.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.11.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib/
|
||||||
stream_channel
|
stream_channel
|
||||||
2.14
|
2.14
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/lib/
|
||||||
stream_transform
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_transform-2.1.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/stream_transform-2.1.0/lib/
|
|
||||||
string_scanner
|
string_scanner
|
||||||
2.18
|
2.18
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.2.0/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.2.0/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib/
|
||||||
term_glyph
|
term_glyph
|
||||||
2.12
|
2.12
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.1/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.1/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib/
|
||||||
test_api
|
test_api
|
||||||
2.18
|
2.18
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/test_api-0.4.16/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/test_api-0.4.16/lib/
|
||||||
timing
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.1/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.1/lib/
|
|
||||||
typed_data
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.3.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.3.2/lib/
|
|
||||||
universal_io
|
|
||||||
2.15
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/universal_io-2.2.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/universal_io-2.2.0/lib/
|
|
||||||
vector_math
|
vector_math
|
||||||
2.14
|
2.14
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.1.4/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/vector_math-2.1.4/
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.1.4/lib/
|
file:///Users/bogdan/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/
|
||||||
watcher
|
|
||||||
2.14
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.0.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.0.2/lib/
|
|
||||||
web_socket_channel
|
|
||||||
2.15
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-2.4.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-2.4.0/lib/
|
|
||||||
win32
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/win32-4.1.4/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/win32-4.1.4/lib/
|
|
||||||
xdg_directories
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.0.0/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.0.0/lib/
|
|
||||||
yaml
|
|
||||||
2.19
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.2/
|
|
||||||
file:///C:/Users/Nutzer/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.2/lib/
|
|
||||||
sky_engine
|
|
||||||
2.12
|
|
||||||
file:///C:/Users/Nutzer/flutter/bin/cache/pkg/sky_engine/
|
|
||||||
file:///C:/Users/Nutzer/flutter/bin/cache/pkg/sky_engine/lib/
|
|
||||||
flutter
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter/
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter/lib/
|
|
||||||
flutter_localizations
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_localizations/
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_localizations/lib/
|
|
||||||
flutter_test
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_test/
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_test/lib/
|
|
||||||
flutter_web_plugins
|
|
||||||
2.17
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_web_plugins/
|
|
||||||
file:///C:/Users/Nutzer/flutter/packages/flutter_web_plugins/lib/
|
|
||||||
ernaehrung
|
ernaehrung
|
||||||
2.19
|
2.19
|
||||||
file:///C:/Users/Nutzer/source/repos/Flutter-Ernaehrungsapp/
|
file:///Users/bogdan/IdeaProjects/erna%CC%88hrung/
|
||||||
file:///C:/Users/Nutzer/source/repos/Flutter-Ernaehrungsapp/lib/
|
file:///Users/bogdan/IdeaProjects/erna%CC%88hrung/lib/
|
||||||
|
sky_engine
|
||||||
|
2.12
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/pkg/sky_engine/
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/bin/cache/pkg/sky_engine/lib/
|
||||||
|
flutter
|
||||||
|
2.17
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter/lib/
|
||||||
|
flutter_test
|
||||||
|
2.17
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter_test/
|
||||||
|
file:///usr/local/Caskroom/flutter/3.7.7/flutter/packages/flutter_test/lib/
|
||||||
2
|
2
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
3.7.9
|
20
.env
20
.env
|
@ -1,20 +0,0 @@
|
||||||
USER_BOX=USER
|
|
||||||
FIRST_NAME_FIELD=FIRST_NAME
|
|
||||||
SECOND_NAME_FIELD=SECOND_NAME
|
|
||||||
AGE_FIELD=AGE
|
|
||||||
WEIGHT_FIELD=WEIGHT
|
|
||||||
HEIGHT_FIELD=HEIGHT
|
|
||||||
CALORIES_FIELD=CALORIES
|
|
||||||
|
|
||||||
DATE_FIELD=DATE # datum
|
|
||||||
BREAKFAST_FIELD=FRÜHSTÜCK # frühstück
|
|
||||||
LUNCH_FIELD=MITTAGESSEN # mittagessen
|
|
||||||
DINNER_FIELD=ABENDESSEN # abendessen
|
|
||||||
YESTERDAY_AND_BEFORE=YESTERDAY # gestern und alles was davor war
|
|
||||||
TOMORROW_AND_AFTER=TOMORROW # morgen und alles was kommen wird
|
|
||||||
|
|
||||||
TODAY_BOX=TODAY
|
|
||||||
PROGRESS_BOX=PROGRESS
|
|
||||||
STATISTICS_BOX=STATISTICS
|
|
||||||
MAIN_BOX=MAIN
|
|
||||||
USER_BOX=USER
|
|
|
@ -1 +0,0 @@
|
||||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"bs_flutter_modal","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_modal-1.0.6\\\\","native_build":true,"dependencies":["bs_flutter_utils"]},{"name":"bs_flutter_utils","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_utils-1.0.2\\\\","native_build":true,"dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\fluttertoast-8.2.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.2.3\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"bs_flutter_modal","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_modal-1.0.6\\\\","native_build":true,"dependencies":["bs_flutter_utils"]},{"name":"bs_flutter_utils","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_utils-1.0.2\\\\","native_build":true,"dependencies":[]},{"name":"dynamic_color","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\dynamic_color-1.6.5\\\\","native_build":true,"dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\fluttertoast-8.2.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"dynamic_color","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\dynamic_color-1.6.5\\\\","native_build":true,"dependencies":[]},{"name":"macos_ui","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\macos_ui-1.12.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.2.3\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"dynamic_color","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\dynamic_color-1.6.5\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"dynamic_color","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\dynamic_color-1.6.5\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"bs_flutter_modal","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_modal-1.0.6\\\\","dependencies":["bs_flutter_utils"]},{"name":"bs_flutter_utils","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\bs_flutter_utils-1.0.2\\\\","dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Nutzer\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\fluttertoast-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"bs_flutter_modal","dependencies":["bs_flutter_utils"]},{"name":"bs_flutter_utils","dependencies":[]},{"name":"dynamic_color","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"macos_ui","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-06-25 14:42:43.177562","version":"3.7.11"}
|
|
|
@ -5,8 +5,7 @@
|
||||||
.LSOverride
|
.LSOverride
|
||||||
|
|
||||||
# Icon must end with two \r
|
# Icon must end with two \r
|
||||||
Icon
|
Icon
|
||||||
|
|
||||||
|
|
||||||
# Thumbnails
|
# Thumbnails
|
||||||
._*
|
._*
|
||||||
|
@ -492,11 +491,6 @@ __pycache__/
|
||||||
# Tabs Studio
|
# Tabs Studio
|
||||||
*.tss
|
*.tss
|
||||||
|
|
||||||
#Dart Tools
|
|
||||||
package_config.json
|
|
||||||
package_config_subset
|
|
||||||
version
|
|
||||||
|
|
||||||
# Telerik's JustMock configuration file
|
# Telerik's JustMock configuration file
|
||||||
*.jmconfig
|
*.jmconfig
|
||||||
|
|
||||||
|
@ -574,81 +568,3 @@ FodyWeavers.xsd
|
||||||
# Built Visual Studio Code Extensions
|
# Built Visual Studio Code Extensions
|
||||||
*.vsix
|
*.vsix
|
||||||
|
|
||||||
# Miscellaneous
|
|
||||||
*.class
|
|
||||||
*.lock
|
|
||||||
*.log
|
|
||||||
*.pyc
|
|
||||||
*.swp
|
|
||||||
.DS_Store
|
|
||||||
.atom/
|
|
||||||
.buildlog/
|
|
||||||
.history
|
|
||||||
.svn/
|
|
||||||
# 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
|
|
||||||
**/doc/api/
|
|
||||||
**/ios/Flutter/.last_build_id
|
|
||||||
.dart_tool/
|
|
||||||
.flutter-plugins
|
|
||||||
.flutter-plugins-dependencies
|
|
||||||
.packages
|
|
||||||
.pub-cache/
|
|
||||||
.pub/
|
|
||||||
/build/
|
|
||||||
# Web related
|
|
||||||
lib/generated_plugin_registrant.dart
|
|
||||||
# Android related
|
|
||||||
**/android/**/gradle-wrapper.jar
|
|
||||||
**/android/.gradle
|
|
||||||
**/android/captures/
|
|
||||||
**/android/gradlew
|
|
||||||
**/android/gradlew.bat
|
|
||||||
**/android/local.properties
|
|
||||||
**/android/**/GeneratedPluginRegistrant.java
|
|
||||||
# iOS/XCode related
|
|
||||||
**/ios/**/*.mode1v3
|
|
||||||
**/ios/**/*.mode2v3
|
|
||||||
**/ios/**/*.moved-aside
|
|
||||||
**/ios/**/*.pbxuser
|
|
||||||
**/ios/**/*.perspectivev3
|
|
||||||
**/ios/**/*sync/
|
|
||||||
**/ios/**/.sconsign.dblite
|
|
||||||
**/ios/**/.tags*
|
|
||||||
**/ios/**/.vagrant/
|
|
||||||
**/ios/**/DerivedData/
|
|
||||||
**/ios/**/Icon?
|
|
||||||
**/ios/**/Pods/
|
|
||||||
**/ios/**/.symlinks/
|
|
||||||
**/ios/**/profile
|
|
||||||
**/ios/**/xcuserdata
|
|
||||||
**/ios/.generated/
|
|
||||||
**/ios/Flutter/App.framework
|
|
||||||
**/ios/Flutter/Flutter.framework
|
|
||||||
**/ios/Flutter/Flutter.podspec
|
|
||||||
**/ios/Flutter/Generated.xcconfig
|
|
||||||
**/ios/Flutter/app.flx
|
|
||||||
**/ios/Flutter/app.zip
|
|
||||||
**/ios/Flutter/flutter_assets/
|
|
||||||
**/ios/Flutter/flutter_export_environment.sh
|
|
||||||
**/ios/ServiceDefinitions.json
|
|
||||||
**/ios/Runner/GeneratedPluginRegistrant.*
|
|
||||||
# Exceptions to above rules.
|
|
||||||
!**/ios/**/default.mode1v3
|
|
||||||
!**/ios/**/default.mode2v3
|
|
||||||
!**/ios/**/default.pbxuser
|
|
||||||
!**/ios/**/default.perspectivev3
|
|
||||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
|
||||||
|
|
||||||
# Windows
|
|
||||||
**/windows/flutter/generated_plugin_registrant.cc
|
|
||||||
**/windows/flutter/generated_plugin_registrant.h
|
|
||||||
**/windows/flutter/generated_plugins.cmake
|
|
|
@ -26,6 +26,6 @@ subprojects {
|
||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("clean", Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,2 +1 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
41
ios/Podfile
41
ios/Podfile
|
@ -1,41 +0,0 @@
|
||||||
# Uncomment this line to define a global platform for your project
|
|
||||||
# platform :ios, '11.0'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
project 'Runner', {
|
|
||||||
'Debug' => :debug,
|
|
||||||
'Profile' => :release,
|
|
||||||
'Release' => :release,
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutter_root
|
|
||||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
|
||||||
unless File.exist?(generated_xcode_build_settings_path)
|
|
||||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
|
||||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
|
||||||
return matches[1].strip if matches
|
|
||||||
end
|
|
||||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
|
||||||
end
|
|
||||||
|
|
||||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
|
||||||
|
|
||||||
flutter_ios_podfile_setup
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
use_frameworks!
|
|
||||||
use_modular_headers!
|
|
||||||
|
|
||||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
flutter_additional_ios_build_settings(target)
|
|
||||||
end
|
|
||||||
end
|
|
26
lib/app.dart
26
lib/app.dart
|
@ -1,26 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/main_page.dart';
|
|
||||||
import 'package:ernaehrung/pages/user_data_form/initial_user_data_form.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import 'models/user.dart';
|
|
||||||
|
|
||||||
class AndroidApp extends StatelessWidget {
|
|
||||||
const AndroidApp({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final box = Hive.box<User>(dotenv.env['USER_BOX'] ?? 'USER');
|
|
||||||
return MaterialApp(
|
|
||||||
debugShowCheckedModeBanner: false,
|
|
||||||
title: 'Flutter Demo',
|
|
||||||
theme: ThemeData(
|
|
||||||
scaffoldBackgroundColor: Colors.grey.shade200, //<-- SEE
|
|
||||||
),
|
|
||||||
home: box.get("USER") == null ? const OnboardingPage() : const MainPage(),
|
|
||||||
routes: {
|
|
||||||
'/navigation': (context) => const MainPage(),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CardComponent extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final String description;
|
||||||
|
|
||||||
|
const CardComponent({super.key, required this.title, required this.description});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.8,
|
||||||
|
child: Card(
|
||||||
|
margin: const EdgeInsets.all(20.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(title, style: const TextStyle(fontSize: 24.0)),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text(description, style: const TextStyle(fontSize: 16.0)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,187 @@
|
||||||
|
import 'package:ernaehrung/views/navigation/navigationScreen.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class WelcomePageStateTextFieldState extends StatefulWidget {
|
||||||
|
const WelcomePageStateTextFieldState({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<WelcomePageStateTextFieldState> createState() =>
|
||||||
|
_WelcomePageStateTextFieldState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WelcomePageStateTextFieldState
|
||||||
|
extends State<WelcomePageStateTextFieldState> {
|
||||||
|
final firstnameTextEditingController = TextEditingController();
|
||||||
|
final secondnameTextEditingController = TextEditingController();
|
||||||
|
final weightTextEditingController = TextEditingController();
|
||||||
|
final heightTextEditingController = TextEditingController();
|
||||||
|
final caloriesTextEditingController = TextEditingController();
|
||||||
|
|
||||||
|
bool isNameVisible = false;
|
||||||
|
bool isSNameVisible = false;
|
||||||
|
bool isWeightVisible = false;
|
||||||
|
bool isHeightVisible = false;
|
||||||
|
bool isCaloriesVisible = false;
|
||||||
|
|
||||||
|
void setNameVisible(bool visibility) {
|
||||||
|
setState(() => isNameVisible = visibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setSNameVisible(bool visibility) {
|
||||||
|
setState(() => isSNameVisible = visibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setWeightVisible(bool visibility) {
|
||||||
|
setState(() => isWeightVisible = visibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setHeightVisible(bool visibility) {
|
||||||
|
setState(() => isHeightVisible = visibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCaloriesVisible(bool visibility) {
|
||||||
|
setState(() => isCaloriesVisible = visibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (newText) {
|
||||||
|
if (newText.isNotEmpty) {
|
||||||
|
setNameVisible(true);
|
||||||
|
} else {
|
||||||
|
setNameVisible(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: firstnameTextEditingController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'Name',
|
||||||
|
border: const OutlineInputBorder(gapPadding: 8),
|
||||||
|
suffixIcon: isNameVisible
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
firstnameTextEditingController.clear();
|
||||||
|
setState(() => isNameVisible = false);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.clear))
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (newText) {
|
||||||
|
if (newText.isNotEmpty) {
|
||||||
|
setSNameVisible(true);
|
||||||
|
} else {
|
||||||
|
setSNameVisible(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: secondnameTextEditingController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'Vorname',
|
||||||
|
border: const OutlineInputBorder(gapPadding: 8),
|
||||||
|
suffixIcon: isSNameVisible
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
secondnameTextEditingController.clear();
|
||||||
|
setState(() => isSNameVisible = false);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.clear))
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.text),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (newText) {
|
||||||
|
if (newText.isNotEmpty) {
|
||||||
|
setWeightVisible(true);
|
||||||
|
} else {
|
||||||
|
setWeightVisible(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: weightTextEditingController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'Gewicht',
|
||||||
|
border: const OutlineInputBorder(gapPadding: 8),
|
||||||
|
suffixIcon: isWeightVisible
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
weightTextEditingController.clear();
|
||||||
|
setState(() => isWeightVisible = false);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.clear))
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (newText) {
|
||||||
|
if (newText.isNotEmpty) {
|
||||||
|
setHeightVisible(true);
|
||||||
|
} else {
|
||||||
|
setHeightVisible(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: heightTextEditingController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'Größe',
|
||||||
|
border: const OutlineInputBorder(gapPadding: 8),
|
||||||
|
suffixIcon: isHeightVisible
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
heightTextEditingController.clear();
|
||||||
|
setState(() => isHeightVisible = false);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.clear))
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (newText) {
|
||||||
|
if (newText.isNotEmpty) {
|
||||||
|
setCaloriesVisible(true);
|
||||||
|
} else {
|
||||||
|
setCaloriesVisible(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: caloriesTextEditingController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'gewünschte Kalorienzufuhr',
|
||||||
|
border: const OutlineInputBorder(gapPadding: 8),
|
||||||
|
suffixIcon: isCaloriesVisible
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
caloriesTextEditingController.clear();
|
||||||
|
setState(() => isCaloriesVisible = false);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.clear))
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
ElevatedButton(onPressed: (){
|
||||||
|
Navigator.pushAndRemoveUntil(context,
|
||||||
|
MaterialPageRoute(builder: (context) => const NavigationScreen()), (r) => false);
|
||||||
|
}, child: const Text('Bestätigen'))
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
import '../models/food.dart';
|
|
||||||
|
|
||||||
List<Food> castDynamicToListFood(dynamic dynamicList) {
|
|
||||||
List<Food> foodList = [];
|
|
||||||
if(dynamicList == null){
|
|
||||||
return foodList;
|
|
||||||
}
|
|
||||||
for (Food element in dynamicList) {
|
|
||||||
foodList.add(element);
|
|
||||||
}
|
|
||||||
return foodList;
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String,List<Food>> castDynamicMap(dynamic dynamicMap){
|
|
||||||
Map<String,List<Food>> foodMap = {};
|
|
||||||
if(dynamicMap == null){
|
|
||||||
return foodMap;
|
|
||||||
}
|
|
||||||
for(dynamic key in dynamicMap.keys){
|
|
||||||
foodMap.putIfAbsent(key as String , () => castDynamicToListFood(dynamicMap[key]));
|
|
||||||
}
|
|
||||||
return foodMap;
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
import '../models/food.dart';
|
|
||||||
|
|
||||||
String getFoodListStringByFood(String foodName, int count, int calories, BuildContext? context){
|
|
||||||
int maxWidth = 35;
|
|
||||||
if(context != null){
|
|
||||||
maxWidth = isScreenWidthAbove1000(context) ? 100 : 35;
|
|
||||||
}
|
|
||||||
String limitedText = foodName.length > maxWidth ? "${foodName.substring(0, maxWidth - 3)} ... $count x $calories kcal" : "$foodName $count x $calories kcal";
|
|
||||||
return limitedText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool isScreenWidthAbove1000(BuildContext context) {
|
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
|
||||||
return screenWidth > 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
String getWeeklyRankingString(String foodName,BuildContext? context){
|
|
||||||
int maxWidth = 40;
|
|
||||||
if(context != null){
|
|
||||||
maxWidth = isScreenWidthAbove1000(context) ? 100 : 40;
|
|
||||||
}
|
|
||||||
String limitedText = foodName.length > maxWidth ? "${foodName.substring(0, maxWidth - 3)} ..." : foodName;
|
|
||||||
return limitedText;
|
|
||||||
}
|
|
||||||
|
|
||||||
String getToastFoodNameString(Food food,BuildContext? context){
|
|
||||||
int maxWidth = 25;
|
|
||||||
if(context != null){
|
|
||||||
maxWidth = isScreenWidthAbove1000(context) ? 100 : 25;
|
|
||||||
}
|
|
||||||
String limitedText = food.name.length > maxWidth ? "${food.name.substring(0, maxWidth - 3)} ..." : food.name;
|
|
||||||
return limitedText;
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String,List<int>> getMapOfDistinctElementsWithCounterAndCalories(List<Food> foods){
|
|
||||||
Map<String,List<int>> resultMap = <String,List<int>>{};
|
|
||||||
for(int i = 0; i < foods.length;i++){
|
|
||||||
if(!resultMap.keys.contains(foods[i].name)){
|
|
||||||
resultMap.putIfAbsent(foods[i].name, () => [1,foods[i].calories]);
|
|
||||||
}else{
|
|
||||||
resultMap[foods[i].name]![0] = resultMap[foods[i].name]![0] + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return resultMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
List<Food> getListOfDistinctElements(List<Food> foods){
|
|
||||||
List<Food> result = [];
|
|
||||||
for(int i = 0; i < foods.length;i++){
|
|
||||||
if(!result.any((element) => element.id == foods[i].id)){
|
|
||||||
result.add(foods[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../models/food.dart';
|
|
||||||
|
|
||||||
final List<Food> emptyList = [];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void setupTodayBox() async{
|
|
||||||
final todayBox = Hive.box(dotenv.env['TODAY_BOX']!);
|
|
||||||
putIfKeyNotExists(todayBox, 'FRÜHSTÜCK', []);
|
|
||||||
putIfKeyNotExists(todayBox, 'MITTAGESSEN', []);
|
|
||||||
putIfKeyNotExists(todayBox, 'ABENDESSEN', []);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void putIfKeyNotExists(Box box, String key, List<Food> value) {
|
|
||||||
if (!box.containsKey(key)) {
|
|
||||||
box.put(key, value);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +1,25 @@
|
||||||
|
import 'package:ernaehrung/views/navigation/navigationScreen.dart';
|
||||||
|
import 'package:ernaehrung/views/welcome/welcomeScreen.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'app.dart';
|
|
||||||
import 'helper/setup_todaybox.dart';
|
|
||||||
import 'models/food.dart';
|
|
||||||
import 'models/user.dart';
|
|
||||||
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
await dotenv.load(fileName: ".env");
|
|
||||||
await Hive.initFlutter();
|
|
||||||
if (!Hive.isAdapterRegistered(0)) {
|
|
||||||
Hive.registerAdapter(FoodAdapter());
|
|
||||||
}
|
|
||||||
if (!Hive.isAdapterRegistered(1)) {
|
|
||||||
Hive.registerAdapter(UserAdapter());
|
|
||||||
}
|
|
||||||
await Hive.openBox(dotenv.env['PROGRESS_BOX'] ?? 'PROGRESS');
|
|
||||||
await Hive.openBox( dotenv.env['STATISTICS_BOX'] ?? 'STATISTICS');
|
|
||||||
await Hive.openBox(dotenv.env['MAIN_BOX'] ?? 'MAIN');
|
|
||||||
await Hive.openBox(dotenv.env['TODAY_BOX'] ?? 'TODAY');
|
|
||||||
await Hive.openBox<User>(dotenv.env['USER_BOX'] ?? 'USER');
|
|
||||||
setupTodayBox();
|
|
||||||
//Hive.deleteFromDisk();
|
|
||||||
runApp(const AndroidApp());
|
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
runApp(const MyApp());
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyApp extends StatelessWidget {
|
||||||
|
const MyApp({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MaterialApp(
|
||||||
|
title: 'Flutter Demo',
|
||||||
|
theme: ThemeData(
|
||||||
|
primarySwatch: Colors.blue,
|
||||||
|
),
|
||||||
|
home: const WelcomeScreen(),
|
||||||
|
routes: {
|
||||||
|
'/navigation': (context) => const NavigationScreen(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
class CardModel{
|
|
||||||
final String _name;
|
|
||||||
final int _calories;
|
|
||||||
final double _fat;
|
|
||||||
final double _protein;
|
|
||||||
|
|
||||||
CardModel(this._name, this._calories, this._fat, this._protein);
|
|
||||||
|
|
||||||
String get getName => _name;
|
|
||||||
int get getCalories => _calories;
|
|
||||||
double get getFat => _fat;
|
|
||||||
double get getProtein => _protein;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
class CardItem{
|
|
||||||
Image image;
|
|
||||||
String title, description;
|
|
||||||
int caloriesSummary;
|
|
||||||
|
|
||||||
CardItem(this.image, this.title, this.description, this.caloriesSummary);
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
part 'food.g.dart';
|
|
||||||
|
|
||||||
@HiveType(typeId: 0)
|
|
||||||
class Food {
|
|
||||||
Food(this.id, this.name, this.foodGroup, this.calories, this.fatg,
|
|
||||||
this.proteing, this.carbohydrateg, this.sugarsg, this.fiberg);
|
|
||||||
|
|
||||||
Food.fromJson(dynamic json) {
|
|
||||||
id = json['ID'];
|
|
||||||
name = json['name'];
|
|
||||||
foodGroup = json['Food Group'];
|
|
||||||
calories = json['Calories'];
|
|
||||||
fatg = json['Fat (g)'];
|
|
||||||
proteing = json['Protein (g)'];
|
|
||||||
carbohydrateg = json['Carbohydrate (g)'];
|
|
||||||
sugarsg = json['Sugars (g)'];
|
|
||||||
fiberg = json['Fiber (g)'];
|
|
||||||
}
|
|
||||||
|
|
||||||
@HiveField(0)
|
|
||||||
late dynamic id;
|
|
||||||
@HiveField(1)
|
|
||||||
late dynamic name;
|
|
||||||
@HiveField(2)
|
|
||||||
late dynamic foodGroup;
|
|
||||||
@HiveField(3)
|
|
||||||
late dynamic calories;
|
|
||||||
@HiveField(4)
|
|
||||||
late dynamic fatg;
|
|
||||||
@HiveField(5)
|
|
||||||
late dynamic proteing;
|
|
||||||
@HiveField(6)
|
|
||||||
late dynamic carbohydrateg;
|
|
||||||
@HiveField(7)
|
|
||||||
late dynamic sugarsg;
|
|
||||||
@HiveField(8)
|
|
||||||
late dynamic fiberg;
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final map = <String, dynamic>{};
|
|
||||||
map['ID'] = id;
|
|
||||||
map['name'] = name;
|
|
||||||
map['Food Group'] = foodGroup;
|
|
||||||
map['Calories'] = calories;
|
|
||||||
map['Fat (g)'] = fatg;
|
|
||||||
map['Protein (g)'] = proteing;
|
|
||||||
map['Carbohydrate (g)'] = carbohydrateg;
|
|
||||||
map['Sugars (g)'] = sugarsg;
|
|
||||||
map['Fiber (g)'] = fiberg;
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'Food{id: $id, name: $name, foodGroup: $foodGroup, calories: $calories, fatg: $fatg, proteing: $proteing, carbohydrateg: $carbohydrateg, sugarsg: $sugarsg, fiberg: $fiberg}';
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'food.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// TypeAdapterGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
class FoodAdapter extends TypeAdapter<Food> {
|
|
||||||
@override
|
|
||||||
final int typeId = 0;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Food read(BinaryReader reader) {
|
|
||||||
final numOfFields = reader.readByte();
|
|
||||||
final fields = <int, dynamic>{
|
|
||||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
||||||
};
|
|
||||||
return Food(
|
|
||||||
fields[0] as dynamic,
|
|
||||||
fields[1] as dynamic,
|
|
||||||
fields[2] as dynamic,
|
|
||||||
fields[3] as dynamic,
|
|
||||||
fields[4] as dynamic,
|
|
||||||
fields[5] as dynamic,
|
|
||||||
fields[6] as dynamic,
|
|
||||||
fields[7] as dynamic,
|
|
||||||
fields[8] as dynamic,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void write(BinaryWriter writer, Food obj) {
|
|
||||||
writer
|
|
||||||
..writeByte(9)
|
|
||||||
..writeByte(0)
|
|
||||||
..write(obj.id)
|
|
||||||
..writeByte(1)
|
|
||||||
..write(obj.name)
|
|
||||||
..writeByte(2)
|
|
||||||
..write(obj.foodGroup)
|
|
||||||
..writeByte(3)
|
|
||||||
..write(obj.calories)
|
|
||||||
..writeByte(4)
|
|
||||||
..write(obj.fatg)
|
|
||||||
..writeByte(5)
|
|
||||||
..write(obj.proteing)
|
|
||||||
..writeByte(6)
|
|
||||||
..write(obj.carbohydrateg)
|
|
||||||
..writeByte(7)
|
|
||||||
..write(obj.sugarsg)
|
|
||||||
..writeByte(8)
|
|
||||||
..write(obj.fiberg);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode => typeId.hashCode;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is FoodAdapter &&
|
|
||||||
runtimeType == other.runtimeType &&
|
|
||||||
typeId == other.typeId;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
import 'dart:convert';
|
|
||||||
import 'food.dart';
|
|
||||||
import 'package:flutter/services.dart' as root_bundle;
|
|
||||||
|
|
||||||
class FoodDTO {
|
|
||||||
|
|
||||||
static Future<List<Food>> readJson() async {
|
|
||||||
final jsonData =
|
|
||||||
await root_bundle.rootBundle.loadString('assets/json/csvjson_full.json');
|
|
||||||
final list = json.decode(jsonData) as List<dynamic>;
|
|
||||||
return list.map((e) => Food.fromJson(e)).toList();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class FormTextField{
|
|
||||||
final String title;
|
|
||||||
final TextInputType textInputType;
|
|
||||||
final num? maxLength;
|
|
||||||
final String? maxLengthErrorMessage;
|
|
||||||
final String? minLengthErrorMessage;
|
|
||||||
final num? minLength;
|
|
||||||
final num? numericMax;
|
|
||||||
final num? numericMin;
|
|
||||||
final String? numericMaxErrorMessage;
|
|
||||||
final String? numericMinErrorMessage;
|
|
||||||
|
|
||||||
FormTextField(
|
|
||||||
this.title,
|
|
||||||
this.textInputType,
|
|
||||||
this.maxLength,
|
|
||||||
this.maxLengthErrorMessage,
|
|
||||||
this.minLengthErrorMessage,
|
|
||||||
this.minLength,
|
|
||||||
this.numericMax,
|
|
||||||
this.numericMin,
|
|
||||||
this.numericMaxErrorMessage,
|
|
||||||
this.numericMinErrorMessage);
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
part 'user.g.dart';
|
|
||||||
|
|
||||||
@HiveType(typeId: 1)
|
|
||||||
class User {
|
|
||||||
@HiveField(0)
|
|
||||||
final String vorname;
|
|
||||||
@HiveField(1)
|
|
||||||
final String nachname;
|
|
||||||
@HiveField(2)
|
|
||||||
final int gewicht;
|
|
||||||
@HiveField(3)
|
|
||||||
final int groesse;
|
|
||||||
@HiveField(4)
|
|
||||||
final int alter;
|
|
||||||
@HiveField(5)
|
|
||||||
final int kalorien;
|
|
||||||
|
|
||||||
User(this.vorname, this.nachname, this.gewicht, this.groesse, this.alter,
|
|
||||||
this.kalorien);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'User{vorname: $vorname, nachname: $nachname, gewicht: $gewicht, groesse: $groesse, alter: $alter, kalorien: $kalorien}';
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'user.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// TypeAdapterGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
class UserAdapter extends TypeAdapter<User> {
|
|
||||||
@override
|
|
||||||
final int typeId = 1;
|
|
||||||
|
|
||||||
@override
|
|
||||||
User read(BinaryReader reader) {
|
|
||||||
final numOfFields = reader.readByte();
|
|
||||||
final fields = <int, dynamic>{
|
|
||||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
||||||
};
|
|
||||||
return User(
|
|
||||||
fields[0] as String,
|
|
||||||
fields[1] as String,
|
|
||||||
fields[2] as int,
|
|
||||||
fields[3] as int,
|
|
||||||
fields[4] as int,
|
|
||||||
fields[5] as int,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void write(BinaryWriter writer, User obj) {
|
|
||||||
writer
|
|
||||||
..writeByte(6)
|
|
||||||
..writeByte(0)
|
|
||||||
..write(obj.vorname)
|
|
||||||
..writeByte(1)
|
|
||||||
..write(obj.nachname)
|
|
||||||
..writeByte(2)
|
|
||||||
..write(obj.gewicht)
|
|
||||||
..writeByte(3)
|
|
||||||
..write(obj.groesse)
|
|
||||||
..writeByte(4)
|
|
||||||
..write(obj.alter)
|
|
||||||
..writeByte(5)
|
|
||||||
..write(obj.kalorien);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode => typeId.hashCode;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is UserAdapter &&
|
|
||||||
runtimeType == other.runtimeType &&
|
|
||||||
typeId == other.typeId;
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/statistics_page/statistics_page.dart';
|
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/today_page/today_page.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../services/statistics.dart';
|
|
||||||
import 'subpages/progress_page/sub_components/charts/sub_components/tabs/timespan_tabs.dart';
|
|
||||||
import '../user_data_form/user_data_form.dart';
|
|
||||||
import 'subpages/progress_page/progress_page.dart';
|
|
||||||
|
|
||||||
class MainPage extends StatefulWidget {
|
|
||||||
const MainPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
MainPageState createState() => MainPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class MainPageState extends State<MainPage> {
|
|
||||||
List pages = [
|
|
||||||
const TodayPage(title: 'Essensplan'),
|
|
||||||
const ProgressPage(title: 'Gesamtübersicht'),
|
|
||||||
const StatisticsPage(title: 'Statistiken')
|
|
||||||
];
|
|
||||||
|
|
||||||
int currentIndex = 0;
|
|
||||||
|
|
||||||
void onTap(int index) async {
|
|
||||||
setState(() {
|
|
||||||
currentIndex = index;
|
|
||||||
if (currentIndex == 1) {
|
|
||||||
DataService.instance
|
|
||||||
.updateStatisticsTodayBoxByTimespan(TimeSpan.day);
|
|
||||||
} else if (currentIndex == 2) {
|
|
||||||
DataService.instance.updateProgressBoxValues();
|
|
||||||
}
|
|
||||||
pages[currentIndex];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
extendBodyBehindAppBar: false,
|
|
||||||
appBar: AppBar(
|
|
||||||
title: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
pages[currentIndex].title,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => const SettingsPage()),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: Colors.green, // Set the background color to green
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: const [
|
|
||||||
Icon(
|
|
||||||
Icons.account_circle,
|
|
||||||
size: 30,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
foregroundColor: Colors.grey.shade400,
|
|
||||||
elevation: 0,
|
|
||||||
),
|
|
||||||
body: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 8),
|
|
||||||
child: pages[currentIndex],
|
|
||||||
),
|
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
|
||||||
currentIndex: currentIndex,
|
|
||||||
selectedItemColor: Colors.black54,
|
|
||||||
unselectedItemColor: Colors.grey.withOpacity(0.5),
|
|
||||||
showSelectedLabels: false,
|
|
||||||
showUnselectedLabels: false,
|
|
||||||
elevation: 0,
|
|
||||||
onTap: onTap,
|
|
||||||
items: const [
|
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.today), label: 'Today'),
|
|
||||||
BottomNavigationBarItem(
|
|
||||||
icon: Icon(Icons.area_chart), label: 'Progress'),
|
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.apple), label: 'Meal Plan'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'sub_components/charts/progress_charts_overview.dart';
|
|
||||||
import 'sub_components/list_view/progress_all_meals_component.dart';
|
|
||||||
|
|
||||||
class ProgressPage extends StatefulWidget {
|
|
||||||
final String title;
|
|
||||||
final Color backgroundColor = const Color(0xff47a44b);
|
|
||||||
|
|
||||||
const ProgressPage({Key? key, required this.title}) : super(key: key);
|
|
||||||
|
|
||||||
String get getTitle => title;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
||||||
return getTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StatefulWidget> createState() => ProgressState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class ProgressState extends State<ProgressPage> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: const [
|
|
||||||
ProgressChartsOverviewComponent(),
|
|
||||||
ProgressAllMealsComponent(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'sub_components/tabs/timespan_tabs.dart';
|
|
||||||
import 'sub_components/charts/progress_charts.dart';
|
|
||||||
|
|
||||||
class ProgressChartsOverviewComponent extends StatelessWidget {
|
|
||||||
const ProgressChartsOverviewComponent({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8))),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
vertical: 8, horizontal: 16),
|
|
||||||
child: Column(
|
|
||||||
children: const [
|
|
||||||
TimespanTabsComponent(),
|
|
||||||
ProgressChartsComponent(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class HorizontalChartTextComponent extends StatelessWidget {
|
|
||||||
final String name;
|
|
||||||
final bool titleOrSecondary;
|
|
||||||
|
|
||||||
const HorizontalChartTextComponent(this.name, this.titleOrSecondary, {super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Text(name,
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: const Color(0xff000000),
|
|
||||||
fontSize: titleOrSecondary ? 15 : 13,
|
|
||||||
fontWeight: titleOrSecondary ? FontWeight.w600 : FontWeight.w400
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/charts/progress_circular_chart.dart';
|
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/charts/progress_horizontal_chart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../../../../services/statistics.dart';
|
|
||||||
|
|
||||||
class ProgressChartsComponent extends StatelessWidget {
|
|
||||||
final double heightStatisticsContainer = 220.0;
|
|
||||||
final double widthStatisticsContainer = double.infinity;
|
|
||||||
|
|
||||||
const ProgressChartsComponent({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return ValueListenableBuilder<List<double>>(
|
|
||||||
valueListenable: DataService.instance.ingredients,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
return Container(
|
|
||||||
height: heightStatisticsContainer,
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: SizedBox(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
vertical: 0, horizontal: 8),
|
|
||||||
child: FittedBox(
|
|
||||||
child: ProgressCircularChartComponent(value[6].toInt()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
children: [
|
|
||||||
// TODO adjust 200 to values from user box
|
|
||||||
ProgressHorizontalChartComponent(Colors.lightGreen, value[0],
|
|
||||||
value[3].toInt(), "Fat (g)"),
|
|
||||||
ProgressHorizontalChartComponent(Colors.lightGreen, value[1],
|
|
||||||
value[4].toInt(), "Protein (g)"),
|
|
||||||
ProgressHorizontalChartComponent(Colors.lightGreen, value[2],
|
|
||||||
value[5].toInt(), "Carbohydrate (g)"),
|
|
||||||
],
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
|
||||||
import '../../../../../../../../services/statistics.dart';
|
|
||||||
|
|
||||||
class ProgressCircularChartComponent extends StatelessWidget {
|
|
||||||
final int totalCalories;
|
|
||||||
const ProgressCircularChartComponent(this.totalCalories, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return ValueListenableBuilder(
|
|
||||||
valueListenable: DataService.instance.eatenCalories,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
double progress =
|
|
||||||
double.parse((value / totalCalories).toStringAsFixed(1));
|
|
||||||
progress = progress > 1.0 ? 1.0 : progress;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
CircularPercentIndicator(
|
|
||||||
animation: true,
|
|
||||||
radius: 60.0,
|
|
||||||
lineWidth: 5.0,
|
|
||||||
percent: progress,
|
|
||||||
center: Text(
|
|
||||||
"$value/$totalCalories Kcal",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
progressColor: Colors.lightGreen,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/charts/horizontal_chart_text_component.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:percent_indicator/linear_percent_indicator.dart';
|
|
||||||
|
|
||||||
class ProgressHorizontalChartComponent extends StatelessWidget {
|
|
||||||
final Color progressColor;
|
|
||||||
final double value;
|
|
||||||
final int total;
|
|
||||||
final String textName;
|
|
||||||
|
|
||||||
const ProgressHorizontalChartComponent(
|
|
||||||
this.progressColor, this.value, this.total, this.textName,
|
|
||||||
{super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
double progress = double.parse((value/total).toStringAsFixed(1));
|
|
||||||
progress = progress > 1.0 ? 1.0 : progress;
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 8),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
HorizontalChartTextComponent(double.parse(value.toString()).toStringAsFixed(2), true),
|
|
||||||
const SizedBox(height: 4,),
|
|
||||||
LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
lineHeight: 8.0,
|
|
||||||
percent: progress,
|
|
||||||
progressColor: progressColor,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 4,),
|
|
||||||
HorizontalChartTextComponent(textName, false),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/tabs/timespan_tabs_text.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../../../../services/statistics.dart';
|
|
||||||
|
|
||||||
enum TimeSpan {
|
|
||||||
day,
|
|
||||||
week,
|
|
||||||
month
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TimespanTabsComponent extends StatefulWidget {
|
|
||||||
const TimespanTabsComponent({Key? key}) : super(key: key);
|
|
||||||
@override
|
|
||||||
State<StatefulWidget> createState() => _DaysMealPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class _DaysMealPageState extends State<TimespanTabsComponent> {
|
|
||||||
int activatedIndex = 0;
|
|
||||||
|
|
||||||
void updateValue(int index) {
|
|
||||||
setState(() {
|
|
||||||
activatedIndex = index;
|
|
||||||
if(activatedIndex == 0){
|
|
||||||
DataService.instance.updateStatisticsTodayBoxByTimespan(TimeSpan.day);
|
|
||||||
}else if(activatedIndex == 1){
|
|
||||||
DataService.instance.updateStatisticsTodayBoxByTimespan(TimeSpan.week);
|
|
||||||
}else if(activatedIndex == 2){
|
|
||||||
DataService.instance.updateStatisticsTodayBoxByTimespan(TimeSpan.month);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
TimespanTabsTextComponent(
|
|
||||||
timeSpan: TimeSpan.day,
|
|
||||||
textColor: activatedIndex == 0
|
|
||||||
? const Color(0xff47a44b)
|
|
||||||
: const Color(0xff000000),
|
|
||||||
onPressed: updateValue,
|
|
||||||
index: 0
|
|
||||||
|
|
||||||
),
|
|
||||||
TimespanTabsTextComponent(
|
|
||||||
timeSpan: TimeSpan.week,
|
|
||||||
textColor: activatedIndex == 1
|
|
||||||
? const Color(0xff47a44b)
|
|
||||||
: const Color(0xff000000),
|
|
||||||
onPressed: updateValue,
|
|
||||||
index: 1
|
|
||||||
),
|
|
||||||
TimespanTabsTextComponent(
|
|
||||||
timeSpan: TimeSpan.month,
|
|
||||||
textColor: activatedIndex == 2
|
|
||||||
? const Color(0xff47a44b)
|
|
||||||
: const Color(0xff000000),
|
|
||||||
onPressed: updateValue,
|
|
||||||
index: 2
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/tabs/timespan_tabs.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../../../../../../../services/statistics.dart';
|
|
||||||
|
|
||||||
class TimespanTabsTextComponent extends StatelessWidget {
|
|
||||||
late final String timeSpan;
|
|
||||||
late final TimeSpan timespan;
|
|
||||||
Function(int i) onPressed;
|
|
||||||
int index;
|
|
||||||
Color textColor;
|
|
||||||
late DataService statisticsService;
|
|
||||||
|
|
||||||
TimespanTabsTextComponent({super.key, required TimeSpan timeSpan, required this.textColor, required this.onPressed, required this.index}){
|
|
||||||
timespan = timeSpan;
|
|
||||||
switch(timeSpan){
|
|
||||||
case TimeSpan.day:
|
|
||||||
this.timeSpan = 'Tag';
|
|
||||||
break;
|
|
||||||
case TimeSpan.week:
|
|
||||||
this.timeSpan = 'Woche';
|
|
||||||
break;
|
|
||||||
case TimeSpan.month:
|
|
||||||
this.timeSpan = 'Monat';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
onPressed(index);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
timeSpan,
|
|
||||||
style: TextStyle(
|
|
||||||
color: textColor,
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/list_view/progress_food_list.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../../../../../../services/statistics.dart';
|
|
||||||
import '../../../../../shared_components/title.dart';
|
|
||||||
|
|
||||||
class ProgressAllMealsComponent extends StatelessWidget {
|
|
||||||
const ProgressAllMealsComponent({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8))),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const TitleComponent("Alle Mahlzeiten"),
|
|
||||||
ProgressFoodListComponent(
|
|
||||||
box: Hive.box(DataService.instance.progressBoxName),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,134 +0,0 @@
|
||||||
import 'package:basic_utils/basic_utils.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../../helper/format_helper.dart';
|
|
||||||
import '../../../../../../models/food.dart';
|
|
||||||
import '../../../../../search_food/search_food.dart';
|
|
||||||
|
|
||||||
class ProgressCardComponent extends StatefulWidget {
|
|
||||||
final String eatingMealName;
|
|
||||||
final List<Food> selectedMeal;
|
|
||||||
final bool addButtonVisible;
|
|
||||||
|
|
||||||
const ProgressCardComponent(
|
|
||||||
{Key? key,
|
|
||||||
required this.eatingMealName,
|
|
||||||
required this.selectedMeal,
|
|
||||||
this.addButtonVisible = true})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<ProgressCardComponent> createState() => _ProgressCardComponentState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ProgressCardComponentState extends State<ProgressCardComponent> {
|
|
||||||
Route createRoute(String cardName) {
|
|
||||||
return PageRouteBuilder(
|
|
||||||
pageBuilder: (context, animation, secondaryAnimation) =>
|
|
||||||
SearchFoodPage(cardName),
|
|
||||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
|
||||||
const begin = Offset(0.0, 1.0);
|
|
||||||
const end = Offset.zero;
|
|
||||||
const curve = Curves.ease;
|
|
||||||
|
|
||||||
var tween =
|
|
||||||
Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
|
|
||||||
|
|
||||||
return SlideTransition(
|
|
||||||
position: animation.drive(tween),
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
String capitalize(String s) => s[0].toUpperCase() + s.substring(1);
|
|
||||||
|
|
||||||
Widget getElevatedButton() {
|
|
||||||
if (widget.addButtonVisible) {
|
|
||||||
return ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
Navigator.of(context).push(createRoute(widget.eatingMealName));
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
shape: const CircleBorder(),
|
|
||||||
padding: const EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
child: const Text(
|
|
||||||
'+',
|
|
||||||
style: TextStyle(fontSize: 28),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int getCountedCalories() {
|
|
||||||
double calories = 0;
|
|
||||||
for (Food food in widget.selectedMeal) {
|
|
||||||
if (food.calories is int) {
|
|
||||||
calories += food.calories as int;
|
|
||||||
} else if (food.calories is double) {
|
|
||||||
calories += food.calories as double;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return calories.round();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
StringUtils.capitalize(widget.eatingMealName),
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
softWrap: false,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 16),
|
|
||||||
),
|
|
||||||
getElevatedButton(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width * 1,
|
|
||||||
child: ListView.builder(
|
|
||||||
primary: false,
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: getMapOfDistinctElementsWithCounterAndCalories(
|
|
||||||
widget.selectedMeal)
|
|
||||||
.keys
|
|
||||||
.length,
|
|
||||||
itemBuilder: (context, i) {
|
|
||||||
Map<String, List<int>> map =
|
|
||||||
getMapOfDistinctElementsWithCounterAndCalories(
|
|
||||||
widget.selectedMeal);
|
|
||||||
String foodName = map.keys.elementAt(i);
|
|
||||||
List<int> values = map.values.elementAt(i);
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 10.0), // Adjust the padding as needed
|
|
||||||
child: Text(
|
|
||||||
"${i+1}. ${getFoodListStringByFood(foodName, values[0], values[1], context)}",
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
widget.selectedMeal.isNotEmpty
|
|
||||||
? Column(
|
|
||||||
children: [
|
|
||||||
const Divider(),
|
|
||||||
Text("${getCountedCalories()} kcal")
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: const SizedBox.shrink(),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:hive_flutter/adapters.dart';
|
|
||||||
import '../../../../../../helper/cast_helper.dart';
|
|
||||||
import '../../../../../../services/statistics.dart';
|
|
||||||
import 'progress_card.dart';
|
|
||||||
|
|
||||||
class ProgressFoodListComponent extends StatelessWidget {
|
|
||||||
final Box box;
|
|
||||||
const ProgressFoodListComponent({super.key, required this.box});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
|
|
||||||
return ValueListenableBuilder(
|
|
||||||
valueListenable: box.listenable(),
|
|
||||||
builder: (context, box, widget) {
|
|
||||||
final mealTypes = ['FRÜHSTÜCK','MITTAGESSEN','ABENDESSEN']; // Specify the desired orde
|
|
||||||
return ListView.builder(
|
|
||||||
primary: false,
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: box.keys.length,
|
|
||||||
itemBuilder: (context, i) {
|
|
||||||
return ProgressCardComponent(
|
|
||||||
eatingMealName: mealTypes[i],
|
|
||||||
selectedMeal: castDynamicToListFood(box.get(mealTypes[i])),
|
|
||||||
addButtonVisible: box.name != DataService.instance.progressBoxName.toLowerCase(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../helper/format_helper.dart';
|
|
||||||
import '../../../../services/statistics.dart';
|
|
||||||
import 'sub_components/chart.dart';
|
|
||||||
import '../../../shared_components/secondary_text.dart';
|
|
||||||
import '../../../shared_components/title.dart';
|
|
||||||
|
|
||||||
class StatisticsPage extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
final Color backgroundColor = const Color(0xff47a44b);
|
|
||||||
|
|
||||||
const StatisticsPage({Key? key, required this.title}) : super(key: key);
|
|
||||||
|
|
||||||
String get getTitle => title;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
||||||
return getTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
body: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
const ChartComponent(),
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8))),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
||||||
child: ValueListenableBuilder(
|
|
||||||
valueListenable:
|
|
||||||
DataService.instance.weeklyCaloryRanking,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
const TitleComponent(
|
|
||||||
"Lebensmittel mit dem höchsten Kaloriengehalt"),
|
|
||||||
const SizedBox(
|
|
||||||
height: 5,
|
|
||||||
),
|
|
||||||
for (var item in value)
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
SecondaryTextComponent(
|
|
||||||
getWeeklyRankingString(item.name,context),
|
|
||||||
value.indexOf(item)+1
|
|
||||||
),
|
|
||||||
SecondaryTextComponent(
|
|
||||||
item.calories.toString(),
|
|
||||||
null
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,308 +0,0 @@
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../services/statistics.dart';
|
|
||||||
import '../../../../shared_components/secondary_text.dart';
|
|
||||||
import '../../../../shared_components/title.dart';
|
|
||||||
|
|
||||||
class ChartComponent extends StatelessWidget {
|
|
||||||
const ChartComponent({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
BarTouchData get barTouchData => BarTouchData(
|
|
||||||
enabled: false,
|
|
||||||
touchTooltipData: BarTouchTooltipData(
|
|
||||||
tooltipBgColor: Colors.transparent,
|
|
||||||
tooltipPadding: EdgeInsets.zero,
|
|
||||||
tooltipMargin: 4,
|
|
||||||
getTooltipItem: (
|
|
||||||
BarChartGroupData group,
|
|
||||||
int groupIndex,
|
|
||||||
BarChartRodData rod,
|
|
||||||
int rodIndex,
|
|
||||||
) {
|
|
||||||
return BarTooltipItem(
|
|
||||||
rod.toY.round().toString(),
|
|
||||||
const TextStyle(
|
|
||||||
color: Colors.transparent,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
Widget getTitles(double value, TitleMeta meta) {
|
|
||||||
const style = TextStyle(
|
|
||||||
color: Colors.orange,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 14,
|
|
||||||
);
|
|
||||||
String text;
|
|
||||||
switch (value.toInt()) {
|
|
||||||
case 0:
|
|
||||||
text = 'M';
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
text = 'T';
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
text = 'W';
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
text = 'T';
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
text = 'F';
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
text = 'S';
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
text = 'S';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
text = '';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return SideTitleWidget(
|
|
||||||
axisSide: meta.axisSide,
|
|
||||||
space: 4,
|
|
||||||
child: Text(text, style: style),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
FlTitlesData get titlesData => FlTitlesData(
|
|
||||||
show: true,
|
|
||||||
bottomTitles: AxisTitles(
|
|
||||||
sideTitles: SideTitles(
|
|
||||||
showTitles: true,
|
|
||||||
reservedSize: 30,
|
|
||||||
getTitlesWidget: getTitles,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
topTitles: AxisTitles(
|
|
||||||
sideTitles: SideTitles(showTitles: false),
|
|
||||||
),
|
|
||||||
rightTitles: AxisTitles(
|
|
||||||
sideTitles: SideTitles(
|
|
||||||
showTitles: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leftTitles: AxisTitles(
|
|
||||||
sideTitles: SideTitles(
|
|
||||||
showTitles: true,
|
|
||||||
getTitlesWidget: (value, _) {
|
|
||||||
// Return a custom widget for each axis value
|
|
||||||
return Container(
|
|
||||||
constraints:
|
|
||||||
const BoxConstraints.tightFor(width: double.infinity),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 3.0),
|
|
||||||
// Adjust the margin value as needed
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.scaleDown,
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Text(
|
|
||||||
value.toInt().toString(),
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.orange,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
));
|
|
||||||
|
|
||||||
FlBorderData get borderData => FlBorderData(
|
|
||||||
show: true, // Set to true to display the chart border
|
|
||||||
border: const Border(
|
|
||||||
bottom: BorderSide(color: Colors.black, width: 1),
|
|
||||||
left:
|
|
||||||
BorderSide(color: Colors.black, width: 1), // Hide the left border
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8))),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
ValueListenableBuilder(
|
|
||||||
valueListenable: DataService
|
|
||||||
.instance.dailyAverageForCurrentWeek,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
return SizedBox(
|
|
||||||
height: 100,
|
|
||||||
width: 400,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const TitleComponent("Kalorien"),
|
|
||||||
const SizedBox(
|
|
||||||
height: 10,
|
|
||||||
),
|
|
||||||
const SecondaryTextComponent(
|
|
||||||
"Durchschnittlich",
|
|
||||||
null
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"${value.toString()} kcal/Tag",
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 30,
|
|
||||||
fontWeight: FontWeight.w600
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
),
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ValueListenableBuilder(
|
|
||||||
valueListenable:
|
|
||||||
DataService.instance.barChartData,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
return SizedBox(
|
|
||||||
height: 300,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 15,
|
|
||||||
// Adjust the height of the legend as needed
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 8.0),
|
|
||||||
// Adjust the spacing between legend items
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 12,
|
|
||||||
height: 12,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.yellow,
|
|
||||||
// Use the color of the first bar rod for the legend item
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 4.0),
|
|
||||||
// Adjust the spacing between the color indicator and the legend label
|
|
||||||
const Text(
|
|
||||||
'Frühstück',
|
|
||||||
// Replace with your desired legend label
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
12), // Adjust the font size of the legend labels
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 8.0),
|
|
||||||
// Adjust the spacing between legend items
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 12,
|
|
||||||
height: 12,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.red,
|
|
||||||
// Use the color of the first bar rod for the legend item
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 4.0),
|
|
||||||
// Adjust the spacing between the color indicator and the legend label
|
|
||||||
const Text(
|
|
||||||
'Mittagessen',
|
|
||||||
// Replace with your desired legend label
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
12), // Adjust the font size of the legend labels
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 8.0),
|
|
||||||
// Adjust the spacing between legend items
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 12,
|
|
||||||
height: 12,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.green,
|
|
||||||
// Use the color of the first bar rod for the legend item
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 4.0),
|
|
||||||
// Adjust the spacing between the color indicator and the legend label
|
|
||||||
const Text(
|
|
||||||
'Abendessen',
|
|
||||||
// Replace with your desired legend label
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
12), // Adjust the font size of the legend labels
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin:
|
|
||||||
const EdgeInsets.fromLTRB(0, 24, 0, 0),
|
|
||||||
height: 250,
|
|
||||||
child: BarChart(
|
|
||||||
BarChartData(
|
|
||||||
barTouchData: barTouchData,
|
|
||||||
titlesData: titlesData,
|
|
||||||
borderData: borderData,
|
|
||||||
barGroups: value,
|
|
||||||
gridData: FlGridData(show: false),
|
|
||||||
alignment: BarChartAlignment.spaceAround,
|
|
||||||
extraLinesData: ExtraLinesData(
|
|
||||||
horizontalLines: [
|
|
||||||
HorizontalLine(
|
|
||||||
y: DataService.instance.getCaloryTargetForOneDay(), // Specify the y-value where you want the line to be positioned
|
|
||||||
color: Colors.black, // Change the color as per your requirement
|
|
||||||
strokeWidth: 2, // Adjust the width as needed
|
|
||||||
dashArray: [3, 2],
|
|
||||||
label: HorizontalLineLabel(
|
|
||||||
show: true,
|
|
||||||
labelResolver: (x) => "Zielwert"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:hive_flutter/adapters.dart';
|
|
||||||
import '../../../../../services/statistics.dart';
|
|
||||||
import 'today_card/today_card.dart';
|
|
||||||
|
|
||||||
class MealsComponent extends StatelessWidget {
|
|
||||||
MealsComponent({Key? key}) : super(key: key);
|
|
||||||
final List<Color> colors = [Colors.green,Colors.lightGreen,CupertinoColors.systemGreen];
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return ValueListenableBuilder(
|
|
||||||
valueListenable: Hive.box(dotenv.env['TODAY_BOX'] ?? 'TODAY').listenable(),
|
|
||||||
builder: (context, box, widget) {
|
|
||||||
final mealTypes = ['FRÜHSTÜCK','MITTAGESSEN','ABENDESSEN']; // Specify the desired order of meal types
|
|
||||||
return ListView.builder(
|
|
||||||
primary: false,
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: box.keys.length,
|
|
||||||
itemBuilder: (context, i) {
|
|
||||||
String mealTypeAsString = mealTypes[i];
|
|
||||||
return TodayCardComponent(
|
|
||||||
mealTypeAsString,
|
|
||||||
DataService.instance.getMealsOfTodayByMealtype(mealTypeAsString),
|
|
||||||
color: colors[i],
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../../../helper/format_helper.dart';
|
|
||||||
import '../../../../../../../models/food.dart';
|
|
||||||
import 'card_food_item.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class CardDataFoodComponent extends StatelessWidget {
|
|
||||||
final List<Food> foods;
|
|
||||||
final Color color;
|
|
||||||
|
|
||||||
const CardDataFoodComponent(this.foods,this.color, {Key? key,}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
|
|
||||||
child: foods.isNotEmpty ?
|
|
||||||
Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
ListView.builder(
|
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: getMapOfDistinctElementsWithCounterAndCalories(
|
|
||||||
foods)
|
|
||||||
.keys
|
|
||||||
.length,
|
|
||||||
itemBuilder: (context, i) {
|
|
||||||
Map<String, List<int>> map =
|
|
||||||
getMapOfDistinctElementsWithCounterAndCalories(
|
|
||||||
foods);
|
|
||||||
String foodName = map.keys.elementAt(i);
|
|
||||||
List<int> values = map.values.elementAt(i);
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
CardFoodItemComponent(foodName,values),
|
|
||||||
Divider(
|
|
||||||
color: Colors.grey.shade300,
|
|
||||||
thickness: 1.2,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: const Center(
|
|
||||||
child: Text(
|
|
||||||
"Füge jetzt neue Gerichte hinzu!",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.white
|
|
||||||
),
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class CardFoodItemComponent extends StatelessWidget {
|
|
||||||
final String foodName;
|
|
||||||
final List<int> countAndCalories; // [count, calories]
|
|
||||||
|
|
||||||
const CardFoodItemComponent(this.foodName,this.countAndCalories, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.fromLTRB(0, 8, 0, 4),
|
|
||||||
width: double.infinity,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"$foodName - ${countAndCalories[0] * 100}g",
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 17,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: 2,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"\n${countAndCalories[1]} kcal | 100g",
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class CardTitleComponent extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
final String calories;
|
|
||||||
|
|
||||||
const CardTitleComponent(this.title, this.calories, {super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12))
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.symmetric(vertical: 16,horizontal: 16),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(title,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 20
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
calories,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 17
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,92 +0,0 @@
|
||||||
import 'package:basic_utils/basic_utils.dart';
|
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/today_page/sub_components/today_card/sub_components/card_data_food.dart';
|
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/today_page/sub_components/today_card/sub_components/card_title.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../../../../helper/cast_helper.dart';
|
|
||||||
import '../../../../../../models/food.dart';
|
|
||||||
import '../../../../../search_food/search_food.dart';
|
|
||||||
|
|
||||||
class TodayCardComponent extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
final Color color;
|
|
||||||
final List<Food> foods;
|
|
||||||
|
|
||||||
const TodayCardComponent(this.title, this.foods, {super.key, Color? color})
|
|
||||||
: color = color ?? Colors.black;
|
|
||||||
|
|
||||||
Route createRoute(String cardName) {
|
|
||||||
return PageRouteBuilder(
|
|
||||||
pageBuilder: (context, animation, secondaryAnimation) =>
|
|
||||||
SearchFoodPage(cardName),
|
|
||||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
|
||||||
const begin = Offset(0.0, 1.0);
|
|
||||||
const end = Offset.zero;
|
|
||||||
const curve = Curves.ease;
|
|
||||||
|
|
||||||
var tween =
|
|
||||||
Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
|
|
||||||
|
|
||||||
return SlideTransition(
|
|
||||||
position: animation.drive(tween),
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
int countCalories(List<Food> foods){
|
|
||||||
int summary = 0;
|
|
||||||
for(int i=0; i<foods.length;i++){
|
|
||||||
summary += foods[i].calories is int ? foods[i].calories as int : (foods[i].calories as double).round();
|
|
||||||
}
|
|
||||||
|
|
||||||
return summary;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: color,
|
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
|
||||||
),
|
|
||||||
margin: const EdgeInsets.fromLTRB(0, 0, 0, 16),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
CardTitleComponent(
|
|
||||||
StringUtils.capitalize(title),
|
|
||||||
"${countCalories(castDynamicToListFood(foods))} Kalorien",
|
|
||||||
),
|
|
||||||
CardDataFoodComponent(
|
|
||||||
foods,
|
|
||||||
color,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(left: 8, right: 8,bottom: 8),
|
|
||||||
child: ElevatedButton(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
minimumSize: const Size.fromHeight(40),
|
|
||||||
backgroundColor: const Color(0xFFffffff),
|
|
||||||
foregroundColor: color,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
Navigator.of(context).push(createRoute(title));
|
|
||||||
},
|
|
||||||
child: const Text(
|
|
||||||
'+ Gericht hinzufügen',
|
|
||||||
style:TextStyle(
|
|
||||||
fontSize: 17
|
|
||||||
) ,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/today_page/sub_components/meals.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class TodayPage extends StatefulWidget {
|
|
||||||
final String title;
|
|
||||||
final Color backgroundColor = const Color(0xff47a44b);
|
|
||||||
|
|
||||||
const TodayPage({Key? key, required this.title}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<TodayPage> createState() => _TodayPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TodayPageState extends State<TodayPage> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(body: SingleChildScrollView(child: MealsComponent()));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
import 'package:ernaehrung/pages/search_food/sub_components/search.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../models/food.dart';
|
|
||||||
import '../../models/food_dto.dart';
|
|
||||||
|
|
||||||
class SearchFoodPage extends StatefulWidget {
|
|
||||||
final String cardName;
|
|
||||||
const SearchFoodPage(this.cardName, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<SearchFoodPage> createState() => _SearchFoodPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchFoodPageState extends State<SearchFoodPage> {
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SafeArea(
|
|
||||||
top: true,
|
|
||||||
child: Scaffold(
|
|
||||||
extendBodyBehindAppBar: false,
|
|
||||||
extendBody: false,
|
|
||||||
resizeToAvoidBottomInset: false,
|
|
||||||
body: FutureBuilder(
|
|
||||||
future: FoodDTO.readJson(),
|
|
||||||
builder: (BuildContext context, AsyncSnapshot<List<Food>> snapshot) {
|
|
||||||
if (snapshot.hasData) {
|
|
||||||
return SearchComponent(snapshot.data!, widget.cardName);
|
|
||||||
}else {
|
|
||||||
return const Center(
|
|
||||||
child: CircularProgressIndicator(), // Loading animation
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,76 +0,0 @@
|
||||||
import 'package:empty_widget/empty_widget.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../../../models/food.dart';
|
|
||||||
import 'searched_food.dart';
|
|
||||||
|
|
||||||
class SearchComponent extends StatefulWidget {
|
|
||||||
final List<Food> foods;
|
|
||||||
final String cardName;
|
|
||||||
const SearchComponent(this.foods, this.cardName, {super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<SearchComponent> createState() => _SearchComponentState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchComponentState extends State<SearchComponent> {
|
|
||||||
final TextEditingController controller = TextEditingController();
|
|
||||||
late List<Food> allFoods = widget.foods;
|
|
||||||
List<Food> foundedFood = [];
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
constraints: const BoxConstraints.expand(),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0), // Add padding on the X-axis
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
TextField(
|
|
||||||
controller: controller,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16), // Add padding on the X-axis for text input
|
|
||||||
prefix: const Icon(Icons.search),
|
|
||||||
hintText: 'Suche nach Gericht',
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
borderSide: const BorderSide(color: Colors.blue),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onChanged: findOnChanged,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: controller.text.isNotEmpty && foundedFood.isNotEmpty
|
|
||||||
? ListView.builder(
|
|
||||||
itemCount: foundedFood.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
final food = foundedFood[index];
|
|
||||||
return SearchedFoodComponent(food, widget.cardName);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: EmptyWidget(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void findOnChanged(String searchedFood) async{
|
|
||||||
foundedFood =
|
|
||||||
allFoods
|
|
||||||
.where((food) => food.name
|
|
||||||
.toString()
|
|
||||||
.toLowerCase()
|
|
||||||
.startsWith(searchedFood.toLowerCase()))
|
|
||||||
.toList();
|
|
||||||
setState(() {
|
|
||||||
foundedFood;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,202 +0,0 @@
|
||||||
import 'package:assorted_layout_widgets/assorted_layout_widgets.dart';
|
|
||||||
import 'package:basic_utils/basic_utils.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../../../helper/cast_helper.dart';
|
|
||||||
import '../../../helper/format_helper.dart';
|
|
||||||
import '../../../models/food.dart';
|
|
||||||
import '../../../services/statistics.dart';
|
|
||||||
|
|
||||||
class SearchedFoodComponent extends StatefulWidget {
|
|
||||||
final Food food;
|
|
||||||
final String cardName;
|
|
||||||
const SearchedFoodComponent(this.food, this.cardName, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<SearchedFoodComponent> createState() => _SearchFoodComponentState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchFoodComponentState extends State<SearchedFoodComponent> {
|
|
||||||
int counter = 1;
|
|
||||||
void storeFood(int counter, BuildContext context) async {
|
|
||||||
final todayBox = Hive.box(dotenv.env['TODAY_BOX']!);
|
|
||||||
if (!todayBox.isOpen){
|
|
||||||
Hive.openBox(dotenv.env['TODAY_BOX']!);
|
|
||||||
}
|
|
||||||
for(int i = 0; i < counter; i++){
|
|
||||||
DataService.instance.addItemToMainBox(widget.food, widget.cardName);
|
|
||||||
addValuesToList(todayBox, widget.cardName, [widget.food]);
|
|
||||||
}
|
|
||||||
showSuccessToast(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
void showSuccessToast(BuildContext context){
|
|
||||||
Fluttertoast.showToast(
|
|
||||||
msg: "${getToastFoodNameString(widget.food,context)} erfolgreich zu ${StringUtils.capitalize(widget.cardName)} hinzugefügt",
|
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
|
||||||
gravity: ToastGravity.BOTTOM,
|
|
||||||
timeInSecForIosWeb: 5,
|
|
||||||
backgroundColor: Colors.green,
|
|
||||||
textColor: Colors.black,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addValuesToList(box, String key, List<Food> newValues){
|
|
||||||
List<Food> existingList = castDynamicToListFood(box.get(key));
|
|
||||||
for(int i = 0; i < newValues.length;i++){
|
|
||||||
if(!existingList.contains(newValues[i])){
|
|
||||||
existingList.add(newValues[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
box.put(key, existingList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
||||||
margin: const EdgeInsets.only(top: 8),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.lightGreen,
|
|
||||||
borderRadius: BorderRadius.circular(5),
|
|
||||||
),
|
|
||||||
child: WrapSuper(
|
|
||||||
spacing: 32,
|
|
||||||
wrapType: WrapType.balanced,
|
|
||||||
wrapFit: WrapFit.larger,
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.6,
|
|
||||||
child: Text(
|
|
||||||
widget.food.name,
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
softWrap: false,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 20.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.6,
|
|
||||||
child: Text(
|
|
||||||
"${widget.food.calories} kcal | 100g",
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
softWrap: false,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 20.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top:12),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(right :12),
|
|
||||||
child: Container(
|
|
||||||
width: 40,
|
|
||||||
height: 40,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.green,
|
|
||||||
borderRadius: BorderRadius.circular(5),
|
|
||||||
border: Border.all(color: Colors.white),
|
|
||||||
),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
counter = counter > 1 ? counter - 1 : 1;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: const Center(
|
|
||||||
child: Text(
|
|
||||||
"-",
|
|
||||||
style: TextStyle(fontSize: 24, color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
width: 20,
|
|
||||||
child: Text(
|
|
||||||
counter.toString(),
|
|
||||||
style: const TextStyle(fontSize: 24, color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(left:12),
|
|
||||||
child: Container(
|
|
||||||
width: 40,
|
|
||||||
height: 38,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.green,
|
|
||||||
borderRadius: BorderRadius.circular(5),
|
|
||||||
border: Border.all(color: Colors.white),
|
|
||||||
),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
counter++;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: const Center(
|
|
||||||
child: Text(
|
|
||||||
"+",
|
|
||||||
style: TextStyle(fontSize: 24, color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top:12),
|
|
||||||
child: ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
storeFood(counter,context);
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
backgroundColor: Colors.green,
|
|
||||||
shadowColor: Colors.greenAccent,
|
|
||||||
elevation: 3,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(5.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: const Text(
|
|
||||||
'+',
|
|
||||||
style: TextStyle(fontSize: 25),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,175 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../../models/form_builder.dart';
|
|
||||||
import '../../models/user.dart';
|
|
||||||
import 'form_builder_text_field.dart';
|
|
||||||
|
|
||||||
class FormBuilderComponent extends StatefulWidget {
|
|
||||||
final bool lockTextFields;
|
|
||||||
|
|
||||||
const FormBuilderComponent({Key? key, required this.lockTextFields})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<FormBuilderComponent> createState() => _FormBuilderComponentState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _FormBuilderComponentState extends State<FormBuilderComponent> {
|
|
||||||
final formKey = GlobalKey<FormBuilderState>();
|
|
||||||
|
|
||||||
final List<FormTextField> listOfTextField = [
|
|
||||||
FormTextField(
|
|
||||||
"vorname",
|
|
||||||
TextInputType.text,
|
|
||||||
30,
|
|
||||||
"Der Vorname sollte maximal 30 Zeichen lang sein",
|
|
||||||
"Der Vorname sollte mindestens 2 Zeichen lang sein",
|
|
||||||
2,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null),
|
|
||||||
FormTextField(
|
|
||||||
"nachname",
|
|
||||||
TextInputType.text,
|
|
||||||
30,
|
|
||||||
"Der Nachname sollte maximal 30 Zeichen lang sein",
|
|
||||||
"Der Nachname sollte mindestens 2 Zeichen lang sein",
|
|
||||||
2,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null),
|
|
||||||
FormTextField(
|
|
||||||
"gewicht",
|
|
||||||
TextInputType.number,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
200,
|
|
||||||
10,
|
|
||||||
"Der Gewicht sollte maximal 200 kg sein",
|
|
||||||
"Der Gewicht sollte mindestens 10 kg sein"),
|
|
||||||
FormTextField(
|
|
||||||
"groesse",
|
|
||||||
TextInputType.number,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
230,
|
|
||||||
60,
|
|
||||||
"Die Größe sollte maximal 230cm sein",
|
|
||||||
"Die Größe sollte mindestens 60cm sein"),
|
|
||||||
FormTextField(
|
|
||||||
"alter",
|
|
||||||
TextInputType.number,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
99,
|
|
||||||
6,
|
|
||||||
"Das Alter sollte maximal 99 Jahre alt sein",
|
|
||||||
"Das Alter sollte mindestens 6 Jahre alt sein"),
|
|
||||||
FormTextField(
|
|
||||||
"kalorien",
|
|
||||||
TextInputType.number,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
30000,
|
|
||||||
1000,
|
|
||||||
"Die Kalorienanzahl sollte mindestens 30000 Kcal sein",
|
|
||||||
"Die Kalorienanzahl sollte mindestens 1000 Kcal sein")
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return FormBuilder(
|
|
||||||
key: formKey,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
ListView.builder(
|
|
||||||
primary: false,
|
|
||||||
itemCount: listOfTextField.length,
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return FormBuilderTextFieldComponent(
|
|
||||||
widget.lockTextFields, listOfTextField[index]);
|
|
||||||
}),
|
|
||||||
Container(
|
|
||||||
margin:
|
|
||||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 0),
|
|
||||||
width: double.infinity,
|
|
||||||
child: ElevatedButton(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
minimumSize: const Size.fromHeight(40), //
|
|
||||||
backgroundColor: CupertinoColors.systemGreen,
|
|
||||||
foregroundColor: const Color(0xFFffffff),
|
|
||||||
shape: const StadiumBorder(),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
final Box box = Hive.box<User>(dotenv.env['USER_BOX'] ?? 'USER');
|
|
||||||
|
|
||||||
if (widget.lockTextFields) {
|
|
||||||
box.put(
|
|
||||||
"USER",
|
|
||||||
User(
|
|
||||||
formKey.currentState?.fields['vorname']
|
|
||||||
?.value ??
|
|
||||||
box.get("USER").vorname.toString(),
|
|
||||||
formKey.currentState?.fields['nachname']
|
|
||||||
?.value ??
|
|
||||||
box.get("USER").nachname.toString(),
|
|
||||||
int.parse(formKey.currentState?.fields['gewicht']
|
|
||||||
?.value ??
|
|
||||||
box.get("USER").gewicht),
|
|
||||||
int.parse(formKey.currentState?.fields['groesse']
|
|
||||||
?.value ??
|
|
||||||
box.get("USER").groesse),
|
|
||||||
int.parse(formKey.currentState?.fields['alter']?.value ??
|
|
||||||
box.get("USER").alter),
|
|
||||||
int.parse(formKey.currentState?.fields['kalorien']
|
|
||||||
?.value ??
|
|
||||||
box.get("USER").kalorien)));
|
|
||||||
|
|
||||||
ScaffoldMessenger.of(context)
|
|
||||||
.showSnackBar(const SnackBar(
|
|
||||||
duration: Duration(seconds: 2),
|
|
||||||
content: Text('Die Daten wurden erfolgreich gespeichert'),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
box.put(
|
|
||||||
"USER",
|
|
||||||
User(
|
|
||||||
formKey.currentState?.fields['vorname']?.value,
|
|
||||||
formKey.currentState?.fields['nachname']?.value,
|
|
||||||
int.parse(formKey.currentState?.fields['gewicht']?.value),
|
|
||||||
int.parse(formKey.currentState?.fields['groesse']?.value),
|
|
||||||
int.parse(formKey.currentState?.fields['alter']?.value),
|
|
||||||
int.parse(formKey.currentState?.fields['kalorien']?.value)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
Future.delayed(
|
|
||||||
const Duration(seconds: 2),
|
|
||||||
() => Navigator.of(context)
|
|
||||||
.pushNamedAndRemoveUntil('/navigation', (Route<dynamic> route)
|
|
||||||
=> false)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: const Text("Eingaben bestätigen"),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,119 +0,0 @@
|
||||||
import 'package:basic_utils/basic_utils.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
|
||||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../../models/form_builder.dart';
|
|
||||||
import '../../models/user.dart';
|
|
||||||
|
|
||||||
class FormBuilderTextFieldComponent extends StatefulWidget {
|
|
||||||
final bool isSettingsPage;
|
|
||||||
final FormTextField formTextField;
|
|
||||||
|
|
||||||
const FormBuilderTextFieldComponent(this.isSettingsPage, this.formTextField,
|
|
||||||
{super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<FormBuilderTextFieldComponent> createState() => _FormBuilderTextFieldComponentState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _FormBuilderTextFieldComponentState extends State<FormBuilderTextFieldComponent> {
|
|
||||||
bool enable = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 0),
|
|
||||||
child: widget.isSettingsPage
|
|
||||||
? Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
TextFieldChild(widget.isSettingsPage, widget.formTextField, enable: enable,)),
|
|
||||||
enable
|
|
||||||
? IconButton(
|
|
||||||
onPressed: () async {
|
|
||||||
setState(() {
|
|
||||||
enable = !enable;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.lock_open))
|
|
||||||
: IconButton(
|
|
||||||
onPressed: () async {
|
|
||||||
setState(() {
|
|
||||||
enable = !enable;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.lock))
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: TextFieldChild(widget.isSettingsPage, widget.formTextField),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TextFieldChild extends StatelessWidget {
|
|
||||||
final bool isSettingsPage;
|
|
||||||
final FormTextField formTextField;
|
|
||||||
final bool? enable;
|
|
||||||
|
|
||||||
const TextFieldChild(this.isSettingsPage, this.formTextField,
|
|
||||||
{super.key, this.enable = true});
|
|
||||||
|
|
||||||
|
|
||||||
dynamic getInitialValue(FormTextField textField){
|
|
||||||
final User user = Hive.box<User>(dotenv.env['USER_BOX'] ?? 'USER').values.last;
|
|
||||||
if (textField.title == "vorname"){
|
|
||||||
return user.vorname;
|
|
||||||
}else if (textField.title == "nachname"){
|
|
||||||
return user.nachname;
|
|
||||||
}else if (textField.title == "gewicht"){
|
|
||||||
return user.gewicht;
|
|
||||||
}else if (textField.title == "groesse"){
|
|
||||||
return user.groesse;
|
|
||||||
}else if (textField.title == "alter"){
|
|
||||||
return user.alter;
|
|
||||||
}else if (textField.title == "kalorien"){
|
|
||||||
return user.kalorien;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return FormBuilderTextField(
|
|
||||||
name: formTextField.title,
|
|
||||||
enabled: enable!,
|
|
||||||
initialValue: isSettingsPage ? getInitialValue(formTextField).toString() : "",
|
|
||||||
decoration: InputDecoration(
|
|
||||||
border: const OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10.0))),
|
|
||||||
filled: true,
|
|
||||||
hintStyle: TextStyle(color: Colors.grey.shade400),
|
|
||||||
hintText: StringUtils.capitalize(formTextField.title),
|
|
||||||
labelText: StringUtils.capitalize(formTextField.title),
|
|
||||||
fillColor: Colors.white70),
|
|
||||||
keyboardType: formTextField.textInputType,
|
|
||||||
maxLength: TextInputType.number == formTextField.textInputType ? 7 : 30,
|
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
|
||||||
validator: FormBuilderValidators.compose([
|
|
||||||
FormBuilderValidators.required(),
|
|
||||||
|
|
||||||
TextInputType.number == formTextField.textInputType
|
|
||||||
? FormBuilderValidators.max(formTextField.numericMax!,
|
|
||||||
errorText: formTextField.numericMaxErrorMessage)
|
|
||||||
: FormBuilderValidators.maxLength(30,
|
|
||||||
errorText: formTextField.maxLengthErrorMessage),
|
|
||||||
|
|
||||||
TextInputType.number == formTextField.textInputType
|
|
||||||
? FormBuilderValidators.min(formTextField.numericMin!,
|
|
||||||
errorText: formTextField.numericMinErrorMessage)
|
|
||||||
: FormBuilderValidators.minLength(2,
|
|
||||||
errorText: formTextField.minLengthErrorMessage)
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class SecondaryTextComponent extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
final int? rank;
|
|
||||||
|
|
||||||
const SecondaryTextComponent(this.title, this.rank,{Key? key,}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final TextStyle textStyle = TextStyle(
|
|
||||||
color: Colors.grey.shade500,
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
);
|
|
||||||
|
|
||||||
Widget textWidget;
|
|
||||||
|
|
||||||
if (rank != null) {
|
|
||||||
textWidget = Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: getRankColor(rank!),
|
|
||||||
borderRadius: BorderRadius.circular(15),
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'$rank.',
|
|
||||||
style: rank! <= 3 ? textStyle.copyWith(color: Colors.white) :textStyle.copyWith(color: Colors.grey),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 4),
|
|
||||||
Text(
|
|
||||||
title.toString(),
|
|
||||||
style: rank! <= 3 ? textStyle.copyWith(color: Colors.white) :textStyle.copyWith(color: Colors.grey),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
textWidget = Text(
|
|
||||||
title.toString(),
|
|
||||||
style: textStyle,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8.0),
|
|
||||||
child: textWidget,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Color getRankColor(int rank) {
|
|
||||||
if (rank == 1) {
|
|
||||||
return Colors.amber;
|
|
||||||
} else if (rank == 2) {
|
|
||||||
return Colors.grey;
|
|
||||||
} else if (rank == 3) {
|
|
||||||
return Colors.brown;
|
|
||||||
} else {
|
|
||||||
return Colors.transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class TitleComponent extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
|
|
||||||
const TitleComponent(this.title, {super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Text(
|
|
||||||
title.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.orange.shade400,
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../shared_components/form_builder.dart';
|
|
||||||
|
|
||||||
class OnboardingPage extends StatefulWidget {
|
|
||||||
const OnboardingPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<OnboardingPage> createState() => _OnboardingPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _OnboardingPageState extends State<OnboardingPage> {
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
title: const Text(
|
|
||||||
"Welcome",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black
|
|
||||||
),
|
|
||||||
),
|
|
||||||
backgroundColor: Colors.grey.shade100,
|
|
||||||
),
|
|
||||||
body: const FormBuilderComponent(lockTextFields: false,)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import '../shared_components/form_builder.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class SettingsPage extends StatefulWidget {
|
|
||||||
const SettingsPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<SettingsPage> createState() => _SettingsPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SettingsPageState extends State<SettingsPage> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: CupertinoColors.systemGreen,
|
|
||||||
leading: BackButton(
|
|
||||||
onPressed: () async => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
title: const Text('Einstellungen'),
|
|
||||||
),
|
|
||||||
body: const FormBuilderComponent(lockTextFields: true),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,480 +0,0 @@
|
||||||
import 'dart:math';
|
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:hive/hive.dart';
|
|
||||||
import '../pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/tabs/timespan_tabs.dart';
|
|
||||||
import '../models/food.dart';
|
|
||||||
import '../models/user.dart';
|
|
||||||
import '../helper/cast_helper.dart';
|
|
||||||
import '../helper/format_helper.dart';
|
|
||||||
|
|
||||||
class DataService {
|
|
||||||
|
|
||||||
static final DataService _instance = DataService._internal();
|
|
||||||
factory DataService() => _instance;
|
|
||||||
|
|
||||||
static DataService get instance => _instance;
|
|
||||||
|
|
||||||
DataService._internal() {
|
|
||||||
// TO RUN TESTS -> COMMENT initBoxes() out -> HIVE behavior is tested in other tests
|
|
||||||
initBoxes();
|
|
||||||
}
|
|
||||||
String progressBoxName = dotenv.env['PROGRESS_BOX'] ?? 'PROGRESS_BOX';
|
|
||||||
String mainBoxName = dotenv.env['MAIN_BOX'] ?? 'MAIN_BOX';
|
|
||||||
String statisticsBoxName = dotenv.env['STATISTICS_BOX'] ?? 'STATISTICS_BOX';
|
|
||||||
|
|
||||||
ValueNotifier<int> eatenCalories = ValueNotifier<int>(0);
|
|
||||||
/*
|
|
||||||
* fat 0
|
|
||||||
* protein 1
|
|
||||||
* carbon 2
|
|
||||||
* fat for one day, week, month, 3
|
|
||||||
* protein for one day, week, month 4
|
|
||||||
* carbon for one day, week, month 5
|
|
||||||
* calories for one day, week, month 6
|
|
||||||
* */
|
|
||||||
ValueNotifier<List<double>> ingredients = ValueNotifier<List<double>>([0,0,0,0,0,0,0]);
|
|
||||||
ValueNotifier<int> dailyAverageForCurrentWeek = ValueNotifier<int>(0);
|
|
||||||
ValueNotifier<List<Food>> weeklyCaloryRanking = ValueNotifier<List<Food>>([]);
|
|
||||||
ValueNotifier<List<BarChartGroupData>> barChartData = ValueNotifier<List<BarChartGroupData>>([]);
|
|
||||||
|
|
||||||
initBoxes()async{
|
|
||||||
Box reducedBox = Hive.box(progressBoxName);
|
|
||||||
Box progressBox = Hive.box(statisticsBoxName);
|
|
||||||
|
|
||||||
putIfKeyNotExists([reducedBox,progressBox], 'FRÜHSTÜCK', []);
|
|
||||||
putIfKeyNotExists([reducedBox,progressBox], 'MITTAGESSEN', []);
|
|
||||||
putIfKeyNotExists([reducedBox,progressBox], 'ABENDESSEN', []);
|
|
||||||
updateStatisticsTodayBoxByTimespan(TimeSpan.day);
|
|
||||||
}
|
|
||||||
|
|
||||||
void putIfKeyNotExists(List<Box> boxes, String key, dynamic value) {
|
|
||||||
for(int i = 0; i < boxes.length;i++){
|
|
||||||
if (!boxes[i].containsKey(key)) {
|
|
||||||
boxes[i].put(key, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateStatisticsTodayBoxByTimespan(TimeSpan timespan){
|
|
||||||
clearBoxByBox(Hive.box(progressBoxName));
|
|
||||||
int timestamp = getTimestampFromNow();
|
|
||||||
int dayLen = 1;
|
|
||||||
switch(timespan){
|
|
||||||
case TimeSpan.day:
|
|
||||||
getNewFoodAndUpdateBoxByTimestampAndBox(timestamp, Hive.box(progressBoxName));
|
|
||||||
break;
|
|
||||||
case TimeSpan.week:
|
|
||||||
List<int> currentWeek = getTimestampsByTimestampAndTimespan(TimeSpan.week,timestamp);
|
|
||||||
for(int i = 0;i < currentWeek.length;i++){
|
|
||||||
getNewFoodAndUpdateBoxByTimestampAndBox(currentWeek[i],Hive.box(progressBoxName));
|
|
||||||
}
|
|
||||||
dayLen = currentWeek.length;
|
|
||||||
break;
|
|
||||||
case TimeSpan.month:
|
|
||||||
List<int> currentMonth = getTimestampsByTimestampAndTimespan(TimeSpan.month,timestamp);
|
|
||||||
for(int i = 0;i < currentMonth.length;i++){
|
|
||||||
getNewFoodAndUpdateBoxByTimestampAndBox(currentMonth[i],Hive.box(progressBoxName));
|
|
||||||
}
|
|
||||||
dayLen = currentMonth.length;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
updateCalculationsAndNotfiyListenersForPorgressStatistics(dayLen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateCalculationsAndNotfiyListenersForPorgressStatistics(int dayLen){
|
|
||||||
eatenCalories.value = getAllEatenCaloriesByBox(Hive.box(progressBoxName));
|
|
||||||
ingredients.value = getAllEatenIngredientsForTodayStatistics(dayLen.roundToDouble());
|
|
||||||
}
|
|
||||||
|
|
||||||
void getNewFoodAndUpdateBoxByTimestampAndBox(int timestamp, Box box){
|
|
||||||
Map<String,List<Food>> newFood = getFoodMapForGivenTimestampFromMainBox(timestamp);
|
|
||||||
if(newFood.keys.isNotEmpty){
|
|
||||||
setElementsOfBoxByBox(newFood, box);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool timestampIsValid(int timestamp){
|
|
||||||
try{
|
|
||||||
DateTime.fromMillisecondsSinceEpoch(timestamp*1000);
|
|
||||||
return true;
|
|
||||||
}catch(e){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<int> getTimestampsByTimestampAndTimespan(TimeSpan timespan, int timestamp) {
|
|
||||||
if(!timestampIsValid(timestamp)){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
int range = timespan == TimeSpan.week ? 7 : 31;
|
|
||||||
int targetWeekday = DateTime.monday; // Example target weekday (Monday)
|
|
||||||
DateTime currentDateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
|
||||||
int currentWeekday = currentDateTime.weekday;
|
|
||||||
int daysToAdd = targetWeekday - currentWeekday;
|
|
||||||
DateTime targetDateTime = currentDateTime.add(Duration(days: daysToAdd));
|
|
||||||
|
|
||||||
List<int> timestampsForWeekdays = [];
|
|
||||||
for (int i = 0; i < range; i++) {
|
|
||||||
timestampsForWeekdays.add(targetDateTime.millisecondsSinceEpoch ~/ 1000);
|
|
||||||
targetDateTime = targetDateTime.add(const Duration(days: 1));
|
|
||||||
}
|
|
||||||
return timestampsForWeekdays;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearBoxByBox(Box box){
|
|
||||||
for(int i = 0; i < box.keys.length;i++){
|
|
||||||
box.put(box.keys.elementAt(i), []);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setElementsOfBoxByBox(Map<String,List<Food>> newFood,Box box){
|
|
||||||
Iterable<String> keys = newFood.keys;
|
|
||||||
for(int i = 0; i < keys.length;i++){
|
|
||||||
List<Food> alreadyExisting = castDynamicToListFood(box.get(keys.elementAt(i)));
|
|
||||||
alreadyExisting.addAll(newFood[keys.elementAt(i)] as Iterable<Food>);
|
|
||||||
box.put(keys.elementAt(i), alreadyExisting);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getDayAsIntFromTimestamp(int timestamp){
|
|
||||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
|
||||||
return dateTime.day;
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String,List<Food>> getFoodMapForGivenTimestampFromMainBox(int timestamp){
|
|
||||||
Box box = Hive.box(mainBoxName);
|
|
||||||
dynamic matchingTimestamp = getMatchingTimestamp(box, timestamp);
|
|
||||||
if(matchingTimestamp != null){
|
|
||||||
return castDynamicMap(box.get(matchingTimestamp));
|
|
||||||
}
|
|
||||||
return <String,List<Food>>{};
|
|
||||||
}
|
|
||||||
|
|
||||||
getMatchingTimestamp(Box box,int newTimestamp){
|
|
||||||
if(box.keys.isNotEmpty){
|
|
||||||
for(int i = 0; i < box.keys.length;i++){
|
|
||||||
int timestamp = box.keys.elementAt(i);
|
|
||||||
if(isDateEqual(newTimestamp, timestamp)){
|
|
||||||
return timestamp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getMonthAsIntFromTimestamp(int timestamp){
|
|
||||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
|
||||||
return dateTime.month;
|
|
||||||
}
|
|
||||||
|
|
||||||
getYearAsIntFromTimestamp(int timestamp){
|
|
||||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
|
||||||
return dateTime.year;
|
|
||||||
}
|
|
||||||
|
|
||||||
isDateEqual(int timestamp1, int timestamp2){
|
|
||||||
if(!timestampIsValid(timestamp1) || !timestampIsValid(timestamp2)){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return
|
|
||||||
getDayAsIntFromTimestamp(timestamp1) == getDayAsIntFromTimestamp(timestamp2) &&
|
|
||||||
getMonthAsIntFromTimestamp(timestamp1) == getMonthAsIntFromTimestamp(timestamp2) &&
|
|
||||||
getYearAsIntFromTimestamp(timestamp1) == getYearAsIntFromTimestamp(timestamp2);
|
|
||||||
}
|
|
||||||
|
|
||||||
addItemToMainBox(Food value, String mealType){
|
|
||||||
// Hive.deleteFromDisk();
|
|
||||||
Box box = Hive.box(mainBoxName);
|
|
||||||
DateTime dateTime = DateTime.now();
|
|
||||||
|
|
||||||
// DEBUG
|
|
||||||
//DateTime dateTime = getRandomTimestampForTesting();
|
|
||||||
|
|
||||||
int newTimestamp = dateTime.millisecondsSinceEpoch.toInt() ~/ 1000;
|
|
||||||
|
|
||||||
dynamic matchingTimestamp = getMatchingTimestamp(box, newTimestamp);
|
|
||||||
if(matchingTimestamp != null){
|
|
||||||
newTimestamp = matchingTimestamp;
|
|
||||||
}
|
|
||||||
Map<String, List<Food>> valueMap = castDynamicMap(box.get(newTimestamp));
|
|
||||||
List<Food> values = [];
|
|
||||||
if(valueMap.containsKey(mealType)){
|
|
||||||
values = valueMap[mealType]!;
|
|
||||||
}
|
|
||||||
values.add(value);
|
|
||||||
valueMap[mealType] = values;
|
|
||||||
box.put(newTimestamp, valueMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
getRandomTimestampForTesting(){
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
DateTime startOfWeek = now.subtract(Duration(days: now.weekday - 1));
|
|
||||||
DateTime endOfWeek = startOfWeek.add(const Duration(days: 6));
|
|
||||||
|
|
||||||
Random random = Random();
|
|
||||||
int randomMilliseconds = random.nextInt(endOfWeek.millisecondsSinceEpoch - startOfWeek.millisecondsSinceEpoch);
|
|
||||||
DateTime randomTimestamp = startOfWeek.add(Duration(milliseconds: randomMilliseconds));
|
|
||||||
|
|
||||||
return randomTimestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getAllEatenCaloriesByBox(Box box){
|
|
||||||
num sum = 0;
|
|
||||||
for(int i = 0; i < box.keys.length;i++){
|
|
||||||
for(Food food in box.get(box.keys.elementAt(i))){
|
|
||||||
sum += food.calories;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sum as int;
|
|
||||||
}
|
|
||||||
|
|
||||||
double getCaloryTargetForOneDay(){
|
|
||||||
final Box userBox = Hive.box<User>(dotenv.env['USER_BOX'] ?? 'USER');
|
|
||||||
return userBox.get("USER").kalorien.toDouble();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<double> getAllEatenIngredientsForTodayStatistics(double dayLen){
|
|
||||||
Box box = Hive.box(progressBoxName);
|
|
||||||
final Box userBox = Hive.box<User>(dotenv.env['USER_BOX'] ?? 'USER');
|
|
||||||
final calorieSummary = userBox.get("USER").kalorien;
|
|
||||||
|
|
||||||
const double fatPercentPerThousandCalorie = 3.7;
|
|
||||||
const double proteinPercentPerThousandCalorie = 4.5;
|
|
||||||
const double carbsPercentPerThousandCalorie = 12.8;
|
|
||||||
|
|
||||||
double fatSummary = (calorieSummary / 100) * fatPercentPerThousandCalorie;
|
|
||||||
double carbSummary = (calorieSummary / 100) * carbsPercentPerThousandCalorie;
|
|
||||||
double proteinSummary = (calorieSummary / 100) * proteinPercentPerThousandCalorie;
|
|
||||||
|
|
||||||
num fat = 0;
|
|
||||||
num protein = 0;
|
|
||||||
num carbs = 0;
|
|
||||||
for(int i = 0; i < box.keys.length;i++){
|
|
||||||
for(Food food in box.get(box.keys.elementAt(i))){
|
|
||||||
fat += food.fatg;
|
|
||||||
protein += food.proteing;
|
|
||||||
carbs += food.carbohydrateg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
fat.roundToDouble(),
|
|
||||||
protein.roundToDouble(),
|
|
||||||
carbs.roundToDouble(),
|
|
||||||
fatSummary * dayLen,
|
|
||||||
proteinSummary * dayLen,
|
|
||||||
carbSummary * dayLen,
|
|
||||||
calorieSummary * dayLen
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateCalculationsAndNotfiyListenersForTodayStatistics(){
|
|
||||||
dailyAverageForCurrentWeek.value = getAverageCaloriesForCurrentWeekOnDailyBasis();
|
|
||||||
weeklyCaloryRanking.value = getWeeklyCaloryRanking();
|
|
||||||
barChartData.value = getBarChartData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateProgressBoxValues(){
|
|
||||||
Box box = Hive.box(statisticsBoxName);
|
|
||||||
box.clear();
|
|
||||||
int timestamp = getTimestampFromNow();
|
|
||||||
List<int> currentWeek = getTimestampsByTimestampAndTimespan(TimeSpan.week,timestamp);
|
|
||||||
for(int i = 0;i < currentWeek.length;i++){
|
|
||||||
getNewFoodAndUpdateBoxByTimestampAndBox(currentWeek[i],box);
|
|
||||||
}
|
|
||||||
updateCalculationsAndNotfiyListenersForTodayStatistics();
|
|
||||||
}
|
|
||||||
|
|
||||||
int getAverageCaloriesForCurrentWeekOnDailyBasis(){
|
|
||||||
Box box = Hive.box(statisticsBoxName);
|
|
||||||
return getAllEatenCaloriesByBox(box)~/7;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Food> getWeeklyCaloryRanking(){
|
|
||||||
int timestamp = getTimestampFromNow();
|
|
||||||
List<int> currentWeek = getTimestampsByTimestampAndTimespan(TimeSpan.week,timestamp);
|
|
||||||
List<Food> allFoodsOfWeek = [];
|
|
||||||
for(int i = 0;i < currentWeek.length;i++){
|
|
||||||
Map<String,List<Food>> foodFromMainBox = getFoodMapForGivenTimestampFromMainBox(currentWeek[i]);
|
|
||||||
Iterable<String> keys = foodFromMainBox.keys;
|
|
||||||
if(keys.isNotEmpty){
|
|
||||||
for(int i = 0; i < keys.length;i++ ){
|
|
||||||
allFoodsOfWeek.addAll(foodFromMainBox[keys.elementAt(i)] as Iterable<Food>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
allFoodsOfWeek.sort((a, b) => b.calories - a.calories);
|
|
||||||
return getListOfDistinctElements(allFoodsOfWeek);
|
|
||||||
}
|
|
||||||
|
|
||||||
int getSumOfCaloriesByFoodList(List<Food> foods){
|
|
||||||
int sum = 0;
|
|
||||||
for(int i = 0; i < foods.length;i++){
|
|
||||||
try{
|
|
||||||
sum += foods[i].calories as int;
|
|
||||||
}catch(e){
|
|
||||||
throw const FormatException('please check formats');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sum;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BarChartGroupData> getBarChartData(){
|
|
||||||
int timestamp = getTimestampFromNow();
|
|
||||||
List<int> currentWeek = getTimestampsByTimestampAndTimespan(TimeSpan.week,timestamp);
|
|
||||||
int maxValue = 0;
|
|
||||||
List<List<int>> result =
|
|
||||||
[
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
[0,0,0],
|
|
||||||
]; //[[breakfast,lunch,dinner],[breakfast,lunch,dinner] ...]
|
|
||||||
for(int i = 0;i < currentWeek.length;i++){
|
|
||||||
Map<String,List<Food>> foodMapFromMainBoxByTimestamp = getFoodMapForGivenTimestampFromMainBox(currentWeek[i]);
|
|
||||||
Iterable<String> keys = foodMapFromMainBoxByTimestamp.keys;
|
|
||||||
if(keys.isNotEmpty){
|
|
||||||
for(int j = 0; j < keys.length;j++){
|
|
||||||
int value = getSumOfCaloriesByFoodList(foodMapFromMainBoxByTimestamp[keys.elementAt(j)] ?? []);
|
|
||||||
if(value > maxValue){
|
|
||||||
maxValue = value;
|
|
||||||
}
|
|
||||||
result[i][j] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 0,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[0][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[0][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[0][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 1,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[1][0].toDouble(),
|
|
||||||
// First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[1][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[1][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 2,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[2][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[2][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[2][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 3,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[3][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[3][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[3][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
showingTooltipIndicators: [0],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 4,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[4][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[4][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[4][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 5,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[5][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[5][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[5][2].toDouble(), // Second segment color
|
|
||||||
),],
|
|
||||||
),
|
|
||||||
BarChartGroupData(
|
|
||||||
x: 6,
|
|
||||||
barRods: [BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.yellow,
|
|
||||||
toY: result[6][0].toDouble(), // First segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.red,
|
|
||||||
toY: result[6][1].toDouble(), // Second segment color
|
|
||||||
), BarChartRodData(
|
|
||||||
width: 7.5, // Adjust the width of the bar if needed
|
|
||||||
color: Colors.green,
|
|
||||||
toY: result[6][2].toDouble(), // Second segment color
|
|
||||||
),], showingTooltipIndicators: [0],
|
|
||||||
),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
getTimestampFromNow(){
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
return now.millisecondsSinceEpoch.toInt() ~/ 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Food> getMealsOfTodayByMealtype(String mealtype){
|
|
||||||
int timestamp = getTimestampFromNow();
|
|
||||||
return getFoodMapForGivenTimestampFromMainBox(timestamp)[mealtype] ?? [];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
import 'package:card_swiper/card_swiper.dart';
|
||||||
|
import 'package:ernaehrung/components/cardComponent.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class NavigationScreen extends StatefulWidget {
|
||||||
|
const NavigationScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
NavigationScreenState createState() => NavigationScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class NavigationScreenState extends State<NavigationScreen> {
|
||||||
|
int _selectedIndex = 0;
|
||||||
|
final PageController _pageController = PageController(initialPage: 0);
|
||||||
|
|
||||||
|
void _onItemTapped(int index) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
_pageController.animateToPage(index,
|
||||||
|
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: PageView(
|
||||||
|
controller: _pageController,
|
||||||
|
children: _widgetOptions,
|
||||||
|
onPageChanged: (int index) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
|
items: const <BottomNavigationBarItem>[
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.home),
|
||||||
|
label: 'Page 1',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.work),
|
||||||
|
label: 'Page 2',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.school),
|
||||||
|
label: 'Page 3',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
currentIndex: _selectedIndex,
|
||||||
|
onTap: _onItemTapped,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final List<Widget> _widgetOptions = <Widget>[
|
||||||
|
Swiper(
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return const CardComponent(
|
||||||
|
title: 'Page 1',
|
||||||
|
description: 'This is page 1',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: 1,
|
||||||
|
loop: false,
|
||||||
|
),
|
||||||
|
Swiper(
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return const CardComponent(
|
||||||
|
title: 'Page 2',
|
||||||
|
description: 'This is page 2',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: 1,
|
||||||
|
loop: false,
|
||||||
|
),
|
||||||
|
Swiper(
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return const CardComponent(
|
||||||
|
title: 'Page 3',
|
||||||
|
description: 'This is page 3',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: 1,
|
||||||
|
loop: false,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
import 'package:ernaehrung/components/welcomePageChildrenTextField.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class WelcomeScreen extends StatelessWidget {
|
||||||
|
const WelcomeScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const MaterialApp(
|
||||||
|
title: 'Welcome Screen',
|
||||||
|
home: WelcomeScreenPage(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WelcomeScreenPage extends StatefulWidget {
|
||||||
|
const WelcomeScreenPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => WelcomeScreenPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class WelcomeScreenPageState extends State<WelcomeScreenPage> {
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('Welcome Screen'),
|
||||||
|
),
|
||||||
|
body: const SizedBox(
|
||||||
|
height: double.infinity,
|
||||||
|
width: double.infinity,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Form(
|
||||||
|
child: WelcomePageStateTextFieldState(),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dynamic_color/dynamic_color_plugin.h>
|
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
|
||||||
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_color
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
||||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
||||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
|
|
|
@ -5,12 +5,6 @@
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import dynamic_color
|
|
||||||
import macos_ui
|
|
||||||
import path_provider_foundation
|
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
|
||||||
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
|
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
platform :osx, '10.14'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
project 'Runner', {
|
|
||||||
'Debug' => :debug,
|
|
||||||
'Profile' => :release,
|
|
||||||
'Release' => :release,
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutter_root
|
|
||||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
|
|
||||||
unless File.exist?(generated_xcode_build_settings_path)
|
|
||||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
|
||||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
|
||||||
return matches[1].strip if matches
|
|
||||||
end
|
|
||||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
|
|
||||||
end
|
|
||||||
|
|
||||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
|
||||||
|
|
||||||
flutter_macos_podfile_setup
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
use_frameworks!
|
|
||||||
use_modular_headers!
|
|
||||||
|
|
||||||
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
flutter_additional_macos_build_settings(target)
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -0,0 +1,197 @@
|
||||||
|
# Generated by pub
|
||||||
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
|
packages:
|
||||||
|
async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: async
|
||||||
|
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.0"
|
||||||
|
boolean_selector:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: boolean_selector
|
||||||
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
card_swiper:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: card_swiper
|
||||||
|
sha256: "0c94c538f47be1dab52d018d4900a7046b4cb0700dc7f95b8628da89d1212b35"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.4"
|
||||||
|
characters:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: characters
|
||||||
|
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
clock:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: clock
|
||||||
|
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.1"
|
||||||
|
collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: collection
|
||||||
|
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.17.0"
|
||||||
|
cupertino_icons:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: cupertino_icons
|
||||||
|
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.5"
|
||||||
|
fake_async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: fake_async
|
||||||
|
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.1"
|
||||||
|
flutter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
flutter_lints:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: flutter_lints
|
||||||
|
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
|
flutter_test:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.5"
|
||||||
|
lints:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: lints
|
||||||
|
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
|
matcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: matcher
|
||||||
|
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.13"
|
||||||
|
material_color_utilities:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: material_color_utilities
|
||||||
|
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
|
meta:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: meta
|
||||||
|
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.8.0"
|
||||||
|
path:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path
|
||||||
|
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.8.2"
|
||||||
|
sky_engine:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.99"
|
||||||
|
source_span:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_span
|
||||||
|
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.9.1"
|
||||||
|
stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stack_trace
|
||||||
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.11.0"
|
||||||
|
stream_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_channel
|
||||||
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
string_scanner:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: string_scanner
|
||||||
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
term_glyph:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: term_glyph
|
||||||
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
test_api:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_api
|
||||||
|
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.4.16"
|
||||||
|
vector_math:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_math
|
||||||
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
sdks:
|
||||||
|
dart: ">=2.19.6 <3.0.0"
|
||||||
|
flutter: ">=0.1.4"
|
28
pubspec.yaml
28
pubspec.yaml
|
@ -35,26 +35,6 @@ dependencies:
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
animate_gradient: ^0.0.2
|
|
||||||
percent_indicator: ^4.0.1
|
|
||||||
searchable_listview: ^2.4.0
|
|
||||||
empty_widget: ^0.0.5
|
|
||||||
assorted_layout_widgets: ^8.0.0
|
|
||||||
hive: ^2.2.3
|
|
||||||
hive_flutter: ^1.1.0
|
|
||||||
flutter_dotenv: ^5.0.2
|
|
||||||
responsive_framework: ^1.0.0
|
|
||||||
sizer: ^2.0.15
|
|
||||||
fl_chart: ^0.62.0
|
|
||||||
basic_utils: ^5.5.4
|
|
||||||
flutter_form_builder: ^8.0.0
|
|
||||||
form_builder_validators: ^8.0.0
|
|
||||||
fluttertoast: ^8.0.7
|
|
||||||
flutter_profile_picture: ^2.0.0
|
|
||||||
bs_flutter_modal: ^1.0.6
|
|
||||||
adaptive_dialog: ^1.8.3+1
|
|
||||||
path_provider: ^2.0.15
|
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -66,9 +46,6 @@ dev_dependencies:
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
hive_generator: ^2.0.0
|
|
||||||
build_runner: ^2.3.3
|
|
||||||
|
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
@ -80,10 +57,7 @@ flutter:
|
||||||
# included with your application, so that you can use the icons in
|
# included with your application, so that you can use the icons in
|
||||||
# the material Icons class.
|
# the material Icons class.
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
assets:
|
|
||||||
- assets/json/csvjson_full.json
|
|
||||||
- assets/json/csvjson_minified.json
|
|
||||||
- .env
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
# assets:
|
# assets:
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
|
|
|
@ -1,356 +0,0 @@
|
||||||
import 'dart:io';
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
import 'package:hive/src/adapters/date_time_adapter.dart';
|
|
||||||
import 'package:hive/src/hive_impl.dart';
|
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
|
||||||
|
|
||||||
class _TestAdapter extends TypeAdapter<int> {
|
|
||||||
_TestAdapter([this.typeId = 0]);
|
|
||||||
|
|
||||||
@override
|
|
||||||
final int typeId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int read(_) => 5;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void write(_, __) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
// Initialize hive.
|
|
||||||
Hive.initFlutter();
|
|
||||||
|
|
||||||
group('HiveImpl', () {
|
|
||||||
Future<HiveImpl> initHive() async {
|
|
||||||
await Hive.initFlutter();
|
|
||||||
var hive = HiveImpl();
|
|
||||||
|
|
||||||
var path = "/assets/";
|
|
||||||
if (!kIsWeb) {
|
|
||||||
var appDocDir = await getApplicationDocumentsDirectory();
|
|
||||||
path = appDocDir.path;
|
|
||||||
}
|
|
||||||
hive.init(path);
|
|
||||||
return hive;
|
|
||||||
}
|
|
||||||
|
|
||||||
test('.init()', () {
|
|
||||||
var hive = HiveImpl();
|
|
||||||
|
|
||||||
expect(() => hive.init('MYPATH'), returnsNormally);
|
|
||||||
expect(hive.homePath, 'MYPATH');
|
|
||||||
|
|
||||||
expect(
|
|
||||||
hive.findAdapterForValue(DateTime.now())!.adapter,
|
|
||||||
isA<DateTimeWithTimezoneAdapter>(),
|
|
||||||
);
|
|
||||||
expect(hive.findAdapterForTypeId(16)!.adapter, isA<DateTimeAdapter>());
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.openBox()', () {
|
|
||||||
group('box already open', () {
|
|
||||||
test('opened box is returned if it exists', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var testBox = await hive.openBox('TESTBOX');
|
|
||||||
var testBox2 = await hive.openBox('testBox');
|
|
||||||
expect(testBox == testBox2, true);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throw HiveError if opened box is lazy', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await hive.openLazyBox('LAZYBOX');
|
|
||||||
await expectLater(
|
|
||||||
() => hive.openBox('lazyBox'),
|
|
||||||
throwsUnimplementedError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throw HiveError if already opening box is lazy', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await Future.wait([
|
|
||||||
hive.openLazyBox('TESTBOX'),
|
|
||||||
expectLater(hive.openBox('testbox'), throwsUnimplementedError)
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('same box returned if it is already opening', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
Box? box1;
|
|
||||||
Box? box2;
|
|
||||||
await Future.wait([
|
|
||||||
hive.openBox('TESTBOX').then((value) => box1 = value),
|
|
||||||
hive.openBox('testbox').then((value) => box2 = value)
|
|
||||||
]);
|
|
||||||
|
|
||||||
expect(box1 == box2, true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.openLazyBox()', () {
|
|
||||||
group('box already open', () {
|
|
||||||
test('opened box is returned if it exists', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var testBox = await hive.openLazyBox('TESTBOX');
|
|
||||||
var testBox2 = await hive.openLazyBox('testBox');
|
|
||||||
expect(testBox == testBox2, true);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('same box returned if it is already opening', () async {
|
|
||||||
LazyBox? box1;
|
|
||||||
LazyBox? box2;
|
|
||||||
|
|
||||||
var hive = await initHive();
|
|
||||||
await Future.wait([
|
|
||||||
hive.openLazyBox('LAZYBOX').then((value) => box1 = value),
|
|
||||||
hive.openLazyBox('lazyBox').then((value) => box2 = value)
|
|
||||||
]);
|
|
||||||
|
|
||||||
expect(box1 == box2, true);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throw HiveError if opened box is not lazy', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await hive.openBox('LAZYBOX');
|
|
||||||
await expectLater(
|
|
||||||
() => hive.openLazyBox('lazyBox'),
|
|
||||||
throwsUnimplementedError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throw HiveError if already opening box is not lazy', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await Future.wait([
|
|
||||||
hive.openBox('LAZYBOX'),
|
|
||||||
expectLater(hive.openLazyBox('lazyBox'), throwsUnimplementedError)
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.box()', () {
|
|
||||||
test('returns already opened box', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box = await hive.openBox('TESTBOX');
|
|
||||||
expect(hive.box('testBox'), box);
|
|
||||||
expect(() => hive.box('other'), throwsArgumentError);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throws HiveError if box type does not match', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await hive.openBox<int>('INTBOX');
|
|
||||||
expect(
|
|
||||||
() => hive.box('intBox'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.openBox('DYNAMICBOX');
|
|
||||||
expect(
|
|
||||||
() => hive.box<int>('dynamicBox'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.openLazyBox('LAZYBOX');
|
|
||||||
expect(
|
|
||||||
() => hive.box('lazyBox'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.lazyBox()', () {
|
|
||||||
test('returns already opened box', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box = await hive.openLazyBox('TESTBOX');
|
|
||||||
expect(hive.lazyBox('testBox'), box);
|
|
||||||
expect(() => hive.lazyBox('other'), throwsArgumentError);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('throws HiveError if box type does not match', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await hive.openLazyBox<int>('INTBOX');
|
|
||||||
expect(
|
|
||||||
() => hive.lazyBox('intBox'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.openLazyBox('DYNAMICBOX');
|
|
||||||
expect(
|
|
||||||
() => hive.lazyBox<int>('dynamicBox'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.openBox('BOX');
|
|
||||||
expect(
|
|
||||||
() => hive.lazyBox('box'),
|
|
||||||
throwsArgumentError,
|
|
||||||
);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
test('isBoxOpen()', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
await hive.openBox('testBox');
|
|
||||||
|
|
||||||
expect(hive.isBoxOpen('testBox'), true);
|
|
||||||
expect(hive.isBoxOpen('nonExistingBox'), false);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('.close()', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box1 = await hive.openBox('box1');
|
|
||||||
var box2 = await hive.openBox('box2');
|
|
||||||
expect(box1.isOpen, true);
|
|
||||||
expect(box2.isOpen, true);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
expect(box1.isOpen, false);
|
|
||||||
expect(box2.isOpen, false);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('.generateSecureKey()', () {
|
|
||||||
var hive = HiveImpl();
|
|
||||||
|
|
||||||
var key1 = hive.generateSecureKey();
|
|
||||||
var key2 = hive.generateSecureKey();
|
|
||||||
|
|
||||||
expect(key1.length, 32);
|
|
||||||
expect(key2.length, 32);
|
|
||||||
expect(key1, isNot(key2));
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.deleteBoxFromDisk()', () {
|
|
||||||
test('deletes open box', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box1 = await hive.openBox('testBox1');
|
|
||||||
await box1.put('key', 'value');
|
|
||||||
var box1File = File(box1.path!);
|
|
||||||
|
|
||||||
await hive.deleteBoxFromDisk('testBox1');
|
|
||||||
expect(await box1File.exists(), false);
|
|
||||||
expect(hive.isBoxOpen('testBox1'), false);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('deletes closed box', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box1 = await hive.openBox('testBox1');
|
|
||||||
await box1.put('key', 'value');
|
|
||||||
var path = box1.path!;
|
|
||||||
await box1.close();
|
|
||||||
var box1File = File(path);
|
|
||||||
|
|
||||||
await hive.deleteBoxFromDisk('testBox1');
|
|
||||||
expect(await box1File.exists(), false);
|
|
||||||
expect(hive.isBoxOpen('testBox1'), false);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('does nothing if files do not exist', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
await hive.deleteBoxFromDisk('testBox1');
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
test('.deleteFromDisk()', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
|
|
||||||
var box1 = await hive.openBox('testBox1');
|
|
||||||
await box1.put('key', 'value');
|
|
||||||
var box1File = File(box1.path!);
|
|
||||||
|
|
||||||
var box2 = await hive.openBox('testBox2');
|
|
||||||
await box2.put('key', 'value');
|
|
||||||
var box2File = File(box1.path!);
|
|
||||||
|
|
||||||
await hive.deleteFromDisk();
|
|
||||||
expect(await box1File.exists(), false);
|
|
||||||
expect(await box2File.exists(), false);
|
|
||||||
expect(hive.isBoxOpen('testBox1'), false);
|
|
||||||
expect(hive.isBoxOpen('testBox2'), false);
|
|
||||||
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.boxExists()', () {
|
|
||||||
test('returns true if a box was created', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
await hive.openBox('testBox1');
|
|
||||||
expect(await hive.boxExists('testBox1'), true);
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('returns false if no box was created', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
expect(await hive.boxExists('testBox1'), false);
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('returns false if box was created and then deleted', () async {
|
|
||||||
var hive = await initHive();
|
|
||||||
await hive.openBox('testBox1');
|
|
||||||
await hive.deleteBoxFromDisk('testBox1');
|
|
||||||
expect(await hive.boxExists('testBox1'), false);
|
|
||||||
await hive.close();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
group('.resetAdapters()', () {
|
|
||||||
test('returns normally', () async {
|
|
||||||
final hive = await initHive();
|
|
||||||
expect(hive.resetAdapters, returnsNormally);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('clears an adapter', () async {
|
|
||||||
final hive = await initHive();
|
|
||||||
final adapter = _TestAdapter(1);
|
|
||||||
|
|
||||||
expect(hive.isAdapterRegistered(adapter.typeId), isFalse);
|
|
||||||
hive.registerAdapter(adapter);
|
|
||||||
expect(hive.isAdapterRegistered(adapter.typeId), isTrue);
|
|
||||||
|
|
||||||
hive.resetAdapters();
|
|
||||||
expect(hive.isAdapterRegistered(adapter.typeId), isFalse);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,98 +0,0 @@
|
||||||
import 'package:ernaehrung/helper/format_helper.dart';
|
|
||||||
import 'package:ernaehrung/models/food.dart';
|
|
||||||
import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/charts/sub_components/tabs/timespan_tabs.dart';
|
|
||||||
import 'package:ernaehrung/services/statistics.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
|
|
||||||
// TO RUN TESTS COMMENT initBoxes() (services/statistics.dart line 21) out -> HIVE behavior is tested in other tests
|
|
||||||
|
|
||||||
late DataService dataService;
|
|
||||||
Future<void> main() async {
|
|
||||||
await dotenv.load(fileName: ".env");
|
|
||||||
|
|
||||||
setUp(() async {
|
|
||||||
dataService = DataService.instance;
|
|
||||||
});
|
|
||||||
|
|
||||||
tearDown(() async {
|
|
||||||
//await Hive.close(); // Close Hive at the end of tests
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
getTimestampFromNow(){
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
return now.millisecondsSinceEpoch.toInt() ~/ 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
getTimeStampForDateTime(DateTime date){
|
|
||||||
return date.millisecondsSinceEpoch.toInt() ~/ 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
getFoodListValid(){
|
|
||||||
// 1500kcal
|
|
||||||
return [
|
|
||||||
Food(167511, "Testfood","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "TestfoodTestfoodTestfoodTestfood","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","",300,0,0,0,0,0)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
getInvalidFoodList(){
|
|
||||||
return [
|
|
||||||
Food(167512, "","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","",300,0,0,0,0,0),
|
|
||||||
Food(167512, "","","300",0,0,0,0,0),
|
|
||||||
Food(167512, "","",-200,0,0,0,0,0)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
test('check if given timestamp returns valid timespan or catches invalid timestamp', () {
|
|
||||||
List<int> day = dataService.getTimestampsByTimestampAndTimespan(TimeSpan.day,getTimestampFromNow());
|
|
||||||
expect(31, day.length);
|
|
||||||
List<int> week = dataService.getTimestampsByTimestampAndTimespan(TimeSpan.week,getTimestampFromNow());
|
|
||||||
expect(7, week.length);
|
|
||||||
List<int> month = dataService.getTimestampsByTimestampAndTimespan(TimeSpan.month,getTimestampFromNow());
|
|
||||||
expect(31, month.length);
|
|
||||||
List<int> invalidTimestamp = dataService.getTimestampsByTimestampAndTimespan(TimeSpan.month,9999999999999);
|
|
||||||
expect(0, invalidTimestamp.length);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('check if dates are returned correctly from timestamp', () {
|
|
||||||
int day = dataService.getDayAsIntFromTimestamp(getTimestampFromNow());
|
|
||||||
expect(DateTime.now().day, day);
|
|
||||||
int month = dataService.getMonthAsIntFromTimestamp(getTimestampFromNow());
|
|
||||||
expect(DateTime.now().month, month);
|
|
||||||
int year = dataService.getYearAsIntFromTimestamp(getTimestampFromNow());
|
|
||||||
expect(DateTime.now().year, year);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('check if date comparison is right', () {
|
|
||||||
int today = getTimestampFromNow();
|
|
||||||
expect(true,dataService.isDateEqual(today, today));
|
|
||||||
int other = getTimeStampForDateTime(DateTime.utc(2010));
|
|
||||||
expect(false,dataService.isDateEqual(today, other));
|
|
||||||
expect(false,dataService.isDateEqual(9999999999999, today));
|
|
||||||
expect(false,dataService.isDateEqual(other, 9999999999999));
|
|
||||||
expect(false,dataService.isDateEqual(other, -1));
|
|
||||||
expect(false,dataService.isDateEqual(other, 0));
|
|
||||||
});
|
|
||||||
|
|
||||||
test('check if calories are summed up correctly for given food list',() {
|
|
||||||
expect(1500, dataService.getSumOfCaloriesByFoodList(getFoodListValid()));
|
|
||||||
expect(() => dataService.getSumOfCaloriesByFoodList(getInvalidFoodList()),throwsException);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('check if format helper are working right',() {
|
|
||||||
expect(2,getListOfDistinctElements(getFoodListValid()).length);
|
|
||||||
expect(3,getMapOfDistinctElementsWithCounterAndCalories(getFoodListValid()).keys.length);
|
|
||||||
expect("Testfood",getToastFoodNameString(getFoodListValid()[0],null));
|
|
||||||
expect("TestfoodTestfoodTestfo ...",getToastFoodNameString(getFoodListValid()[1],null));
|
|
||||||
Food food = getFoodListValid()[0];
|
|
||||||
expect("Testfood 2 x 600 kcal", getFoodListStringByFood(food.name, 2, 600,null));
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// This is a basic Flutter widget test.
|
||||||
|
//
|
||||||
|
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||||
|
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||||
|
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||||
|
// tree, read text, and verify that the values of widget properties are correct.
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
|
import 'package:ernaehrung/main.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||||
|
// Build our app and trigger a frame.
|
||||||
|
await tester.pumpWidget(const MyApp());
|
||||||
|
|
||||||
|
// Verify that our counter starts at 0.
|
||||||
|
expect(find.text('0'), findsOneWidget);
|
||||||
|
expect(find.text('1'), findsNothing);
|
||||||
|
|
||||||
|
// Tap the '+' icon and trigger a frame.
|
||||||
|
await tester.tap(find.byIcon(Icons.add));
|
||||||
|
await tester.pump();
|
||||||
|
|
||||||
|
// Verify that our counter has incremented.
|
||||||
|
expect(find.text('0'), findsNothing);
|
||||||
|
expect(find.text('1'), findsOneWidget);
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
|
||||||
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
#include <flutter/plugin_registry.h>
|
||||||
|
|
||||||
|
// Registers Flutter plugins.
|
||||||
|
void RegisterPlugins(flutter::PluginRegistry* registry);
|
||||||
|
|
||||||
|
#endif // GENERATED_PLUGIN_REGISTRANT_
|
|
@ -0,0 +1,23 @@
|
||||||
|
#
|
||||||
|
# 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 $<TARGET_FILE:${plugin}_plugin>)
|
||||||
|
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)
|
Loading…
Reference in New Issue