├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── LaunchImageDark.png │ │ │ ├── LaunchImageDark@2x.png │ │ │ ├── LaunchImageDark@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── ItunesArtwork@2x.png │ │ │ ├── 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-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── LaunchBackground.imageset │ │ │ ├── background.png │ │ │ └── Contents.json │ ├── Runner.entitlements │ ├── RunnerProfile.entitlements │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── firebase_app_id_file.json ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── splash │ ├── img │ │ ├── dark-1x.png │ │ ├── dark-2x.png │ │ ├── dark-3x.png │ │ ├── dark-4x.png │ │ ├── light-1x.png │ │ ├── light-2x.png │ │ ├── light-3x.png │ │ └── light-4x.png │ ├── splash.js │ └── style.css ├── manifest.json └── index.html ├── assets ├── image │ ├── emptyCart.png │ ├── onboard_1.png │ ├── onboard_2.png │ ├── onboard_3.png │ ├── no_connection.png │ ├── chooseBackground.jpeg │ ├── wholedata_logo_home.png │ └── wholedata_logo_login.png └── font │ ├── Lemon-Regular.ttf │ ├── Sofia │ ├── SofiaProBold.otf │ ├── SofiaProLight.otf │ ├── SofiaProMedium.otf │ ├── SofiaProRegular.otf │ ├── SofiaProSemiBold.otf │ ├── SofiaProExtraLight.otf │ └── SofiaProUltraLight.otf │ └── Poppins │ ├── Poppins-Bold.otf │ ├── Poppins-Thin.otf │ ├── Poppins-Light.otf │ ├── Poppins-Medium.otf │ ├── Poppins-Regular.otf │ ├── Poppins-ExtraBold.otf │ ├── Poppins-SemiBold.otf │ └── Poppins-ExtraLight.otf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_stat_name.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_stat_name.png │ │ │ │ ├── drawable │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_stat_name.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_stat_name.png │ │ │ │ ├── drawable-v21 │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_stat_name.png │ │ │ │ ├── drawable-night-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-night-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-night-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-night-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-night-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── values-v31 │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── io │ │ │ │ │ └── wholedata │ │ │ │ │ └── test │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── lib ├── constants.dart ├── utils.dart ├── Library │ ├── intro_views_flutter-2.4.0 │ │ └── lib │ │ │ ├── Models │ │ │ ├── slide_update_model.dart │ │ │ ├── page_button_view_model.dart │ │ │ ├── pager_indicator_view_model.dart │ │ │ ├── page_bubble_view_model.dart │ │ │ └── page_view_model.dart │ │ │ ├── Constants │ │ │ └── constants.dart │ │ │ ├── Animation_Gesture │ │ │ ├── page_reveal.dart │ │ │ ├── animated_page_dragger.dart │ │ │ └── page_dragger.dart │ │ │ ├── Clipper │ │ │ └── circular_reveal_clipper.dart │ │ │ └── UI │ │ │ ├── page_bubble.dart │ │ │ ├── pager_indicator.dart │ │ │ ├── page.dart │ │ │ └── page_indicator_buttons.dart │ ├── loader.dart │ ├── snackbar_message.dart │ ├── no_item_cart.dart │ ├── Animation │ │ └── FadeAnimation.dart │ ├── overlay.dart │ ├── no_connection.dart │ └── loading_button.dart ├── Screen │ ├── widgets │ │ └── loading_button.dart │ ├── OnBoarding_Screen │ │ └── Splash_Screen.dart │ ├── Bottom_Nav_Bar │ │ └── Bottom_Navigation_Bar.dart │ └── B4_Cart_Screen │ │ └── Step_Order │ │ └── 1_Delivery_option.dart ├── firebase_options.dart ├── models │ ├── menuModel.dart │ ├── restaurantModel.dart │ ├── cartModel.dart │ └── productModel.dart └── main.dart ├── .metadata ├── test └── widget_test.dart ├── .gitignore ├── analysis_options.yaml ├── README.md └── pubspec.yaml /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/image/emptyCart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/emptyCart.png -------------------------------------------------------------------------------- /assets/image/onboard_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/onboard_1.png -------------------------------------------------------------------------------- /assets/image/onboard_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/onboard_2.png -------------------------------------------------------------------------------- /assets/image/onboard_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/onboard_3.png -------------------------------------------------------------------------------- /web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /assets/font/Lemon-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Lemon-Regular.ttf -------------------------------------------------------------------------------- /web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /assets/image/no_connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/no_connection.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProBold.otf -------------------------------------------------------------------------------- /assets/image/chooseBackground.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/chooseBackground.jpeg -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-Bold.otf -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-Thin.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProLight.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProMedium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProMedium.otf -------------------------------------------------------------------------------- /assets/image/wholedata_logo_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/wholedata_logo_home.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-Light.otf -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-Medium.otf -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-Regular.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProRegular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProRegular.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProSemiBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProSemiBold.otf -------------------------------------------------------------------------------- /assets/image/wholedata_logo_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/image/wholedata_logo_login.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-ExtraBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-ExtraBold.otf -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-SemiBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-SemiBold.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProExtraLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProExtraLight.otf -------------------------------------------------------------------------------- /assets/font/Sofia/SofiaProUltraLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Sofia/SofiaProUltraLight.otf -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/font/Poppins/Poppins-ExtraLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/assets/font/Poppins/Poppins-ExtraLight.otf -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_stat_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-hdpi/ic_stat_name.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_stat_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-mdpi/ic_stat_name.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-night-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-night-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-night-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_stat_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-night-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-night-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /lib/constants.dart: -------------------------------------------------------------------------------- 1 | const String BASE_URL = ''; 2 | const String RESTAURANT_PK = ''; 3 | const String STRIPE_PUB_KEY = ''; 4 | String FIREBASE_TOPIC = ''; 5 | String APP_NAME = ''; 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ECEAEA 4 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/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/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maaanueeelll/flutter_delivery/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png -------------------------------------------------------------------------------- /web/splash/splash.js: -------------------------------------------------------------------------------- 1 | function removeSplashFromWeb() { 2 | const elem = document.getElementById("splash"); 3 | if (elem) { 4 | elem.remove(); 5 | } 6 | document.body.style.background = "transparent"; 7 | } 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | extension PrettyJson on Map { 4 | String toPrettyString() { 5 | var encoder = new JsonEncoder.withIndent(" "); 6 | return encoder.convert(this); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "", 5 | "FIREBASE_PROJECT_ID": "", 6 | "GCM_SENDER_ID": "" 7 | } -------------------------------------------------------------------------------- /android/app/src/main/kotlin/io/wholedata/test/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package io.wholedata.test 2 | import io.flutter.embedding.android.FlutterActivity 3 | import io.flutter.embedding.android.FlutterFragmentActivity 4 | 5 | 6 | class MainActivity: FlutterFragmentActivity() { 7 | } -------------------------------------------------------------------------------- /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.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/RunnerProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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 and should not be manually edited. 5 | 6 | version: 7 | revision: db747aa1331bd95bc9b3874c842261ca2d302cd5 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Models/slide_update_model.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 3 | 4 | // model for slide update 5 | 6 | class SlideUpdate { 7 | final UpdateType updateType; 8 | final SlideDirection direction; 9 | final double slidePercent; 10 | 11 | SlideUpdate( 12 | this.direction, 13 | this.slidePercent, 14 | this.updateType, 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /lib/Library/loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Loader { 4 | static final Loader appLoader = Loader(); 5 | ValueNotifier loaderShowingNotifier = ValueNotifier(false); 6 | 7 | void showLoader() { 8 | loaderShowingNotifier.value = true; 9 | } 10 | 11 | void hideLoader() { 12 | loaderShowingNotifier.value = false; 13 | } 14 | 15 | void setImage() { 16 | // same as that of setText // 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 14 | } 15 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart: -------------------------------------------------------------------------------- 1 | /// This package contains all the constants used. 2 | 3 | const BUBBLE_WIDTH = 55.0; 4 | 5 | const FULL_TARNSITION_PX = 300.0; 6 | 7 | const PERCENT_PER_MILLISECOND = 0.00125; 8 | 9 | enum SlideDirection { 10 | leftToRight, 11 | rightToLeft, 12 | none, 13 | } 14 | 15 | enum UpdateType { 16 | dragging, 17 | doneDragging, 18 | animating, 19 | doneAnimating, 20 | } 21 | 22 | enum TransitionGoal { 23 | open, 24 | close, 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/Library/snackbar_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | SnackBar snackBarMessage(String message) { 4 | return SnackBar( 5 | backgroundColor: Colors.white, 6 | elevation: 0, 7 | duration: const Duration(milliseconds: 1500), 8 | content: Text( 9 | message, 10 | textAlign: TextAlign.center, 11 | style: const TextStyle( 12 | color: Colors.black87, 13 | fontFamily: "Sofia", 14 | fontWeight: FontWeight.w600, 15 | fontSize: 16), 16 | ), 17 | ); 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 that Flutter provides. 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:test/main.dart'; 12 | 13 | void main() {} 14 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Models/page_button_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 2 | 3 | /// This is view model for the skip and done buttons. 4 | 5 | class PageButtonViewModel { 6 | final double slidePercent; 7 | final int totalPages; 8 | final int activePageIndex; 9 | final SlideDirection slideDirection; 10 | 11 | PageButtonViewModel({ 12 | required this.slidePercent, 13 | required this.totalPages, 14 | required this.activePageIndex, 15 | required this.slideDirection, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Models/pager_indicator_view_model.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 3 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/page_view_model.dart'; 4 | 5 | //view model for page indicator 6 | 7 | class PagerIndicatorViewModel { 8 | final List pages; 9 | final int activeIndex; 10 | final SlideDirection slideDirection; 11 | final double slidePercent; 12 | 13 | PagerIndicatorViewModel( 14 | this.pages, 15 | this.activeIndex, 16 | this.slideDirection, 17 | this.slidePercent, 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Models/page_bubble_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // View Model for page bubble 4 | 5 | class PageBubbleViewModel { 6 | final String iconAssetPath; 7 | final Color iconColor; 8 | final bool isHollow; 9 | final double activePercent; 10 | final Color? bubbleBackgroundColor; 11 | final Widget bubbleInner; 12 | 13 | PageBubbleViewModel({ 14 | required this.bubbleInner, 15 | required this.iconAssetPath, 16 | required this.iconColor, 17 | required this.isHollow, 18 | required this.activePercent, 19 | this.bubbleBackgroundColor = const Color(0x88FFFFFF), 20 | }) : assert(bubbleBackgroundColor != null); 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Animation_Gesture/page_reveal.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Clipper/circular_reveal_clipper.dart'; 3 | 4 | /// This class reveals the next page in the circular form. 5 | 6 | class PageReveal extends StatelessWidget { 7 | final double revealPercent; 8 | final Widget child; 9 | 10 | //Constructor 11 | PageReveal({ 12 | required this.revealPercent, 13 | required this.child, 14 | }); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | //ClipOval cuts the page to circular shape. 19 | return new ClipOval( 20 | clipper: new CircularRevealClipper(revealPercent: revealPercent), 21 | child: child, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.3' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.10' 12 | 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | mavenCentral() 20 | } 21 | } 22 | 23 | rootProject.buildDir = '../build' 24 | subprojects { 25 | project.buildDir = "${rootProject.buildDir}/${project.name}" 26 | } 27 | subprojects { 28 | project.evaluationDependsOn(':app') 29 | } 30 | 31 | task clean(type: Delete) { 32 | delete rootProject.buildDir 33 | } 34 | -------------------------------------------------------------------------------- /web/splash/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin:0; 3 | height:100%; 4 | background: #ffffff; 5 | 6 | background-size: 100% 100%; 7 | } 8 | 9 | .center { 10 | margin: 0; 11 | position: absolute; 12 | top: 50%; 13 | left: 50%; 14 | -ms-transform: translate(-50%, -50%); 15 | transform: translate(-50%, -50%); 16 | } 17 | 18 | .contain { 19 | display:block; 20 | width:100%; height:100%; 21 | object-fit: contain; 22 | } 23 | 24 | .stretch { 25 | display:block; 26 | width:100%; height:100%; 27 | } 28 | 29 | .cover { 30 | display:block; 31 | width:100%; height:100%; 32 | object-fit: cover; 33 | } 34 | 35 | @media (prefers-color-scheme: dark) { 36 | body { 37 | margin:0; 38 | height:100%; 39 | background: #ffffff; 40 | 41 | background-size: 100% 100%; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_windows 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /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": "test", 3 | "short_name": "test", 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 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Clipper/circular_reveal_clipper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | /// Custom clipper for circular page reveal. 6 | 7 | class CircularRevealClipper extends CustomClipper { 8 | final double revealPercent; 9 | 10 | CircularRevealClipper({ 11 | required this.revealPercent, 12 | }); 13 | 14 | @override 15 | Rect getClip(Size size) { 16 | // center of rectangle 17 | final center = new Offset(size.width / 2, size.height * 0.9); 18 | 19 | // Calculate distance from center to the top left corner to make sure we fill the screen via simple trigonometry. 20 | double theta = atan(center.dy / center.dx); 21 | final distanceToCorner = center.dy / sin(theta); 22 | 23 | final radius = distanceToCorner * revealPercent; 24 | final diameter = 2 * radius; 25 | 26 | return new Rect.fromLTWH( 27 | center.dx - radius, center.dy - radius, diameter, diameter); 28 | } 29 | 30 | @override 31 | bool shouldReclip(CustomClipper oldClipper) { 32 | return true; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 17 | 20 | -------------------------------------------------------------------------------- /lib/Library/no_item_cart.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// 4 | /// 5 | /// If no item cart this class showing 6 | /// 7 | class NoItemCart extends StatelessWidget { 8 | NoItemCart({required this.message}); 9 | String message; 10 | @override 11 | Widget build(BuildContext context) { 12 | MediaQueryData mediaQueryData = MediaQuery.of(context); 13 | return Container( 14 | width: 500.0, 15 | color: Colors.white, 16 | height: double.infinity, 17 | child: SingleChildScrollView( 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.center, 20 | children: [ 21 | Padding( 22 | padding: EdgeInsets.only(top: mediaQueryData.padding.top + 50.0), 23 | ), 24 | Image.asset( 25 | "assets/image/emptyCart.png", 26 | height: 300.0, 27 | ), 28 | const Padding(padding: EdgeInsets.only(bottom: 10.0)), 29 | Text( 30 | message, 31 | style: const TextStyle( 32 | fontWeight: FontWeight.w400, 33 | fontSize: 18.5, 34 | color: Colors.black54, 35 | fontFamily: "Popins"), 36 | ), 37 | ], 38 | ), 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "LaunchImageDark.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "filename" : "LaunchImage@2x.png", 21 | "idiom" : "universal", 22 | "scale" : "2x" 23 | }, 24 | { 25 | "appearances" : [ 26 | { 27 | "appearance" : "luminosity", 28 | "value" : "dark" 29 | } 30 | ], 31 | "filename" : "LaunchImageDark@2x.png", 32 | "idiom" : "universal", 33 | "scale" : "2x" 34 | }, 35 | { 36 | "filename" : "LaunchImage@3x.png", 37 | "idiom" : "universal", 38 | "scale" : "3x" 39 | }, 40 | { 41 | "appearances" : [ 42 | { 43 | "appearance" : "luminosity", 44 | "value" : "dark" 45 | } 46 | ], 47 | "filename" : "LaunchImageDark@3x.png", 48 | "idiom" : "universal", 49 | "scale" : "3x" 50 | } 51 | ], 52 | "info" : { 53 | "author" : "xcode", 54 | "version" : 1 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /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"test", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | target.build_configurations.each do |config| 41 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' 42 | end 43 | end 44 | end -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DELIVERY 2 | 3 | A Flutter project for delivery restaurants/fast food. `Null safety` 4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 |

12 | 13 | ## Requirements 14 | - flutter 2.10+ 15 | 16 | ## Getting Started 17 | 18 | clone this repo and run `flutter pub get` to install all the dependencies 19 | 20 | follow the instructions for the **Firebase** package [here](https://firebase.flutter.dev/docs/overview/) 21 | 22 | if you don't need Firebase messaging just comment the initialize inside **main.dart** 23 | 24 | This project is a Flutter application. 25 | A few resources to get you started if this is your first Flutter project: 26 | 27 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 28 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 29 | 30 | For help getting started with Flutter, view our 31 | [online documentation](https://flutter.dev/docs), which offers tutorials, 32 | samples, guidance on mobile development, and a full API reference. 33 | -------------------------------------------------------------------------------- /lib/Library/Animation/FadeAnimation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:simple_animations/simple_animations.dart'; 3 | 4 | class FadeAnimation extends StatelessWidget { 5 | final double delay; 6 | final Widget child; 7 | 8 | FadeAnimation( 9 | this.delay, 10 | this.child, 11 | ); 12 | @override 13 | Widget build(BuildContext context) { 14 | //final tween = MultiTween([ 15 | // Track("opacity") 16 | // .add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 1.0)), 17 | // Track("translateY").add( 18 | // Duration(milliseconds: 1500), Tween(begin: -30.0, end: 0.0), 19 | // curve: Curves.easeOut) 20 | //]); 21 | // final tween = MultiTween( 22 | // // [ 23 | // // Track("opacity").add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 1.0)), 24 | // // Track("translateY").add( 25 | // // Duration(milliseconds: 500), Tween(begin: -30.0, end: 0.0), 26 | // // curve: Curves.easeOut) 27 | // // ] 28 | // 29 | // ) 30 | // ..add( 31 | // AniProps.opacity, 32 | // Tween(begin: 0.0, end: 1.0), 33 | // const Duration(milliseconds: 300), 34 | // ) 35 | // ..add(AniProps.translateY, Tween(begin: -30.0, end: 0.0), 36 | // const Duration(milliseconds: 500), Curves.easeOut); 37 | final tween = Tween(begin: 0, end: 1); 38 | 39 | return PlayAnimation( 40 | delay: Duration(milliseconds: (900 * delay).round()), 41 | // duration: tween.duration, 42 | tween: tween, 43 | child: child, 44 | builder: (context, child, animation) => const Opacity( 45 | opacity: 1.0, 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Library/overlay.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_template/Library/loader.dart'; 3 | 4 | class OverlayView extends StatelessWidget { 5 | const OverlayView({ 6 | Key? key, 7 | }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return yourOverLayWidget(); 12 | } 13 | 14 | Container yourOverLayWidget() { 15 | return Container( 16 | color: Colors.black.withOpacity(0.5), 17 | child: Padding( 18 | padding: const EdgeInsets.all(8.0), 19 | child: Center( 20 | child: Row( 21 | children: [ 22 | Expanded( 23 | child: Card( 24 | child: Column( 25 | mainAxisSize: MainAxisSize.min, 26 | children: [ 27 | Row( 28 | children: [ 29 | const Spacer(), 30 | IconButton( 31 | icon: const Icon(Icons.close_outlined), 32 | onPressed: () { 33 | Loader.appLoader.hideLoader(); 34 | }, 35 | ), 36 | ], 37 | ), 38 | const Icon( 39 | Icons.error_rounded, 40 | color: Colors.red, 41 | size: 50, 42 | ), 43 | const SizedBox( 44 | height: 16, 45 | ), 46 | ], 47 | ), 48 | ), 49 | ), 50 | ], 51 | ), 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Models/page_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | //view model for pages 4 | 5 | class PageViewModel { 6 | /// Page BackGround Color 7 | final Color pageColor; 8 | 9 | ///icon image path 10 | final String iconImageAssetPath; 11 | 12 | /// iconColor 13 | final Color iconColor; 14 | 15 | /// color for background of progress bubbles 16 | /// 17 | /// @Default `const Color(0x88FFFFFF)` 18 | final Color bubbleBackgroundColor; 19 | 20 | /// widget for the title 21 | /// 22 | /// _typicaly a Text Widget_ 23 | /// 24 | /// @Default Textstyle `color: Colors.white , fontSize: 50.0` 25 | final Widget title; 26 | 27 | /// widget for the body 28 | /// 29 | /// _typicaly a Text Widget_ 30 | /// 31 | /// @Default Textstyle `color: Colors.white, fontSize: 24.0` 32 | final Widget body; 33 | 34 | /// set default TextStyle for both title and body 35 | final TextStyle textStyle; 36 | 37 | /// Image Widget 38 | /// 39 | /// _typicaly a Image Widget_ 40 | final Widget mainImage; 41 | 42 | /// bubble inner Widget 43 | /// 44 | /// _typicaly a Image Widget_ 45 | /// 46 | /// gets overriden by [iconImageAssetPath] 47 | final Widget bubble; 48 | 49 | PageViewModel({ 50 | required this.pageColor, 51 | required this.iconImageAssetPath, 52 | this.bubbleBackgroundColor = const Color(0x88FFFFFF), 53 | required this.iconColor, 54 | required this.title, 55 | required this.body, 56 | required this.mainImage, 57 | required this.bubble, 58 | required this.textStyle, 59 | }); 60 | 61 | TextStyle get titleTextStyle { 62 | return TextStyle(color: Colors.white, fontSize: 50.0).merge(this.textStyle); 63 | } 64 | 65 | TextStyle get bodyTextStyle { 66 | return TextStyle(color: Colors.white, fontSize: 24.0).merge(this.textStyle); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/Screen/widgets/loading_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingButton extends StatefulWidget { 4 | final Future Function()? onPressed; 5 | final String text; 6 | 7 | const LoadingButton({Key? key, required this.onPressed, required this.text}) 8 | : super(key: key); 9 | 10 | @override 11 | _LoadingButtonState createState() => _LoadingButtonState(); 12 | } 13 | 14 | class _LoadingButtonState extends State { 15 | bool _isLoading = false; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Row( 20 | mainAxisSize: MainAxisSize.max, 21 | children: [ 22 | Expanded( 23 | child: ElevatedButton( 24 | style: ElevatedButton.styleFrom( 25 | primary: Colors.amber.shade700, 26 | padding: const EdgeInsets.symmetric(vertical: 12), 27 | shape: RoundedRectangleBorder( 28 | borderRadius: BorderRadius.circular(30.0), 29 | ), 30 | ), 31 | onPressed: 32 | (_isLoading || widget.onPressed == null) ? null : _loadFuture, 33 | child: _isLoading 34 | ? const SizedBox( 35 | height: 22, 36 | width: 22, 37 | child: CircularProgressIndicator( 38 | strokeWidth: 2, 39 | ), 40 | ) 41 | : Text(widget.text), 42 | ), 43 | ), 44 | ], 45 | ); 46 | } 47 | 48 | Future _loadFuture() async { 49 | setState(() { 50 | _isLoading = true; 51 | }); 52 | 53 | try { 54 | await widget.onPressed!(); 55 | } catch (e, s) { 56 | //print(e); 57 | rethrow; 58 | } finally { 59 | setState(() { 60 | _isLoading = false; 61 | }); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /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 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /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 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Wholedata 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | test 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UIBackgroundModes 28 | 29 | fetch 30 | processing 31 | remote-notification 32 | 33 | UILaunchStoryboardName 34 | LaunchScreen 35 | UIMainStoryboardFile 36 | Main 37 | UIStatusBarHidden 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/Library/no_connection.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '/Screen/Bottom_Nav_Bar/Bottom_Navigation_Bar.dart'; 3 | 4 | class NoConnection extends StatelessWidget { 5 | const NoConnection({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | backgroundColor: Colors.black87, 11 | body: Column( 12 | mainAxisAlignment: MainAxisAlignment.center, 13 | children: [ 14 | const Text( 15 | 'Opppsss! \nqualcosa è andato storto', 16 | textAlign: TextAlign.center, 17 | style: TextStyle( 18 | fontFamily: "Sofia", 19 | fontSize: 16, 20 | color: Colors.white, 21 | fontWeight: FontWeight.w600, 22 | ), 23 | ), 24 | const SizedBox( 25 | height: 20, 26 | ), 27 | Image.asset('assets/image/no_connection.png'), 28 | const Text( 29 | 'Opppsss! \nqualcosa è andato storto', 30 | textAlign: TextAlign.center, 31 | style: TextStyle( 32 | fontFamily: "Sofia", 33 | fontSize: 16, 34 | color: Colors.white, 35 | fontWeight: FontWeight.w600, 36 | ), 37 | ), 38 | const SizedBox( 39 | height: 20, 40 | ), 41 | ElevatedButton( 42 | onPressed: () { 43 | Navigator.of(context).pushReplacement( 44 | PageRouteBuilder( 45 | pageBuilder: (_, __, ____) => BottomNavigationBarT2()), 46 | ); 47 | }, 48 | child: const Text( 49 | 'Riprova', 50 | textAlign: TextAlign.center, 51 | style: TextStyle( 52 | fontFamily: "Sofia", 53 | fontSize: 16, 54 | color: Colors.white, 55 | fontWeight: FontWeight.w600, 56 | ), 57 | ), 58 | ) 59 | ], 60 | ), 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | switch (defaultTargetPlatform) { 20 | case TargetPlatform.android: 21 | return android; 22 | case TargetPlatform.iOS: 23 | return ios; 24 | case TargetPlatform.macOS: 25 | throw UnsupportedError( 26 | 'DefaultFirebaseOptions have not been configured for macos - ' 27 | 'you can reconfigure this by running the FlutterFire CLI again.', 28 | ); 29 | case TargetPlatform.windows: 30 | throw UnsupportedError( 31 | 'DefaultFirebaseOptions have not been configured for windows - ' 32 | 'you can reconfigure this by running the FlutterFire CLI again.', 33 | ); 34 | case TargetPlatform.linux: 35 | throw UnsupportedError( 36 | 'DefaultFirebaseOptions have not been configured for linux - ' 37 | 'you can reconfigure this by running the FlutterFire CLI again.', 38 | ); 39 | default: 40 | throw UnsupportedError( 41 | 'DefaultFirebaseOptions are not supported for this platform.', 42 | ); 43 | } 44 | } 45 | 46 | static const FirebaseOptions android = FirebaseOptions( 47 | apiKey: '', 48 | appId: '', 49 | messagingSenderId: '', 50 | projectId: '', 51 | storageBucket: '', 52 | ); 53 | 54 | static const FirebaseOptions ios = FirebaseOptions( 55 | apiKey: '', 56 | appId: '', 57 | messagingSenderId: '', 58 | projectId: '', 59 | storageBucket: '', 60 | iosClientId: '', 61 | iosBundleId: '', 62 | ); 63 | } 64 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/UI/page_bubble.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/page_bubble_view_model.dart'; 5 | 6 | /// This class contains the UI for page bubble. 7 | class PageBubble extends StatelessWidget { 8 | //view model 9 | final PageBubbleViewModel viewModel; 10 | 11 | //Constructor 12 | PageBubble({ 13 | required this.viewModel, 14 | }); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return new Container( 19 | width: 55.0, 20 | height: 65.0, 21 | decoration: 22 | BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.0))), 23 | child: new Center( 24 | child: new Padding( 25 | padding: const EdgeInsets.all(0.5), 26 | child: new Container( 27 | width: 28 | 60.0, //This method return in between values according to active percent. 29 | height: 4.0, 30 | decoration: new BoxDecoration( 31 | borderRadius: BorderRadius.all(Radius.circular(0.0)), 32 | //Alpha is used to create fade effect for background color 33 | color: viewModel.isHollow ? Colors.white24 : Color(0xFFF88421), 34 | border: new Border.all( 35 | color: viewModel.isHollow 36 | ? viewModel.bubbleBackgroundColor!.withAlpha( 37 | (0xFF * (0.1 - viewModel.activePercent)).round()) 38 | : Colors.white10, 39 | width: 2.0, 40 | ), //Border 41 | ), //BoxDecoration 42 | child: new Opacity( 43 | opacity: viewModel.activePercent, 44 | child: (viewModel.iconAssetPath != null && 45 | viewModel.iconAssetPath != "") 46 | // ignore: conflicting_dart_import 47 | ? new Image.asset( 48 | viewModel.iconAssetPath, 49 | color: viewModel.iconColor, 50 | ) 51 | : new Container(), 52 | ), //opacity 53 | ), //Container 54 | ), //Padding 55 | ), //Center 56 | ); //Container 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.google.gms.google-services' 25 | apply plugin: 'com.android.application' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion flutter.compileSdkVersion 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 "io.wholedata.test" 48 | minSdkVersion localProperties.getProperty('flutter.minSdkVersion') 49 | targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion') 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | multiDexEnabled true 53 | } 54 | 55 | buildTypes { 56 | release { 57 | // TODO: Add your own signing config for the release build. 58 | // Signing with the debug keys for now, so `flutter run --release` works. 59 | signingConfig signingConfigs.debug 60 | } 61 | } 62 | } 63 | 64 | flutter { 65 | source '../..' 66 | } 67 | 68 | dependencies { 69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 70 | implementation platform('com.google.firebase:firebase-bom:29.2.1') 71 | implementation 'com.android.support:multidex:1.0.3' 72 | implementation 'com.google.firebase:firebase-analytics-ktx' 73 | } 74 | -------------------------------------------------------------------------------- /lib/Library/loading_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class LoadingButton extends StatefulWidget { 6 | final Future Function()? onPressed; 7 | final String text; 8 | 9 | const LoadingButton({Key? key, required this.onPressed, required this.text}) 10 | : super(key: key); 11 | 12 | @override 13 | _LoadingButtonState createState() => _LoadingButtonState(); 14 | } 15 | 16 | class _LoadingButtonState extends State { 17 | bool _isLoading = false; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Row( 22 | mainAxisSize: MainAxisSize.max, 23 | crossAxisAlignment: CrossAxisAlignment.center, 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | ElevatedButton( 27 | style: ElevatedButton.styleFrom( 28 | primary: Colors.orangeAccent, 29 | padding: EdgeInsets.symmetric(horizontal: 50, vertical: 20), 30 | shape: RoundedRectangleBorder( 31 | borderRadius: BorderRadius.circular(30.0), 32 | ), 33 | // minimumSize: const Size(330, 60), 34 | ), 35 | onPressed: () { 36 | print('PAY'); 37 | print(_isLoading); 38 | print(widget.onPressed); 39 | if (_isLoading == null || widget.onPressed == null) { 40 | return null; 41 | } else { 42 | _loadFuture; 43 | } 44 | }, 45 | child: _isLoading 46 | ? const SizedBox( 47 | height: 22, 48 | width: 22, 49 | child: CircularProgressIndicator( 50 | strokeWidth: 2, 51 | )) 52 | : Text( 53 | widget.text, 54 | style: const TextStyle( 55 | color: Colors.white, 56 | fontSize: 17.0, 57 | fontWeight: FontWeight.w700, 58 | fontFamily: "Sofia", 59 | letterSpacing: 0.9), 60 | ), 61 | ), 62 | ], 63 | ); 64 | } 65 | 66 | Future _loadFuture() async { 67 | setState(() { 68 | _isLoading = true; 69 | }); 70 | 71 | try { 72 | await widget.onPressed!(); 73 | } catch (e, s) { 74 | log(e.toString(), error: e, stackTrace: s); 75 | ScaffoldMessenger.of(context) 76 | .showSnackBar(SnackBar(content: Text('Error $e'))); 77 | rethrow; 78 | } finally { 79 | setState(() { 80 | _isLoading = false; 81 | }); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/models/menuModel.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:food_template/constants.dart'; 7 | //import 'package:flutter/services.dart' show rootBundle; 8 | 9 | Future> fetchMenus(http.Client client) async { 10 | final queryParameters = { 11 | 'restaurant_pk': RESTAURANT_PK, 12 | }; 13 | //final httpUri = Uri( 14 | // scheme: 'https', 15 | // host: 'wholedata.io', 16 | // path: '/api/menu/', 17 | // queryParameters: {'restaurant_pk': RESTAURANT_PK}); 18 | final uri = Uri.https(BASE_URL, 'api/menu', queryParameters); 19 | final response = await client.get(uri, headers: { 20 | HttpHeaders.contentTypeHeader: 'application/json', 21 | }); 22 | 23 | //final response = await rootBundle.loadString('assets/data/menu.json'); 24 | 25 | // Use the compute function to run parseMenus in a separate isolate. 26 | return compute(parseMenus, response.body); 27 | } 28 | 29 | Future fetchDetailMenus(http.Client client, int id) async { 30 | final queryParameters = { 31 | 'restaurant_pk': RESTAURANT_PK, 32 | 'menu_pk': id.toString(), 33 | }; 34 | 35 | final uri = Uri.https(BASE_URL, 'api/menu-detail', queryParameters); 36 | final response = await client.get(uri, headers: { 37 | HttpHeaders.contentTypeHeader: 'application/json', 38 | }); 39 | // print(response.body); 40 | 41 | if (response.statusCode == 200) { 42 | final parsed = jsonDecode(response.body); 43 | return Menu.fromJson(parsed); 44 | } else { 45 | return const Menu( 46 | id: 0, position: 0, name: '', imageUrl: '', restaurant: 0); 47 | } 48 | } 49 | 50 | // A function that converts a response body into a List. 51 | List parseMenus(String responseBody) { 52 | final parsed = jsonDecode(responseBody).cast>(); 53 | 54 | return parsed.map((json) => Menu.fromJson(json)).toList(); 55 | } 56 | 57 | class Menu { 58 | final int id; 59 | final int position; 60 | final String name; 61 | final String imageUrl; 62 | final int restaurant; 63 | final int countFood; 64 | 65 | const Menu({ 66 | this.id = 0, 67 | this.position = 0, 68 | this.name = '', 69 | this.imageUrl = '', 70 | this.restaurant = 0, 71 | this.countFood = 0, 72 | }); 73 | 74 | factory Menu.fromJson(Map json) { 75 | return Menu( 76 | id: json['id'], 77 | position: json['position'] as int, 78 | name: json['name'] as String, 79 | imageUrl: json['image_url'], 80 | restaurant: json['restaurant'] as int, 81 | countFood: json['count_food'] as int, 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/models/restaurantModel.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:food_template/constants.dart'; 8 | import 'package:pretty_json/pretty_json.dart'; 9 | //import 'package:flutter/services.dart' show rootBundle; 10 | //import 'package:shared_preferences/shared_preferences.dart'; 11 | 12 | Future fetchRestaurant(http.Client client) async { 13 | final queryParameters = { 14 | 'restaurant_pk': RESTAURANT_PK, 15 | }; 16 | final uri = Uri.https(BASE_URL, 'api/restaurant', queryParameters); 17 | final response = await client.get(uri); 18 | //printPrettyJson(response.body, indent: 2); 19 | //final response = await rootBundle.loadString('assets/data/menu.json'); 20 | 21 | bool saveP = await savePrefs(response.body); 22 | // Use the compute function to run parseMenus in a separate isolate. 23 | return compute(parseRestaurant, response.body); 24 | } 25 | 26 | Future fetchRestaurantFromPref() async { 27 | const storage = FlutterSecureStorage(); 28 | 29 | //SharedPreferences sharedRest = await SharedPreferences.getInstance(); 30 | 31 | String json = await storage.read(key: 'restaurant') ?? ''; 32 | 33 | if (json.isEmpty) { 34 | return Restaurant(); 35 | } else { 36 | return compute(parseRestaurant, json); 37 | } 38 | } 39 | 40 | Future savePrefs(String jsonRestaurant) async { 41 | const storage = FlutterSecureStorage(); 42 | 43 | //SharedPreferences sharedRest = await SharedPreferences.getInstance(); 44 | storage.write(key: 'restaurant', value: jsonRestaurant); 45 | return true; 46 | } 47 | 48 | // A function that converts a response body into a List. 49 | Restaurant parseRestaurant(String responseBody) { 50 | final parsed = jsonDecode(responseBody); 51 | return Restaurant.fromJson(parsed); 52 | } 53 | 54 | class Restaurant { 55 | final int id; 56 | final String name; 57 | final bool activeOrders; 58 | final double deliveryFees; 59 | String stripeAccountId = ''; 60 | // final String? imageUrl; 61 | 62 | Restaurant({ 63 | this.id = 0, 64 | this.name = '', 65 | this.activeOrders = false, 66 | this.deliveryFees = 0.0, 67 | this.stripeAccountId = '', 68 | // required this.imageUrl, 69 | }); 70 | 71 | factory Restaurant.fromJson(Map json) { 72 | return Restaurant( 73 | id: json['id'], 74 | name: json['name'] as String, 75 | activeOrders: json['active_orders'] as bool, 76 | stripeAccountId: json['stripe_account'] ?? '', 77 | deliveryFees: json['delivery_fees'].toDouble(), 78 | // imageUrl: json['image_url'] as String?, 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Animation_Gesture/animated_page_dragger.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:ui'; 3 | 4 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 5 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/slide_update_model.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | /// This class provides the animation controller 9 | /// used when then user stops dragging and page 10 | /// reveal is not completed. 11 | 12 | /// This class provides the animation controller 13 | /// used when then user stops dragging and page 14 | /// reveal is not completed. 15 | 16 | class AnimatedPageDragger { 17 | final SlideDirection slideDirection; 18 | 19 | //This variable tells that whether we have to open or close the page reveal. 20 | final TransitionGoal transitionGoal; 21 | 22 | //Animation controller 23 | late AnimationController completionAnimationController; 24 | 25 | //Constructor 26 | AnimatedPageDragger({ 27 | required this.slideDirection, 28 | required this.transitionGoal, 29 | required double slidePercent, 30 | required StreamController slideUpdateStream, 31 | required TickerProvider vsync, 32 | }) { 33 | final startSlidePercent = slidePercent; 34 | double endSlidePercent; 35 | Duration duration; 36 | 37 | //We have to complete the page reveal 38 | if (transitionGoal == TransitionGoal.open) { 39 | endSlidePercent = 1.0; 40 | 41 | final slideRemaining = 1.0 - slidePercent; 42 | //Standard value take for drag velocity to avoid complex calculations. 43 | duration = Duration( 44 | milliseconds: (slideRemaining / PERCENT_PER_MILLISECOND).round()); 45 | } 46 | //We have to close the page reveal 47 | else { 48 | endSlidePercent = 0.0; 49 | 50 | duration = Duration( 51 | milliseconds: (slidePercent / PERCENT_PER_MILLISECOND).round()); 52 | } 53 | 54 | //Adding listener to animation controller 55 | //Also value to animation controller vary from 0.0 to 1.0 according to duration. 56 | completionAnimationController = AnimationController( 57 | duration: duration, vsync: vsync) 58 | ..addListener(() { 59 | final slidePercent = lerpDouble(startSlidePercent, endSlidePercent, 60 | completionAnimationController.value); 61 | 62 | //Adding to slide update stream 63 | slideUpdateStream.add( 64 | SlideUpdate(slideDirection, slidePercent!, UpdateType.animating)); 65 | }) 66 | ..addStatusListener((AnimationStatus status) { 67 | //When animation has done executing 68 | if (status == AnimationStatus.completed) { 69 | //Adding to slide update stream 70 | slideUpdateStream.add(SlideUpdate( 71 | slideDirection, slidePercent, UpdateType.doneAnimating)); 72 | } 73 | }); 74 | } 75 | 76 | //This method is used to run animation Controller 77 | void run() { 78 | completionAnimationController.forward(from: 0.0); 79 | } 80 | 81 | //This method is used to dispose animation controller 82 | void dispose() { 83 | completionAnimationController.dispose(); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/Animation_Gesture/page_dragger.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:html'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 6 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/slide_update_model.dart'; 7 | 8 | /// This class is used to get user gesture and work according to it. 9 | 10 | /// This class is used to get user gesture and work according to it. 11 | 12 | class PageDragger extends StatefulWidget { 13 | //These bool variables are used to check whether user can drag left or right or none. 14 | final bool canDragLeftToRight; 15 | final bool canDragRightToLeft; 16 | final double fullTransitionPX; 17 | //Stream controller 18 | final StreamController slideUpdateStream; 19 | 20 | //Constructor 21 | PageDragger({ 22 | required this.canDragLeftToRight, 23 | required this.canDragRightToLeft, 24 | required this.slideUpdateStream, 25 | this.fullTransitionPX = FULL_TARNSITION_PX, 26 | }) : assert(fullTransitionPX != null); 27 | 28 | @override 29 | _PageDraggerState createState() => _PageDraggerState(); 30 | } 31 | 32 | class _PageDraggerState extends State { 33 | //Variables 34 | late Offset dragStart; 35 | late SlideDirection slideDirection; 36 | double slidePercent = 0.0; 37 | 38 | // This methods executes when user starts dragging. 39 | onDragStart(DragStartDetails details) { 40 | dragStart = details.globalPosition; 41 | } 42 | 43 | // This methods executes while user is dragging. 44 | onDragUpdate(DragUpdateDetails details) { 45 | if (dragStart != null) { 46 | //Getting new position details 47 | final newPosition = details.globalPosition; 48 | //Change in position in x 49 | final dx = dragStart.dx - newPosition.dx; 50 | 51 | //predicting slide direction 52 | if (dx > 0.0 && widget.canDragRightToLeft) { 53 | slideDirection = SlideDirection.rightToLeft; 54 | } else if (dx < 0.0 && widget.canDragLeftToRight) { 55 | slideDirection = SlideDirection.leftToRight; 56 | } else { 57 | slideDirection = SlideDirection.none; 58 | } 59 | 60 | //predicting slide percent 61 | if (slideDirection != SlideDirection.none) { 62 | //clamp method is used to clamp the value of slidePercent from 0.0 to 1.0, after 1.0 it set to 1.0 63 | slidePercent = (dx / widget.fullTransitionPX).abs().clamp(0.0, 1.0); 64 | } else { 65 | slidePercent = 0.0; 66 | } 67 | 68 | // Adding to slideUpdateStream 69 | widget.slideUpdateStream 70 | .add(SlideUpdate(slideDirection, slidePercent, UpdateType.dragging)); 71 | } 72 | } 73 | 74 | // This method executes when user ends dragging. 75 | onDragEnd(DragEndDetails details) { 76 | // Adding to slideUpdateStream 77 | widget.slideUpdateStream.add(SlideUpdate( 78 | SlideDirection.none, slidePercent, UpdateType.doneDragging)); 79 | 80 | //Making dragStart to null for the reallocation 81 | //dragStart = null; 82 | } 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | //Gesture Detector for horizontal drag 87 | return GestureDetector( 88 | onHorizontalDragStart: onDragStart, 89 | onHorizontalDragUpdate: onDragUpdate, 90 | onHorizontalDragEnd: onDragEnd, 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /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", "io.wholedata" "\0" 93 | VALUE "FileDescription", "test" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "test" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 io.wholedata. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "test.exe" "\0" 98 | VALUE "ProductName", "test" "\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 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/UI/pager_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 3 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/page_bubble_view_model.dart'; 4 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/pager_indicator_view_model.dart'; 5 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/UI/page_bubble.dart'; 6 | 7 | /// This class contains the UI elements associated with bottom page indicator. 8 | 9 | class PagerIndicator extends StatelessWidget { 10 | //view model 11 | final PagerIndicatorViewModel viewModel; 12 | 13 | //Constructor 14 | PagerIndicator({ 15 | required this.viewModel, 16 | }); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | //Extracting page bubble information from page view model 21 | List bubbles = []; 22 | 23 | for (var i = 0; i < viewModel.pages.length; i++) { 24 | final page = viewModel.pages[i]; 25 | 26 | //calculating percent active 27 | var percentActive; 28 | if (i == viewModel.activeIndex) { 29 | percentActive = 1.0 - viewModel.slidePercent; 30 | } else if (i == viewModel.activeIndex - 1 && 31 | viewModel.slideDirection == SlideDirection.leftToRight) { 32 | percentActive = viewModel.slidePercent; 33 | } else if (i == viewModel.activeIndex + 1 && 34 | viewModel.slideDirection == SlideDirection.rightToLeft) { 35 | percentActive = viewModel.slidePercent; 36 | } else { 37 | percentActive = 0.0; 38 | } 39 | 40 | //Checking is that bubble hollow 41 | bool isHollow = i > viewModel.activeIndex || 42 | (i == viewModel.activeIndex && 43 | viewModel.slideDirection == SlideDirection.leftToRight); 44 | 45 | //Adding to the list 46 | bubbles.add(PageBubble( 47 | viewModel: PageBubbleViewModel( 48 | iconAssetPath: page.iconImageAssetPath, 49 | iconColor: page.iconColor, 50 | isHollow: isHollow, 51 | activePercent: percentActive, 52 | bubbleBackgroundColor: page.bubbleBackgroundColor, 53 | bubbleInner: page.bubble, 54 | ), 55 | )); 56 | } 57 | 58 | //Calculating the translation value of pager indicator while sliding. 59 | final baseTranslation = 60 | ((viewModel.pages.length * BUBBLE_WIDTH) / 2) - (BUBBLE_WIDTH / 2); 61 | var translation = baseTranslation - (viewModel.activeIndex * BUBBLE_WIDTH); 62 | 63 | if (viewModel.slideDirection == SlideDirection.leftToRight) { 64 | translation += BUBBLE_WIDTH * viewModel.slidePercent; 65 | } else if (viewModel.slideDirection == SlideDirection.rightToLeft) { 66 | translation -= BUBBLE_WIDTH * viewModel.slidePercent; 67 | } 68 | //UI 69 | return Column( 70 | children: [ 71 | Expanded(child: Container()), 72 | Row( 73 | mainAxisAlignment: MainAxisAlignment.center, 74 | children: [ 75 | Transform( 76 | // used for horizontal transformation 77 | transform: Matrix4.translationValues(translation, 0.0, 0.0), 78 | child: Row( 79 | mainAxisAlignment: MainAxisAlignment.center, 80 | children: bubbles, 81 | ), //Row 82 | ), 83 | ], 84 | ), //Transform 85 | ], //Children 86 | ); //Column 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/Screen/OnBoarding_Screen/Splash_Screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:connection_notifier/connection_notifier.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | import '/Screen/Bottom_Nav_Bar/Bottom_Navigation_Bar.dart'; 6 | //import 'package:shared_preferences/shared_preferences.dart'; 7 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 8 | import 'onBoarding_Screen.dart'; 9 | 10 | Future showOnboardScreen() async { 11 | bool check = false; 12 | const storage = FlutterSecureStorage(); 13 | String? showIntroSplash = await storage.read(key: 'showOnboardScreen'); 14 | 15 | if (showIntroSplash != null) { 16 | check = true ? showIntroSplash == 'true' : false; 17 | return false; 18 | } else { 19 | return false; 20 | } 21 | } 22 | 23 | class SplashScreenTemplate2 extends StatelessWidget { 24 | @override 25 | Widget build(BuildContext context) { 26 | ///Set color status bar 27 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith( 28 | statusBarColor: Colors.transparent, 29 | )); 30 | 31 | /// To set orientation always portrait 32 | SystemChrome.setPreferredOrientations([ 33 | DeviceOrientation.portraitUp, 34 | DeviceOrientation.portraitDown, 35 | ]); 36 | 37 | return ConnectionNotifier( 38 | child: MaterialApp( 39 | home: SplashScreenTemplate2Screen(), 40 | debugShowCheckedModeBanner: false, 41 | theme: ThemeData( 42 | appBarTheme: const AppBarTheme( 43 | systemOverlayStyle: SystemUiOverlayStyle.dark, // 2 44 | ), 45 | brightness: Brightness.light, 46 | backgroundColor: Colors.white, 47 | primaryColorLight: Colors.white, 48 | // primaryColorBrightness: Brightness.light, 49 | primaryColor: Colors.white), 50 | ), 51 | ); 52 | } 53 | } 54 | 55 | class SplashScreenTemplate2Screen extends StatefulWidget { 56 | @override 57 | _SplashScreenTemplate2ScreenState createState() => 58 | _SplashScreenTemplate2ScreenState(); 59 | } 60 | 61 | class _SplashScreenTemplate2ScreenState 62 | extends State { 63 | @override 64 | void _Navigator() async { 65 | bool check = await showOnboardScreen(); 66 | Navigator.of(context).pushReplacement( 67 | PageRouteBuilder( 68 | pageBuilder: (_, __, ___) => 69 | check ? const BottomNavigationBarT2() : OnboardingScreen(), 70 | //testing(), 71 | transitionDuration: const Duration(milliseconds: 2000), 72 | transitionsBuilder: 73 | (_, Animation animation, __, Widget child) { 74 | return Opacity( 75 | opacity: animation.value, 76 | child: child, 77 | ); 78 | }), 79 | ); 80 | } 81 | 82 | /// Set timer SplashScreenTemplate2 83 | _timer() async { 84 | return Timer(const Duration(milliseconds: 800), _Navigator); 85 | } 86 | 87 | @override 88 | void initState() { 89 | super.initState(); 90 | _timer(); 91 | } 92 | 93 | @override 94 | Widget build(BuildContext context) { 95 | return Scaffold( 96 | body: Container( 97 | alignment: Alignment.center, 98 | decoration: BoxDecoration( 99 | color: Colors.white, 100 | image: DecorationImage( 101 | image: Image.asset("assets/image/wholedata_logo_home.png").image, 102 | fit: BoxFit.fitWidth), 103 | ), 104 | ), 105 | ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(test LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "test") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images":[ 3 | { 4 | "idiom":"iphone", 5 | "size":"20x20", 6 | "scale":"2x", 7 | "filename":"Icon-App-20x20@2x.png" 8 | }, 9 | { 10 | "idiom":"iphone", 11 | "size":"20x20", 12 | "scale":"3x", 13 | "filename":"Icon-App-20x20@3x.png" 14 | }, 15 | { 16 | "idiom":"iphone", 17 | "size":"29x29", 18 | "scale":"1x", 19 | "filename":"Icon-App-29x29@1x.png" 20 | }, 21 | { 22 | "idiom":"iphone", 23 | "size":"29x29", 24 | "scale":"2x", 25 | "filename":"Icon-App-29x29@2x.png" 26 | }, 27 | { 28 | "idiom":"iphone", 29 | "size":"29x29", 30 | "scale":"3x", 31 | "filename":"Icon-App-29x29@3x.png" 32 | }, 33 | { 34 | "idiom":"iphone", 35 | "size":"40x40", 36 | "scale":"2x", 37 | "filename":"Icon-App-40x40@2x.png" 38 | }, 39 | { 40 | "idiom":"iphone", 41 | "size":"40x40", 42 | "scale":"3x", 43 | "filename":"Icon-App-40x40@3x.png" 44 | }, 45 | { 46 | "idiom":"iphone", 47 | "size":"60x60", 48 | "scale":"2x", 49 | "filename":"Icon-App-60x60@2x.png" 50 | }, 51 | { 52 | "idiom":"iphone", 53 | "size":"60x60", 54 | "scale":"3x", 55 | "filename":"Icon-App-60x60@3x.png" 56 | }, 57 | { 58 | "idiom":"iphone", 59 | "size":"76x76", 60 | "scale":"2x", 61 | "filename":"Icon-App-76x76@2x.png" 62 | }, 63 | { 64 | "idiom":"ipad", 65 | "size":"20x20", 66 | "scale":"1x", 67 | "filename":"Icon-App-20x20@1x.png" 68 | }, 69 | { 70 | "idiom":"ipad", 71 | "size":"20x20", 72 | "scale":"2x", 73 | "filename":"Icon-App-20x20@2x.png" 74 | }, 75 | { 76 | "idiom":"ipad", 77 | "size":"29x29", 78 | "scale":"1x", 79 | "filename":"Icon-App-29x29@1x.png" 80 | }, 81 | { 82 | "idiom":"ipad", 83 | "size":"29x29", 84 | "scale":"2x", 85 | "filename":"Icon-App-29x29@2x.png" 86 | }, 87 | { 88 | "idiom":"ipad", 89 | "size":"40x40", 90 | "scale":"1x", 91 | "filename":"Icon-App-40x40@1x.png" 92 | }, 93 | { 94 | "idiom":"ipad", 95 | "size":"40x40", 96 | "scale":"2x", 97 | "filename":"Icon-App-40x40@2x.png" 98 | }, 99 | { 100 | "idiom":"ipad", 101 | "size":"76x76", 102 | "scale":"1x", 103 | "filename":"Icon-App-76x76@1x.png" 104 | }, 105 | { 106 | "idiom":"ipad", 107 | "size":"76x76", 108 | "scale":"2x", 109 | "filename":"Icon-App-76x76@2x.png" 110 | }, 111 | { 112 | "idiom":"ipad", 113 | "size":"83.5x83.5", 114 | "scale":"2x", 115 | "filename":"Icon-App-83.5x83.5@2x.png" 116 | }, 117 | { 118 | "size" : "1024x1024", 119 | "idiom" : "ios-marketing", 120 | "scale" : "1x", 121 | "filename" : "ItunesArtwork@2x.png" 122 | } 123 | ], 124 | "info":{ 125 | "version":1, 126 | "author":"makeappicon" 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | "flutter_texture_registrar.h" 27 | ) 28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 29 | add_library(flutter INTERFACE) 30 | target_include_directories(flutter INTERFACE 31 | "${EPHEMERAL_DIR}" 32 | ) 33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 34 | add_dependencies(flutter flutter_assemble) 35 | 36 | # === Wrapper === 37 | list(APPEND CPP_WRAPPER_SOURCES_CORE 38 | "core_implementations.cc" 39 | "standard_codec.cc" 40 | ) 41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 43 | "plugin_registrar.cc" 44 | ) 45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 46 | list(APPEND CPP_WRAPPER_SOURCES_APP 47 | "flutter_engine.cc" 48 | "flutter_view_controller.cc" 49 | ) 50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 51 | 52 | # Wrapper sources needed for a plugin. 53 | add_library(flutter_wrapper_plugin STATIC 54 | ${CPP_WRAPPER_SOURCES_CORE} 55 | ${CPP_WRAPPER_SOURCES_PLUGIN} 56 | ) 57 | apply_standard_settings(flutter_wrapper_plugin) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | POSITION_INDEPENDENT_CODE ON) 60 | set_target_properties(flutter_wrapper_plugin PROPERTIES 61 | CXX_VISIBILITY_PRESET hidden) 62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 63 | target_include_directories(flutter_wrapper_plugin PUBLIC 64 | "${WRAPPER_ROOT}/include" 65 | ) 66 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 67 | 68 | # Wrapper sources needed for the runner. 69 | add_library(flutter_wrapper_app STATIC 70 | ${CPP_WRAPPER_SOURCES_CORE} 71 | ${CPP_WRAPPER_SOURCES_APP} 72 | ) 73 | apply_standard_settings(flutter_wrapper_app) 74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 75 | target_include_directories(flutter_wrapper_app PUBLIC 76 | "${WRAPPER_ROOT}/include" 77 | ) 78 | add_dependencies(flutter_wrapper_app flutter_assemble) 79 | 80 | # === Flutter tool backend === 81 | # _phony_ is a non-existent file to force this command to run every time, 82 | # since currently there's no way to get a full input/output list from the 83 | # flutter tool. 84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 86 | add_custom_command( 87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 89 | ${CPP_WRAPPER_SOURCES_APP} 90 | ${PHONY_OUTPUT} 91 | COMMAND ${CMAKE_COMMAND} -E env 92 | ${FLUTTER_TOOL_ENVIRONMENT} 93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 94 | windows-x64 $ 95 | VERBATIM 96 | ) 97 | add_custom_target(flutter_assemble DEPENDS 98 | "${FLUTTER_LIBRARY}" 99 | ${FLUTTER_LIBRARY_HEADERS} 100 | ${CPP_WRAPPER_SOURCES_CORE} 101 | ${CPP_WRAPPER_SOURCES_PLUGIN} 102 | ${CPP_WRAPPER_SOURCES_APP} 103 | ) 104 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 5 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 6 | import 'Screen/OnBoarding_Screen/Splash_Screen.dart'; 7 | import 'package:firebase_core/firebase_core.dart'; 8 | import 'package:firebase_messaging/firebase_messaging.dart'; 9 | import 'constants.dart'; 10 | //import 'services/PushNotificationService.dart'; 11 | import 'firebase_options.dart'; 12 | 13 | Future saveToken() async { 14 | String? token = await FirebaseMessaging.instance.getToken(); 15 | const storage = FlutterSecureStorage(); 16 | if (token != null) { 17 | storage.write( 18 | key: 'firebaseToken', 19 | value: token, 20 | ); 21 | } else { 22 | storage.write( 23 | key: 'firebaseToken', 24 | value: '', 25 | ); 26 | } 27 | } 28 | 29 | Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { 30 | // print("Message: ${message.data}"); 31 | // If you're going to use other Firebase services in the background, such as Firestore, 32 | // make sure you call `initializeApp` before using other Firebase services. 33 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 34 | await FirebaseMessaging.instance.subscribeToTopic(FIREBASE_TOPIC); 35 | // print('TOKEN ${FirebaseMessaging.instance.getToken()}'); 36 | // print('Handling a background message ${message.messageId}'); 37 | } 38 | 39 | /// Create a [AndroidNotificationChannel] for heads up notifications 40 | late AndroidNotificationChannel channel; 41 | 42 | /// Initialize the [FlutterLocalNotificationsPlugin] package. 43 | late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; 44 | 45 | void main() async { 46 | WidgetsFlutterBinding.ensureInitialized(); 47 | 48 | await Firebase.initializeApp( 49 | options: DefaultFirebaseOptions.currentPlatform, 50 | ); 51 | await FirebaseMessaging.instance.subscribeToTopic(FIREBASE_TOPIC); 52 | 53 | // Set the background messaging handler early on, as a named top-level function 54 | FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); 55 | 56 | if (!kIsWeb) { 57 | NotificationSettings settings = 58 | await FirebaseMessaging.instance.requestPermission( 59 | announcement: true, 60 | carPlay: true, 61 | criticalAlert: true, 62 | ); 63 | 64 | channel = const AndroidNotificationChannel( 65 | 'high_importance_channel', // id 66 | 'High Importance Notifications', // title 67 | description: 68 | 'This channel is used for important notifications.', // description 69 | importance: Importance.high, 70 | ); 71 | 72 | flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); 73 | 74 | await flutterLocalNotificationsPlugin.initialize( 75 | const InitializationSettings( 76 | android: AndroidInitializationSettings('@drawable/ic_stat_name'), 77 | iOS: IOSInitializationSettings()), 78 | onSelectNotification: (payload) async {}, 79 | ); 80 | 81 | /// Create an Android Notification Channel. 82 | /// 83 | /// We use this channel in the `AndroidManifest.xml` file to override the 84 | /// default FCM channel to enable heads up notifications. 85 | await flutterLocalNotificationsPlugin 86 | .resolvePlatformSpecificImplementation< 87 | AndroidFlutterLocalNotificationsPlugin>() 88 | ?.createNotificationChannel(channel); 89 | 90 | /// Update the iOS foreground notification presentation options to allow 91 | /// heads up notifications. 92 | await FirebaseMessaging.instance 93 | .setForegroundNotificationPresentationOptions( 94 | alert: true, 95 | badge: true, 96 | sound: true, 97 | ); 98 | } 99 | saveToken(); 100 | 101 | runApp(SplashScreenTemplate2()); 102 | SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( 103 | statusBarBrightness: Brightness.light, 104 | )); 105 | } 106 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | test 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 111 | 112 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: food_template 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.16.1 <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 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | 37 | badges: ^2.0.2 38 | # bloc_pattern: ^3.0.0 39 | cached_network_image: ^3.2.0 40 | connection_notifier: ^0.0.1 41 | cupertino_icons: ^1.0.2 42 | #firebase_core: ^1.11.0 43 | firebase_messaging: ^11.4.0 44 | flutter_native_splash: ^2.0.5 45 | flutter_slidable: ^1.2.0 46 | flutter_secure_storage: ^5.0.2 47 | http: ^0.13.3 48 | image_picker: ^0.8.4+9 49 | simple_animations: ^4.0.1 50 | #shimmer: ^2.0.0 51 | pretty_json: ^2.0.0 52 | intl: ^0.17.0 53 | rating_dialog: ^2.0.3 54 | animated_text_kit: ^4.2.1 55 | drop_shadow_image: ^0.9.1 56 | flutter_local_notifications: ^9.5.3+1 57 | #dependency_validator: ^3.2.0 58 | flutter_stripe: ^3.0.0 59 | 60 | 61 | 62 | dev_dependencies: 63 | flutter_test: 64 | sdk: flutter 65 | 66 | # The "flutter_lints" package below contains a set of recommended lints to 67 | # encourage good coding practices. The lint set provided by the package is 68 | # activated in the `analysis_options.yaml` file located at the root of your 69 | # package. See that file for information about deactivating specific lint 70 | # rules and activating additional ones. 71 | flutter_lints: ^1.0.0 72 | 73 | # For information on the generic Dart part of this file, see the 74 | # following page: https://dart.dev/tools/pub/pubspec 75 | 76 | 77 | flutter_native_splash: 78 | color: "#ffffff" 79 | image: assets/image/wholedata_logo_home.png 80 | android: true 81 | ios: true 82 | 83 | # The following section is specific to Flutter. 84 | flutter: 85 | 86 | # The following line ensures that the Material Icons font is 87 | # included with your application, so that you can use the icons in 88 | # the material Icons class. 89 | uses-material-design: true 90 | 91 | fonts: 92 | - family : Lemon 93 | fonts: 94 | - asset: assets/font/Lemon-Regular.ttf 95 | weight: 400 96 | - family : Sofia 97 | fonts: 98 | - asset: assets/font/Sofia/SofiaProBold.otf 99 | weight: 900 100 | - asset: assets/font/Sofia/SofiaProSemiBold.otf 101 | weight: 800 102 | - asset: assets/font/Sofia/SofiaProMedium.otf 103 | weight: 700 104 | - asset: assets/font/Sofia/SofiaProRegular.otf 105 | weight: 600 106 | - asset: assets/font/Sofia/SofiaProLight.otf 107 | weight: 500 108 | - asset: assets/font/Sofia/SofiaProExtraLight.otf 109 | weight: 400 110 | - asset: assets/font/Sofia/SofiaProUltraLight.otf 111 | weight: 300 112 | - family : Poppins 113 | fonts: 114 | - asset: assets/font/Poppins/Poppins-ExtraBold.otf 115 | weight: 900 116 | - asset: assets/font/Poppins/Poppins-Bold.otf 117 | weight: 800 118 | - asset: assets/font/Poppins/Poppins-SemiBold.otf 119 | weight: 700 120 | - asset: assets/font/Poppins/Poppins-Medium.otf 121 | weight: 600 122 | - asset: assets/font/Poppins/Poppins-Regular.otf 123 | weight: 500 124 | - asset: assets/font/Poppins/Poppins-Light.otf 125 | weight: 400 126 | - asset: assets/font/Poppins/Poppins-ExtraLight.otf 127 | weight: 300 128 | - asset: assets/font/Poppins/Poppins-Thin.otf 129 | weight: 200 130 | 131 | assets: 132 | 133 | - assets/ 134 | - assets/image/ 135 | -------------------------------------------------------------------------------- /lib/models/cartModel.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:collection'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 6 | import 'package:food_template/models/productModel.dart'; 7 | import 'package:pretty_json/pretty_json.dart'; 8 | //import 'package:shared_preferences/shared_preferences.dart'; 9 | import 'package:http/http.dart' as http; 10 | import 'package:food_template/constants.dart'; 11 | import 'package:food_template/models/userModel.dart'; 12 | 13 | Future> insertOrder(CartModel cart) async { 14 | Token token = await fetchTokenFromPref(); 15 | final uri = Uri.https(BASE_URL, 'api/orders/create/'); 16 | final header = { 17 | HttpHeaders.authorizationHeader: 'Bearer ${token.accessToken}', 18 | HttpHeaders.contentTypeHeader: 'application/json' 19 | }; 20 | 21 | cart.total = cart.total + cart.deliveryFee; 22 | 23 | String mapCart = jsonEncode(cart.toCartJson()); 24 | http.Response response = await http.post( 25 | uri, 26 | headers: header, 27 | body: mapCart, 28 | encoding: Encoding.getByName("utf-8"), 29 | ); 30 | switch (response.statusCode) { 31 | case 201: 32 | return json.decode(response.body); 33 | case 205: 34 | return json.decode('{"error": "Stripe checkout error"}'); 35 | case 400: 36 | return json.decode('{"error": "Bad request"}'); 37 | case 500: 38 | return json.decode('{"error": "Server error"}'); 39 | default: 40 | return json.decode('{"error": "Unknown error"}'); 41 | } 42 | } 43 | 44 | Future fetchCartFromPref() async { 45 | const storage = FlutterSecureStorage(); 46 | // SharedPreferences sharedRest = await SharedPreferences.getInstance(); 47 | 48 | String? json = await storage.read(key: 'cart'); 49 | 50 | if (json != null) { 51 | return compute(parseCart, json); 52 | } else { 53 | return CartModel(0.0, []); 54 | } 55 | } 56 | 57 | CartModel updateTotalCart(CartModel cart) { 58 | if (cart.cartItems.isNotEmpty) { 59 | cart.total = 0.0; 60 | for (var element in cart.cartItems) { 61 | cart.total = cart.total + (element.price * element.quantity); 62 | } 63 | } else { 64 | cart.total = 0.0; 65 | } 66 | 67 | return cart; 68 | } 69 | 70 | Future saveCartPrefs(CartModel cart) async { 71 | const storage = FlutterSecureStorage(); 72 | CartModel cartUpdated = updateTotalCart(cart); 73 | //SharedPreferences sharedRest = await SharedPreferences.getInstance(); 74 | String jsonCart = jsonEncode(cartUpdated); 75 | 76 | storage.write(key: 'cart', value: jsonCart); 77 | return true; 78 | } 79 | 80 | CartModel parseCart(String responseBody) { 81 | final parsed = jsonDecode(responseBody); 82 | //printPrettyJson(parsed, indent: 2); 83 | return CartModel.fromJson(parsed); 84 | } 85 | 86 | class CartModel { 87 | List? items = []; 88 | double total = 0.0; 89 | double deliveryFee = 0.0; 90 | String restaurant = ''; 91 | String restaurantName = ''; 92 | String paymentType = ''; 93 | String deliverType = ''; 94 | String status = ''; 95 | String fullName = ''; 96 | String address = ''; 97 | String city = ''; 98 | String note = ''; 99 | String user = ''; 100 | String email = ''; 101 | String telephone = ''; 102 | String timeDelivery = ''; 103 | String firebaseToken = ''; 104 | String stripeAccountId = ''; 105 | bool onlinePayment = false; 106 | bool pickup = false; 107 | bool deliveryAsap = false; 108 | 109 | CartModel(this.total, [this.items]); 110 | 111 | factory CartModel.fromJson(dynamic json) { 112 | if (json['items'] != null) { 113 | var total = json['total'] as double; 114 | var prodJson = json['items'] as List; 115 | List _items = 116 | prodJson.map((pJson) => Product.fromCartJson(pJson)).toList(); 117 | return CartModel( 118 | total, 119 | _items, 120 | ); 121 | } else { 122 | return CartModel( 123 | 0.0, 124 | [], 125 | ); 126 | } 127 | } 128 | Map toJson() { 129 | List? items = this.items != null 130 | ? this.items!.map((i) => i.toCartJson()).toList() 131 | : null; 132 | return { 133 | 'items': items, 134 | 'total': total, 135 | 'deliveryFee': deliveryFee, 136 | 'restaurant': restaurant, 137 | 'restauraName': restaurantName, 138 | 'paymentType': paymentType, 139 | 'deliverType': deliverType, 140 | 'delivery_asap': deliveryAsap, 141 | 'is_pickup': pickup, 142 | 'status': status, 143 | 'address': address, 144 | 'city': city, 145 | 'telephone': telephone, 146 | 'user': user, 147 | 'email': email, 148 | 'fullname': fullName, 149 | 'timeDelivery': timeDelivery, 150 | 'firebaseToken': firebaseToken, 151 | 'onlinePayment': onlinePayment, 152 | 'stripeAccountId': stripeAccountId, 153 | 'note': note, 154 | }; 155 | } 156 | 157 | Map toCartJson() { 158 | List? items = this.items != null 159 | ? this.items!.map((i) => i.toCartJson()).toList() 160 | : null; 161 | return { 162 | "food_list": items, 163 | "total": total.toString(), 164 | "deliveryFee": deliveryFee.toString(), 165 | "restaurant": restaurant.toString(), 166 | "restaurant_name": restaurantName.toString(), 167 | "payment_type": paymentType.toString(), 168 | "deliver_type": deliverType.toString(), 169 | "delivery_asap": deliveryAsap.toString(), 170 | "is_pickup": pickup.toString(), 171 | "status": status.toString(), 172 | "address": address.toString(), 173 | "city": city.toString(), 174 | "telephone": telephone.toString(), 175 | "email": email.toString(), 176 | "user": user.toString(), 177 | "fullname": fullName.toString(), 178 | "deliver_time": timeDelivery.toString(), 179 | "firebase_id": firebaseToken.toString(), 180 | "online_payment": onlinePayment.toString(), 181 | "note": note.toString() 182 | }; 183 | } 184 | 185 | List get cartItems { 186 | return items!; 187 | } 188 | 189 | // 190 | // void add(Product item) { 191 | // items!.add(item); 192 | // } 193 | // 194 | // void remove(Product item) { 195 | // items!.remove(item); 196 | // } 197 | // 198 | void removeAll() { 199 | items!.clear(); 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /lib/Screen/Bottom_Nav_Bar/Bottom_Navigation_Bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:badges/badges.dart'; 2 | import 'package:connection_notifier/connection_notifier.dart'; 3 | import 'package:flutter/material.dart'; 4 | import '/models/userModel.dart'; 5 | import '/models/cartModel.dart'; 6 | import '/Library/no_connection.dart'; 7 | import '/Screen/OnBoarding_Screen/Choose_Login.dart'; 8 | import '/Screen/B1_Home_Screen/B1_Home_Screen_T2.dart'; 9 | import '/Screen/B2_Favorite_Screen/B2_Favorite_Screen.dart'; 10 | import '/Screen/B4_Cart_Screen/B4_Cart_Screen.dart'; 11 | import '/Screen/B5_Profile_Screen/B5_Profile_Screen.dart'; 12 | 13 | class BottomNavigationBarT2 extends StatefulWidget { 14 | const BottomNavigationBarT2({Key? key}) : super(key: key); 15 | 16 | @override 17 | _BottomNavigationBarT2State createState() => _BottomNavigationBarT2State(); 18 | } 19 | 20 | class _BottomNavigationBarT2State extends State { 21 | int currentIndex = 0; 22 | int currentPage = 0; 23 | CartModel? _cart; 24 | 25 | /// Set a type current number a layout class 26 | 27 | Widget callPage(int current) { 28 | switch (current) { 29 | case 0: 30 | return HomeScreenT2(); 31 | case 1: 32 | return FavoriteScreenT2(); 33 | case 2: 34 | return MyOrderScreenT2(); 35 | case 3: 36 | return const ProfileScreenT2(); 37 | case 4: 38 | return const ChooseLogin(); 39 | default: 40 | return HomeScreenT2(); 41 | } 42 | } 43 | 44 | @override 45 | void initState() { 46 | // TODO: implement initState 47 | 48 | fetchCartFromPref().then((CartModel res) { 49 | setState(() { 50 | _cart = res; 51 | }); 52 | }); 53 | 54 | super.initState(); 55 | } 56 | 57 | /// Build BottomNavigationBar Widget 58 | @override 59 | Widget build(BuildContext context) { 60 | return FutureBuilder( 61 | future: fetchUserdataFromPref(), 62 | builder: (context, snapshot) { 63 | if (snapshot.hasData) { 64 | return Scaffold( 65 | body: ConnectionNotifierToggler( 66 | onConnectionStatusChanged: (connected) { 67 | /// that means it is still in the initialization phase. 68 | if (connected == null) return; 69 | }, 70 | connected: callPage(currentPage), 71 | disconnected: const NoConnection(), 72 | ), 73 | bottomNavigationBar: Theme( 74 | data: Theme.of(context).copyWith( 75 | canvasColor: Colors.white70, 76 | // textTheme: Theme.of(context).textTheme.copyWith( 77 | // caption: const TextStyle(color: Colors.white), 78 | // ), 79 | ), 80 | child: BottomNavigationBar( 81 | type: BottomNavigationBarType.fixed, 82 | currentIndex: currentIndex, 83 | fixedColor: Colors.amber.shade700, 84 | elevation: 1, 85 | onTap: (value) { 86 | if (value == 1 || value == 3) { 87 | if (snapshot.data!.username != '') { 88 | currentIndex = value; 89 | currentPage = value; 90 | } else { 91 | currentIndex = value; 92 | currentPage = 4; 93 | } 94 | } else { 95 | currentIndex = value; 96 | currentPage = value; 97 | } 98 | 99 | fetchCartFromPref().then((CartModel res) { 100 | setState(() { 101 | _cart = res; 102 | }); 103 | }); 104 | 105 | setState(() {}); 106 | }, 107 | items: [ 108 | const BottomNavigationBarItem( 109 | icon: Icon( 110 | Icons.home_rounded, 111 | size: 20.0, 112 | ), 113 | label: 'Home'), 114 | const BottomNavigationBarItem( 115 | icon: Icon( 116 | Icons.favorite_rounded, 117 | size: 20.0, 118 | ), 119 | label: "Favoriti", 120 | ), 121 | // BottomNavigationBarItem( 122 | // icon: Icon(Icons.grain), 123 | // label: "Category", 124 | // ), 125 | BottomNavigationBarItem( 126 | icon: _cart!.items!.isNotEmpty 127 | ? Badge( 128 | badgeContent: Text(_cart!.items!.length.toString()), 129 | badgeColor: Colors.red.shade400, 130 | padding: const EdgeInsets.all(3), 131 | child: const Icon( 132 | Icons.shopping_cart_rounded, 133 | size: 20.0, 134 | ), 135 | ) 136 | : const Icon( 137 | Icons.shopping_cart_rounded, 138 | size: 20.0, 139 | ), 140 | label: "Carrello", 141 | ), 142 | const BottomNavigationBarItem( 143 | icon: Icon( 144 | Icons.person_rounded, 145 | size: 20.0, 146 | ), 147 | label: "Profilo", 148 | ), 149 | ], 150 | ), 151 | ), 152 | ); 153 | } else { 154 | return Scaffold( 155 | backgroundColor: Colors.white, 156 | body: ConnectionNotifierToggler( 157 | onConnectionStatusChanged: (connected) { 158 | if (connected == null) return; 159 | // print(connected); 160 | }, 161 | connected: Center( 162 | child: CircularProgressIndicator( 163 | color: Colors.amber.shade700, 164 | ), 165 | ), 166 | disconnected: const NoConnection(), 167 | ), 168 | ); 169 | } 170 | }, 171 | ); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/UI/page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/page_view_model.dart'; 3 | 4 | /// This is the class which contains the Page UI. 5 | class PageOnBoarding extends StatelessWidget { 6 | ///page details 7 | final PageViewModel pageViewModel; 8 | 9 | ///percent visible of page 10 | final double percentVisible; 11 | 12 | /// [MainAxisAligment] 13 | final MainAxisAlignment columnMainAxisAlignment; 14 | 15 | //Constructor 16 | PageOnBoarding({ 17 | required this.pageViewModel, 18 | this.percentVisible = 1.0, 19 | this.columnMainAxisAlignment = MainAxisAlignment.start, 20 | }); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return new Container( 25 | padding: const EdgeInsets.all(8.0), 26 | width: double.infinity, 27 | color: pageViewModel.pageColor, 28 | child: new Opacity( 29 | //Opacity is used to create fade in effect 30 | opacity: percentVisible, 31 | child: new OrientationBuilder( 32 | builder: (BuildContext context, Orientation orientation) { 33 | return orientation == Orientation.portrait 34 | ? _buildPortraitPage() 35 | : __buildLandscapePage(); 36 | }), //OrientationBuilder 37 | ), 38 | ); 39 | } 40 | 41 | /// when device is Portrait place title, image and body in a column 42 | Widget _buildPortraitPage() { 43 | return new Column( 44 | mainAxisAlignment: columnMainAxisAlignment, 45 | mainAxisSize: MainAxisSize.max, 46 | children: [ 47 | Expanded( 48 | flex: 4, 49 | child: new _ImagePageTransform( 50 | percentVisible: percentVisible, 51 | pageViewModel: pageViewModel, 52 | ), 53 | ), //Transform 54 | Flexible( 55 | flex: 1, 56 | child: new _TitlePageTransform( 57 | percentVisible: percentVisible, 58 | pageViewModel: pageViewModel, 59 | ), 60 | ), //Transform 61 | Flexible( 62 | flex: 2, 63 | child: new _BodyPageTransform( 64 | percentVisible: percentVisible, 65 | pageViewModel: pageViewModel, 66 | ), 67 | ), //Transform 68 | ], 69 | ); 70 | } 71 | 72 | /// if Device is Landscape reorder with row and column 73 | Widget __buildLandscapePage() { 74 | return new Row( 75 | crossAxisAlignment: CrossAxisAlignment.center, 76 | mainAxisSize: MainAxisSize.max, 77 | children: [ 78 | Expanded( 79 | child: new _ImagePageTransform( 80 | percentVisible: percentVisible, 81 | pageViewModel: pageViewModel, 82 | ), 83 | ), //Transform 84 | 85 | new Flexible( 86 | child: new Column( 87 | mainAxisAlignment: columnMainAxisAlignment, 88 | mainAxisSize: MainAxisSize.max, 89 | children: [ 90 | new _TitlePageTransform( 91 | percentVisible: percentVisible, 92 | pageViewModel: pageViewModel, 93 | ), //Transform 94 | new _BodyPageTransform( 95 | percentVisible: percentVisible, 96 | pageViewModel: pageViewModel, 97 | ), //Transform 98 | ], 99 | ), // Column 100 | ), 101 | ], 102 | ); 103 | } 104 | } 105 | 106 | /// Body for the Page. 107 | class _BodyPageTransform extends StatelessWidget { 108 | final double percentVisible; 109 | 110 | final PageViewModel pageViewModel; 111 | 112 | const _BodyPageTransform({ 113 | Key? key, 114 | required this.percentVisible, 115 | required this.pageViewModel, 116 | }) : super(key: key); 117 | 118 | @override 119 | Widget build(BuildContext context) { 120 | return new Transform( 121 | //Used for vertical transformation 122 | transform: 123 | new Matrix4.translationValues(0.0, 30.0 * (1 - percentVisible), 0.0), 124 | child: new Padding( 125 | padding: const EdgeInsets.only( 126 | bottom: 15.0, 127 | left: 10.0, 128 | right: 10.0, 129 | ), 130 | child: DefaultTextStyle.merge( 131 | style: pageViewModel.bodyTextStyle, 132 | textAlign: TextAlign.center, 133 | child: pageViewModel.body, 134 | ), 135 | ), //Padding 136 | ); 137 | } 138 | } 139 | 140 | /// Main Image of the Page 141 | class _ImagePageTransform extends StatelessWidget { 142 | final double percentVisible; 143 | 144 | final PageViewModel pageViewModel; 145 | 146 | const _ImagePageTransform({ 147 | Key? key, 148 | required this.percentVisible, 149 | required this.pageViewModel, 150 | }) : super(key: key); 151 | 152 | @override 153 | Widget build(BuildContext context) { 154 | return new Transform( 155 | //Used for vertical transformation 156 | transform: 157 | new Matrix4.translationValues(0.0, 50.0 * (1 - percentVisible), 0.0), 158 | child: new Padding( 159 | padding: new EdgeInsets.only( 160 | top: 60.0, 161 | bottom: 0.0, 162 | ), 163 | child: new Container( 164 | width: double.infinity, 165 | child: pageViewModel.mainImage, //Loading main 166 | ), //Container 167 | ), //Padding 168 | ); 169 | } 170 | } 171 | 172 | /// Title for the Page 173 | class _TitlePageTransform extends StatelessWidget { 174 | final double percentVisible; 175 | 176 | final PageViewModel pageViewModel; 177 | 178 | const _TitlePageTransform({ 179 | Key? key, 180 | required this.percentVisible, 181 | required this.pageViewModel, 182 | }) : super(key: key); 183 | 184 | @override 185 | Widget build(BuildContext context) { 186 | return new Transform( 187 | //Used for vertical transformation 188 | transform: 189 | new Matrix4.translationValues(0.0, 30.0 * (1 - percentVisible), 0.0), 190 | child: new Padding( 191 | padding: new EdgeInsets.only( 192 | bottom: 0.0, 193 | left: 10.0, 194 | right: 10.0, 195 | ), 196 | child: DefaultTextStyle.merge( 197 | style: pageViewModel.titleTextStyle, 198 | child: pageViewModel.title, 199 | ), 200 | ), //Padding 201 | ); 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - awesome_notifications (0.0.3): 3 | - Flutter 4 | - Firebase/CoreOnly (8.14.0): 5 | - FirebaseCore (= 8.14.0) 6 | - Firebase/Messaging (8.14.0): 7 | - Firebase/CoreOnly 8 | - FirebaseMessaging (~> 8.14.0) 9 | - firebase_core (1.14.1): 10 | - Firebase/CoreOnly (= 8.14.0) 11 | - Flutter 12 | - firebase_messaging (11.4.0): 13 | - Firebase/Messaging (= 8.14.0) 14 | - firebase_core 15 | - Flutter 16 | - FirebaseCore (8.14.0): 17 | - FirebaseCoreDiagnostics (~> 8.0) 18 | - GoogleUtilities/Environment (~> 7.7) 19 | - GoogleUtilities/Logger (~> 7.7) 20 | - FirebaseCoreDiagnostics (8.15.0): 21 | - GoogleDataTransport (~> 9.1) 22 | - GoogleUtilities/Environment (~> 7.7) 23 | - GoogleUtilities/Logger (~> 7.7) 24 | - nanopb (~> 2.30908.0) 25 | - FirebaseInstallations (8.15.0): 26 | - FirebaseCore (~> 8.0) 27 | - GoogleUtilities/Environment (~> 7.7) 28 | - GoogleUtilities/UserDefaults (~> 7.7) 29 | - PromisesObjC (< 3.0, >= 1.2) 30 | - FirebaseMessaging (8.14.0): 31 | - FirebaseCore (~> 8.0) 32 | - FirebaseInstallations (~> 8.0) 33 | - GoogleDataTransport (~> 9.1) 34 | - GoogleUtilities/AppDelegateSwizzler (~> 7.7) 35 | - GoogleUtilities/Environment (~> 7.7) 36 | - GoogleUtilities/Reachability (~> 7.7) 37 | - GoogleUtilities/UserDefaults (~> 7.7) 38 | - nanopb (~> 2.30908.0) 39 | - Flutter (1.0.0) 40 | - flutter_local_notifications (0.0.1): 41 | - Flutter 42 | - flutter_native_splash (0.0.1): 43 | - Flutter 44 | - flutter_secure_storage (3.3.1): 45 | - Flutter 46 | - FMDB (2.7.5): 47 | - FMDB/standard (= 2.7.5) 48 | - FMDB/standard (2.7.5) 49 | - GoogleDataTransport (9.1.2): 50 | - GoogleUtilities/Environment (~> 7.2) 51 | - nanopb (~> 2.30908.0) 52 | - PromisesObjC (< 3.0, >= 1.2) 53 | - GoogleUtilities/AppDelegateSwizzler (7.7.0): 54 | - GoogleUtilities/Environment 55 | - GoogleUtilities/Logger 56 | - GoogleUtilities/Network 57 | - GoogleUtilities/Environment (7.7.0): 58 | - PromisesObjC (< 3.0, >= 1.2) 59 | - GoogleUtilities/Logger (7.7.0): 60 | - GoogleUtilities/Environment 61 | - GoogleUtilities/Network (7.7.0): 62 | - GoogleUtilities/Logger 63 | - "GoogleUtilities/NSData+zlib" 64 | - GoogleUtilities/Reachability 65 | - "GoogleUtilities/NSData+zlib (7.7.0)" 66 | - GoogleUtilities/Reachability (7.7.0): 67 | - GoogleUtilities/Logger 68 | - GoogleUtilities/UserDefaults (7.7.0): 69 | - GoogleUtilities/Logger 70 | - image_picker_ios (0.0.1): 71 | - Flutter 72 | - nanopb (2.30908.0): 73 | - nanopb/decode (= 2.30908.0) 74 | - nanopb/encode (= 2.30908.0) 75 | - nanopb/decode (2.30908.0) 76 | - nanopb/encode (2.30908.0) 77 | - path_provider_ios (0.0.1): 78 | - Flutter 79 | - PromisesObjC (2.1.0) 80 | - shared_preferences_ios (0.0.1): 81 | - Flutter 82 | - sqflite (0.0.2): 83 | - Flutter 84 | - FMDB (>= 2.7.5) 85 | - Stripe (21.12.0): 86 | - Stripe/Stripe3DS2 (= 21.12.0) 87 | - StripeApplePay (= 21.12.0) 88 | - StripeCore (= 21.12.0) 89 | - StripeUICore (= 21.12.0) 90 | - Stripe/Stripe3DS2 (21.12.0): 91 | - StripeApplePay (= 21.12.0) 92 | - StripeCore (= 21.12.0) 93 | - StripeUICore (= 21.12.0) 94 | - stripe_ios (0.0.1): 95 | - Flutter 96 | - Stripe (~> 21.12.0) 97 | - StripeApplePay (21.12.0): 98 | - StripeCore (= 21.12.0) 99 | - StripeCore (21.12.0) 100 | - StripeUICore (21.12.0): 101 | - StripeCore (= 21.12.0) 102 | 103 | DEPENDENCIES: 104 | - firebase_core (from `.symlinks/plugins/firebase_core/ios`) 105 | - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) 106 | - Flutter (from `Flutter`) 107 | - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) 108 | - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) 109 | - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) 110 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) 111 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 112 | - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) 113 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 114 | - stripe_ios (from `.symlinks/plugins/stripe_ios/ios`) 115 | 116 | SPEC REPOS: 117 | trunk: 118 | - Firebase 119 | - FirebaseCore 120 | - FirebaseCoreDiagnostics 121 | - FirebaseInstallations 122 | - FirebaseMessaging 123 | - FMDB 124 | - GoogleDataTransport 125 | - GoogleUtilities 126 | - nanopb 127 | - PromisesObjC 128 | - Stripe 129 | - StripeApplePay 130 | - StripeCore 131 | - StripeUICore 132 | 133 | EXTERNAL SOURCES: 134 | awesome_notifications: 135 | :path: ".symlinks/plugins/awesome_notifications/ios" 136 | firebase_core: 137 | :path: ".symlinks/plugins/firebase_core/ios" 138 | firebase_messaging: 139 | :path: ".symlinks/plugins/firebase_messaging/ios" 140 | Flutter: 141 | :path: Flutter 142 | flutter_local_notifications: 143 | :path: ".symlinks/plugins/flutter_local_notifications/ios" 144 | flutter_native_splash: 145 | :path: ".symlinks/plugins/flutter_native_splash/ios" 146 | flutter_secure_storage: 147 | :path: ".symlinks/plugins/flutter_secure_storage/ios" 148 | image_picker_ios: 149 | :path: ".symlinks/plugins/image_picker_ios/ios" 150 | path_provider_ios: 151 | :path: ".symlinks/plugins/path_provider_ios/ios" 152 | shared_preferences_ios: 153 | :path: ".symlinks/plugins/shared_preferences_ios/ios" 154 | sqflite: 155 | :path: ".symlinks/plugins/sqflite/ios" 156 | stripe_ios: 157 | :path: ".symlinks/plugins/stripe_ios/ios" 158 | 159 | SPEC CHECKSUMS: 160 | awesome_notifications: 04530aafec8dac4635244ed4b4072f4aea6cc938 161 | Firebase: 7e8fe528c161b9271d365217a74c16aaf834578e 162 | firebase_core: cdef02fcf55872191eb0568d4c31a7a700e38582 163 | firebase_messaging: 93a33994ae5ba316ffebf35443243694828ad845 164 | FirebaseCore: b84a44ee7ba999e0f9f76d198a9c7f60a797b848 165 | FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb 166 | FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd 167 | FirebaseMessaging: 5ebc42d281567658a2cb72b9ef3506e4a1a1a6e4 168 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 169 | flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 170 | flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef 171 | flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec 172 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 173 | GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940 174 | GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1 175 | image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb 176 | nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 177 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 178 | PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72 179 | shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad 180 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 181 | Stripe: c3692f360abcdfeef9751e3c240e7efbc68b921f 182 | stripe_ios: bfa5113de686073731d1ebbaecc0e863a2e110b7 183 | StripeApplePay: 14db90fdf89abb2809ce41fc68bc6b1a86221408 184 | StripeCore: 5e38cdea3dc176a32d8797ef312fe1ab41571272 185 | StripeUICore: c28e371b385f968388ae38bedb93a2723c078442 186 | 187 | PODFILE CHECKSUM: 740578d4e64ee51c39ea1acb9b29aa0c2fab78bf 188 | 189 | COCOAPODS: 1.11.3 190 | -------------------------------------------------------------------------------- /lib/Library/intro_views_flutter-2.4.0/lib/UI/page_indicator_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Constants/constants.dart'; 3 | 4 | import 'package:food_template/Library/intro_views_flutter-2.4.0/lib/Models/page_button_view_model.dart'; 5 | 6 | /// Skip, Next, and Back button class 7 | 8 | class DefaultButton extends StatelessWidget { 9 | //callback for skip button 10 | final VoidCallback onTap; 11 | 12 | //view model 13 | final PageButtonViewModel pageButtonViewModel; 14 | final Widget child; 15 | 16 | //Constructor 17 | DefaultButton({ 18 | required this.onTap, 19 | required this.pageButtonViewModel, 20 | required this.child, 21 | }); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | //Calculating opacity to create a fade in effect 26 | double opacity = 1.0; 27 | final TextStyle style = DefaultTextStyle.of(context).style; 28 | if (pageButtonViewModel.activePageIndex == 29 | pageButtonViewModel.totalPages - 2 && 30 | pageButtonViewModel.slideDirection == SlideDirection.rightToLeft) { 31 | opacity = 1.0 - pageButtonViewModel.slidePercent; 32 | } else if (pageButtonViewModel.activePageIndex == 33 | pageButtonViewModel.totalPages - 1 && 34 | pageButtonViewModel.slideDirection == SlideDirection.leftToRight) { 35 | opacity = pageButtonViewModel.slidePercent; 36 | } 37 | 38 | return FlatButton( 39 | onPressed: onTap, 40 | child: Opacity( 41 | opacity: opacity, 42 | child: DefaultTextStyle.merge( 43 | style: style, 44 | child: child, 45 | ), //Text 46 | ), //Opacity 47 | ); //FlatButton 48 | } 49 | } 50 | 51 | /// Done Button class 52 | 53 | class DoneButton extends StatelessWidget { 54 | //Callback 55 | final VoidCallback onTap; 56 | 57 | //View Model 58 | final PageButtonViewModel pageButtonViewModel; 59 | final Widget child; 60 | 61 | //Constructor 62 | DoneButton({ 63 | required this.onTap, 64 | required this.pageButtonViewModel, 65 | required this.child, 66 | }); 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | //Calculating opacity so as to create a fade in effect 71 | double opacity = 1.0; 72 | final TextStyle style = DefaultTextStyle.of(context).style; 73 | if (pageButtonViewModel.activePageIndex == 74 | pageButtonViewModel.totalPages - 1 && 75 | pageButtonViewModel.slideDirection == SlideDirection.leftToRight) { 76 | opacity = 1.0 - pageButtonViewModel.slidePercent; 77 | } 78 | 79 | return FlatButton( 80 | onPressed: onTap, 81 | child: Opacity( 82 | opacity: opacity, 83 | child: DefaultTextStyle.merge( 84 | style: style, 85 | child: child, //Text 86 | ), 87 | ), //Opacity 88 | ); //FlatButton 89 | } 90 | } 91 | 92 | class PageIndicatorButtons extends StatelessWidget { 93 | //Some variables 94 | final int activePageIndex; 95 | final int totalPages; 96 | final VoidCallback onPressedDoneButton; //Callback for Done Button 97 | final VoidCallback onPressedNextButton; 98 | final VoidCallback onPressedBackButton; 99 | final VoidCallback onPressedSkipButton; //Callback for Skip Button 100 | final SlideDirection slideDirection; 101 | final double slidePercent; 102 | final bool showSkipButton; 103 | final bool showNextButton; 104 | final bool showBackButton; 105 | 106 | final Widget doneText; 107 | final Widget skipText; 108 | final Widget nextText; 109 | final Widget backText; 110 | final TextStyle textStyle; 111 | 112 | final bool doneButtonPersist; 113 | 114 | Widget _getDoneORNextButton() { 115 | if ((activePageIndex < totalPages - 1 || 116 | (activePageIndex == totalPages - 1 && 117 | slideDirection == SlideDirection.leftToRight)) && 118 | showNextButton) { 119 | return DefaultButton( 120 | child: nextText, 121 | onTap: onPressedNextButton, 122 | pageButtonViewModel: PageButtonViewModel( 123 | //View Model 124 | activePageIndex: activePageIndex, 125 | totalPages: totalPages, 126 | slidePercent: slidePercent, 127 | slideDirection: slideDirection, 128 | ), 129 | ); 130 | } else if (activePageIndex == totalPages - 1 || 131 | (activePageIndex == totalPages - 2 && 132 | slideDirection == SlideDirection.rightToLeft || 133 | doneButtonPersist)) { 134 | return DoneButton( 135 | child: doneText, 136 | onTap: onPressedDoneButton, 137 | pageButtonViewModel: PageButtonViewModel( 138 | //view Model 139 | activePageIndex: activePageIndex, 140 | totalPages: totalPages, 141 | slidePercent: doneButtonPersist ? 0.0 : slidePercent, 142 | slideDirection: slideDirection, 143 | ), 144 | ); 145 | } else { 146 | return Container(); 147 | } 148 | } 149 | 150 | Widget _getSkipORBackButton() { 151 | if (activePageIndex <= totalPages && 152 | activePageIndex >= 1 && 153 | showBackButton) { 154 | return DefaultButton( 155 | child: backText, 156 | onTap: onPressedBackButton, 157 | pageButtonViewModel: PageButtonViewModel( 158 | //View Model 159 | activePageIndex: activePageIndex, 160 | totalPages: totalPages, 161 | slidePercent: slidePercent, 162 | slideDirection: slideDirection, 163 | ), 164 | ); 165 | } else if ((activePageIndex < totalPages - 1 || 166 | (activePageIndex == totalPages - 1 && 167 | slideDirection == SlideDirection.leftToRight)) && 168 | showSkipButton) { 169 | return DefaultButton( 170 | child: skipText, 171 | onTap: onPressedSkipButton, 172 | pageButtonViewModel: PageButtonViewModel( 173 | //View Model 174 | activePageIndex: activePageIndex, 175 | totalPages: totalPages, 176 | slidePercent: slidePercent, 177 | slideDirection: slideDirection, 178 | ), 179 | ); 180 | } else { 181 | return Container(); 182 | } 183 | } 184 | 185 | //Constructor 186 | PageIndicatorButtons({ 187 | required this.activePageIndex, 188 | required this.totalPages, 189 | required this.onPressedDoneButton, 190 | required this.slideDirection, 191 | required this.slidePercent, 192 | required this.onPressedSkipButton, 193 | required this.onPressedNextButton, 194 | required this.onPressedBackButton, 195 | required this.showSkipButton, 196 | required this.skipText, 197 | required this.nextText, 198 | required this.doneText, 199 | required this.textStyle, 200 | required this.doneButtonPersist, 201 | this.showNextButton = true, 202 | this.showBackButton = true, 203 | required this.backText, 204 | }); 205 | 206 | @override 207 | Widget build(BuildContext context) { 208 | return Positioned( 209 | left: 0.0, 210 | right: 0.0, 211 | bottom: 0.0, 212 | child: DefaultTextStyle( 213 | style: textStyle, 214 | child: Row( 215 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 216 | crossAxisAlignment: CrossAxisAlignment.center, 217 | mainAxisSize: MainAxisSize.max, 218 | children: [ 219 | Padding( 220 | padding: const EdgeInsets.only(bottom: 10.0), 221 | child: _getSkipORBackButton() //Row 222 | ), //Padding 223 | Padding( 224 | padding: const EdgeInsets.only(bottom: 10.0), 225 | child: _getDoneORNextButton() //Row 226 | ) 227 | ], 228 | ), 229 | ), 230 | ); 231 | } 232 | } 233 | -------------------------------------------------------------------------------- /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/Screen/B4_Cart_Screen/Step_Order/1_Delivery_option.dart: -------------------------------------------------------------------------------- 1 | import 'package:connection_notifier/connection_notifier.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:food_template/Screen/B4_Cart_Screen/Step_Order/2_Time_Screen.dart'; 4 | import 'package:intl/intl.dart'; 5 | import '/models/cartModel.dart'; 6 | import '/models/restaurantModel.dart'; 7 | import '/models/userModel.dart'; 8 | import '/Library/no_connection.dart'; 9 | 10 | class DeliveryScreenT2 extends StatefulWidget { 11 | DeliveryScreenT2({ 12 | Key? key, 13 | required this.cart, 14 | required this.user, 15 | required this.restaurant, 16 | }) : super(key: key); 17 | 18 | CartModel? cart; 19 | final User? user; 20 | final Restaurant? restaurant; 21 | @override 22 | _DeliveryScreenT2State createState() => _DeliveryScreenT2State(); 23 | } 24 | 25 | class _DeliveryScreenT2State extends State { 26 | bool enabled = true; 27 | bool pickUp = false; 28 | late CartModel? _cart; 29 | late User? _user; 30 | late Restaurant? _restaurant; 31 | final TextEditingController _userController = TextEditingController(); 32 | final TextEditingController _cityController = TextEditingController(); 33 | final TextEditingController _addressController = TextEditingController(); 34 | final TextEditingController _telephoneController = TextEditingController(); 35 | final TextEditingController _noteController = TextEditingController(); 36 | final TextEditingController _timeController = TextEditingController(); 37 | 38 | @override 39 | void initState() { 40 | // TODO: implement initState 41 | _cart = widget.cart; 42 | _user = widget.user; 43 | _restaurant = widget.restaurant; 44 | _userController.text = '${_user!.firstName} ${_user!.lastName}'; 45 | _cityController.text = _user!.city; 46 | _addressController.text = _user!.address; 47 | _telephoneController.text = _user!.telephone; 48 | _noteController.text = ''; 49 | super.initState(); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Scaffold( 55 | backgroundColor: Colors.white, 56 | appBar: AppBar( 57 | leading: const BackButton( 58 | color: Colors.black54, 59 | ), 60 | centerTitle: true, 61 | backgroundColor: Colors.white70, 62 | title: const Text( 63 | "Indirizzo di consegna", 64 | style: TextStyle( 65 | color: Colors.black54, 66 | fontFamily: "Sofia", 67 | fontSize: 20.0, 68 | fontWeight: FontWeight.w600), 69 | ), 70 | elevation: 1, 71 | ), 72 | body: ConnectionNotifierToggler( 73 | onConnectionStatusChanged: (connected) { 74 | /// that means it is still in the initialization phase. 75 | if (connected == null) return; 76 | }, 77 | connected: SingleChildScrollView( 78 | child: Padding( 79 | padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), 80 | child: Column( 81 | mainAxisAlignment: MainAxisAlignment.start, 82 | crossAxisAlignment: CrossAxisAlignment.start, 83 | children: [ 84 | const SizedBox( 85 | height: 5, 86 | ), 87 | InputDataField( 88 | title: 'NOME COMPLETO', 89 | type: 'text', 90 | inputController: _userController, 91 | enabled: enabled, 92 | ), 93 | const SizedBox( 94 | height: 10, 95 | ), 96 | InputDataField( 97 | title: 'INDIRIZZO', 98 | type: 'text', 99 | inputController: _addressController, 100 | enabled: enabled, 101 | ), 102 | const SizedBox( 103 | height: 10, 104 | ), 105 | InputDataField( 106 | title: 'CITTA', 107 | type: 'text', 108 | inputController: _cityController, 109 | enabled: enabled, 110 | ), 111 | const SizedBox( 112 | height: 10, 113 | ), 114 | InputDataField( 115 | title: 'TELEFONO', 116 | type: 'number', 117 | inputController: _telephoneController, 118 | enabled: enabled, 119 | ), 120 | const SizedBox( 121 | height: 10, 122 | ), 123 | InputDataField( 124 | title: 'NOTE CONSEGNA', 125 | type: 'text', 126 | inputController: _noteController, 127 | enabled: true, 128 | ), 129 | const SizedBox( 130 | height: 20, 131 | ), 132 | Row( 133 | mainAxisAlignment: MainAxisAlignment.center, 134 | children: [ 135 | const Text( 136 | 'Ritiro io in negozio', 137 | style: TextStyle(fontSize: 17.0), 138 | ), //Text 139 | const SizedBox( 140 | width: 10, 141 | ), 142 | Checkbox( 143 | value: pickUp, 144 | onChanged: (bool? value) { 145 | setState(() { 146 | pickUp = value!; 147 | if (pickUp) { 148 | _cart!.pickup = true; 149 | _cart!.deliveryFee = 0; 150 | _cart!.deliverType = 'TO-GO'; 151 | } else { 152 | _cart!.pickup = false; 153 | _cart!.deliveryFee = _restaurant!.deliveryFees; 154 | _cart!.deliverType = 'CONSEGNA'; 155 | } 156 | 157 | if (enabled) { 158 | enabled = false; 159 | } else { 160 | enabled = true; 161 | } 162 | }); 163 | }, 164 | ), 165 | ], 166 | ), 167 | const SizedBox( 168 | height: 30, 169 | ), 170 | InkWell( 171 | onTap: () { 172 | _cart!.note = _noteController.text; 173 | _cart!.address = _addressController.text; 174 | _cart!.city = _cityController.text; 175 | _cart!.telephone = _telephoneController.text; 176 | _cart!.email = _user!.email; 177 | _cart!.fullName = _userController.text; 178 | Navigator.of(context).push( 179 | PageRouteBuilder( 180 | pageBuilder: (_, __, ___) => TimeScreenT2( 181 | user: _user, 182 | restaurant: _restaurant, 183 | cart: _cart, 184 | ), 185 | ), 186 | ); 187 | }, 188 | child: Container( 189 | height: 55.0, 190 | width: double.infinity, 191 | child: const Center( 192 | child: Text( 193 | "Selziona l'orario", 194 | style: TextStyle( 195 | color: Colors.white, 196 | fontFamily: "Sofia", 197 | fontSize: 17, 198 | fontWeight: FontWeight.w600), 199 | ), 200 | ), 201 | decoration: BoxDecoration( 202 | borderRadius: 203 | const BorderRadius.all(Radius.circular(60.0)), 204 | color: Colors.amber.shade700), 205 | ), 206 | ), 207 | const SizedBox( 208 | height: 50, 209 | ), 210 | ], 211 | ), 212 | ), 213 | ), 214 | disconnected: const NoConnection(), 215 | ), 216 | ); 217 | } 218 | } 219 | 220 | class InputDataField extends StatelessWidget { 221 | InputDataField({ 222 | Key? key, 223 | required this.title, 224 | required this.type, 225 | required this.inputController, 226 | required this.enabled, 227 | }) : super(key: key); 228 | String title, type; 229 | TextEditingController inputController; 230 | bool enabled; 231 | 232 | @override 233 | Widget build(BuildContext context) { 234 | return Column( 235 | mainAxisAlignment: MainAxisAlignment.center, 236 | crossAxisAlignment: CrossAxisAlignment.start, 237 | children: [ 238 | Text( 239 | title, 240 | style: const TextStyle( 241 | fontFamily: "Sofia", 242 | fontWeight: FontWeight.w600, 243 | color: Colors.black54), 244 | ), 245 | TextFormField( 246 | textAlign: TextAlign.start, 247 | keyboardType: TextInputType.emailAddress, 248 | autocorrect: false, 249 | autofocus: false, 250 | enabled: enabled, 251 | controller: inputController, 252 | decoration: InputDecoration( 253 | hintText: inputController.text, 254 | hintStyle: const TextStyle( 255 | fontFamily: "Sofia", 256 | color: Colors.black, 257 | fontWeight: FontWeight.w300, 258 | fontSize: 17.0), 259 | enabledBorder: const UnderlineInputBorder( 260 | borderSide: BorderSide( 261 | color: Colors.black12, 262 | ), 263 | ), 264 | ), 265 | ) 266 | ], 267 | ); 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /lib/models/productModel.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:food_template/models/restaurantModel.dart'; 6 | import 'package:food_template/models/userModel.dart'; 7 | import 'package:http/http.dart' as http; 8 | import 'package:food_template/constants.dart'; 9 | //import 'package:flutter/services.dart' show rootBundle; 10 | import 'package:pretty_json/pretty_json.dart'; 11 | 12 | Future addFavorite( 13 | Product product, User user, Restaurant restaurant) async { 14 | Token token = await fetchTokenFromPref(); 15 | final uri = Uri.https(BASE_URL, 'api/food/favorites/'); 16 | final header = { 17 | HttpHeaders.authorizationHeader: 'Bearer ${token.accessToken}', 18 | // HttpHeaders.contentTypeHeader: 'application/json' 19 | }; 20 | var map = new Map(); 21 | map['food'] = product.id.toString(); 22 | map['user'] = user.id.toString(); 23 | map['restaurant'] = restaurant.id.toString(); 24 | 25 | http.Response response = await http.post( 26 | uri, 27 | headers: header, 28 | body: map, 29 | encoding: Encoding.getByName("utf-8"), 30 | ); 31 | 32 | if (response.statusCode == 201 || response.statusCode == 409) { 33 | return true; 34 | } else { 35 | return false; 36 | } 37 | } 38 | 39 | Future removeFavorite(Product product, User user) async { 40 | Token token = await fetchTokenFromPref(); 41 | final uri = Uri.https(BASE_URL, 'api/food/favorites/remove/'); 42 | final header = { 43 | HttpHeaders.authorizationHeader: 'Bearer ${token.accessToken}', 44 | // HttpHeaders.contentTypeHeader: 'application/json' 45 | }; 46 | var map = new Map(); 47 | map['food'] = product.id.toString(); 48 | map['user'] = user.id.toString(); 49 | 50 | http.Response response = await http.post( 51 | uri, 52 | headers: header, 53 | body: map, 54 | encoding: Encoding.getByName("utf-8"), 55 | ); 56 | 57 | if (response.statusCode == 205) { 58 | return true; 59 | } else { 60 | return false; 61 | } 62 | } 63 | 64 | Future> fetchFavoriteProducts( 65 | http.Client client, Restaurant restaurant) async { 66 | Token token = await fetchTokenFromPref(); 67 | final header = { 68 | HttpHeaders.authorizationHeader: 'Bearer ${token.accessToken}', 69 | // HttpHeaders.contentTypeHeader: 'application/json' 70 | }; 71 | final queryParameters = { 72 | 'restaurant': RESTAURANT_PK, 73 | }; 74 | final uri = Uri.https(BASE_URL, 'api/food/favorites', queryParameters); 75 | final response = await client.get(uri, headers: header); 76 | 77 | // Use the compute function to run parseProducts in a separate isolate. 78 | return compute(parseProducts, response.body); 79 | } 80 | 81 | Future> fetchPopularProducts(http.Client client) async { 82 | final queryParameters = { 83 | 'restaurant_pk': RESTAURANT_PK, 84 | }; 85 | final uri = Uri.https(BASE_URL, 'api/menu/food/popular', queryParameters); 86 | final response = await client.get(uri, headers: { 87 | HttpHeaders.contentTypeHeader: 'application/json', 88 | }); 89 | 90 | //final response = await rootBundle.loadString('assets/data/food.json'); 91 | 92 | // Use the compute function to run parseProducts in a separate isolate. 93 | return compute(parseProducts, response.body); 94 | } 95 | 96 | Future> fetchProducts( 97 | http.Client client, 98 | int menuPk, 99 | ) async { 100 | final queryParameters = { 101 | 'restaurant_pk': RESTAURANT_PK, 102 | 'menu_pk': menuPk.toString(), 103 | }; 104 | final uri = Uri.https(BASE_URL, 'api/menu/food', queryParameters); 105 | final response = await client.get(uri, headers: { 106 | HttpHeaders.contentTypeHeader: 'application/json', 107 | }); 108 | 109 | //final response = await rootBundle.loadString('assets/data/food.json'); 110 | //printPrettyJson(response.body, indent: 2); 111 | // Use the compute function to run parseProducts in a separate isolate. 112 | return compute(parseProducts, response.body); 113 | } 114 | 115 | // A function that converts a response body into a List. 116 | List parseProducts(String responseBody) { 117 | final parsed = jsonDecode(responseBody).cast>(); 118 | return parsed.map((json) => Product.fromJson(json)).toList(); 119 | } 120 | 121 | class Product { 122 | int id; 123 | String name; 124 | String description; 125 | String imageUrl; 126 | int restaurant; 127 | String ingredients; 128 | double rating; 129 | double price; 130 | int menu; 131 | int kcal; 132 | int protein; 133 | int carbs; 134 | bool isPromo; 135 | bool isNews; 136 | int quantity; 137 | bool isInCart; 138 | 139 | Product({ 140 | this.id = 0, 141 | this.name = '', 142 | this.description = '', 143 | this.imageUrl = '', 144 | this.restaurant = 0, 145 | this.ingredients = '', 146 | this.rating = 0.0, 147 | this.price = 0.0, 148 | this.menu = 0, 149 | this.quantity = 1, 150 | this.kcal = 0, 151 | this.carbs = 0, 152 | this.protein = 0, 153 | this.isNews = false, 154 | this.isPromo = false, 155 | this.isInCart = false, 156 | }); 157 | 158 | factory Product.fromJson(Map json) { 159 | return Product( 160 | id: json['id'] as int, 161 | name: json['name'] as String, 162 | description: json['description'] as String, 163 | imageUrl: json['image_url'] as String, 164 | restaurant: json['restaurant'] as int, 165 | ingredients: json['ingredients'] as String, 166 | rating: double.parse(json['rating']), 167 | price: double.parse(json['price']), 168 | menu: json['menu'] as int, 169 | quantity: json['quantity'] as int, 170 | kcal: json['kcal'] as int, 171 | protein: json['protein'] as int, 172 | carbs: json['carbs'] as int, 173 | isNews: json['is_news'] == '1' ? true : false, 174 | isPromo: json['is_promo'] == '1' ? true : false, 175 | ); 176 | } 177 | 178 | factory Product.fromCartJson(Map json) { 179 | return Product( 180 | id: int.parse(json['food']), 181 | name: json['name'] as String, 182 | description: json['description'] as String, 183 | ingredients: json['ingredients'] as String, 184 | imageUrl: json['image_url'] as String, 185 | restaurant: int.parse(json['restaurant']), 186 | price: double.parse(json['price']), 187 | menu: int.parse(json['menu']), 188 | quantity: int.parse(json['quantity']), 189 | isPromo: json['isInCart'] == 'true' ? true : false, 190 | ); 191 | } 192 | 193 | factory Product.sharedFromJson(Map json) { 194 | return Product( 195 | id: int.parse(json['id']), 196 | name: json['name'] as String, 197 | description: json['description'] as String, 198 | imageUrl: json['image_url'] as String, 199 | restaurant: int.parse(json['restaurant']), 200 | ingredients: json['ingredients'] as String, 201 | rating: double.parse(json['rating']), 202 | price: double.parse(json['price']), 203 | menu: int.parse(json['menu']), 204 | quantity: int.parse(json['quantity']), 205 | isInCart: json['isInCart'] == 'true' ? true : false, 206 | kcal: int.parse(json['kcal']), 207 | protein: int.parse(json['protein']), 208 | carbs: int.parse(json['carbs']), 209 | isNews: json['is_news'] == 'true' ? true : false, 210 | isPromo: json['is_promo'] == 'true' ? true : false, 211 | ); 212 | } 213 | Map toJson() { 214 | return { 215 | 'id': id.toString(), 216 | 'name': name.toString(), 217 | 'description': description.toString(), 218 | 'image_url': imageUrl.toString(), 219 | 'restaurant': restaurant.toString(), 220 | 'ingredients': ingredients.toString(), 221 | 'rating': rating.toString(), 222 | 'price': price.toString(), 223 | 'menu': menu.toString(), 224 | 'quantity': quantity.toString(), 225 | 'isInCart': isInCart.toString(), 226 | }; 227 | } 228 | 229 | Map toCartJson() { 230 | return { 231 | 'food': id.toString(), 232 | 'name': name.toString(), 233 | 'description': description.toString(), 234 | 'ingredients': ingredients.toString(), 235 | 'image_url': imageUrl.toString(), 236 | 'restaurant': restaurant.toString(), 237 | 'price': price.toString(), 238 | 'menu': menu.toString(), 239 | 'quantity': quantity.toString(), 240 | 'isInCart': isInCart.toString(), 241 | }; 242 | } 243 | } 244 | 245 | Future insertReview(ReviewFood reviewFood) async { 246 | Token token = await fetchTokenFromPref(); 247 | 248 | final uri = Uri.https(BASE_URL, 'api/food/insert-review/'); 249 | final header = { 250 | HttpHeaders.authorizationHeader: 'Bearer ${token.accessToken}', 251 | // HttpHeaders.contentTypeHeader: 'application/json' 252 | }; 253 | var map = new Map(); 254 | map['food'] = reviewFood.foodId.toString(); 255 | map['user'] = reviewFood.userId.toString(); 256 | map['restaurant'] = reviewFood.restaurantId.toString(); 257 | map['review'] = reviewFood.review; 258 | map['rating'] = reviewFood.rating.toString(); 259 | 260 | http.Response response = await http.post( 261 | uri, 262 | headers: header, 263 | body: map, 264 | encoding: Encoding.getByName("utf-8"), 265 | ); 266 | 267 | if (response.statusCode == 201) { 268 | return true; 269 | } else { 270 | return false; 271 | } 272 | } 273 | 274 | class ReviewFood { 275 | int foodId; 276 | int restaurantId; 277 | String userId; 278 | String review; 279 | double rating; 280 | 281 | ReviewFood({ 282 | this.foodId = 0, 283 | this.restaurantId = 0, 284 | this.userId = '', 285 | this.review = '', 286 | this.rating = 0.0, 287 | }); 288 | 289 | factory ReviewFood.fromJson(Map json) { 290 | return ReviewFood( 291 | foodId: json['food'] as int, 292 | rating: double.parse(json['rating']), 293 | ); 294 | } 295 | 296 | Map toJson() { 297 | return { 298 | 'food': foodId.toString(), 299 | 'user': userId.toString(), 300 | 'restaurant': restaurantId.toString(), 301 | 'review': review.toString(), 302 | 'rating': rating.toString(), 303 | }; 304 | } 305 | } 306 | --------------------------------------------------------------------------------