├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner.xcodeproj │ ├── project.xcworkspace │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ └── xcschemes │ └── Runner.xcscheme ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── shahin │ │ │ │ │ └── health_assistance │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── assets ├── fitness_app │ ├── back.png │ ├── bell.png │ ├── area1.png │ ├── area2.png │ ├── area3.png │ ├── bottle.png │ ├── burned.png │ ├── dinner.png │ ├── eaten.png │ ├── glass.png │ ├── lunch.png │ ├── runner.png │ ├── snack.png │ ├── tab_1.png │ ├── tab_1s.png │ ├── tab_2.png │ ├── tab_2s.png │ ├── tab_3.png │ ├── tab_3s.png │ ├── tab_4.png │ ├── tab_4s.png │ └── breakfast.png ├── images │ ├── helpImage.png │ ├── userImage.png │ ├── inviteImage.png │ ├── supportIcon.png │ └── feedbackImage.png ├── fonts │ ├── Roboto-Bold.ttf │ ├── Roboto-Medium.ttf │ ├── WorkSans-Bold.ttf │ ├── Roboto-Regular.ttf │ ├── WorkSans-Medium.ttf │ ├── WorkSans-Regular.ttf │ └── WorkSans-SemiBold.ttf └── introduction_animation │ ├── cycle.png │ ├── medis.png │ ├── relax.png │ ├── welcome.png │ ├── workout.png │ └── care_image.png ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── CMakeLists.txt │ ├── main.cpp │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── flutter │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── .gitignore └── CMakeLists.txt ├── .gitignore ├── test └── widget_test.dart ├── lib ├── fitness_app │ ├── models │ │ ├── tabIcon_data.dart │ │ └── meals_list_data.dart │ ├── fitness_app_theme.dart │ ├── ui_view │ │ ├── title_view.dart │ │ ├── glass_view.dart │ │ ├── area_list_view.dart │ │ ├── running_view.dart │ │ ├── workout_view.dart │ │ └── wave_view.dart │ └── fitness_app_home_screen.dart ├── main.dart ├── introduction_animation │ ├── components │ │ ├── top_back_skip_view.dart │ │ ├── splash_view.dart │ │ ├── welcome_view.dart │ │ ├── relax_view.dart │ │ ├── mood_diary_vew.dart │ │ ├── care_view.dart │ │ └── center_next_button.dart │ └── introduction_animation_screen.dart └── app_theme.dart ├── analysis_options.yaml ├── README.md ├── .metadata ├── pubspec.yaml └── pubspec.lock /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/fitness_app/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/back.png -------------------------------------------------------------------------------- /assets/fitness_app/bell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/bell.png -------------------------------------------------------------------------------- /assets/images/helpImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/images/helpImage.png -------------------------------------------------------------------------------- /assets/images/userImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/images/userImage.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/fitness_app/area1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/area1.png -------------------------------------------------------------------------------- /assets/fitness_app/area2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/area2.png -------------------------------------------------------------------------------- /assets/fitness_app/area3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/area3.png -------------------------------------------------------------------------------- /assets/fitness_app/bottle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/bottle.png -------------------------------------------------------------------------------- /assets/fitness_app/burned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/burned.png -------------------------------------------------------------------------------- /assets/fitness_app/dinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/dinner.png -------------------------------------------------------------------------------- /assets/fitness_app/eaten.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/eaten.png -------------------------------------------------------------------------------- /assets/fitness_app/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/glass.png -------------------------------------------------------------------------------- /assets/fitness_app/lunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/lunch.png -------------------------------------------------------------------------------- /assets/fitness_app/runner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/runner.png -------------------------------------------------------------------------------- /assets/fitness_app/snack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/snack.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_1.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_1s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_1s.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_2.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_2s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_2s.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_3.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_3s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_3s.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_4.png -------------------------------------------------------------------------------- /assets/fitness_app/tab_4s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/tab_4s.png -------------------------------------------------------------------------------- /assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/WorkSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/WorkSans-Bold.ttf -------------------------------------------------------------------------------- /assets/images/inviteImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/images/inviteImage.png -------------------------------------------------------------------------------- /assets/images/supportIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/images/supportIcon.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/fitness_app/breakfast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fitness_app/breakfast.png -------------------------------------------------------------------------------- /assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/WorkSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/WorkSans-Medium.ttf -------------------------------------------------------------------------------- /assets/images/feedbackImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/images/feedbackImage.png -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/fonts/WorkSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/WorkSans-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/WorkSans-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/fonts/WorkSans-SemiBold.ttf -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /assets/introduction_animation/cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/cycle.png -------------------------------------------------------------------------------- /assets/introduction_animation/medis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/medis.png -------------------------------------------------------------------------------- /assets/introduction_animation/relax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/relax.png -------------------------------------------------------------------------------- /assets/introduction_animation/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/welcome.png -------------------------------------------------------------------------------- /assets/introduction_animation/workout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/workout.png -------------------------------------------------------------------------------- /assets/introduction_animation/care_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/assets/introduction_animation/care_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/md-shahin-miah/Health-Assistance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/shahin/health_assistance/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.shahin.health_assistance 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = health_assistance 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.shahin.healthAssistance 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.shahin. All rights reserved. 15 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "health_assistance", 3 | "short_name": "health_assistance", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:health_assistance/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget( MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Disable Windows macros that collide with C++ standard library functions. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 25 | 26 | # Add dependency libraries and include directories. Add any application-specific 27 | # dependencies here. 28 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 29 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 30 | 31 | # Run the Flutter tool portions of the build. This must not be removed. 32 | add_dependencies(${BINARY_NAME} flutter_assemble) 33 | -------------------------------------------------------------------------------- /lib/fitness_app/models/tabIcon_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TabIconData { 4 | TabIconData({ 5 | this.imagePath = '', 6 | this.index = 0, 7 | this.selectedImagePath = '', 8 | this.isSelected = false, 9 | this.animationController, 10 | }); 11 | 12 | String imagePath; 13 | String selectedImagePath; 14 | bool isSelected; 15 | int index; 16 | 17 | AnimationController? animationController; 18 | 19 | static List tabIconsList = [ 20 | TabIconData( 21 | imagePath: 'assets/fitness_app/tab_1.png', 22 | selectedImagePath: 'assets/fitness_app/tab_1s.png', 23 | index: 0, 24 | isSelected: true, 25 | animationController: null, 26 | ), 27 | TabIconData( 28 | imagePath: 'assets/fitness_app/tab_2.png', 29 | selectedImagePath: 'assets/fitness_app/tab_2s.png', 30 | index: 1, 31 | isSelected: false, 32 | animationController: null, 33 | ), 34 | TabIconData( 35 | imagePath: 'assets/fitness_app/tab_3.png', 36 | selectedImagePath: 'assets/fitness_app/tab_3s.png', 37 | index: 2, 38 | isSelected: false, 39 | animationController: null, 40 | ), 41 | TabIconData( 42 | imagePath: 'assets/fitness_app/tab_4.png', 43 | selectedImagePath: 'assets/fitness_app/tab_4s.png', 44 | index: 3, 45 | isSelected: false, 46 | animationController: null, 47 | ), 48 | ]; 49 | } 50 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"health_assistance", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /lib/fitness_app/models/meals_list_data.dart: -------------------------------------------------------------------------------- 1 | class MealsListData { 2 | MealsListData({ 3 | this.imagePath = '', 4 | this.titleTxt = '', 5 | this.startColor = '', 6 | this.endColor = '', 7 | this.meals, 8 | this.kacl = 0, 9 | }); 10 | 11 | String imagePath; 12 | String titleTxt; 13 | String startColor; 14 | String endColor; 15 | List? meals; 16 | int kacl; 17 | 18 | static List tabIconsList = [ 19 | MealsListData( 20 | imagePath: 'assets/fitness_app/breakfast.png', 21 | titleTxt: 'Breakfast', 22 | kacl: 525, 23 | meals: ['Bread,', 'Peanut butter,', 'Apple'], 24 | startColor: '#6F72CA', 25 | endColor: '#1E1466', 26 | 27 | ), 28 | MealsListData( 29 | imagePath: 'assets/fitness_app/lunch.png', 30 | titleTxt: 'Lunch', 31 | kacl: 602, 32 | meals: ['Salmon,', 'Mixed veggies,', 'Avocado'], 33 | startColor: '#21883F', 34 | endColor: '#79B78B', 35 | ), 36 | MealsListData( 37 | imagePath: 'assets/fitness_app/snack.png', 38 | titleTxt: 'Snack', 39 | kacl: 0, 40 | meals: ['Recommend:', '800 kcal'], 41 | startColor: '#FE95B6', 42 | endColor: '#FF5287', 43 | ), 44 | MealsListData( 45 | imagePath: 'assets/fitness_app/dinner.png', 46 | titleTxt: 'Dinner', 47 | kacl: 0, 48 | meals: ['Recommend:', '703 kcal'], 49 | startColor: '#FA7D82', 50 | endColor: '#FFB295', 51 | ), 52 | ]; 53 | } 54 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Health-Assistance 2 | 3 | alt home |alt home| alt home 4 | 5 | alt home |alt home| alt home 6 | 7 | alt home |alt home| alt home 8 | 9 | alt home 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 18 | - platform: android 19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 21 | - platform: ios 22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 24 | - platform: linux 25 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 26 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 27 | - platform: macos 28 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 29 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 30 | - platform: web 31 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 32 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 33 | - platform: windows 34 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 35 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'app_theme.dart'; 5 | import 'introduction_animation/introduction_animation_screen.dart'; 6 | import 'package:flutter/foundation.dart' show kIsWeb; 7 | 8 | void main() async { 9 | WidgetsFlutterBinding.ensureInitialized(); 10 | await SystemChrome.setPreferredOrientations([ 11 | DeviceOrientation.portraitUp, 12 | DeviceOrientation.portraitDown 13 | ]).then((_) => runApp(MyApp())); 14 | } 15 | 16 | class MyApp extends StatelessWidget { 17 | @override 18 | Widget build(BuildContext context) { 19 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( 20 | statusBarColor: Colors.transparent, 21 | statusBarIconBrightness: Brightness.dark, 22 | statusBarBrightness: 23 | !kIsWeb && Platform.isAndroid ? Brightness.dark : Brightness.light, 24 | systemNavigationBarColor: Colors.white, 25 | systemNavigationBarDividerColor: Colors.transparent, 26 | systemNavigationBarIconBrightness: Brightness.dark, 27 | )); 28 | return MaterialApp( 29 | title: 'Fitness assistance UI', 30 | debugShowCheckedModeBanner: false, 31 | theme: ThemeData( 32 | primarySwatch: Colors.blue, 33 | textTheme: AppTheme.textTheme, 34 | platform: TargetPlatform.iOS, 35 | ), 36 | home: const IntroductionAnimationScreen(), 37 | ); 38 | } 39 | } 40 | 41 | class HexColor extends Color { 42 | HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); 43 | 44 | static int _getColorFromHex(String hexColor) { 45 | hexColor = hexColor.toUpperCase().replaceAll('#', ''); 46 | if (hexColor.length == 6) { 47 | hexColor = 'FF' + hexColor; 48 | } 49 | return int.parse(hexColor, radix: 16); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Health Assistance 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | health_assistance 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | health_assistance 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.shahin.health_assistance" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/top_back_skip_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TopBackSkipView extends StatelessWidget { 4 | final AnimationController animationController; 5 | final VoidCallback onBackClick; 6 | final VoidCallback onSkipClick; 7 | 8 | const TopBackSkipView({ 9 | Key? key, 10 | required this.onBackClick, 11 | required this.onSkipClick, 12 | required this.animationController, 13 | }) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final animation = 18 | Tween(begin: const Offset(0, -1), end: const Offset(0.0, 0.0)) 19 | .animate(CurvedAnimation( 20 | parent: animationController, 21 | curve: const Interval( 22 | 0.0, 23 | 0.2, 24 | curve: Curves.fastOutSlowIn, 25 | ), 26 | )); 27 | 28 | // final _backAnimation = 29 | // Tween(begin: Offset(0, 0), end: Offset(-2, 0)) 30 | // .animate(CurvedAnimation( 31 | // parent: animationController, 32 | // curve: Interval( 33 | // 0.6, 34 | // 0.8, 35 | // curve: Curves.fastOutSlowIn, 36 | // ), 37 | // )); 38 | final skipAnimation = Tween(begin: const Offset(0, 0), end: const Offset(2, 0)) 39 | .animate(CurvedAnimation( 40 | parent: animationController, 41 | curve: const Interval( 42 | 0.6, 43 | 0.8, 44 | curve: Curves.fastOutSlowIn, 45 | ), 46 | )); 47 | 48 | return SlideTransition( 49 | position: animation, 50 | child: Padding( 51 | padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), 52 | child: SizedBox( 53 | height: 58, 54 | child: Padding( 55 | padding: const EdgeInsets.only(left: 8, right: 16), 56 | child: Row( 57 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 58 | children: [ 59 | // SlideTransition( 60 | // position: _backAnimation, 61 | // child: 62 | IconButton( 63 | onPressed: onBackClick, 64 | icon: const Icon(Icons.arrow_back_ios_new_rounded), 65 | // ), 66 | ), 67 | SlideTransition( 68 | position: skipAnimation, 69 | child: IconButton( 70 | onPressed: onSkipClick, 71 | icon: const Text('Skip'), 72 | ), 73 | ), 74 | ], 75 | ), 76 | ), 77 | ), 78 | ), 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/fitness_app/fitness_app_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FitnessAppTheme { 4 | FitnessAppTheme._(); 5 | static const Color nearlyWhite = Color(0xFFFAFAFA); 6 | static const Color white = Color(0xFFFFFFFF); 7 | static const Color background = Color(0xFFF2F3F8); 8 | static const Color nearlyDarkBlue = Colors.deepOrangeAccent; 9 | 10 | static const Color nearlyBlue = Colors.deepOrange; 11 | static const Color nearlyBlack = Color(0xFF213333); 12 | static const Color grey = Color(0xFF3A5160); 13 | static const Color dark_grey = Color(0xFF313A44); 14 | 15 | static const Color darkText = Color(0xFF253840); 16 | static const Color darkerText = Color(0xFF17262A); 17 | static const Color lightText = Color(0xFF4A6572); 18 | static const Color deactivatedText = Color(0xFF767676); 19 | static const Color dismissibleBackground = Color(0xFF364A54); 20 | static const Color spacer = Color(0xFFF2F2F2); 21 | static const String fontName = 'Roboto'; 22 | 23 | static const TextTheme textTheme = TextTheme( 24 | headline4: display1, 25 | headline5: headline, 26 | headline6: title, 27 | subtitle2: subtitle, 28 | bodyText2: body2, 29 | bodyText1: body1, 30 | caption: caption, 31 | ); 32 | 33 | static const TextStyle display1 = TextStyle( 34 | fontFamily: fontName, 35 | fontWeight: FontWeight.bold, 36 | fontSize: 36, 37 | letterSpacing: 0.4, 38 | height: 0.9, 39 | color: darkerText, 40 | ); 41 | 42 | static const TextStyle headline = TextStyle( 43 | fontFamily: fontName, 44 | fontWeight: FontWeight.bold, 45 | fontSize: 24, 46 | letterSpacing: 0.27, 47 | color: darkerText, 48 | ); 49 | 50 | static const TextStyle title = TextStyle( 51 | fontFamily: fontName, 52 | fontWeight: FontWeight.bold, 53 | fontSize: 16, 54 | letterSpacing: 0.18, 55 | color: darkerText, 56 | ); 57 | 58 | static const TextStyle subtitle = TextStyle( 59 | fontFamily: fontName, 60 | fontWeight: FontWeight.w400, 61 | fontSize: 14, 62 | letterSpacing: -0.04, 63 | color: darkText, 64 | ); 65 | 66 | static const TextStyle body2 = TextStyle( 67 | fontFamily: fontName, 68 | fontWeight: FontWeight.w400, 69 | fontSize: 14, 70 | letterSpacing: 0.2, 71 | color: darkText, 72 | ); 73 | 74 | static const TextStyle body1 = TextStyle( 75 | fontFamily: fontName, 76 | fontWeight: FontWeight.w400, 77 | fontSize: 16, 78 | letterSpacing: -0.05, 79 | color: darkText, 80 | ); 81 | 82 | static const TextStyle caption = TextStyle( 83 | fontFamily: fontName, 84 | fontWeight: FontWeight.w400, 85 | fontSize: 12, 86 | letterSpacing: 0.2, 87 | color: lightText, // was lightText 88 | ); 89 | } 90 | -------------------------------------------------------------------------------- /lib/app_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppTheme { 4 | AppTheme._(); 5 | 6 | static const Color notWhite = Color(0xFFEDF0F2); 7 | static const Color nearlyWhite = Color(0xFFFEFEFE); 8 | static const Color white = Color(0xFFFFFFFF); 9 | static const Color nearlyDeepOrange = Colors.deepOrange; 10 | static const Color grey = Color(0xFF3A5160); 11 | static const Color dark_grey = Color(0xFF313A44); 12 | 13 | static const Color darkText = Color(0xFF253840); 14 | static const Color darkerText = Color(0xFF17262A); 15 | static const Color lightText = Color(0xFF4A6572); 16 | static const Color deactivatedText = Color(0xFF767676); 17 | static const Color dismissibleBackground = Color(0xFF364A54); 18 | static const Color chipBackground = Color(0xFFEEF1F3); 19 | static const Color spacer = Color(0xFFF2F2F2); 20 | static const String fontName = 'WorkSans'; 21 | 22 | static const TextTheme textTheme = TextTheme( 23 | headline4: display1, 24 | headline5: headline, 25 | headline6: title, 26 | subtitle2: subtitle, 27 | bodyText2: body2, 28 | bodyText1: body1, 29 | caption: caption, 30 | ); 31 | 32 | static const TextStyle display1 = TextStyle( // h4 -> display1 33 | fontFamily: fontName, 34 | fontWeight: FontWeight.bold, 35 | fontSize: 36, 36 | letterSpacing: 0.4, 37 | height: 0.9, 38 | color: darkerText, 39 | ); 40 | 41 | static const TextStyle headline = TextStyle( // h5 -> headline 42 | fontFamily: fontName, 43 | fontWeight: FontWeight.bold, 44 | fontSize: 24, 45 | letterSpacing: 0.27, 46 | color: darkerText, 47 | ); 48 | 49 | static const TextStyle title = TextStyle( // h6 -> title 50 | fontFamily: fontName, 51 | fontWeight: FontWeight.bold, 52 | fontSize: 16, 53 | letterSpacing: 0.18, 54 | color: darkerText, 55 | ); 56 | 57 | static const TextStyle subtitle = TextStyle( // subtitle2 -> subtitle 58 | fontFamily: fontName, 59 | fontWeight: FontWeight.w400, 60 | fontSize: 14, 61 | letterSpacing: -0.04, 62 | color: darkText, 63 | ); 64 | 65 | static const TextStyle body2 = TextStyle( // body1 -> body2 66 | fontFamily: fontName, 67 | fontWeight: FontWeight.w400, 68 | fontSize: 14, 69 | letterSpacing: 0.2, 70 | color: darkText, 71 | ); 72 | 73 | static const TextStyle body1 = TextStyle( // body2 -> body1 74 | fontFamily: fontName, 75 | fontWeight: FontWeight.w400, 76 | fontSize: 16, 77 | letterSpacing: -0.05, 78 | color: darkText, 79 | ); 80 | 81 | static const TextStyle caption = TextStyle( // Caption -> caption 82 | fontFamily: fontName, 83 | fontWeight: FontWeight.w400, 84 | fontSize: 12, 85 | letterSpacing: 0.2, 86 | color: lightText, // was lightText 87 | ); 88 | 89 | } 90 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/splash_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashView extends StatefulWidget { 4 | final AnimationController animationController; 5 | 6 | const SplashView({Key? key, required this.animationController}) 7 | : super(key: key); 8 | 9 | @override 10 | _SplashViewState createState() => _SplashViewState(); 11 | } 12 | 13 | class _SplashViewState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | final introductionanimation = 17 | Tween(begin: const Offset(0, 0), end: const Offset(0.0, -1.0)) 18 | .animate(CurvedAnimation( 19 | parent: widget.animationController, 20 | curve: const Interval( 21 | 0.0, 22 | 0.2, 23 | curve: Curves.fastOutSlowIn, 24 | ), 25 | )); 26 | return SlideTransition( 27 | position: introductionanimation, 28 | child: SingleChildScrollView( 29 | child: Column( 30 | children: [ 31 | SizedBox( 32 | width: MediaQuery.of(context).size.width, 33 | height: MediaQuery.of(context).size.height/2, 34 | child: Image.asset( 35 | 'assets/introduction_animation/medis.png', 36 | fit: BoxFit.fitHeight, 37 | ), 38 | ), 39 | const Padding( 40 | padding: EdgeInsets.only(top: 18.0, bottom: 8.0), 41 | child: Text( 42 | "Meditation", 43 | style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), 44 | ), 45 | ), 46 | const Padding( 47 | padding: EdgeInsets.only(left: 64, right: 64), 48 | child: Text( 49 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 50 | textAlign: TextAlign.center, 51 | ), 52 | ), 53 | const SizedBox( 54 | height: 48, 55 | ), 56 | Padding( 57 | padding: EdgeInsets.only( 58 | bottom: MediaQuery.of(context).padding.bottom + 16), 59 | child: InkWell( 60 | onTap: () { 61 | widget.animationController.animateTo(0.2); 62 | }, 63 | child: Container( 64 | height: 58, 65 | padding: const EdgeInsets.only( 66 | left: 56.0, 67 | right: 56.0, 68 | top: 16, 69 | bottom: 16, 70 | ), 71 | decoration: BoxDecoration( 72 | borderRadius: BorderRadius.circular(38.0), 73 | color: Colors.deepOrange, 74 | ), 75 | child: const Text( 76 | "Let's Start", 77 | style: TextStyle( 78 | fontSize: 18, 79 | color: Colors.white, 80 | ), 81 | ), 82 | ), 83 | ), 84 | ), 85 | ], 86 | ), 87 | ), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/welcome_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WelcomeView extends StatelessWidget { 4 | final AnimationController animationController; 5 | const WelcomeView({Key? key, required this.animationController}) 6 | : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | final firstHalfAnimation = 11 | Tween(begin: const Offset(1, 0), end: const Offset(0, 0)).animate( 12 | CurvedAnimation( 13 | parent: animationController, 14 | curve: const Interval( 15 | 0.6, 16 | 0.8, 17 | curve: Curves.fastOutSlowIn, 18 | ), 19 | ), 20 | ); 21 | final secondHalfAnimation = 22 | Tween(begin: const Offset(0, 0), end: const Offset(-1, 0)).animate( 23 | CurvedAnimation( 24 | parent: animationController, 25 | curve: const Interval( 26 | 0.8, 27 | 1.0, 28 | curve: Curves.fastOutSlowIn, 29 | ), 30 | ), 31 | ); 32 | 33 | final welcomeFirstHalfAnimation = 34 | Tween(begin: const Offset(2, 0), end: const Offset(0, 0)) 35 | .animate(CurvedAnimation( 36 | parent: animationController, 37 | curve: const Interval( 38 | 0.6, 39 | 0.8, 40 | curve: Curves.fastOutSlowIn, 41 | ), 42 | )); 43 | 44 | final welcomeImageAnimation = 45 | Tween(begin: const Offset(4, 0), end: const Offset(0, 0)) 46 | .animate(CurvedAnimation( 47 | parent: animationController, 48 | curve: const Interval( 49 | 0.6, 50 | 0.8, 51 | curve: Curves.fastOutSlowIn, 52 | ), 53 | )); 54 | return SlideTransition( 55 | position: firstHalfAnimation, 56 | child: SlideTransition( 57 | position: secondHalfAnimation, 58 | child: Padding( 59 | padding: const EdgeInsets.only(bottom: 100), 60 | child: Column( 61 | mainAxisAlignment: MainAxisAlignment.center, 62 | children: [ 63 | SlideTransition( 64 | position: welcomeImageAnimation, 65 | child: Container( 66 | constraints: const BoxConstraints(maxWidth: 350, maxHeight: 350), 67 | child: Image.asset( 68 | 'assets/introduction_animation/welcome.png', 69 | fit: BoxFit.contain, 70 | ), 71 | ), 72 | ), 73 | SlideTransition( 74 | position: welcomeFirstHalfAnimation, 75 | child: const Text( 76 | "Welcome", 77 | style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), 78 | ), 79 | ), 80 | const Padding( 81 | padding: 82 | EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), 83 | child: Text( 84 | "Stay organised and live stress-free with you-do app", 85 | textAlign: TextAlign.center, 86 | ), 87 | ), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/title_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../fitness_app_theme.dart'; 4 | 5 | class TitleView extends StatelessWidget { 6 | final String titleTxt; 7 | final String subTxt; 8 | final AnimationController? animationController; 9 | final Animation? animation; 10 | 11 | const TitleView( 12 | {Key? key, 13 | this.titleTxt: "", 14 | this.subTxt: "", 15 | this.animationController, 16 | this.animation}) 17 | : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return AnimatedBuilder( 22 | animation: animationController!, 23 | builder: (BuildContext context, Widget? child) { 24 | return FadeTransition( 25 | opacity: animation!, 26 | child: Transform( 27 | transform: Matrix4.translationValues( 28 | 0.0, 30 * (1.0 - animation!.value), 0.0), 29 | child: Padding( 30 | padding: const EdgeInsets.only(left: 24, right: 24), 31 | child: Row( 32 | children: [ 33 | Expanded( 34 | child: Text( 35 | titleTxt, 36 | textAlign: TextAlign.left, 37 | style: const TextStyle( 38 | fontFamily: FitnessAppTheme.fontName, 39 | fontWeight: FontWeight.w500, 40 | fontSize: 18, 41 | letterSpacing: 0.5, 42 | color: FitnessAppTheme.lightText, 43 | ), 44 | ), 45 | ), 46 | InkWell( 47 | highlightColor: Colors.transparent, 48 | borderRadius: BorderRadius.all(Radius.circular(4.0)), 49 | onTap: () {}, 50 | child: Padding( 51 | padding: const EdgeInsets.only(left: 8), 52 | child: Row( 53 | children: [ 54 | Text( 55 | subTxt, 56 | textAlign: TextAlign.left, 57 | style: const TextStyle( 58 | fontFamily: FitnessAppTheme.fontName, 59 | fontWeight: FontWeight.normal, 60 | fontSize: 16, 61 | letterSpacing: 0.5, 62 | color: FitnessAppTheme.nearlyDarkBlue, 63 | ), 64 | ), 65 | const SizedBox( 66 | height: 38, 67 | width: 26, 68 | child: Icon( 69 | Icons.arrow_forward, 70 | color: FitnessAppTheme.darkText, 71 | size: 18, 72 | ), 73 | ), 74 | ], 75 | ), 76 | ), 77 | ) 78 | ], 79 | ), 80 | ), 81 | ), 82 | ); 83 | }, 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.shahin" "\0" 93 | VALUE "FileDescription", "health_assistance" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "health_assistance" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.shahin. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "health_assistance.exe" "\0" 98 | VALUE "ProductName", "health_assistance" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/fitness_app/fitness_app_home_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:health_assistance/fitness_app/training/training_screen.dart'; 4 | import 'bottom_navigation_view/bottom_bar_view.dart'; 5 | import 'fitness_app_theme.dart'; 6 | import 'models/tabIcon_data.dart'; 7 | import 'my_diary/my_diary_screen.dart'; 8 | 9 | class FitnessAppHomeScreen extends StatefulWidget { 10 | @override 11 | _FitnessAppHomeScreenState createState() => _FitnessAppHomeScreenState(); 12 | } 13 | 14 | class _FitnessAppHomeScreenState extends State 15 | with TickerProviderStateMixin { 16 | AnimationController? animationController; 17 | 18 | List tabIconsList = TabIconData.tabIconsList; 19 | 20 | Widget tabBody = Container( 21 | color: FitnessAppTheme.background, 22 | ); 23 | 24 | @override 25 | void initState() { 26 | tabIconsList.forEach((TabIconData tab) { 27 | tab.isSelected = false; 28 | }); 29 | tabIconsList[0].isSelected = true; 30 | 31 | animationController = AnimationController( 32 | duration: const Duration(milliseconds: 600), vsync: this); 33 | tabBody = MyDiaryScreen(animationController: animationController); 34 | super.initState(); 35 | } 36 | 37 | @override 38 | void dispose() { 39 | animationController?.dispose(); 40 | super.dispose(); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return Container( 46 | color: FitnessAppTheme.background, 47 | child: Scaffold( 48 | backgroundColor: Colors.transparent, 49 | body: FutureBuilder( 50 | future: getData(), 51 | builder: (BuildContext context, AsyncSnapshot snapshot) { 52 | if (!snapshot.hasData) { 53 | return const SizedBox(); 54 | } else { 55 | return Stack( 56 | children: [ 57 | tabBody, 58 | bottomBar(), 59 | ], 60 | ); 61 | } 62 | }, 63 | ), 64 | ), 65 | ); 66 | } 67 | 68 | Future getData() async { 69 | await Future.delayed(const Duration(milliseconds: 200)); 70 | return true; 71 | } 72 | 73 | Widget bottomBar() { 74 | return Column( 75 | children: [ 76 | const Expanded( 77 | child: SizedBox(), 78 | ), 79 | BottomBarView( 80 | tabIconsList: tabIconsList, 81 | addClick: () {}, 82 | changeIndex: (int index) { 83 | if (index == 0 || index == 2) { 84 | animationController?.reverse().then((data) { 85 | if (!mounted) { 86 | return; 87 | } 88 | setState(() { 89 | tabBody = 90 | MyDiaryScreen(animationController: animationController); 91 | }); 92 | }); 93 | } else if (index == 1 || index == 3) { 94 | animationController?.reverse().then((data) { 95 | if (!mounted) { 96 | return; 97 | } 98 | setState(() { 99 | tabBody = 100 | TrainingScreen(animationController: animationController); 101 | }); 102 | }); 103 | } 104 | }, 105 | ), 106 | ], 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/relax_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RelaxView extends StatelessWidget { 4 | final AnimationController animationController; 5 | 6 | const RelaxView({Key? key, required this.animationController}) 7 | : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final firstHalfAnimation = 12 | Tween(begin: const Offset(0, 1), end: const Offset(0, 0)).animate( 13 | CurvedAnimation( 14 | parent: animationController, 15 | curve: const Interval( 16 | 0.0, 17 | 0.2, 18 | curve: Curves.fastOutSlowIn, 19 | ), 20 | ), 21 | ); 22 | final secondHalfAnimation = 23 | Tween(begin: const Offset(0, 0), end: const Offset(-1, 0)).animate( 24 | CurvedAnimation( 25 | parent: animationController, 26 | curve: const Interval( 27 | 0.2, 28 | 0.4, 29 | curve: Curves.fastOutSlowIn, 30 | ), 31 | ), 32 | ); 33 | final textAnimation = 34 | Tween(begin: const Offset(0, 0), end: const Offset(-2, 0)).animate( 35 | CurvedAnimation( 36 | parent: animationController, 37 | curve: const Interval( 38 | 0.2, 39 | 0.4, 40 | curve: Curves.fastOutSlowIn, 41 | ), 42 | ), 43 | ); 44 | final imageAnimation = 45 | Tween(begin: const Offset(0, 0), end: const Offset(-4, 0)).animate( 46 | CurvedAnimation( 47 | parent: animationController, 48 | curve: const Interval( 49 | 0.2, 50 | 0.4, 51 | curve: Curves.fastOutSlowIn, 52 | ), 53 | ), 54 | ); 55 | 56 | final relaxAnimation = 57 | Tween(begin: const Offset(0, -2), end: const Offset(0, 0)).animate( 58 | CurvedAnimation( 59 | parent: animationController, 60 | curve: const Interval( 61 | 0.0, 62 | 0.2, 63 | curve: Curves.fastOutSlowIn, 64 | ), 65 | ), 66 | ); 67 | return SlideTransition( 68 | position: firstHalfAnimation, 69 | child: SlideTransition( 70 | position: secondHalfAnimation, 71 | child: Padding( 72 | padding: const EdgeInsets.only(bottom: 100), 73 | child: Column( 74 | mainAxisAlignment: MainAxisAlignment.center, 75 | children: [ 76 | SlideTransition( 77 | position: relaxAnimation, 78 | child: const Text( 79 | "Relax", 80 | style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), 81 | ), 82 | ), 83 | SlideTransition( 84 | position: textAnimation, 85 | child: const Padding( 86 | padding: 87 | EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), 88 | child: Text( 89 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 90 | textAlign: TextAlign.center, 91 | ), 92 | ), 93 | ), 94 | SlideTransition( 95 | position: imageAnimation, 96 | child: Container( 97 | constraints: const BoxConstraints(maxWidth: 350, maxHeight: 250), 98 | child: Image.asset( 99 | 'assets/introduction_animation/relax.png', 100 | fit: BoxFit.contain, 101 | ), 102 | ), 103 | ), 104 | ], 105 | ), 106 | ), 107 | ), 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/glass_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../main.dart'; 4 | import '../fitness_app_theme.dart'; 5 | 6 | class GlassView extends StatelessWidget { 7 | final AnimationController? animationController; 8 | final Animation? animation; 9 | 10 | const GlassView({Key? key, this.animationController, this.animation}) 11 | : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | return AnimatedBuilder( 15 | animation: animationController!, 16 | builder: (BuildContext context, Widget? child) { 17 | return FadeTransition( 18 | opacity: animation!, 19 | child: Transform( 20 | transform: new Matrix4.translationValues( 21 | 0.0, 30 * (1.0 - animation!.value), 0.0), 22 | child: Column( 23 | children: [ 24 | Padding( 25 | padding: const EdgeInsets.only( 26 | left: 24, right: 24, top: 0, bottom: 24), 27 | child: Stack( 28 | clipBehavior: Clip.none, 29 | children: [ 30 | Padding( 31 | padding: const EdgeInsets.only(top: 16), 32 | child: Container( 33 | decoration: BoxDecoration( 34 | color: HexColor("#D7E0F9"), 35 | borderRadius: const BorderRadius.only( 36 | topLeft: Radius.circular(8.0), 37 | bottomLeft: Radius.circular(8.0), 38 | bottomRight: Radius.circular(8.0), 39 | topRight: Radius.circular(8.0)), 40 | // boxShadow: [ 41 | // BoxShadow( 42 | // color: FitnessAppTheme.grey.withOpacity(0.2), 43 | // offset: Offset(1.1, 1.1), 44 | // blurRadius: 10.0), 45 | // ], 46 | ), 47 | child: Column( 48 | children: [ 49 | Padding( 50 | padding: const EdgeInsets.only( 51 | left: 68, bottom: 12, right: 16, top: 12), 52 | child: Text( 53 | 'Prepare your stomach for lunch with one or two glass of water', 54 | textAlign: TextAlign.left, 55 | style: TextStyle( 56 | fontFamily: FitnessAppTheme.fontName, 57 | fontWeight: FontWeight.w500, 58 | fontSize: 14, 59 | letterSpacing: 0.0, 60 | color: FitnessAppTheme.nearlyDarkBlue 61 | .withOpacity(0.6), 62 | ), 63 | ), 64 | ), 65 | ], 66 | ), 67 | ), 68 | ), 69 | Positioned( 70 | top: -12, 71 | left: 0, 72 | child: SizedBox( 73 | width: 80, 74 | height: 80, 75 | child: Image.asset("assets/fitness_app/glass.png"), 76 | ), 77 | ) 78 | ], 79 | ), 80 | ), 81 | ], 82 | ), 83 | ), 84 | ); 85 | }, 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: health_assistance 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.17.6 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | font_awesome_flutter: ^10.1.0 34 | flutter_rating_bar: ^4.0.1 35 | intl: ^0.17.0 36 | animations: ^2.0.3 37 | 38 | # The following adds the Cupertino Icons font to your application. 39 | # Use with the CupertinoIcons class for iOS style icons. 40 | cupertino_icons: ^1.0.2 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # The "flutter_lints" package below contains a set of recommended lints to 47 | # encourage good coding practices. The lint set provided by the package is 48 | # activated in the `analysis_options.yaml` file located at the root of your 49 | # package. See that file for information about deactivating specific lint 50 | # rules and activating additional ones. 51 | flutter_lints: ^2.0.0 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter packages. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | assets: 66 | - assets/images/ 67 | - assets/fitness_app/ 68 | - assets/introduction_animation/ 69 | 70 | # An image asset can refer to one or more resolution-specific "variants", see 71 | # https://flutter.dev/assets-and-images/#resolution-aware 72 | 73 | # For details regarding adding assets from package dependencies, see 74 | # https://flutter.dev/assets-and-images/#from-packages 75 | 76 | # To add custom fonts to your application, add a fonts section here, 77 | # in this "flutter" section. Each entry in this list should have a 78 | # "family" key with the font family name, and a "fonts" key with a 79 | # list giving the asset and other descriptors for the font. For 80 | # example: 81 | # fonts: 82 | # - family: Schyler 83 | # fonts: 84 | # - asset: fonts/Schyler-Regular.ttf 85 | # - asset: fonts/Schyler-Italic.ttf 86 | # style: italic 87 | # - family: Trajan Pro 88 | # fonts: 89 | # - asset: fonts/TrajanPro.ttf 90 | # - asset: fonts/TrajanPro_Bold.ttf 91 | # weight: 700 92 | # 93 | # For details regarding fonts from package dependencies, 94 | # see https://flutter.dev/custom-fonts/#from-packages 95 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "health_assistance"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "health_assistance"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/mood_diary_vew.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MoodDiaryVew extends StatelessWidget { 4 | final AnimationController animationController; 5 | 6 | const MoodDiaryVew({Key? key, required this.animationController}) 7 | : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final _firstHalfAnimation = 12 | Tween(begin: Offset(1, 0), end: Offset(0, 0)) 13 | .animate(CurvedAnimation( 14 | parent: animationController, 15 | curve: Interval( 16 | 0.4, 17 | 0.6, 18 | curve: Curves.fastOutSlowIn, 19 | ), 20 | )); 21 | final _secondHalfAnimation = 22 | Tween(begin: Offset(0, 0), end: Offset(-1, 0)) 23 | .animate(CurvedAnimation( 24 | parent: animationController, 25 | curve: const Interval( 26 | 0.6, 27 | 0.8, 28 | curve: Curves.fastOutSlowIn, 29 | ), 30 | )); 31 | 32 | final _moodFirstHalfAnimation = 33 | Tween(begin: Offset(2, 0), end: Offset(0, 0)) 34 | .animate(CurvedAnimation( 35 | parent: animationController, 36 | curve: const Interval( 37 | 0.4, 38 | 0.6, 39 | curve: Curves.fastOutSlowIn, 40 | ), 41 | )); 42 | final _moodSecondHalfAnimation = 43 | Tween(begin: Offset(0, 0), end: Offset(-2, 0)) 44 | .animate(CurvedAnimation( 45 | parent: animationController, 46 | curve: Interval( 47 | 0.6, 48 | 0.8, 49 | curve: Curves.fastOutSlowIn, 50 | ), 51 | )); 52 | final _imageFirstHalfAnimation = 53 | Tween(begin: Offset(4, 0), end: Offset(0, 0)) 54 | .animate(CurvedAnimation( 55 | parent: animationController, 56 | curve: const Interval( 57 | 0.4, 58 | 0.6, 59 | curve: Curves.fastOutSlowIn, 60 | ), 61 | )); 62 | final _imageSecondHalfAnimation = 63 | Tween(begin: Offset(0, 0), end: Offset(-4, 0)) 64 | .animate(CurvedAnimation( 65 | parent: animationController, 66 | curve: Interval( 67 | 0.6, 68 | 0.8, 69 | curve: Curves.fastOutSlowIn, 70 | ), 71 | )); 72 | 73 | return SlideTransition( 74 | position: _firstHalfAnimation, 75 | child: SlideTransition( 76 | position: _secondHalfAnimation, 77 | child: Padding( 78 | padding: const EdgeInsets.only(bottom: 100), 79 | child: Column( 80 | mainAxisAlignment: MainAxisAlignment.center, 81 | children: [ 82 | const Text( 83 | "Mood Dairy", 84 | style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), 85 | ), 86 | SlideTransition( 87 | position: _moodFirstHalfAnimation, 88 | child: SlideTransition( 89 | position: _moodSecondHalfAnimation, 90 | child: const Padding( 91 | padding: EdgeInsets.only( 92 | left: 64, right: 64, top: 16, bottom: 16), 93 | child: Text( 94 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 95 | textAlign: TextAlign.center, 96 | ), 97 | ), 98 | ), 99 | ), 100 | SlideTransition( 101 | position: _imageFirstHalfAnimation, 102 | child: SlideTransition( 103 | position: _imageSecondHalfAnimation, 104 | child: Container( 105 | constraints: BoxConstraints(maxWidth: 350, maxHeight: 250), 106 | child: Image.asset( 107 | 'assets/introduction_animation/cycle.png', 108 | fit: BoxFit.contain, 109 | ), 110 | ), 111 | ), 112 | ), 113 | ], 114 | ), 115 | ), 116 | ), 117 | ); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/care_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CareView extends StatelessWidget { 4 | final AnimationController animationController; 5 | 6 | const CareView({Key? key, required this.animationController}) 7 | : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final _firstHalfAnimation = 12 | Tween(begin: Offset(1, 0), end: Offset(0, 0)) 13 | .animate(CurvedAnimation( 14 | parent: animationController, 15 | curve: Interval( 16 | 0.2, 17 | 0.4, 18 | curve: Curves.fastOutSlowIn, 19 | ), 20 | )); 21 | final _secondHalfAnimation = 22 | Tween(begin: Offset(0, 0), end: Offset(-1, 0)) 23 | .animate(CurvedAnimation( 24 | parent: animationController, 25 | curve: const Interval( 26 | 0.4, 27 | 0.6, 28 | curve: Curves.fastOutSlowIn, 29 | ), 30 | )); 31 | final _relaxFirstHalfAnimation = 32 | Tween(begin: Offset(2, 0), end: Offset(0, 0)) 33 | .animate(CurvedAnimation( 34 | parent: animationController, 35 | curve: const Interval( 36 | 0.2, 37 | 0.4, 38 | curve: Curves.fastOutSlowIn, 39 | ), 40 | )); 41 | final _relaxSecondHalfAnimation = 42 | Tween(begin: Offset(0, 0), end: Offset(-2, 0)) 43 | .animate(CurvedAnimation( 44 | parent: animationController, 45 | curve: const Interval( 46 | 0.4, 47 | 0.6, 48 | curve: Curves.fastOutSlowIn, 49 | ), 50 | )); 51 | 52 | final _imageFirstHalfAnimation = 53 | Tween(begin: Offset(4, 0), end: Offset(0, 0)) 54 | .animate(CurvedAnimation( 55 | parent: animationController, 56 | curve: const Interval( 57 | 0.2, 58 | 0.4, 59 | curve: Curves.fastOutSlowIn, 60 | ), 61 | )); 62 | final _imageSecondHalfAnimation = 63 | Tween(begin: Offset(0, 0), end: Offset(-4, 0)) 64 | .animate(CurvedAnimation( 65 | parent: animationController, 66 | curve: const Interval( 67 | 0.4, 68 | 0.6, 69 | curve: Curves.fastOutSlowIn, 70 | ), 71 | )); 72 | 73 | return SlideTransition( 74 | position: _firstHalfAnimation, 75 | child: SlideTransition( 76 | position: _secondHalfAnimation, 77 | child: Padding( 78 | padding: const EdgeInsets.only(bottom: 100), 79 | child: Column( 80 | mainAxisAlignment: MainAxisAlignment.center, 81 | children: [ 82 | SlideTransition( 83 | position: _imageFirstHalfAnimation, 84 | child: SlideTransition( 85 | position: _imageSecondHalfAnimation, 86 | child: Container( 87 | constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), 88 | child: Image.asset( 89 | 'assets/introduction_animation/workout.png', 90 | fit: BoxFit.fitHeight, 91 | ), 92 | ), 93 | ), 94 | ), 95 | SlideTransition( 96 | position: _relaxFirstHalfAnimation, 97 | child: SlideTransition( 98 | position: _relaxSecondHalfAnimation, 99 | child: const Text( 100 | "Care", 101 | style: 102 | TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), 103 | ), 104 | ), 105 | ), 106 | const Padding( 107 | padding: 108 | EdgeInsets.only(left: 64, right: 64, bottom: 16, top: 16), 109 | child: Text( 110 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 111 | textAlign: TextAlign.center, 112 | ), 113 | ), 114 | ], 115 | ), 116 | ), 117 | ), 118 | ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(health_assistance LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "health_assistance") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | # Generated plugin build rules, which manage building the plugins and adding 56 | # them to the application. 57 | include(flutter/generated_plugins.cmake) 58 | 59 | 60 | # === Installation === 61 | # Support files are copied into place next to the executable, so that it can 62 | # run in place. This is done instead of making a separate bundle (as on Linux) 63 | # so that building and running from within Visual Studio will work. 64 | set(BUILD_BUNDLE_DIR "$") 65 | # Make the "install" step default, as it's required to run. 66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 69 | endif() 70 | 71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 73 | 74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 75 | COMPONENT Runtime) 76 | 77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 78 | COMPONENT Runtime) 79 | 80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 81 | COMPONENT Runtime) 82 | 83 | if(PLUGIN_BUNDLED_LIBRARIES) 84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 86 | COMPONENT Runtime) 87 | endif() 88 | 89 | # Fully re-copy the assets directory on each build to avoid having stale files 90 | # from a previous install. 91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 92 | install(CODE " 93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 94 | " COMPONENT Runtime) 95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 97 | 98 | # Install the AOT library on non-Debug builds only. 99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 100 | CONFIGURATIONS Profile;Release 101 | COMPONENT Runtime) 102 | -------------------------------------------------------------------------------- /lib/introduction_animation/introduction_animation_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | import '../fitness_app/fitness_app_home_screen.dart'; 5 | import 'components/care_view.dart'; 6 | import 'components/center_next_button.dart'; 7 | import 'components/mood_diary_vew.dart'; 8 | import 'components/relax_view.dart'; 9 | import 'components/splash_view.dart'; 10 | import 'components/top_back_skip_view.dart'; 11 | import 'components/welcome_view.dart'; 12 | 13 | class IntroductionAnimationScreen extends StatefulWidget { 14 | const IntroductionAnimationScreen({Key? key}) : super(key: key); 15 | 16 | @override 17 | _IntroductionAnimationScreenState createState() => 18 | _IntroductionAnimationScreenState(); 19 | } 20 | 21 | class _IntroductionAnimationScreenState 22 | extends State with TickerProviderStateMixin { 23 | AnimationController? _animationController; 24 | 25 | @override 26 | void initState() { 27 | _animationController = 28 | AnimationController(vsync: this, duration: const Duration(seconds: 8)); 29 | _animationController?.animateTo(0.0); 30 | super.initState(); 31 | } 32 | 33 | @override 34 | void dispose() { 35 | _animationController?.dispose(); 36 | super.dispose(); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | print(_animationController?.value); 42 | return Scaffold( 43 | backgroundColor: const Color(0xffF7EBE1), 44 | body: ClipRect( 45 | child: Stack( 46 | children: [ 47 | SplashView( 48 | animationController: _animationController!, 49 | ), 50 | RelaxView( 51 | animationController: _animationController!, 52 | ), 53 | CareView( 54 | animationController: _animationController!, 55 | ), 56 | MoodDiaryVew( 57 | animationController: _animationController!, 58 | ), 59 | WelcomeView( 60 | animationController: _animationController!, 61 | ), 62 | TopBackSkipView( 63 | onBackClick: _onBackClick, 64 | onSkipClick: _onSkipClick, 65 | animationController: _animationController!, 66 | ), 67 | CenterNextButton( 68 | animationController: _animationController!, 69 | onNextClick: _onNextClick, 70 | ), 71 | ], 72 | ), 73 | ), 74 | ); 75 | } 76 | 77 | void _onSkipClick() { 78 | _animationController?.animateTo(0.8, 79 | duration: Duration(milliseconds: 1200)); 80 | } 81 | 82 | void _onBackClick() { 83 | if (_animationController!.value >= 0 && 84 | _animationController!.value <= 0.2) { 85 | _animationController?.animateTo(0.0); 86 | } else if (_animationController!.value > 0.2 && 87 | _animationController!.value <= 0.4) { 88 | _animationController?.animateTo(0.2); 89 | } else if (_animationController!.value > 0.4 && 90 | _animationController!.value <= 0.6) { 91 | _animationController?.animateTo(0.4); 92 | } else if (_animationController!.value > 0.6 && 93 | _animationController!.value <= 0.8) { 94 | _animationController?.animateTo(0.6); 95 | } else if (_animationController!.value > 0.8 && 96 | _animationController!.value <= 1.0) { 97 | _animationController?.animateTo(0.8); 98 | } 99 | } 100 | 101 | void _onNextClick() { 102 | if (_animationController!.value >= 0 && 103 | _animationController!.value <= 0.2) { 104 | _animationController?.animateTo(0.4); 105 | } else if (_animationController!.value > 0.2 && 106 | _animationController!.value <= 0.4) { 107 | _animationController?.animateTo(0.6); 108 | } else if (_animationController!.value > 0.4 && 109 | _animationController!.value <= 0.6) { 110 | _animationController?.animateTo(0.8); 111 | } else if (_animationController!.value > 0.6 && 112 | _animationController!.value <= 0.8) { 113 | _signUpClick(); 114 | } 115 | } 116 | 117 | void _signUpClick() { 118 | 119 | Navigator.pushAndRemoveUntil( 120 | context, 121 | MaterialPageRoute(builder: (context) => FitnessAppHomeScreen()),(route) => false 122 | ); 123 | // Navigator.pop(context); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "health_assistance") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.shahin.health_assistance") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | # Generated plugin build rules, which manage building the plugins and adding 90 | # them to the application. 91 | include(flutter/generated_plugins.cmake) 92 | 93 | 94 | # === Installation === 95 | # By default, "installing" just makes a relocatable bundle in the build 96 | # directory. 97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 100 | endif() 101 | 102 | # Start with a clean build bundle directory every time. 103 | install(CODE " 104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 105 | " COMPONENT Runtime) 106 | 107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 109 | 110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 111 | COMPONENT Runtime) 112 | 113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 114 | COMPONENT Runtime) 115 | 116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 117 | COMPONENT Runtime) 118 | 119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 120 | install(FILES "${bundled_library}" 121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 122 | COMPONENT Runtime) 123 | endforeach(bundled_library) 124 | 125 | # Fully re-copy the assets directory on each build to avoid having stale files 126 | # from a previous install. 127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 128 | install(CODE " 129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 130 | " COMPONENT Runtime) 131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 133 | 134 | # Install the AOT library on non-Debug builds only. 135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 137 | COMPONENT Runtime) 138 | endif() 139 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/area_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../fitness_app_theme.dart'; 4 | 5 | class AreaListView extends StatefulWidget { 6 | const AreaListView( 7 | {Key? key, this.mainScreenAnimationController, this.mainScreenAnimation}) 8 | : super(key: key); 9 | 10 | final AnimationController? mainScreenAnimationController; 11 | final Animation? mainScreenAnimation; 12 | @override 13 | _AreaListViewState createState() => _AreaListViewState(); 14 | } 15 | 16 | class _AreaListViewState extends State 17 | with TickerProviderStateMixin { 18 | AnimationController? animationController; 19 | List areaListData = [ 20 | 'assets/fitness_app/area1.png', 21 | 'assets/fitness_app/area2.png', 22 | 'assets/fitness_app/area3.png', 23 | 'assets/fitness_app/area1.png', 24 | ]; 25 | 26 | @override 27 | void initState() { 28 | animationController = AnimationController( 29 | duration: const Duration(milliseconds: 2000), vsync: this); 30 | super.initState(); 31 | } 32 | 33 | @override 34 | void dispose() { 35 | animationController?.dispose(); 36 | super.dispose(); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return AnimatedBuilder( 42 | animation: widget.mainScreenAnimationController!, 43 | builder: (BuildContext context, Widget? child) { 44 | return FadeTransition( 45 | opacity: widget.mainScreenAnimation!, 46 | child: Transform( 47 | transform: Matrix4.translationValues( 48 | 0.0, 30 * (1.0 - widget.mainScreenAnimation!.value), 0.0), 49 | child: AspectRatio( 50 | aspectRatio: 1.0, 51 | child: Padding( 52 | padding: const EdgeInsets.only(left: 8.0, right: 8), 53 | child: GridView( 54 | padding: const EdgeInsets.only( 55 | left: 16, right: 16, top: 16, bottom: 16), 56 | physics: const BouncingScrollPhysics(), 57 | scrollDirection: Axis.vertical, 58 | children: List.generate( 59 | areaListData.length, 60 | (int index) { 61 | final int count = areaListData.length; 62 | final Animation animation = 63 | Tween(begin: 0.0, end: 1.0).animate( 64 | CurvedAnimation( 65 | parent: animationController!, 66 | curve: Interval((1 / count) * index, 1.0, 67 | curve: Curves.fastOutSlowIn), 68 | ), 69 | ); 70 | animationController?.forward(); 71 | return AreaView( 72 | imagepath: areaListData[index], 73 | animation: animation, 74 | animationController: animationController!, 75 | ); 76 | }, 77 | ), 78 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 79 | crossAxisCount: 2, 80 | mainAxisSpacing: 24.0, 81 | crossAxisSpacing: 24.0, 82 | childAspectRatio: 1.0, 83 | ), 84 | ), 85 | ), 86 | ), 87 | ), 88 | ); 89 | }, 90 | ); 91 | } 92 | } 93 | 94 | class AreaView extends StatelessWidget { 95 | const AreaView({ 96 | Key? key, 97 | this.imagepath, 98 | this.animationController, 99 | this.animation, 100 | }) : super(key: key); 101 | 102 | final String? imagepath; 103 | final AnimationController? animationController; 104 | final Animation? animation; 105 | 106 | @override 107 | Widget build(BuildContext context) { 108 | return AnimatedBuilder( 109 | animation: animationController!, 110 | builder: (BuildContext context, Widget? child) { 111 | return FadeTransition( 112 | opacity: animation!, 113 | child: Transform( 114 | transform: Matrix4.translationValues( 115 | 0.0, 50 * (1.0 - animation!.value), 0.0), 116 | child: Container( 117 | decoration: BoxDecoration( 118 | color: FitnessAppTheme.white, 119 | borderRadius: const BorderRadius.only( 120 | topLeft: Radius.circular(8.0), 121 | bottomLeft: Radius.circular(8.0), 122 | bottomRight: Radius.circular(8.0), 123 | topRight: Radius.circular(8.0)), 124 | boxShadow: [ 125 | BoxShadow( 126 | color: FitnessAppTheme.grey.withOpacity(0.4), 127 | offset: const Offset(1.1, 1.1), 128 | blurRadius: 10.0), 129 | ], 130 | ), 131 | child: Material( 132 | color: Colors.transparent, 133 | child: InkWell( 134 | focusColor: Colors.transparent, 135 | highlightColor: Colors.transparent, 136 | hoverColor: Colors.transparent, 137 | borderRadius: const BorderRadius.all(Radius.circular(8.0)), 138 | splashColor: FitnessAppTheme.nearlyDarkBlue.withOpacity(0.2), 139 | onTap: () {}, 140 | child: Column( 141 | children: [ 142 | Padding( 143 | padding: 144 | const EdgeInsets.only(top: 16, left: 16, right: 16), 145 | child: Image.asset(imagepath!), 146 | ), 147 | ], 148 | ), 149 | ), 150 | ), 151 | ), 152 | ), 153 | ); 154 | }, 155 | ); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/running_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../fitness_app_theme.dart'; 3 | 4 | class RunningView extends StatelessWidget { 5 | final AnimationController? animationController; 6 | final Animation? animation; 7 | 8 | const RunningView({Key? key, this.animationController, this.animation}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return AnimatedBuilder( 14 | animation: animationController!, 15 | builder: (BuildContext context, Widget? child) { 16 | return FadeTransition( 17 | opacity: animation!, 18 | child: Transform( 19 | transform: Matrix4.translationValues( 20 | 0.0, 30 * (1.0 - animation!.value), 0.0), 21 | child: Column( 22 | children: [ 23 | Padding( 24 | padding: const EdgeInsets.only( 25 | left: 24, right: 24, top: 0, bottom: 0), 26 | child: Stack( 27 | clipBehavior: Clip.none, 28 | children: [ 29 | Padding( 30 | padding: const EdgeInsets.only(top: 16, bottom: 16), 31 | child: Container( 32 | decoration: BoxDecoration( 33 | color: FitnessAppTheme.white, 34 | borderRadius: const BorderRadius.only( 35 | topLeft: Radius.circular(8.0), 36 | bottomLeft: Radius.circular(8.0), 37 | bottomRight: Radius.circular(8.0), 38 | topRight: Radius.circular(8.0)), 39 | boxShadow: [ 40 | BoxShadow( 41 | color: FitnessAppTheme.grey.withOpacity(0.4), 42 | offset: const Offset(1.1, 1.1), 43 | blurRadius: 10.0), 44 | ], 45 | ), 46 | child: Stack( 47 | alignment: Alignment.topLeft, 48 | children: [ 49 | ClipRRect( 50 | borderRadius: 51 | BorderRadius.all(const Radius.circular(8.0)), 52 | child: SizedBox( 53 | height: 74, 54 | child: AspectRatio( 55 | aspectRatio: 1.714, 56 | child: Image.asset( 57 | "assets/fitness_app/back.png"), 58 | ), 59 | ), 60 | ), 61 | Column( 62 | crossAxisAlignment: CrossAxisAlignment.start, 63 | children: [ 64 | Row( 65 | children: const [ 66 | Padding( 67 | padding: EdgeInsets.only( 68 | left: 100, 69 | right: 16, 70 | top: 16, 71 | ), 72 | child: Text( 73 | "You're doing great!", 74 | textAlign: TextAlign.left, 75 | style: TextStyle( 76 | fontFamily: 77 | FitnessAppTheme.fontName, 78 | fontWeight: FontWeight.w500, 79 | fontSize: 14, 80 | letterSpacing: 0.0, 81 | color: 82 | FitnessAppTheme.nearlyDarkBlue, 83 | ), 84 | ), 85 | ), 86 | ], 87 | ), 88 | Padding( 89 | padding: const EdgeInsets.only( 90 | left: 100, 91 | bottom: 12, 92 | top: 4, 93 | right: 16, 94 | ), 95 | child: Text( 96 | "Keep it up\nand stick to your plan!", 97 | textAlign: TextAlign.left, 98 | style: TextStyle( 99 | fontFamily: FitnessAppTheme.fontName, 100 | fontWeight: FontWeight.w500, 101 | fontSize: 10, 102 | letterSpacing: 0.0, 103 | color: FitnessAppTheme.grey 104 | .withOpacity(0.5), 105 | ), 106 | ), 107 | ), 108 | ], 109 | ), 110 | ], 111 | ), 112 | ), 113 | ), 114 | Positioned( 115 | top: -16, 116 | left: 0, 117 | child: SizedBox( 118 | width: 110, 119 | height: 110, 120 | child: Image.asset("assets/fitness_app/runner.png"), 121 | ), 122 | ) 123 | ], 124 | ), 125 | ), 126 | ], 127 | ), 128 | ), 129 | ); 130 | }, 131 | ); 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/workout_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../main.dart'; 3 | import '../fitness_app_theme.dart'; 4 | 5 | class WorkoutView extends StatelessWidget { 6 | final AnimationController? animationController; 7 | final Animation? animation; 8 | 9 | const WorkoutView({Key? key, this.animationController, this.animation}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return AnimatedBuilder( 15 | animation: animationController!, 16 | builder: (BuildContext context, Widget? child) { 17 | return FadeTransition( 18 | opacity: animation!, 19 | child: Transform( 20 | transform: Matrix4.translationValues( 21 | 0.0, 30 * (1.0 - animation!.value), 0.0), 22 | child: Padding( 23 | padding: const EdgeInsets.only( 24 | left: 24, right: 24, top: 16, bottom: 18), 25 | child: Container( 26 | decoration: BoxDecoration( 27 | gradient: LinearGradient(colors: [ 28 | FitnessAppTheme.nearlyDarkBlue, 29 | HexColor("#A88EB2") 30 | ], begin: Alignment.topLeft, end: Alignment.bottomRight), 31 | borderRadius: const BorderRadius.only( 32 | topLeft: Radius.circular(8.0), 33 | bottomLeft: Radius.circular(8.0), 34 | bottomRight: Radius.circular(8.0), 35 | topRight: Radius.circular(68.0)), 36 | boxShadow: [ 37 | BoxShadow( 38 | color: FitnessAppTheme.grey.withOpacity(0.6), 39 | offset: const Offset(1.1, 1.1), 40 | blurRadius: 10.0), 41 | ], 42 | ), 43 | child: Padding( 44 | padding: const EdgeInsets.all(16.0), 45 | child: Column( 46 | mainAxisAlignment: MainAxisAlignment.center, 47 | crossAxisAlignment: CrossAxisAlignment.start, 48 | children: [ 49 | const Text( 50 | 'Next workout', 51 | textAlign: TextAlign.left, 52 | style: TextStyle( 53 | fontFamily: FitnessAppTheme.fontName, 54 | fontWeight: FontWeight.normal, 55 | fontSize: 14, 56 | letterSpacing: 0.0, 57 | color: FitnessAppTheme.white, 58 | ), 59 | ), 60 | const Padding( 61 | padding: EdgeInsets.only(top: 8.0), 62 | child: Text( 63 | 'Legs Toning and\nGlutes Workout at Home', 64 | textAlign: TextAlign.left, 65 | style: TextStyle( 66 | fontFamily: FitnessAppTheme.fontName, 67 | fontWeight: FontWeight.normal, 68 | fontSize: 20, 69 | letterSpacing: 0.0, 70 | color: FitnessAppTheme.white, 71 | ), 72 | ), 73 | ), 74 | const SizedBox( 75 | height: 32, 76 | ), 77 | Padding( 78 | padding: const EdgeInsets.only(right: 4), 79 | child: Row( 80 | crossAxisAlignment: CrossAxisAlignment.end, 81 | mainAxisAlignment: MainAxisAlignment.center, 82 | children: [ 83 | const Padding( 84 | padding: EdgeInsets.only(left: 4), 85 | child: Icon( 86 | Icons.timer, 87 | color: FitnessAppTheme.white, 88 | size: 16, 89 | ), 90 | ), 91 | const Padding( 92 | padding: EdgeInsets.only(left: 4.0), 93 | child: Text( 94 | '68 min', 95 | textAlign: TextAlign.center, 96 | style: TextStyle( 97 | fontFamily: FitnessAppTheme.fontName, 98 | fontWeight: FontWeight.w500, 99 | fontSize: 14, 100 | letterSpacing: 0.0, 101 | color: FitnessAppTheme.white, 102 | ), 103 | ), 104 | ), 105 | const Expanded( 106 | child: SizedBox(), 107 | ), 108 | Container( 109 | decoration: BoxDecoration( 110 | color: FitnessAppTheme.nearlyWhite, 111 | shape: BoxShape.circle, 112 | boxShadow: [ 113 | BoxShadow( 114 | color: FitnessAppTheme.nearlyBlack 115 | .withOpacity(0.4), 116 | offset: const Offset(8.0, 8.0), 117 | blurRadius: 8.0), 118 | ], 119 | ), 120 | child: Padding( 121 | padding: const EdgeInsets.all(0.0), 122 | child: Icon( 123 | Icons.arrow_right, 124 | color: HexColor("#6F56E8"), 125 | size: 44, 126 | ), 127 | ), 128 | ) 129 | ], 130 | ), 131 | ) 132 | ], 133 | ), 134 | ), 135 | ), 136 | ), 137 | ), 138 | ); 139 | }, 140 | ); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animations: 5 | dependency: "direct main" 6 | description: 7 | name: animations 8 | sha256: fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "2.0.7" 12 | async: 13 | dependency: transitive 14 | description: 15 | name: async 16 | sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.10.0" 20 | boolean_selector: 21 | dependency: transitive 22 | description: 23 | name: boolean_selector 24 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "2.1.1" 28 | characters: 29 | dependency: transitive 30 | description: 31 | name: characters 32 | sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "1.2.1" 36 | clock: 37 | dependency: transitive 38 | description: 39 | name: clock 40 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.1.1" 44 | collection: 45 | dependency: transitive 46 | description: 47 | name: collection 48 | sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.17.0" 52 | cupertino_icons: 53 | dependency: "direct main" 54 | description: 55 | name: cupertino_icons 56 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.0.5" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.3.1" 68 | flutter: 69 | dependency: "direct main" 70 | description: flutter 71 | source: sdk 72 | version: "0.0.0" 73 | flutter_lints: 74 | dependency: "direct dev" 75 | description: 76 | name: flutter_lints 77 | sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c 78 | url: "https://pub.dev" 79 | source: hosted 80 | version: "2.0.1" 81 | flutter_rating_bar: 82 | dependency: "direct main" 83 | description: 84 | name: flutter_rating_bar 85 | sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 86 | url: "https://pub.dev" 87 | source: hosted 88 | version: "4.0.1" 89 | flutter_test: 90 | dependency: "direct dev" 91 | description: flutter 92 | source: sdk 93 | version: "0.0.0" 94 | font_awesome_flutter: 95 | dependency: "direct main" 96 | description: 97 | name: font_awesome_flutter 98 | sha256: "959ef4add147753f990b4a7c6cccb746d5792dbdc81b1cde99e62e7edb31b206" 99 | url: "https://pub.dev" 100 | source: hosted 101 | version: "10.4.0" 102 | intl: 103 | dependency: "direct main" 104 | description: 105 | name: intl 106 | sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" 107 | url: "https://pub.dev" 108 | source: hosted 109 | version: "0.17.0" 110 | js: 111 | dependency: transitive 112 | description: 113 | name: js 114 | sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" 115 | url: "https://pub.dev" 116 | source: hosted 117 | version: "0.6.5" 118 | lints: 119 | dependency: transitive 120 | description: 121 | name: lints 122 | sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" 123 | url: "https://pub.dev" 124 | source: hosted 125 | version: "2.0.1" 126 | matcher: 127 | dependency: transitive 128 | description: 129 | name: matcher 130 | sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" 131 | url: "https://pub.dev" 132 | source: hosted 133 | version: "0.12.13" 134 | material_color_utilities: 135 | dependency: transitive 136 | description: 137 | name: material_color_utilities 138 | sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 139 | url: "https://pub.dev" 140 | source: hosted 141 | version: "0.2.0" 142 | meta: 143 | dependency: transitive 144 | description: 145 | name: meta 146 | sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" 147 | url: "https://pub.dev" 148 | source: hosted 149 | version: "1.8.0" 150 | path: 151 | dependency: transitive 152 | description: 153 | name: path 154 | sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b 155 | url: "https://pub.dev" 156 | source: hosted 157 | version: "1.8.2" 158 | sky_engine: 159 | dependency: transitive 160 | description: flutter 161 | source: sdk 162 | version: "0.0.99" 163 | source_span: 164 | dependency: transitive 165 | description: 166 | name: source_span 167 | sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 168 | url: "https://pub.dev" 169 | source: hosted 170 | version: "1.9.1" 171 | stack_trace: 172 | dependency: transitive 173 | description: 174 | name: stack_trace 175 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 176 | url: "https://pub.dev" 177 | source: hosted 178 | version: "1.11.0" 179 | stream_channel: 180 | dependency: transitive 181 | description: 182 | name: stream_channel 183 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" 184 | url: "https://pub.dev" 185 | source: hosted 186 | version: "2.1.1" 187 | string_scanner: 188 | dependency: transitive 189 | description: 190 | name: string_scanner 191 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 192 | url: "https://pub.dev" 193 | source: hosted 194 | version: "1.2.0" 195 | term_glyph: 196 | dependency: transitive 197 | description: 198 | name: term_glyph 199 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 200 | url: "https://pub.dev" 201 | source: hosted 202 | version: "1.2.1" 203 | test_api: 204 | dependency: transitive 205 | description: 206 | name: test_api 207 | sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 208 | url: "https://pub.dev" 209 | source: hosted 210 | version: "0.4.16" 211 | vector_math: 212 | dependency: transitive 213 | description: 214 | name: vector_math 215 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 216 | url: "https://pub.dev" 217 | source: hosted 218 | version: "2.1.4" 219 | sdks: 220 | dart: ">=2.18.0 <3.0.0" 221 | flutter: ">=3.0.0" 222 | -------------------------------------------------------------------------------- /lib/introduction_animation/components/center_next_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:animations/animations.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CenterNextButton extends StatelessWidget { 5 | final AnimationController animationController; 6 | final VoidCallback onNextClick; 7 | const CenterNextButton( 8 | {Key? key, required this.animationController, required this.onNextClick}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final topMoveAnimation = 14 | Tween(begin: const Offset(0, 5), end: const Offset(0, 0)) 15 | .animate(CurvedAnimation( 16 | parent: animationController, 17 | curve: const Interval( 18 | 0.0, 19 | 0.2, 20 | curve: Curves.fastOutSlowIn, 21 | ), 22 | )); 23 | final signUpMoveAnimation = 24 | Tween(begin: 0, end: 1.0).animate(CurvedAnimation( 25 | parent: animationController, 26 | curve: const Interval( 27 | 0.6, 28 | 0.8, 29 | curve: Curves.fastOutSlowIn, 30 | ), 31 | )); 32 | final loginTextMoveAnimation = 33 | Tween(begin: const Offset(0, 5), end: const Offset(0, 0)) 34 | .animate(CurvedAnimation( 35 | parent: animationController, 36 | curve: const Interval( 37 | 0.6, 38 | 0.8, 39 | curve: Curves.fastOutSlowIn, 40 | ), 41 | )); 42 | 43 | return Padding( 44 | padding: 45 | EdgeInsets.only(bottom: 16 + MediaQuery.of(context).padding.bottom), 46 | child: Column( 47 | mainAxisAlignment: MainAxisAlignment.end, 48 | crossAxisAlignment: CrossAxisAlignment.center, 49 | children: [ 50 | SlideTransition( 51 | position: topMoveAnimation, 52 | child: AnimatedBuilder( 53 | animation: animationController, 54 | builder: (context, child) => AnimatedOpacity( 55 | opacity: animationController.value >= 0.2 && 56 | animationController.value <= 0.6 57 | ? 1 58 | : 0, 59 | duration: Duration(milliseconds: 480), 60 | child: _pageView(), 61 | ), 62 | ), 63 | ), 64 | SlideTransition( 65 | position: topMoveAnimation, 66 | child: AnimatedBuilder( 67 | animation: animationController, 68 | builder: (context, child) => Padding( 69 | padding: EdgeInsets.only( 70 | bottom: 38 - (38 * signUpMoveAnimation.value)), 71 | child: Container( 72 | height: 58, 73 | width: 58 + (200 * signUpMoveAnimation.value), 74 | decoration: BoxDecoration( 75 | borderRadius: BorderRadius.circular( 76 | 8 + 32 * (1 - signUpMoveAnimation.value)), 77 | color: Colors.deepOrange, 78 | ), 79 | child: PageTransitionSwitcher( 80 | duration: Duration(milliseconds: 480), 81 | reverse: signUpMoveAnimation.value < 0.7, 82 | transitionBuilder: ( 83 | Widget child, 84 | Animation animation, 85 | Animation secondaryAnimation, 86 | ) { 87 | return SharedAxisTransition( 88 | fillColor: Colors.transparent, 89 | child: child, 90 | animation: animation, 91 | secondaryAnimation: secondaryAnimation, 92 | transitionType: SharedAxisTransitionType.vertical, 93 | ); 94 | }, 95 | child: signUpMoveAnimation.value > 0.7 96 | ? InkWell( 97 | key: const ValueKey('Sign Up button'), 98 | onTap: onNextClick, 99 | child: Padding( 100 | padding: const EdgeInsets.only(left: 16.0, right: 16.0), 101 | child: Row( 102 | mainAxisAlignment: 103 | MainAxisAlignment.spaceBetween, 104 | children: const [ 105 | Text( 106 | 'Start Over', 107 | style: TextStyle( 108 | color: Colors.white, 109 | fontSize: 18, 110 | fontWeight: FontWeight.w500, 111 | ), 112 | ), 113 | Icon(Icons.arrow_forward_rounded, 114 | color: Colors.white), 115 | ], 116 | ), 117 | ), 118 | ) 119 | : InkWell( 120 | key: const ValueKey('next button'), 121 | onTap: onNextClick, 122 | child: const Padding( 123 | padding: EdgeInsets.all(16.0), 124 | child: Icon(Icons.arrow_forward_ios_rounded, 125 | color: Colors.white), 126 | ), 127 | ), 128 | ), 129 | ), 130 | ), 131 | ), 132 | ), 133 | Padding( 134 | padding: const EdgeInsets.only(top: 8), 135 | child: SlideTransition( 136 | position: loginTextMoveAnimation, 137 | child: Row( 138 | mainAxisAlignment: MainAxisAlignment.center, 139 | children: const [ 140 | Text( 141 | 'Want to log in? ', 142 | style: TextStyle( 143 | color: Colors.grey, 144 | fontSize: 14, 145 | fontWeight: FontWeight.normal, 146 | ), 147 | ), 148 | Text( 149 | 'Sign Up', 150 | style: TextStyle( 151 | color: Color(0xff132137), 152 | fontSize: 16, 153 | fontWeight: FontWeight.bold, 154 | ), 155 | ), 156 | ], 157 | ), 158 | ), 159 | ), 160 | ], 161 | ), 162 | ); 163 | } 164 | 165 | Widget _pageView() { 166 | int _selectedIndex = 0; 167 | 168 | if (animationController.value >= 0.7) { 169 | _selectedIndex = 3; 170 | } else if (animationController.value >= 0.5) { 171 | _selectedIndex = 2; 172 | } else if (animationController.value >= 0.3) { 173 | _selectedIndex = 1; 174 | } else if (animationController.value >= 0.1) { 175 | _selectedIndex = 0; 176 | } 177 | 178 | return Padding( 179 | padding: const EdgeInsets.only(bottom: 16), 180 | child: Row( 181 | mainAxisSize: MainAxisSize.min, 182 | children: [ 183 | for (var i = 0; i < 4; i++) 184 | Padding( 185 | padding: const EdgeInsets.all(4), 186 | child: AnimatedContainer( 187 | duration: const Duration(milliseconds: 480), 188 | decoration: BoxDecoration( 189 | borderRadius: BorderRadius.circular(32), 190 | color: _selectedIndex == i 191 | ? Colors.deepOrange 192 | : Color(0xffE3E4E4), 193 | ), 194 | width: 10, 195 | height: 10, 196 | ), 197 | ) 198 | ], 199 | ), 200 | ); 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: { 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | } 185 | 186 | case WM_ACTIVATE: 187 | if (child_content_ != nullptr) { 188 | SetFocus(child_content_); 189 | } 190 | return 0; 191 | } 192 | 193 | return DefWindowProc(window_handle_, message, wparam, lparam); 194 | } 195 | 196 | void Win32Window::Destroy() { 197 | OnDestroy(); 198 | 199 | if (window_handle_) { 200 | DestroyWindow(window_handle_); 201 | window_handle_ = nullptr; 202 | } 203 | if (g_active_window_count == 0) { 204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 205 | } 206 | } 207 | 208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 209 | return reinterpret_cast( 210 | GetWindowLongPtr(window, GWLP_USERDATA)); 211 | } 212 | 213 | void Win32Window::SetChildContent(HWND content) { 214 | child_content_ = content; 215 | SetParent(content, window_handle_); 216 | RECT frame = GetClientArea(); 217 | 218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 219 | frame.bottom - frame.top, true); 220 | 221 | SetFocus(child_content_); 222 | } 223 | 224 | RECT Win32Window::GetClientArea() { 225 | RECT frame; 226 | GetClientRect(window_handle_, &frame); 227 | return frame; 228 | } 229 | 230 | HWND Win32Window::GetHandle() { 231 | return window_handle_; 232 | } 233 | 234 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 235 | quit_on_close_ = quit_on_close; 236 | } 237 | 238 | bool Win32Window::OnCreate() { 239 | // No-op; provided for subclasses. 240 | return true; 241 | } 242 | 243 | void Win32Window::OnDestroy() { 244 | // No-op; provided for subclasses. 245 | } 246 | -------------------------------------------------------------------------------- /lib/fitness_app/ui_view/wave_view.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math' as math; 2 | import 'package:flutter/material.dart'; 3 | import 'package:vector_math/vector_math.dart' as vector; 4 | 5 | import '../fitness_app_theme.dart'; 6 | 7 | class WaveView extends StatefulWidget { 8 | final double percentageValue; 9 | 10 | const WaveView({Key? key, this.percentageValue = 100.0}) : super(key: key); 11 | @override 12 | _WaveViewState createState() => _WaveViewState(); 13 | } 14 | 15 | class _WaveViewState extends State with TickerProviderStateMixin { 16 | AnimationController? animationController; 17 | AnimationController? waveAnimationController; 18 | Offset bottleOffset1 = const Offset(0, 0); 19 | List animList1 = []; 20 | Offset bottleOffset2 = const Offset(60, 0); 21 | List animList2 = []; 22 | 23 | @override 24 | void initState() { 25 | animationController = AnimationController( 26 | duration: const Duration(milliseconds: 2000), vsync: this); 27 | waveAnimationController = AnimationController( 28 | duration: const Duration(milliseconds: 2000), vsync: this); 29 | animationController! 30 | .addStatusListener((status) { 31 | if (status == AnimationStatus.completed) { 32 | animationController?.reverse(); 33 | } else if (status == AnimationStatus.dismissed) { 34 | animationController?.forward(); 35 | } 36 | }); 37 | waveAnimationController!.addListener(() { 38 | animList1.clear(); 39 | for (int i = -2 - bottleOffset1.dx.toInt(); i <= 60 + 2; i++) { 40 | animList1.add( 41 | Offset( 42 | i.toDouble() + bottleOffset1.dx.toInt(), 43 | math.sin((waveAnimationController!.value * 360 - i) % 44 | 360 * 45 | vector.degrees2Radians) * 46 | 4 + 47 | (((100 - widget.percentageValue) * 160 / 100)), 48 | ), 49 | ); 50 | } 51 | animList2.clear(); 52 | for (int i = -2 - bottleOffset2.dx.toInt(); i <= 60 + 2; i++) { 53 | animList2.add( 54 | Offset( 55 | i.toDouble() + bottleOffset2.dx.toInt(), 56 | math.sin((waveAnimationController!.value * 360 - i) % 57 | 360 * 58 | vector.degrees2Radians) * 59 | 4 + 60 | (((100 - widget.percentageValue) * 160 / 100)), 61 | ), 62 | ); 63 | } 64 | }); 65 | waveAnimationController?.repeat(); 66 | animationController?.forward(); 67 | super.initState(); 68 | } 69 | 70 | @override 71 | void dispose() { 72 | animationController?.dispose(); 73 | waveAnimationController?.dispose(); 74 | super.dispose(); 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | return Container( 80 | alignment: Alignment.center, 81 | child: AnimatedBuilder( 82 | animation: CurvedAnimation( 83 | parent: animationController!, 84 | curve: Curves.easeInOut, 85 | ), 86 | builder: (context, child) => Stack( 87 | children: [ 88 | ClipPath( 89 | clipper: new WaveClipper(animationController!.value, animList1), 90 | child: Container( 91 | decoration: BoxDecoration( 92 | color: FitnessAppTheme.nearlyDarkBlue.withOpacity(0.5), 93 | borderRadius: const BorderRadius.only( 94 | topLeft: Radius.circular(80.0), 95 | bottomLeft: Radius.circular(80.0), 96 | bottomRight: Radius.circular(80.0), 97 | topRight: Radius.circular(80.0)), 98 | gradient: LinearGradient( 99 | colors: [ 100 | FitnessAppTheme.nearlyDarkBlue.withOpacity(0.2), 101 | FitnessAppTheme.nearlyDarkBlue.withOpacity(0.5) 102 | ], 103 | begin: Alignment.topLeft, 104 | end: Alignment.bottomRight, 105 | ), 106 | ), 107 | ), 108 | ), 109 | ClipPath( 110 | clipper: WaveClipper(animationController!.value, animList2), 111 | child: Container( 112 | decoration: BoxDecoration( 113 | color: FitnessAppTheme.nearlyDarkBlue, 114 | gradient: LinearGradient( 115 | colors: [ 116 | FitnessAppTheme.nearlyDarkBlue.withOpacity(0.4), 117 | FitnessAppTheme.nearlyDarkBlue 118 | ], 119 | begin: Alignment.topLeft, 120 | end: Alignment.bottomRight, 121 | ), 122 | borderRadius: const BorderRadius.only( 123 | topLeft: Radius.circular(80.0), 124 | bottomLeft: Radius.circular(80.0), 125 | bottomRight: Radius.circular(80.0), 126 | topRight: Radius.circular(80.0)), 127 | ), 128 | ), 129 | ), 130 | Padding( 131 | padding: const EdgeInsets.only(top: 48), 132 | child: Center( 133 | child: Row( 134 | mainAxisAlignment: MainAxisAlignment.center, 135 | crossAxisAlignment: CrossAxisAlignment.start, 136 | children: [ 137 | Text( 138 | widget.percentageValue.round().toString(), 139 | textAlign: TextAlign.center, 140 | style: const TextStyle( 141 | fontFamily: FitnessAppTheme.fontName, 142 | fontWeight: FontWeight.w500, 143 | fontSize: 24, 144 | letterSpacing: 0.0, 145 | color: FitnessAppTheme.white, 146 | ), 147 | ), 148 | const Padding( 149 | padding: EdgeInsets.only(top: 3.0), 150 | child: Text( 151 | '%', 152 | textAlign: TextAlign.center, 153 | style: TextStyle( 154 | fontFamily: FitnessAppTheme.fontName, 155 | fontWeight: FontWeight.w500, 156 | fontSize: 14, 157 | letterSpacing: 0.0, 158 | color: FitnessAppTheme.white, 159 | ), 160 | ), 161 | ), 162 | ], 163 | ), 164 | ), 165 | ), 166 | Positioned( 167 | top: 0, 168 | left: 6, 169 | bottom: 8, 170 | child: ScaleTransition( 171 | alignment: Alignment.center, 172 | scale: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( 173 | parent: animationController!, 174 | curve: Interval(0.0, 1.0, curve: Curves.fastOutSlowIn))), 175 | child: Container( 176 | width: 2, 177 | height: 2, 178 | decoration: BoxDecoration( 179 | color: FitnessAppTheme.white.withOpacity(0.4), 180 | shape: BoxShape.circle, 181 | ), 182 | ), 183 | ), 184 | ), 185 | Positioned( 186 | left: 24, 187 | right: 0, 188 | bottom: 16, 189 | child: ScaleTransition( 190 | alignment: Alignment.center, 191 | scale: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( 192 | parent: animationController!, 193 | curve: const Interval(0.4, 1.0, curve: Curves.fastOutSlowIn))), 194 | child: Container( 195 | width: 4, 196 | height: 4, 197 | decoration: BoxDecoration( 198 | color: FitnessAppTheme.white.withOpacity(0.4), 199 | shape: BoxShape.circle, 200 | ), 201 | ), 202 | ), 203 | ), 204 | Positioned( 205 | left: 0, 206 | right: 24, 207 | bottom: 32, 208 | child: ScaleTransition( 209 | alignment: Alignment.center, 210 | scale: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( 211 | parent: animationController!, 212 | curve: Interval(0.6, 0.8, curve: Curves.fastOutSlowIn))), 213 | child: Container( 214 | width: 3, 215 | height: 3, 216 | decoration: BoxDecoration( 217 | color: FitnessAppTheme.white.withOpacity(0.4), 218 | shape: BoxShape.circle, 219 | ), 220 | ), 221 | ), 222 | ), 223 | Positioned( 224 | top: 0, 225 | right: 20, 226 | bottom: 0, 227 | child: Transform( 228 | transform: Matrix4.translationValues( 229 | 0.0, 16 * (1.0 - animationController!.value), 0.0), 230 | child: Container( 231 | width: 4, 232 | height: 4, 233 | decoration: BoxDecoration( 234 | color: FitnessAppTheme.white.withOpacity( 235 | animationController!.status == AnimationStatus.reverse 236 | ? 0.0 237 | : 0.4), 238 | shape: BoxShape.circle, 239 | ), 240 | ), 241 | ), 242 | ), 243 | Column( 244 | children: [ 245 | AspectRatio( 246 | aspectRatio: 1, 247 | child: Image.asset("assets/fitness_app/bottle.png"), 248 | ), 249 | ], 250 | ) 251 | ], 252 | ), 253 | ), 254 | ); 255 | } 256 | } 257 | 258 | class WaveClipper extends CustomClipper { 259 | final double animation; 260 | 261 | List waveList1 = []; 262 | 263 | WaveClipper(this.animation, this.waveList1); 264 | 265 | @override 266 | Path getClip(Size size) { 267 | Path path = new Path(); 268 | 269 | path.addPolygon(waveList1, false); 270 | 271 | path.lineTo(size.width, size.height); 272 | path.lineTo(0.0, size.height); 273 | path.close(); 274 | return path; 275 | } 276 | 277 | @override 278 | bool shouldReclip(WaveClipper oldClipper) => 279 | animation != oldClipper.animation; 280 | } 281 | --------------------------------------------------------------------------------