├── yassir_food_prototype ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ └── .gitignore ├── assets │ ├── img │ │ ├── cart.png │ │ ├── chef.png │ │ ├── edit.png │ │ ├── map.png │ │ ├── shop.png │ │ ├── star.png │ │ ├── burger.png │ │ ├── close.png │ │ ├── filter.png │ │ ├── image.jpg │ │ ├── logout.png │ │ ├── makla.png │ │ ├── select.png │ │ ├── account.png │ │ ├── explore.png │ │ ├── favorites.png │ │ ├── half-star.png │ │ ├── location.png │ │ ├── profile.png │ │ ├── splash_icon.png │ │ ├── logo_yassir_small.png │ │ └── placeholders │ │ │ ├── img0.jpg │ │ │ ├── img1.jpg │ │ │ ├── img10.jpg │ │ │ ├── img11.jpg │ │ │ ├── img12.jpg │ │ │ ├── img13.jpg │ │ │ ├── img14.jpg │ │ │ ├── img15.jpg │ │ │ ├── img16.jpg │ │ │ ├── img17.jpg │ │ │ ├── img18.jpg │ │ │ ├── img2.jpg │ │ │ ├── img3.jpg │ │ │ ├── img4.jpg │ │ │ ├── img5.jpg │ │ │ ├── img6.jpg │ │ │ ├── img7.jpg │ │ │ ├── img8.jpg │ │ │ └── img9.jpg │ └── fonts │ │ ├── esphimere_font.otf │ │ ├── sofia_pro_bold.ttf │ │ ├── sofia_pro_light.ttf │ │ ├── sofia_pro_medium.ttf │ │ ├── sofia_pro_regular.ttf │ │ └── esphimere_semi_bold.otf ├── android │ ├── gradle.properties │ ├── .gitignore │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── yassir_food_prototype │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── .metadata ├── lib │ ├── main.dart │ ├── components │ │ ├── Separator.dart │ │ ├── CustomTab.dart │ │ ├── errorWidgets.dart │ │ ├── CustomAppBars.dart │ │ ├── myAccountTabViewItem.dart │ │ ├── MaklaTabViewItem.dart │ │ └── CartTabViewItem.dart │ ├── pages │ │ ├── SplashScreen.dart │ │ ├── ManageAddresses.dart │ │ ├── HomePage.dart │ │ ├── FilterPage.dart │ │ ├── EditProfilePage.dart │ │ ├── RestaurantCategory.dart │ │ ├── AddToCartPage.dart │ │ └── RestaurantPage.dart │ ├── config │ │ ├── manager.dart │ │ ├── classes.dart │ │ └── style.dart │ └── staticData.dart ├── .gitignore ├── README.md ├── test │ └── widget_test.dart ├── pubspec.yaml └── pubspec.lock ├── .gitattributes ├── screenshots ├── s1.jpg ├── s2.jpg └── s3.jpg └── README.md /yassir_food_prototype/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /screenshots/s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/screenshots/s1.jpg -------------------------------------------------------------------------------- /screenshots/s2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/screenshots/s2.jpg -------------------------------------------------------------------------------- /screenshots/s3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/screenshots/s3.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/cart.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/chef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/chef.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/edit.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/map.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/shop.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/star.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/burger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/burger.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/close.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/filter.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/image.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/logout.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/makla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/makla.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/select.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/account.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/explore.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/favorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/favorites.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/half-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/half-star.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/location.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/profile.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/splash_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/splash_icon.png -------------------------------------------------------------------------------- /yassir_food_prototype/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/esphimere_font.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/esphimere_font.otf -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/sofia_pro_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/sofia_pro_bold.ttf -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/sofia_pro_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/sofia_pro_light.ttf -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/sofia_pro_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/sofia_pro_medium.ttf -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/sofia_pro_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/sofia_pro_regular.ttf -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/logo_yassir_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/logo_yassir_small.png -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img0.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img1.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img10.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img11.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img12.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img13.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img14.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img15.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img16.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img17.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img18.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img2.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img3.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img4.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img5.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img6.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img7.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img8.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/assets/img/placeholders/img9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/img/placeholders/img9.jpg -------------------------------------------------------------------------------- /yassir_food_prototype/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /yassir_food_prototype/assets/fonts/esphimere_semi_bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/assets/fonts/esphimere_semi_bold.otf -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagripe/Yassir-Food-Clone/HEAD/yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yassir_food_prototype/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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /yassir_food_prototype/.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: 0b8abb4724aa590dd0f429683339b1e045a1594d 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yassir_food_prototype/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. -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /yassir_food_prototype/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 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/kotlin/com/example/yassir_food_prototype/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.yassir_food_prototype 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity 5 | import io.flutter.embedding.engine.FlutterEngine 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 10 | GeneratedPluginRegistrant.registerWith(flutterEngine); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/pages/SplashScreen.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | void main() { 6 | WidgetsFlutterBinding.ensureInitialized(); 7 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]).then( 8 | (_) => runApp(MaterialApp( 9 | debugShowCheckedModeBanner: false, 10 | theme: ThemeData( 11 | accentColor: Colors.red[900], 12 | appBarTheme: AppBarTheme(color: Color(0xfffcfbfc), elevation: 2)), 13 | home: SplashScreen()))); 14 | } 15 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /yassir_food_prototype/.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 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 38 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Yassir Food App Clone 2 | This app is a clone of the original [YASSIR Food](https://play.google.com/store/apps/details?id=com.yatechnologies.yassirfoodclient&hl=en) app 3 | 4 | # Show me some ❤️ and star the repo to support the project. 5 | 6 | # Note 7 | - The data used within the app is static & a generated one 8 | - This repository is still under development and I will continue to add more features to it. 9 | 10 | # Screenshots 11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 | 19 | # Getting started 20 | 21 | 1. [Setup Flutter](https://flutter.dev/docs/get-started/install) 22 | 23 | 2. Clone the repo 24 | 25 | ``` 26 | $ git clone https://github.com/lagripe/Yassir-Food-Clone 27 | $ cd Yassir-Food-Clone/ 28 | ``` 29 | 3. Run 30 | `$ flutter run` 31 | 32 | -------------------------------------------------------------------------------- /yassir_food_prototype/README.md: -------------------------------------------------------------------------------- 1 | # Yassir Food App Clone 2 | This app is a clone of the original [YASSIR Food](https://play.google.com/store/apps/details?id=com.yatechnologies.yassirfoodclient&hl=en) app 3 | 4 | # Show me some ❤️ and star the repo to support the project. 5 | 6 | # Note 7 | - The data used within the app is static & generated one 8 | - This repository is still under development and I will continue to add more features to it. 9 | 10 | # Screenshots 11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 | 19 | # Getting started 20 | 21 | 1. [Setup Flutter](https://flutter.dev/docs/get-started/install) 22 | 23 | 2. Clone the repo 24 | 25 | ``` 26 | $ git clone https://github.com/lagripe/Yassir-Food-Clone 27 | $ cd Yassir-Food-Clone/ 28 | ``` 29 | 3. Run 30 | `$ flutter run` 31 | 32 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/Separator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Separator extends StatelessWidget { 4 | final double height; 5 | final Color color; 6 | 7 | const Separator({this.height = 1, this.color = Colors.black}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return LayoutBuilder( 12 | builder: (BuildContext context, BoxConstraints constraints) { 13 | final boxWidth = constraints.constrainWidth(); 14 | final dashWidth = 10.0; 15 | final dashHeight = height; 16 | final dashCount = (boxWidth / (2 * dashWidth)).floor(); 17 | return Flex( 18 | children: List.generate(dashCount, (_) { 19 | return SizedBox( 20 | width: dashWidth, 21 | height: dashHeight, 22 | child: DecoratedBox( 23 | decoration: BoxDecoration(color: color), 24 | ), 25 | ); 26 | }), 27 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | direction: Axis.horizontal, 29 | ); 30 | }, 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /yassir_food_prototype/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:yassir_food_prototype/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/SplashScreen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:yassir_food_prototype/config/manager.dart'; 5 | import 'package:yassir_food_prototype/config/style.dart'; 6 | import 'HomePage.dart'; 7 | 8 | class SplashScreen extends StatefulWidget { 9 | @override 10 | _SplashScreenState createState() => _SplashScreenState(); 11 | } 12 | 13 | class _SplashScreenState extends State { 14 | initState() { 15 | super.initState(); 16 | Timer(Duration(seconds: 1), () { 17 | Navigator.pop(context); 18 | Manager.customPageRoute(context, HomePage(), Offset(1.0, 0.0), 19 | Offset.zero, Duration(milliseconds: 400)); 20 | 21 | }); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | Size size = MediaQuery.of(context).size; 27 | return Scaffold( 28 | body: Container( 29 | color: CustomStyle.splashBackgroundColor, 30 | child: Center( 31 | child: Image( 32 | width: size.height / 3, 33 | height: size.height / 3, 34 | image: AssetImage("assets/img/splash_icon.png"), 35 | ), 36 | ), 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/config/manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'classes.dart'; 3 | import 'package:flutter/material.dart'; 4 | class Manager { 5 | static Future> getRestaurantByLocation( 6 | List restaurants, String location) async { 7 | await Future.delayed(Duration(milliseconds: 500)); 8 | print('-------------- $restaurants.length'); 9 | return restaurants; 10 | } 11 | static customPageRoute(BuildContext context,Widget widget,Offset begin,Offset end,Duration duration){ 12 | Navigator.push( 13 | context, 14 | PageRouteBuilder( 15 | transitionDuration: duration, 16 | transitionsBuilder: (BuildContext context, 17 | Animation animation, 18 | Animation secAnimation, 19 | Widget child) { 20 | var tween = Tween(begin: begin, end: end); 21 | var offsetAnimation = animation.drive(tween); 22 | return SlideTransition( 23 | position: offsetAnimation, 24 | child: child, 25 | ); 26 | }, 27 | pageBuilder: (BuildContext context, Animation animation, 28 | Animation secAnimation) { 29 | return widget; 30 | })); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /yassir_food_prototype/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 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/config/classes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Food { 4 | String idFood, nameFood; 5 | double price; 6 | Food({@required this.idFood, @required this.nameFood, @required this.price}); 7 | } 8 | 9 | class Category { 10 | String idCat, nameCat, banner; 11 | List food; 12 | Category( 13 | {@required this.idCat, 14 | @required this.nameCat, 15 | @required this.banner, 16 | @required this.food}); 17 | } 18 | 19 | class Restaurant { 20 | String idRestaurant, nameRestaurant, banner, adrs, close_at, delivers_in; 21 | double rating; 22 | bool isOpen; 23 | List menu; 24 | 25 | Restaurant( 26 | {this.idRestaurant, 27 | this.nameRestaurant, 28 | this.banner, 29 | this.adrs, 30 | this.rating, 31 | this.isOpen, 32 | this.menu, 33 | this.close_at, 34 | this.delivers_in}); 35 | } 36 | 37 | class Order { 38 | Food food; 39 | int quantity; 40 | Order({@required this.food, @required this.quantity}); 41 | } 42 | 43 | class Cart { 44 | Restaurant restaurant; 45 | List orders = List(); 46 | Cart({@required this.restaurant, @required this.orders}); 47 | } 48 | 49 | class MyAccountItem { 50 | String iconPath, header; 51 | Widget clickable; 52 | IconData replacement; 53 | bool colored = false; 54 | Widget callback; 55 | MyAccountItem( 56 | {@required this.iconPath, 57 | @required this.header, 58 | @required this.clickable, 59 | @required this.replacement, 60 | @required this.colored, 61 | @required this.callback}); 62 | } 63 | 64 | class Address { 65 | String name, adr; 66 | Address({@required this.name, @required this.adr}); 67 | } 68 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | yassir_food_prototype 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/CustomTab.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/style.dart'; 3 | import 'package:yassir_food_prototype/staticData.dart'; 4 | 5 | class CustomTab extends StatefulWidget { 6 | String title; 7 | String icon; 8 | CustomTab({@required this.title, @required this.icon}); 9 | @override 10 | _CustomTabState createState() => _CustomTabState(title: title, icon: icon); 11 | } 12 | 13 | class _CustomTabState extends State { 14 | String title; 15 | String icon; 16 | _CustomTabState({@required this.title, @required this.icon}); 17 | refresh() => setState(() {}); 18 | @override 19 | Widget build(BuildContext context) { 20 | return Container( 21 | width: MediaQuery.of(context).size.width / 4, 22 | height: 56, 23 | child: 24 | Row(mainAxisAlignment: MainAxisAlignment.center, children: [ 25 | Column( 26 | mainAxisAlignment: MainAxisAlignment.center, 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | Stack(children: [ 30 | ImageIcon( 31 | AssetImage(icon), 32 | size: 25, 33 | //color: CustomStyle.tabColor, 34 | ), 35 | title == "Cart" && StaticData.cart.orders.length != 0 36 | ? Positioned( 37 | right: 0, 38 | top: 0, 39 | child: CircleAvatar( 40 | backgroundColor: CustomStyle.selectedTabColor, 41 | radius: 5, 42 | child: Text( 43 | "", 44 | style: TextStyle(fontFamily: "Sofia", fontSize: 12), 45 | ), 46 | )) 47 | : Container() 48 | ]), 49 | Text( 50 | title, 51 | style: CustomStyle.tabStyle(), 52 | ), 53 | ], 54 | ), 55 | ]), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/errorWidgets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/style.dart'; 3 | 4 | class ErrorWidgets { 5 | static Widget error( 6 | {BuildContext context, 7 | String header, 8 | String subHeader, 9 | String asset, 10 | String searchKeyword = ""}) { 11 | Size size = MediaQuery.of(context).size; 12 | return SingleChildScrollView( 13 | physics: NeverScrollableScrollPhysics(), 14 | child: Container( 15 | height: size.height, 16 | width: size.width, 17 | color: CustomStyle.scaffoldBackgroundColor, 18 | child: Padding( 19 | padding: const EdgeInsets.symmetric(horizontal: 15), 20 | child: Column( 21 | mainAxisAlignment: MainAxisAlignment.center, 22 | crossAxisAlignment: CrossAxisAlignment.center, 23 | children: [ 24 | Image( 25 | image: AssetImage("assets/img/$asset.png"), 26 | width: size.width / 2.5, 27 | ), 28 | SizedBox( 29 | height: 10, 30 | ), 31 | Text( 32 | header, 33 | style: CustomStyle.contentRedStyle(), 34 | ), 35 | searchKeyword.length > 2 36 | ? Text( 37 | '"$searchKeyword"', 38 | style: CustomStyle.contentBlackStyle(), 39 | ) 40 | : Container(), 41 | SizedBox( 42 | height: 10, 43 | ), 44 | Text( 45 | subHeader, 46 | style: CustomStyle.contentStyle(), 47 | textAlign: TextAlign.center, 48 | ) 49 | ], 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | 56 | static noImplementation() => Scaffold( 57 | body: Container( 58 | child: Center( 59 | child: Text("Not implemented yet!"), 60 | ), 61 | ), 62 | ); 63 | } 64 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/ManageAddresses.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/components/errorWidgets.dart'; 3 | import 'package:yassir_food_prototype/config/style.dart'; 4 | import 'package:yassir_food_prototype/staticData.dart'; 5 | 6 | class ManageAddressesPage extends StatefulWidget { 7 | @override 8 | _ManageAddressesPageState createState() => _ManageAddressesPageState(); 9 | } 10 | 11 | class _ManageAddressesPageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | double widthScreen = MediaQuery.of(context).size.width; 15 | return Scaffold( 16 | appBar: AppBar( 17 | leading: InkWell( 18 | onTap: () => Navigator.pop(context), 19 | child: Icon( 20 | Icons.arrow_back_ios, 21 | size: 20, 22 | color: Colors.black, 23 | )), 24 | titleSpacing: 15, 25 | title: Text( 26 | "Manage Addresses", 27 | style: CustomStyle.appBarStyle(), 28 | ), 29 | ), 30 | body: Stack( 31 | children: [ 32 | StaticData.addresses.length == 3 33 | ? ErrorWidgets.error( 34 | context: context, 35 | asset: "map", 36 | header: "No address Available", 37 | subHeader: 38 | "No address available. Saved addresses helps you to checkout faster ", 39 | ) 40 | : Container(), 41 | Positioned( 42 | bottom: 15, 43 | left: widthScreen - (widthScreen - 25), 44 | child: Container( 45 | height: 50, 46 | width: widthScreen - 50, 47 | color: Colors.black, 48 | child: Center( 49 | child: Text( 50 | "ADD NEW ADDRESS", 51 | style: TextStyle(color: Colors.white, 52 | fontFamily: "Sofia", 53 | fontSize: 16, 54 | fontWeight: FontWeight.w600), 55 | ), 56 | ), 57 | ), 58 | ) 59 | ], 60 | )); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /yassir_food_prototype/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.yassir_food_prototype" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /yassir_food_prototype/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 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/CustomAppBars.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/style.dart'; 3 | import 'package:yassir_food_prototype/pages/FilterPage.dart'; 4 | 5 | class CustomAppBars { 6 | static AppBar maklaAppBar(String header, String location, 7 | {BuildContext context}) { 8 | return AppBar( 9 | automaticallyImplyLeading: false, 10 | title: Container( 11 | child: Column( 12 | mainAxisAlignment: MainAxisAlignment.start, 13 | crossAxisAlignment: CrossAxisAlignment.start, 14 | children: [ 15 | Text("Getting Location...", 16 | style: TextStyle( 17 | color: Colors.black, fontFamily: "Sofia", fontSize: 15)), 18 | Text("El Biar, Algeria", 19 | style: TextStyle( 20 | color: Colors.grey, 21 | fontFamily: "Sofia", 22 | fontSize: 12, 23 | fontWeight: FontWeight.w600)), 24 | ], 25 | ), 26 | ), 27 | actions: [ 28 | Padding( 29 | padding: const EdgeInsets.all(8.0), 30 | child: InkWell( 31 | onTap: () => Navigator.push( 32 | context, MaterialPageRoute(builder: (_) => FilterPage())), 33 | child: ClipRRect( 34 | borderRadius: BorderRadius.circular(5), 35 | child: Container( 36 | color: CustomStyle.scaffoldBackgroundColor, 37 | child: Padding( 38 | padding: const EdgeInsets.all(10), 39 | child: Row( 40 | crossAxisAlignment: CrossAxisAlignment.center, 41 | mainAxisAlignment: MainAxisAlignment.center, 42 | children: [ 43 | Text( 44 | "Categories", 45 | style: TextStyle( 46 | color: Colors.black, fontFamily: "Sofia"), 47 | ), 48 | SizedBox( 49 | width: 5, 50 | ), 51 | ImageIcon( 52 | AssetImage("assets/img/filter.png"), 53 | color: Colors.black, 54 | ) 55 | ], 56 | ), 57 | )), 58 | ), 59 | ), 60 | ), 61 | ], 62 | ); 63 | } 64 | 65 | static AppBar exploreAppBar(TextEditingController controller) { 66 | return AppBar( 67 | automaticallyImplyLeading: false, 68 | title: TextField( 69 | controller: controller, 70 | decoration: InputDecoration( 71 | hintText: "Search for restaurantsn, dishes...", 72 | hintStyle: TextStyle( 73 | color: Colors.grey, fontFamily: "Sofia", fontSize: 14), 74 | prefixIcon: Icon( 75 | Icons.search, 76 | //AssetImage("assets/img/explore.png"), 77 | size: 27, 78 | color: Colors.black, 79 | ), 80 | border: InputBorder.none), 81 | ), 82 | ); 83 | } 84 | 85 | static AppBar simpleAppBar(String title) => AppBar( 86 | automaticallyImplyLeading: false, 87 | title: Text(title, style: CustomStyle.appBarStyle()), 88 | centerTitle: true, 89 | backgroundColor: CustomStyle.splashBackgroundColor, 90 | ); 91 | } 92 | -------------------------------------------------------------------------------- /yassir_food_prototype/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: yassir_food_prototype 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | smooth_star_rating: 1.0.4+2 27 | store_redirect: ^1.0.2 28 | double_back_to_close_app: ^0.1.2 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | 34 | 35 | # For information on the generic Dart part of this file, see the 36 | # following page: https://dart.dev/tools/pub/pubspec 37 | 38 | # The following section is specific to Flutter. 39 | flutter: 40 | 41 | # The following line ensures that the Material Icons font is 42 | # included with your application, so that you can use the icons in 43 | # the material Icons class. 44 | uses-material-design: true 45 | 46 | # To add assets to your application, add an assets section, like this: 47 | assets: 48 | - assets/img/ 49 | - assets/img/placeholders/ 50 | fonts: 51 | - family: Sofia 52 | fonts: 53 | - asset: assets/fonts/sofia_pro_regular.ttf 54 | weight: 200 55 | - asset: assets/fonts/sofia_pro_bold.ttf 56 | weight: 400 57 | - asset: assets/fonts/sofia_pro_medium.ttf 58 | weight: 300 59 | - asset: assets/fonts/sofia_pro_light.ttf 60 | weight: 100 61 | - family: ES 62 | fonts: 63 | - asset: assets/fonts/esphimere_font.otf 64 | weight: 200 65 | - asset: assets/fonts/esphimere_semi_bold.otf 66 | weight: 400 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/config/style.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomStyle { 4 | static Color unselectedTabColor = Color(0xffd6d5d8); 5 | static Color selectedTabColor = Color(0xffca1333); 6 | static Color splashBackgroundColor = Color(0xfffcfbfc); 7 | static Color scaffoldBackgroundColor = Color(0xffe8e8e9); 8 | static TextStyle tabStyle() { 9 | return TextStyle(fontSize: 12, fontFamily: "Sofia"); 10 | } 11 | 12 | static TextStyle appBarStyle() { 13 | return TextStyle( 14 | fontSize: 18, 15 | fontFamily: "Sofia", 16 | fontWeight: FontWeight.w500, 17 | color: Colors.black); 18 | } 19 | 20 | static TextStyle contentRedStyle() { 21 | return TextStyle( 22 | fontSize: 18, 23 | fontFamily: "Sofia", 24 | fontWeight: FontWeight.w700, 25 | color: selectedTabColor); 26 | } 27 | static TextStyle contentBlackStyle() { 28 | return TextStyle( 29 | fontSize: 18, 30 | fontFamily: "Sofia", 31 | fontWeight: FontWeight.w700, 32 | color: Colors.black); 33 | } 34 | 35 | static TextStyle contentStyle() { 36 | return TextStyle( 37 | fontSize: 15, 38 | fontFamily: "Sofia", 39 | fontWeight: FontWeight.w100, 40 | color: Color(0xff4a4a4a)); 41 | } 42 | 43 | static TextStyle cardStyleRight() { 44 | return TextStyle( 45 | fontSize: 12, 46 | fontFamily: "Sofia", 47 | fontWeight: FontWeight.w500, 48 | color: Colors.white); 49 | } 50 | 51 | static TextStyle cardStyleLeft() { 52 | return TextStyle( 53 | fontSize: 22, 54 | fontFamily: "Sofia", 55 | fontWeight: FontWeight.w700, 56 | color: Colors.white); 57 | } 58 | 59 | static TextStyle restaurantName() { 60 | return TextStyle( 61 | fontSize: 24, 62 | fontFamily: "Sofia", 63 | fontWeight: FontWeight.w800, 64 | color: Colors.black); 65 | } 66 | 67 | static TextStyle restaurantAdrs() { 68 | return TextStyle( 69 | fontSize: 14, 70 | fontFamily: "Sofia", 71 | fontWeight: FontWeight.w400, 72 | color: Color(0xffb5babd)); 73 | } 74 | 75 | static TextStyle restaurantOptions() { 76 | return TextStyle( 77 | fontSize: 14, 78 | fontFamily: "Sofia", 79 | fontWeight: FontWeight.w700, 80 | color: Colors.black); 81 | } 82 | 83 | static TextStyle categoryNameStyle() { 84 | return TextStyle( 85 | fontSize: 14, 86 | fontFamily: "Sofia", 87 | fontWeight: FontWeight.w400, 88 | color: Colors.black); 89 | } 90 | 91 | static TextStyle catNameStyleExtanded() { 92 | return TextStyle( 93 | fontSize: 16, 94 | fontFamily: "Sofia", 95 | fontWeight: FontWeight.w800, 96 | color: Colors.white, 97 | ); 98 | } 99 | 100 | static TextStyle catNameStyleCollapsed() { 101 | return TextStyle( 102 | fontSize: 14, 103 | fontFamily: "Sofia", 104 | fontWeight: FontWeight.w800, 105 | color: Colors.black, 106 | ); 107 | } 108 | 109 | static TextStyle addToCartStyle() { 110 | return TextStyle( 111 | fontSize: 12, 112 | fontFamily: "Sofia", 113 | fontWeight: FontWeight.w800, 114 | color: selectedTabColor, 115 | ); 116 | } 117 | 118 | static TextStyle priceStyle() { 119 | return TextStyle( 120 | fontSize: 14, 121 | fontFamily: "Sofia", 122 | fontWeight: FontWeight.w800, 123 | color: Colors.orange, 124 | ); 125 | } 126 | 127 | static TextStyle foodNameStyle() { 128 | return TextStyle( 129 | fontSize: 14, 130 | fontFamily: "Sofia", 131 | fontWeight: FontWeight.w800, 132 | color: Colors.black, 133 | ); 134 | } 135 | 136 | static TextStyle foodNameAddCartStyle() { 137 | return TextStyle( 138 | fontSize: 22, 139 | fontFamily: "Sofia", 140 | fontWeight: FontWeight.w800, 141 | color: Color(0xFFEC0400), 142 | ); 143 | } 144 | 145 | static TextStyle accountItemStyle() { 146 | return TextStyle( 147 | fontSize: 13, 148 | fontFamily: "Sofia", 149 | fontWeight: FontWeight.w400, 150 | color: Colors.black, 151 | ); 152 | } 153 | 154 | static TextStyle headerEdit() { 155 | return TextStyle( 156 | fontSize: 13, 157 | fontFamily: "Sofia", 158 | fontWeight: FontWeight.w700, 159 | color: Colors.grey[500], 160 | ); 161 | } 162 | static TextStyle textFieldTextStyle() { 163 | return TextStyle( 164 | fontSize: 13, 165 | fontFamily: "Sofia", 166 | fontWeight: FontWeight.w400, 167 | color: Colors.black, 168 | ); 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/HomePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:yassir_food_prototype/components/CartTabViewItem.dart'; 4 | import 'package:yassir_food_prototype/components/CustomAppBars.dart'; 5 | import 'package:yassir_food_prototype/components/CustomTab.dart'; 6 | import 'package:yassir_food_prototype/components/errorWidgets.dart'; 7 | import 'package:yassir_food_prototype/components/myAccountTabViewItem.dart'; 8 | import 'package:yassir_food_prototype/config/style.dart'; 9 | import 'package:yassir_food_prototype/components/MaklaTabViewItem.dart'; 10 | 11 | import '../staticData.dart'; 12 | 13 | class HomePage extends StatefulWidget { 14 | @override 15 | _HomePageState createState() => _HomePageState(); 16 | } 17 | 18 | class _HomePageState extends State 19 | with SingleTickerProviderStateMixin { 20 | TabController _tabController; 21 | TextEditingController _searchController; 22 | int _currentIndex = 0; 23 | String searchKeyword = ""; 24 | @override 25 | void initState() { 26 | // TODO: implement initState 27 | super.initState(); 28 | _searchController = TextEditingController(); 29 | _tabController = TabController(length: 4, initialIndex: 0, vsync: this); 30 | _tabController.addListener( 31 | () => setState(() => _currentIndex = _tabController.index)); 32 | _searchController.addListener( 33 | () => setState(() => searchKeyword = _searchController.text)); 34 | } 35 | 36 | CustomTab _cartTab = CustomTab( 37 | title: "Cart", 38 | icon: "assets/img/cart.png", 39 | ); 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: _currentIndex == 0 44 | ? CustomAppBars.maklaAppBar("header", "location", context: context) 45 | : _currentIndex == 1 46 | ? CustomAppBars.exploreAppBar(_searchController) 47 | : _currentIndex == 2 48 | ? CustomAppBars.simpleAppBar("Cart") 49 | : CustomAppBars.simpleAppBar("My account"), 50 | body: WillPopScope( 51 | onWillPop: () { 52 | return showDialog( 53 | context: context, 54 | barrierDismissible: false, 55 | builder: (BuildContext context) { 56 | return AlertDialog( 57 | title: Text("Confirm Exit"), 58 | content: Text("Are you sure you want to exit?"), 59 | actions: [ 60 | FlatButton( 61 | child: Text("YES"), 62 | onPressed: () { 63 | SystemChannels.platform 64 | .invokeMethod('SystemNavigator.pop'); 65 | }, 66 | ), 67 | FlatButton( 68 | child: Text("NO"), 69 | onPressed: () { 70 | Navigator.of(context).pop(); 71 | }, 72 | ) 73 | ], 74 | ); 75 | }); 76 | }, 77 | child: TabBarView( 78 | physics: NeverScrollableScrollPhysics(), 79 | controller: _tabController, 80 | children: [ 81 | MaklaTabViewItem( 82 | restaurants: StaticData.restaurants, 83 | location: "", 84 | ), 85 | searchKeyword.length < 3 86 | ? Container( 87 | color: CustomStyle.scaffoldBackgroundColor, 88 | child: Center( 89 | child: Text( 90 | "Search for restaurants or dishes.", 91 | style: CustomStyle.restaurantAdrs(), 92 | ), 93 | ), 94 | ) 95 | : ErrorWidgets.error( 96 | context: context, 97 | header: "OOPS! No match found for", 98 | subHeader: 99 | "No restaurant available. Please check the spelling or try a different search", 100 | asset: "chef", 101 | searchKeyword: searchKeyword), 102 | CartTabViewItem(), 103 | MyAccountTabViewItem() 104 | ]), 105 | ), 106 | bottomNavigationBar: TabBar( 107 | unselectedLabelColor: CustomStyle.unselectedTabColor, 108 | labelColor: CustomStyle.selectedTabColor, 109 | indicatorColor: Colors.transparent, 110 | controller: _tabController, 111 | tabs: [ 112 | CustomTab( 113 | title: "MAKLA", 114 | icon: "assets/img/makla.png", 115 | ), 116 | CustomTab( 117 | title: "Explore", 118 | icon: "assets/img/explore.png", 119 | ), 120 | _cartTab, 121 | CustomTab( 122 | title: "Account", 123 | icon: "assets/img/account.png", 124 | ), 125 | ]), 126 | ); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /yassir_food_prototype/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.11" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.3" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.3" 67 | double_back_to_close_app: 68 | dependency: "direct main" 69 | description: 70 | name: double_back_to_close_app 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.1.2" 74 | flutter: 75 | dependency: "direct main" 76 | description: flutter 77 | source: sdk 78 | version: "0.0.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | image: 85 | dependency: transitive 86 | description: 87 | name: image 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "2.1.4" 91 | matcher: 92 | dependency: transitive 93 | description: 94 | name: matcher 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.12.6" 98 | meta: 99 | dependency: transitive 100 | description: 101 | name: meta 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.1.8" 105 | path: 106 | dependency: transitive 107 | description: 108 | name: path 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.6.4" 112 | pedantic: 113 | dependency: transitive 114 | description: 115 | name: pedantic 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.8.0+1" 119 | petitparser: 120 | dependency: transitive 121 | description: 122 | name: petitparser 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.4.0" 126 | quiver: 127 | dependency: transitive 128 | description: 129 | name: quiver 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.0.5" 133 | sky_engine: 134 | dependency: transitive 135 | description: flutter 136 | source: sdk 137 | version: "0.0.99" 138 | smooth_star_rating: 139 | dependency: "direct main" 140 | description: 141 | name: smooth_star_rating 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.0.4+2" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.5.5" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.9.3" 159 | store_redirect: 160 | dependency: "direct main" 161 | description: 162 | name: store_redirect 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.0.2" 166 | stream_channel: 167 | dependency: transitive 168 | description: 169 | name: stream_channel 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.0.0" 173 | string_scanner: 174 | dependency: transitive 175 | description: 176 | name: string_scanner 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.0.5" 180 | term_glyph: 181 | dependency: transitive 182 | description: 183 | name: term_glyph 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.1.0" 187 | test_api: 188 | dependency: transitive 189 | description: 190 | name: test_api 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.2.11" 194 | typed_data: 195 | dependency: transitive 196 | description: 197 | name: typed_data 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.1.6" 201 | vector_math: 202 | dependency: transitive 203 | description: 204 | name: vector_math 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.8" 208 | xml: 209 | dependency: transitive 210 | description: 211 | name: xml 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "3.5.0" 215 | sdks: 216 | dart: ">=2.4.0 <3.0.0" 217 | flutter: ">=0.1.4 <2.0.0" 218 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/FilterPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/staticData.dart'; 3 | 4 | class FilterPage extends StatefulWidget { 5 | @override 6 | _FilterPageState createState() => _FilterPageState(); 7 | } 8 | 9 | class _FilterPageState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | StaticData.filters.forEach((k, v) { 13 | print('$k => $v'); 14 | }); 15 | return Scaffold( 16 | appBar: AppBar( 17 | leading: InkWell( 18 | onTap: () => Navigator.pop(context), 19 | child: Icon( 20 | Icons.arrow_back_ios, 21 | size: 20, 22 | color: Colors.black, 23 | ), 24 | ), 25 | title: Text( 26 | "Filters", 27 | style: TextStyle( 28 | fontFamily: "Sofia", 29 | fontSize: 16, 30 | fontWeight: FontWeight.w600, 31 | color: Colors.black), 32 | ), 33 | actions: [ 34 | Center( 35 | child: Padding( 36 | padding: const EdgeInsets.only(right: 8.0), 37 | child: InkWell( 38 | onTap: () => setState(() => StaticData.initFilters()), 39 | child: Text( 40 | "Reset", 41 | style: TextStyle( 42 | fontFamily: "Sofia", 43 | fontSize: 14, 44 | fontWeight: FontWeight.w600, 45 | color: Colors.red[800]), 46 | ), 47 | ), 48 | ), 49 | ), 50 | ], 51 | ), 52 | body: Column( 53 | children: [ 54 | Container( 55 | height: MediaQuery.of(context).size.height - 150, 56 | child: ListView.builder( 57 | itemCount: StaticData.menu.length, 58 | itemBuilder: (context, index) { 59 | return Container( 60 | child: Column( 61 | children: [ 62 | InkWell( 63 | hoverColor: Colors.transparent, 64 | focusColor: Colors.transparent, 65 | highlightColor: Colors.transparent, 66 | splashColor: Colors.transparent, 67 | onTap: () => setState(() => StaticData.filters 68 | .update( 69 | StaticData.menu[index].idCat, 70 | (_) => !StaticData.filters[ 71 | StaticData.menu[index].idCat])), 72 | child: Padding( 73 | padding: const EdgeInsets.only(right: 8.0), 74 | child: Row( 75 | mainAxisAlignment: 76 | MainAxisAlignment.spaceBetween, 77 | children: [ 78 | Padding( 79 | padding: const EdgeInsets.only( 80 | top: 15.0, left: 8, bottom: 15.0), 81 | child: Text( 82 | StaticData.menu[index].nameCat, 83 | style: TextStyle( 84 | fontFamily: "Sofia", 85 | fontSize: 14, 86 | fontWeight: FontWeight.w600, 87 | color: StaticData.filters[ 88 | StaticData.menu[index].idCat] 89 | ? Colors.red[800] 90 | : Colors.black), 91 | ), 92 | ), 93 | StaticData 94 | .filters[StaticData.menu[index].idCat] 95 | ? selectedFilterIcon() 96 | : CircleAvatar( 97 | radius: 12, 98 | backgroundColor: Colors.grey[200], 99 | ) 100 | ], 101 | ), 102 | ), 103 | ), 104 | Divider( 105 | color: Colors.grey[350], 106 | ) 107 | ], 108 | ), 109 | ); 110 | }), 111 | ), 112 | Column( 113 | children: [ 114 | Padding( 115 | padding: const EdgeInsets.symmetric(horizontal: 20), 116 | child: Container( 117 | color: Colors.black, 118 | child: Row( 119 | mainAxisAlignment: MainAxisAlignment.center, 120 | children: [ 121 | Padding( 122 | padding: const EdgeInsets.symmetric(vertical: 15), 123 | child: Text( 124 | "APPLY", 125 | style: TextStyle(color: Colors.white), 126 | ), 127 | ), 128 | ], 129 | ), 130 | ), 131 | ) 132 | ], 133 | ) 134 | ], 135 | )); 136 | } 137 | 138 | Widget selectedFilterIcon() => CircleAvatar( 139 | backgroundColor: Colors.red[800], 140 | radius: 12, 141 | child: ImageIcon( 142 | AssetImage("assets/img/select.png"), 143 | size: 17, 144 | color: Colors.white, 145 | )); 146 | } 147 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/myAccountTabViewItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/classes.dart'; 3 | import 'package:yassir_food_prototype/config/manager.dart'; 4 | import 'package:yassir_food_prototype/config/style.dart'; 5 | import 'package:store_redirect/store_redirect.dart'; 6 | import 'package:yassir_food_prototype/pages/EditProfilePage.dart'; 7 | import 'package:yassir_food_prototype/pages/ManageAddresses.dart'; 8 | import '../staticData.dart'; 9 | import 'errorWidgets.dart'; 10 | 11 | class MyAccountTabViewItem extends StatelessWidget { 12 | static final List items = [ 13 | MyAccountItem( 14 | iconPath: "profile.png", 15 | header: "Edit profile", 16 | clickable: Icon( 17 | Icons.arrow_forward_ios, 18 | size: 15, 19 | ), 20 | replacement: null, 21 | colored: false, 22 | callback: EditProfilePage()), 23 | MyAccountItem( 24 | iconPath: "location.png", 25 | header: "Manage addresses", 26 | clickable: Icon( 27 | Icons.arrow_forward_ios, 28 | size: 15, 29 | ), 30 | replacement: null, 31 | colored: false, 32 | callback: ManageAddressesPage()), 33 | MyAccountItem( 34 | iconPath: "cart.png", 35 | header: "Orders", 36 | clickable: Icon( 37 | Icons.arrow_forward_ios, 38 | size: 15, 39 | ), 40 | replacement: null, 41 | colored: false, 42 | callback: ErrorWidgets.noImplementation()), 43 | MyAccountItem( 44 | iconPath: null, 45 | header: "Favorites", 46 | clickable: Icon( 47 | Icons.arrow_forward_ios, 48 | size: 15, 49 | ), 50 | replacement: Icons.favorite_border, 51 | colored: false, 52 | callback:ErrorWidgets.noImplementation()), 53 | MyAccountItem( 54 | iconPath: "logo_yassir_small.png", 55 | header: "YASSIR", 56 | clickable: ClipRRect( 57 | borderRadius: BorderRadius.circular(10), 58 | child: Container( 59 | color: Colors.grey[300], 60 | child: Padding( 61 | padding: EdgeInsets.only(top: 5, bottom: 5, left: 10, right: 10), 62 | child: Text( 63 | "Open", 64 | style: TextStyle( 65 | color: Colors.grey[800], fontFamily: "Sofia", fontSize: 12), 66 | ), 67 | ), 68 | ), 69 | ), 70 | replacement: null, 71 | colored: true, 72 | callback: ErrorWidgets.noImplementation()), 73 | MyAccountItem( 74 | iconPath: "logout.png", 75 | header: "Logout", 76 | clickable: Icon( 77 | Icons.arrow_forward_ios, 78 | size: 15, 79 | ), 80 | replacement: null, 81 | colored: false, 82 | callback: ErrorWidgets.noImplementation()), 83 | ]; 84 | @override 85 | Widget build(BuildContext context) { 86 | return Container( 87 | color: Colors.white, 88 | child: Padding( 89 | padding: EdgeInsets.symmetric(horizontal: 10), 90 | child: Column( 91 | children: List.generate(items.length, (index) { 92 | return Padding( 93 | padding: const EdgeInsets.only(bottom: 0, top: 0), 94 | child: Column( 95 | children: [ 96 | SizedBox( 97 | height: 10, 98 | ), 99 | InkWell( 100 | onTap: () => items[index].colored 101 | ? StoreRedirect.redirect( 102 | androidAppId: StaticData.appId) 103 | : Manager.customPageRoute(context, items[index].callback, Offset(1,0), Offset.zero, Duration(milliseconds: 400)), 104 | child: Row( 105 | mainAxisAlignment: MainAxisAlignment.start, 106 | children: [ 107 | Row( 108 | //mainAxisAlignment: MainAxisAlignment.start, 109 | mainAxisSize: MainAxisSize.min, 110 | crossAxisAlignment: CrossAxisAlignment.center, 111 | children: [ 112 | Container( 113 | width: 25, 114 | height: 25, 115 | child: items[index].iconPath == null 116 | ? Icon(items[index].replacement, 117 | size: 25) 118 | : items[index].colored 119 | ? Image( 120 | image: AssetImage( 121 | "assets/img/${items[index].iconPath}"), 122 | fit: BoxFit.fill, 123 | ) 124 | : Image( 125 | image: AssetImage( 126 | "assets/img/${items[index].iconPath}"), 127 | fit: BoxFit.fill, 128 | color: Colors.black, 129 | ), 130 | ), 131 | SizedBox( 132 | width: 25, 133 | ), 134 | Text( 135 | items[index].header, 136 | style: CustomStyle.accountItemStyle(), 137 | ) 138 | ], 139 | ), 140 | Expanded( 141 | child: Row( 142 | mainAxisAlignment: MainAxisAlignment.end, 143 | children: [ 144 | items[index].clickable 145 | ], 146 | ), 147 | ) 148 | ], 149 | ), 150 | ), 151 | SizedBox( 152 | height: 10, 153 | ), 154 | Divider( 155 | color: Colors.grey, 156 | ) 157 | ], 158 | )); 159 | }), 160 | ), 161 | ), 162 | ); 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/EditProfilePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/style.dart'; 3 | import 'package:yassir_food_prototype/staticData.dart'; 4 | 5 | class EditProfilePage extends StatefulWidget { 6 | @override 7 | _EditProfilePageState createState() => _EditProfilePageState(); 8 | } 9 | 10 | class _EditProfilePageState extends State { 11 | TextEditingController _first, _last, _email, _phone; 12 | @override 13 | void initState() { 14 | super.initState(); 15 | _first = TextEditingController(text: StaticData.firstName); 16 | _last = TextEditingController(text: StaticData.lastName); 17 | _email = TextEditingController(text: StaticData.email); 18 | _phone = TextEditingController(text: '+213 ${StaticData.phone}'); 19 | } 20 | 21 | @override 22 | void dispose() { 23 | super.dispose(); 24 | _first.dispose(); 25 | _last.dispose(); 26 | _email.dispose(); 27 | _phone.dispose(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Scaffold( 33 | appBar: AppBar( 34 | leading: InkWell( 35 | onTap: () => Navigator.pop(context), 36 | child: Icon(Icons.arrow_back_ios, size: 20,color: Colors.black,)), 37 | titleSpacing: 15, 38 | title: Text( 39 | "Edit profile", 40 | style: CustomStyle.appBarStyle(), 41 | ), 42 | ), 43 | body: GestureDetector( 44 | onTap: () => FocusScope.of(context).requestFocus(FocusNode()), 45 | child: SingleChildScrollView( 46 | child: Padding( 47 | padding: const EdgeInsets.all(40), 48 | child: Container( 49 | width: double.infinity, 50 | height: MediaQuery.of(context).size.height - 150, 51 | child: Column( 52 | crossAxisAlignment: CrossAxisAlignment.start, 53 | children: [ 54 | Column( 55 | mainAxisAlignment: MainAxisAlignment.start, 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | mainAxisSize: MainAxisSize.min, 58 | children: [ 59 | //---------------- First Name ---------------- 60 | Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | children: [ 63 | Text("FIRST NAME",style: CustomStyle.headerEdit(),), 64 | TextField( 65 | style: CustomStyle.textFieldTextStyle(), 66 | controller: _first,decoration: InputDecoration( 67 | focusedBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 68 | enabledBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 69 | suffixStyle: CustomStyle.textFieldTextStyle())), 70 | ],), 71 | SizedBox(height: 10,), 72 | //---------------- Last Name ---------------- 73 | Column( 74 | crossAxisAlignment: CrossAxisAlignment.start, 75 | children: [ 76 | Text("LAST NAME",style: CustomStyle.headerEdit(),), 77 | TextField( 78 | style: CustomStyle.textFieldTextStyle(), 79 | controller: _last,decoration: InputDecoration( 80 | focusedBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 81 | enabledBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 82 | suffixStyle: CustomStyle.textFieldTextStyle())), 83 | ],), 84 | SizedBox(height: 10,), 85 | //---------------- email ---------------- 86 | Column( 87 | crossAxisAlignment: CrossAxisAlignment.start, 88 | children: [ 89 | Text("EMAIL",style: CustomStyle.headerEdit(),), 90 | TextField( 91 | style: CustomStyle.textFieldTextStyle(), 92 | controller: _email,decoration: InputDecoration( 93 | focusedBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 94 | enabledBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 95 | suffixStyle: CustomStyle.textFieldTextStyle())), 96 | ],), 97 | SizedBox(height: 10,), 98 | //---------------- phone ---------------- 99 | Column( 100 | crossAxisAlignment: CrossAxisAlignment.start, 101 | children: [ 102 | Text("PHONE NUMBER",style: CustomStyle.headerEdit(),), 103 | TextField( 104 | enabled: false, 105 | style: CustomStyle.textFieldTextStyle(), 106 | controller: _phone,decoration: InputDecoration( 107 | focusedBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 108 | enabledBorder: UnderlineInputBorder(borderSide: BorderSide(width: .5,color: Colors.grey[500])), 109 | 110 | suffixStyle: CustomStyle.textFieldTextStyle())), 111 | 112 | ],), 113 | 114 | ], 115 | ), 116 | Expanded( 117 | child: Column( 118 | mainAxisAlignment: MainAxisAlignment.end, 119 | children: [ 120 | ClipRRect( 121 | borderRadius: BorderRadius.circular(8), 122 | child: Container( 123 | height: 60, 124 | color: Colors.red[700], 125 | width: double.infinity, 126 | child: Center( 127 | child: Text( 128 | "UPDATE", 129 | style: TextStyle( 130 | color: Colors.white, 131 | fontSize: 16, 132 | fontFamily: "Sofia", 133 | fontWeight: FontWeight.w400), 134 | ), 135 | ), 136 | ), 137 | ) 138 | ]), 139 | ) 140 | ], 141 | ), 142 | ), 143 | ), 144 | ), 145 | ), 146 | ); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/staticData.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/manager.dart'; 3 | 4 | import 'config/classes.dart'; 5 | 6 | class StaticData { 7 | static List food = [ 8 | Food(idFood: "1", nameFood: "Barquette de frites", price: 150.00), 9 | Food(idFood: "2", nameFood: "Assiete de frites", price: 200.00), 10 | Food(idFood: "3", nameFood: "Pizza poulé", price: 600.00), 11 | Food(idFood: "4", nameFood: "Pizza Mega", price: 1800.00), 12 | Food(idFood: "5", nameFood: "Barquette de frites", price: 150.00), 13 | Food(idFood: "6", nameFood: "Assiete de frites", price: 200.00), 14 | Food(idFood: "7", nameFood: "Pizza poulé", price: 600.00), 15 | Food(idFood: "8", nameFood: "Pizza Mega", price: 1800.00), 16 | Food(idFood: "9", nameFood: "Barquette de frites", price: 150.00), 17 | Food(idFood: "10", nameFood: "Assiete de frites", price: 200.00), 18 | Food(idFood: "11", nameFood: "Pizza poulé", price: 600.00), 19 | Food(idFood: "12", nameFood: "Pizza Mega", price: 1800.00), 20 | ]; 21 | static List menu = [ 22 | Category( 23 | banner: 24 | "https://glasrestaurant.ie/assets/img/Glas_restaurant_food_01.jpg?v2", 25 | food: food, 26 | nameCat: "Desserts", 27 | idCat: "1"), 28 | Category( 29 | banner: 30 | "http://www.gorwelion.co.uk/wp-content/uploads/2015/07/fine-dining-01.jpg", 31 | food: food, 32 | nameCat: "Entrées chaudes", 33 | idCat: "2"), 34 | Category( 35 | banner: 36 | "https://st4.depositphotos.com/1959135/22184/i/1600/depositphotos_221844198-stock-photo-grilled-chicken-legs-tomato-sauce.jpg", 37 | food: food, 38 | nameCat: "Entrées froids", 39 | idCat: "3"), 40 | Category( 41 | banner: 42 | "https://cdn.pixabay.com/photo/2017/12/09/08/18/pizza-3007395_960_720.jpg", 43 | food: food, 44 | nameCat: "Pizza", 45 | idCat: "4"), 46 | Category( 47 | banner: 48 | "http://www.gorwelion.co.uk/wp-content/uploads/2015/07/fine-dining-01.jpg", 49 | food: food, 50 | nameCat: "Plats", 51 | idCat: "5"), 52 | Category( 53 | banner: "https://media.timeout.com/images/105326979/750/422/image.jpg", 54 | food: food, 55 | nameCat: "Pâtes", 56 | idCat: "6"), 57 | Category( 58 | banner: 59 | "https://glasrestaurant.ie/assets/img/Glas_restaurant_food_01.jpg?v2", 60 | food: food, 61 | nameCat: "Desserts", 62 | idCat: "7"), 63 | Category( 64 | banner: 65 | "http://www.gorwelion.co.uk/wp-content/uploads/2015/07/fine-dining-01.jpg", 66 | food: food, 67 | nameCat: "Entrées chaudes", 68 | idCat: "8"), 69 | Category( 70 | banner: 71 | "https://st4.depositphotos.com/1959135/22184/i/1600/depositphotos_221844198-stock-photo-grilled-chicken-legs-tomato-sauce.jpg", 72 | food: [], 73 | nameCat: "Entrées froids", 74 | idCat: "9"), 75 | Category( 76 | banner: 77 | "https://cdn.pixabay.com/photo/2017/12/09/08/18/pizza-3007395_960_720.jpg", 78 | food: food, 79 | nameCat: "Pizza", 80 | idCat: "10"), 81 | Category( 82 | banner: 83 | "http://www.gorwelion.co.uk/wp-content/uploads/2015/07/fine-dining-01.jpg", 84 | food: food, 85 | nameCat: "Plats", 86 | idCat: "11"), 87 | Category( 88 | banner: "https://media.timeout.com/images/105326979/750/422/image.jpg", 89 | food: food, 90 | nameCat: "Pâtes", 91 | idCat: "12"), 92 | ]; 93 | static List restaurants = [ 94 | Restaurant( 95 | adrs: "Staouali, Algérie", 96 | banner: 97 | "https://st4.depositphotos.com/1959135/22184/i/1600/depositphotos_221844198-stock-photo-grilled-chicken-legs-tomato-sauce.jpg", 98 | idRestaurant: "1", 99 | nameRestaurant: "La Famillie", 100 | rating: 4.5, 101 | isOpen: true, 102 | close_at: "22:00", 103 | delivers_in: "40-45 Mins", 104 | menu: menu), 105 | Restaurant( 106 | adrs: "Bab Ezzouar, Algérie", 107 | banner: 108 | "http://www.gorwelion.co.uk/wp-content/uploads/2015/07/fine-dining-01.jpg", 109 | idRestaurant: "2", 110 | nameRestaurant: "Savanah", 111 | rating: 5.0, 112 | isOpen: true, 113 | close_at: "22:00", 114 | delivers_in: "40-45 Mins", 115 | menu: menu), 116 | Restaurant( 117 | adrs: "El Biar, Algérie", 118 | banner: 119 | "https://cdn.pixabay.com/photo/2017/12/09/08/18/pizza-3007395_960_720.jpg", 120 | idRestaurant: "3", 121 | nameRestaurant: "Casa Alger", 122 | rating: 3.7, 123 | isOpen: false, 124 | close_at: "22:00", 125 | delivers_in: "40-45 Mins", 126 | menu: menu), 127 | Restaurant( 128 | adrs: "Bab El Oued, Algérie", 129 | banner: "https://media.timeout.com/images/105326979/750/422/image.jpg", 130 | idRestaurant: "4", 131 | nameRestaurant: "Manhattan", 132 | rating: 2.6, 133 | isOpen: false, 134 | close_at: "22:00", 135 | delivers_in: "40-45 Mins", 136 | menu: menu), 137 | Restaurant( 138 | adrs: "Kouba, Algérie", 139 | banner: 140 | "https://glasrestaurant.ie/assets/img/Glas_restaurant_food_01.jpg?v2", 141 | idRestaurant: "5", 142 | nameRestaurant: "Café Store", 143 | rating: 1.0, 144 | isOpen: true, 145 | close_at: "22:00", 146 | delivers_in: "40-45 Mins", 147 | menu: menu), 148 | Restaurant( 149 | adrs: "Alger Centre, Algérie", 150 | banner: 151 | "https://cdn.pixabay.com/photo/2014/05/18/11/25/pizza-346985_960_720.jpg", 152 | idRestaurant: "6", 153 | nameRestaurant: "Savanah", 154 | rating: 1.8, 155 | isOpen: true, 156 | close_at: "22:00", 157 | delivers_in: "40-45 Mins", 158 | menu: menu), 159 | Restaurant( 160 | adrs: "Boulevard du 11 Decembre 1960, El Biar, Algérie", 161 | banner: 162 | "https://cdn.pixabay.com/photo/2017/12/09/08/18/pizza-3007395_960_720.jpg", 163 | idRestaurant: "7", 164 | nameRestaurant: "Pizza Time val d'hydra", 165 | rating: 1.8, 166 | isOpen: true, 167 | close_at: "22:00", 168 | delivers_in: "40-45 Mins", 169 | menu: menu), 170 | ]; 171 | //-------- Filters map 172 | static initFilters() => filters = {for (var cat in menu) cat.idCat: false}; 173 | static Map filters = {for (var cat in menu) cat.idCat: false}; 174 | 175 | static List orders = [ 176 | Order(food: food[0], quantity: 2), 177 | Order(food: food[2], quantity: 2), 178 | Order(food: food[1], quantity: 6), 179 | ]; 180 | //-------- CART --------------------- 181 | static Cart cart = Cart(restaurant: restaurants[2], orders: orders); 182 | //-------- Addresses 183 | static List
addresses = [ 184 | Address(adr: "Home",name: "El Biar, Alger"), 185 | Address(adr: "Work",name: "Staoueli, Alger"), 186 | Address(adr: "ADR1",name: "Bab Ezzouar, Alger"), 187 | ]; 188 | //------- Account Info 189 | static String appId = "com.yatechnologies.yassirfoodclient"; 190 | static String firstName = "Mohamed"; 191 | static String lastName = "BESSEKRI"; 192 | static String email = "root@gmail.com"; 193 | static String phone = "660 66 00 00"; 194 | } 195 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/RestaurantCategory.dart: -------------------------------------------------------------------------------- 1 | import 'package:yassir_food_prototype/config/classes.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:yassir_food_prototype/config/manager.dart'; 4 | import 'package:yassir_food_prototype/config/style.dart'; 5 | 6 | import 'AddToCartPage.dart'; 7 | 8 | class RestaurantCategory extends StatefulWidget { 9 | Restaurant restaurant; 10 | int index_cat; 11 | RestaurantCategory({@required this.restaurant, @required this.index_cat}); 12 | @override 13 | _RestaurantCategoryState createState() => 14 | _RestaurantCategoryState(restaurant: restaurant, index_cat: index_cat); 15 | } 16 | 17 | class _RestaurantCategoryState extends State { 18 | Restaurant restaurant; 19 | int index_cat; 20 | ScrollController _controller; 21 | bool _isCollapsed = false; 22 | 23 | _RestaurantCategoryState( 24 | {@required this.restaurant, @required this.index_cat}); 25 | bool get _isAppBarExpanded { 26 | print(_controller.hasClients && 27 | _controller.offset > 28 | ((MediaQuery.of(context).size.height / 3.7) - kToolbarHeight)); 29 | return _controller.hasClients && 30 | _controller.offset > 31 | ((MediaQuery.of(context).size.height / 3.7) - kToolbarHeight); 32 | } 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | _controller = ScrollController() 38 | ..addListener(() => _isAppBarExpanded 39 | ? setState(() => _isCollapsed = _isAppBarExpanded) 40 | : setState(() => _isCollapsed = _isAppBarExpanded)); 41 | } 42 | 43 | @override 44 | void dispose() { 45 | // TODO: implement dispose 46 | super.dispose(); 47 | _controller.dispose(); 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | print(index_cat); 53 | return Scaffold( 54 | backgroundColor: Colors.white, 55 | body: CustomScrollView( 56 | controller: _controller, 57 | slivers: [ 58 | SliverAppBar( 59 | leading: InkWell( 60 | onTap: () => Navigator.pop(context), 61 | child: Icon( 62 | Icons.arrow_back_ios, 63 | size: 25, 64 | color: _isCollapsed ? Colors.black : Colors.white, 65 | ), 66 | ), 67 | pinned: true, 68 | floating: false, 69 | expandedHeight: MediaQuery.of(context).size.height / 3.7, 70 | flexibleSpace: FlexibleSpaceBar( 71 | centerTitle: true, 72 | titlePadding: EdgeInsets.zero, 73 | title: Column( 74 | mainAxisAlignment: MainAxisAlignment.center, 75 | crossAxisAlignment: CrossAxisAlignment.center, 76 | children: [ 77 | Flexible(child: Container(), flex: 3), 78 | Flexible( 79 | child: Text( 80 | restaurant.menu[index_cat].nameCat, 81 | style: _isCollapsed 82 | ? CustomStyle.catNameStyleCollapsed() 83 | : CustomStyle.catNameStyleExtanded(), 84 | textAlign: TextAlign.center, 85 | ), 86 | flex: 1), 87 | Flexible(child: Container(), flex: 1), 88 | ], 89 | ), 90 | background: Stack( 91 | fit: StackFit.expand, 92 | children: [ 93 | FadeInImage( 94 | fit: BoxFit.cover, 95 | image: NetworkImage(restaurant.menu[index_cat].banner), 96 | placeholder: AssetImage("assets/placeholders/img5.jpg"), 97 | ), 98 | Container( 99 | decoration: BoxDecoration( 100 | gradient: LinearGradient( 101 | begin: Alignment.topCenter, 102 | end: Alignment.bottomCenter, 103 | colors: [Colors.black, Colors.transparent]), 104 | backgroundBlendMode: BlendMode.darken), 105 | ) 106 | ], 107 | ), 108 | )), 109 | getFood(context, restaurant.menu[index_cat].food, 110 | MediaQuery.of(context).size.height, restaurant.isOpen) 111 | ], 112 | ), 113 | ); 114 | } 115 | 116 | SliverList getFood( 117 | context, List food, double headerHeight, bool isOpen) { 118 | double height = MediaQuery.of(context).size.height; 119 | return SliverList( 120 | delegate: SliverChildBuilderDelegate((context, index) { 121 | return Container( 122 | //height: MediaQuery.of(context).size.height - headerHeight - 5 / 6, 123 | decoration: BoxDecoration( 124 | border: Border( 125 | bottom: BorderSide( 126 | width: .2, 127 | color: Colors.grey, 128 | )), 129 | ), 130 | child: Padding( 131 | padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 30), 132 | child: Row( 133 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 134 | children: [ 135 | Column( 136 | crossAxisAlignment: CrossAxisAlignment.start, 137 | children: [ 138 | Text( 139 | food[index].nameFood, 140 | style: CustomStyle.foodNameStyle(), 141 | ), 142 | Text( 143 | 'DZD ${food[index].price.toStringAsFixed(2)}', 144 | style: CustomStyle.priceStyle(), 145 | ) 146 | ], 147 | ), 148 | InkWell( 149 | onTap: () { 150 | if (!isOpen) 151 | Scaffold.of(context).showSnackBar(SnackBar( 152 | backgroundColor: Colors.red[900], 153 | content: Text("Restaurant is closed"), 154 | duration: Duration(seconds: 1), 155 | )); 156 | else 157 | Manager.customPageRoute( 158 | context, 159 | AddToCartPage( 160 | idRes: restaurant.idRestaurant, 161 | idCat: restaurant.menu[index_cat].idCat, 162 | food: food[index]), 163 | Offset(0, 0), 164 | Offset.zero, 165 | Duration(milliseconds: 300)); 166 | }, 167 | child: Container( 168 | decoration: BoxDecoration( 169 | borderRadius: BorderRadius.circular(2), 170 | border: Border.all( 171 | color: CustomStyle.selectedTabColor, width: .5)), 172 | child: Padding( 173 | padding: const EdgeInsets.all(6.0), 174 | child: Text( 175 | "ADD TO CART", 176 | style: CustomStyle.addToCartStyle(), 177 | ), 178 | ), 179 | ), 180 | ) 181 | ], 182 | ), 183 | ), 184 | ); 185 | }, childCount: food.length), 186 | ); 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/AddToCartPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/classes.dart'; 3 | import 'package:yassir_food_prototype/config/style.dart'; 4 | 5 | class AddToCartPage extends StatefulWidget { 6 | String idRes, idCat; 7 | Food food; 8 | AddToCartPage( 9 | {@required this.idRes, @required this.idCat, @required this.food}); 10 | @override 11 | _AddToCartPageState createState() => 12 | _AddToCartPageState(idRes: idRes, idCat: idCat, food: food); 13 | } 14 | 15 | class _AddToCartPageState extends State { 16 | String idRes, idCat; 17 | Food food; 18 | int quatity = 1; 19 | final int maxQuantity = 99; 20 | TextEditingController _editController; 21 | _AddToCartPageState( 22 | {@required this.idRes, @required this.idCat, @required this.food}); 23 | _qChange(bool inc) => inc 24 | ? setState(() => maxQuantity - quatity < 0 ? null : quatity++) 25 | : setState(() => quatity > 1 ? quatity-- : null); 26 | @override 27 | void initState() { 28 | super.initState(); 29 | _editController = TextEditingController(); 30 | } 31 | 32 | @override 33 | void dispose() { 34 | super.dispose(); 35 | _editController.dispose(); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Scaffold( 41 | appBar: AppBar( 42 | title: Text( 43 | "Add item", 44 | style: TextStyle(color: Colors.black, fontFamily: "Sofia"), 45 | ), 46 | centerTitle: true, 47 | leading: InkWell( 48 | onTap: () => Navigator.pop(context), 49 | child: Icon(Icons.arrow_back_ios, color: Colors.black, size: 25)), 50 | ), 51 | body: GestureDetector( 52 | onTap: ()=> FocusScope.of(context).requestFocus(FocusNode()), 53 | child: SingleChildScrollView( 54 | child: Padding( 55 | padding: EdgeInsets.all(20), 56 | child: Container( 57 | height: MediaQuery.of(context).size.height * 5.9/7, 58 | child: Column( 59 | children: [ 60 | //------------ Food Name 61 | Flexible( 62 | fit: FlexFit.loose, 63 | flex: 2, 64 | child: Center( 65 | child: Text( 66 | food.nameFood, 67 | style: CustomStyle.foodNameAddCartStyle(), 68 | ), 69 | ), 70 | ), 71 | //------------ TextField 72 | Flexible( 73 | fit: FlexFit.loose, 74 | flex: 5, 75 | child: Column( 76 | children: [ 77 | Container( 78 | color: CustomStyle.scaffoldBackgroundColor, 79 | child: Padding( 80 | padding: EdgeInsets.all(8), 81 | child: Row( 82 | children: [ 83 | ImageIcon( 84 | AssetImage("assets/img/edit.png"), 85 | size: 15, 86 | ), 87 | Padding( 88 | padding: const EdgeInsets.only(left: 5.0), 89 | child: Text( 90 | "Special instruction", 91 | style: TextStyle( 92 | fontFamily: "Sofia", color: Colors.black), 93 | ), 94 | ) 95 | ], 96 | ), 97 | ), 98 | ), 99 | Padding( 100 | padding: const EdgeInsets.only(top: 8.0), 101 | child: ClipRRect( 102 | borderRadius: BorderRadius.circular(5), 103 | child: TextField( 104 | keyboardType: TextInputType.multiline, 105 | maxLines: 10, 106 | controller: _editController, 107 | decoration: InputDecoration( 108 | filled: true, 109 | fillColor: CustomStyle.scaffoldBackgroundColor, 110 | hintText: 111 | "Add a note (extra sauce, no sauce...etc)", 112 | hintStyle: TextStyle( 113 | fontFamily: "Sofia", 114 | fontSize: 14, 115 | color: Colors.grey), 116 | border: InputBorder.none), 117 | ), 118 | ), 119 | ), 120 | ], 121 | ), 122 | ), 123 | //------------ Quantity ---------- 124 | Flexible( 125 | flex: 1, 126 | fit: FlexFit.loose, 127 | child: Column( 128 | mainAxisAlignment: MainAxisAlignment.end, 129 | children: [ 130 | Container( 131 | decoration: BoxDecoration( 132 | color: Colors.black, 133 | borderRadius: BorderRadius.circular(10)), 134 | height: 50, 135 | child: Row( 136 | mainAxisSize: MainAxisSize.max, 137 | children: [ 138 | Padding( 139 | padding: const EdgeInsets.only(left: 25), 140 | child: Row( 141 | mainAxisSize: MainAxisSize.min, 142 | children: [ 143 | InkWell( 144 | onTap: () => _qChange(false), 145 | child: Text( 146 | "-", 147 | style: TextStyle( 148 | color: Colors.white, 149 | fontFamily: "Sofia", 150 | fontSize: 30, 151 | fontWeight: FontWeight.w800), 152 | ), 153 | ), 154 | SizedBox(width: 10), 155 | CircleAvatar( 156 | radius: 13, 157 | backgroundColor: Colors.white, 158 | child: Text( 159 | quatity.toString(), 160 | style: TextStyle( 161 | color: Colors.black, 162 | fontFamily: "Sofia"), 163 | ), 164 | ), 165 | SizedBox(width: 10), 166 | InkWell( 167 | onTap: () => _qChange(true), 168 | child: Text( 169 | "+", 170 | style: TextStyle( 171 | color: Colors.white, 172 | fontFamily: "Sofia", 173 | fontSize: 30, 174 | fontWeight: FontWeight.w800), 175 | ), 176 | ) 177 | ], 178 | ), 179 | ), 180 | Expanded( 181 | child: Padding( 182 | padding: const EdgeInsets.only(right: 20), 183 | child: Row( 184 | mainAxisAlignment: MainAxisAlignment.end, 185 | children: [ 186 | Text( 187 | "ADD TO CART", 188 | style: TextStyle( 189 | fontFamily: "Sofia", 190 | color: Colors.white), 191 | ) 192 | ], 193 | ), 194 | ), 195 | ) 196 | ], 197 | ), 198 | ), 199 | ], 200 | )), 201 | ], 202 | ), 203 | ), 204 | ), 205 | ), 206 | ), 207 | ); 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/pages/RestaurantPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/classes.dart'; 3 | import 'package:yassir_food_prototype/config/manager.dart'; 4 | import 'package:yassir_food_prototype/config/style.dart'; 5 | import 'package:yassir_food_prototype/pages/RestaurantCategory.dart'; 6 | 7 | class RestaurantPage extends StatefulWidget { 8 | Restaurant restaurant; 9 | RestaurantPage({@required this.restaurant}); 10 | @override 11 | _RestaurantPageState createState() => 12 | _RestaurantPageState(restaurant: restaurant); 13 | } 14 | 15 | class _RestaurantPageState extends State { 16 | Restaurant restaurant; 17 | _RestaurantPageState({@required this.restaurant}); 18 | @override 19 | Widget build(BuildContext context) { 20 | double headerHeight = MediaQuery.of(context).size.height * 2.15 / 5; 21 | return Scaffold( 22 | backgroundColor: Colors.white, 23 | body: SingleChildScrollView( 24 | child: Column( 25 | children: [ 26 | Container( 27 | color: Color(0xfff4f5f6), 28 | height: headerHeight, 29 | child: Stack( 30 | children: [ 31 | //------- Image ---------- 32 | Container( 33 | height: headerHeight * 3.65 / 5, 34 | width: double.infinity, 35 | child: ShaderMask( 36 | shaderCallback: (rect) { 37 | return LinearGradient( 38 | begin: Alignment.topCenter, 39 | end: Alignment.bottomCenter, 40 | colors: [Colors.black, Colors.transparent], 41 | ).createShader(Rect.fromLTRB( 42 | 0, rect.height - 10, 0, rect.height)); 43 | }, 44 | blendMode: BlendMode.dst, 45 | child: FadeInImage( 46 | image: NetworkImage(restaurant.banner), 47 | placeholder: 48 | AssetImage("assets/img/placeholders/img0.jpg"), 49 | fit: BoxFit.fill, 50 | )), 51 | ), 52 | // --------- appBar ------------- 53 | Padding( 54 | padding: 55 | const EdgeInsets.only(top: 45.0, right: 15, left: 15), 56 | child: Row( 57 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 58 | children: [ 59 | InkWell( 60 | onTap: () => Navigator.pop(context), 61 | child: Icon( 62 | Icons.arrow_back_ios, 63 | size: 20, 64 | color: Colors.white, 65 | ), 66 | ), 67 | Icon( 68 | Icons.favorite_border, 69 | size: 30, 70 | color: Colors.white, 71 | ), 72 | ], 73 | ), 74 | ), 75 | //-------- Restaurant Info ------ 76 | Positioned( 77 | bottom: 5, 78 | child: Padding( 79 | padding: const EdgeInsets.symmetric(horizontal: 15.0), 80 | child: Container( 81 | decoration: BoxDecoration( 82 | borderRadius: BorderRadius.circular(2), 83 | border: 84 | Border.all(width: .1, color: Colors.grey[400]), 85 | color: Colors.white, 86 | boxShadow: [ 87 | BoxShadow( 88 | blurRadius: 2, 89 | spreadRadius: .5, 90 | color: Colors.grey[300], 91 | offset: Offset(0, 2)) 92 | ]), 93 | height: 94 | (headerHeight - (headerHeight * 3.65 / 5)) * 1.75, 95 | width: MediaQuery.of(context).size.width - 40, 96 | child: Column( 97 | mainAxisAlignment: MainAxisAlignment.spaceAround, 98 | children: [ 99 | Column( 100 | children: [ 101 | Text( 102 | restaurant.nameRestaurant, 103 | style: CustomStyle.restaurantName(), 104 | ), 105 | Text( 106 | restaurant.adrs, 107 | style: CustomStyle.restaurantAdrs(), 108 | ) 109 | ], 110 | ), 111 | Row( 112 | mainAxisAlignment: MainAxisAlignment.spaceAround, 113 | children: [ 114 | Column( 115 | children: [ 116 | Text( 117 | "OPEN TILL", 118 | style: CustomStyle.restaurantOptions(), 119 | ), 120 | SizedBox( 121 | height: 5, 122 | ), 123 | Text( 124 | restaurant.close_at, 125 | style: CustomStyle.restaurantAdrs(), 126 | ) 127 | ], 128 | ), 129 | Column( 130 | children: [ 131 | Text( 132 | "DELIVERS IN", 133 | style: CustomStyle.restaurantOptions(), 134 | ), 135 | SizedBox( 136 | height: 5, 137 | ), 138 | Text( 139 | restaurant.delivers_in, 140 | style: CustomStyle.restaurantAdrs(), 141 | ) 142 | ], 143 | ), 144 | Column( 145 | children: [ 146 | Text( 147 | "NOTE", 148 | style: CustomStyle.restaurantOptions(), 149 | ), 150 | SizedBox( 151 | height: 5, 152 | ), 153 | Text( 154 | restaurant.rating.toString(), 155 | style: CustomStyle.restaurantAdrs(), 156 | ) 157 | ], 158 | ), 159 | ], 160 | ) 161 | ], 162 | ), 163 | ), 164 | ), 165 | ) 166 | ], 167 | ), 168 | ), 169 | // MENU HERE 170 | getMENU(restaurant.menu, headerHeight, context) 171 | ], 172 | ), 173 | ), 174 | ); 175 | } 176 | 177 | Widget getMENU( 178 | List menu, double headerHeight, BuildContext context) { 179 | double listHeight = MediaQuery.of(context).size.height - headerHeight - 5; 180 | 181 | return Container( 182 | height: MediaQuery.of(context).size.height - headerHeight - 5, 183 | child: ListView.builder( 184 | itemCount: menu.length, 185 | itemBuilder: (context, index) { 186 | int r = index % 18; 187 | print(index); 188 | return InkWell( 189 | onTap: () => Manager.customPageRoute( 190 | context, 191 | RestaurantCategory(restaurant: restaurant, index_cat: index), 192 | Offset(0,1), 193 | Offset.zero, 194 | Duration(milliseconds: 400)), 195 | child: Container( 196 | //height: MediaQuery.of(context).size.height - headerHeight - 5 / 6, 197 | decoration: BoxDecoration( 198 | border: Border( 199 | bottom: BorderSide( 200 | width: .2, 201 | color: Colors.grey, 202 | )), 203 | ), 204 | child: Padding( 205 | padding: const EdgeInsets.only( 206 | left: 5.0, right: 5.0, top: 10, bottom: 10), 207 | child: Row( 208 | children: [ 209 | Row( 210 | mainAxisSize: MainAxisSize.min, 211 | children: [ 212 | ClipOval( 213 | //borderRadius: BorderRadius.circular(25), 214 | child: FadeInImage( 215 | fit: BoxFit.fill, 216 | image: NetworkImage(menu[index].banner), 217 | placeholder: AssetImage( 218 | "assets/img/placeholders/img$r.jpg"), 219 | width: 50, 220 | height: 50, 221 | ), 222 | ), 223 | Padding( 224 | padding: const EdgeInsets.only(left: 8.0), 225 | child: Text( 226 | menu[index].nameCat, 227 | style: CustomStyle.categoryNameStyle(), 228 | ), 229 | ), 230 | ], 231 | ), 232 | Expanded( 233 | child: Row( 234 | mainAxisAlignment: MainAxisAlignment.end, 235 | children: [ 236 | Icon( 237 | Icons.arrow_forward_ios, 238 | size: 12, 239 | color: Colors.black, 240 | ), 241 | ], 242 | ), 243 | ) 244 | ], 245 | ), 246 | ), 247 | ), 248 | ); 249 | }), 250 | ); 251 | } 252 | } 253 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/MaklaTabViewItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/config/classes.dart'; 3 | import 'package:yassir_food_prototype/config/manager.dart'; 4 | import 'package:yassir_food_prototype/config/style.dart'; 5 | import 'package:smooth_star_rating/smooth_star_rating.dart'; 6 | import 'package:yassir_food_prototype/pages/RestaurantPage.dart'; 7 | 8 | import 'errorWidgets.dart'; 9 | 10 | class MaklaTabViewItem extends StatefulWidget { 11 | String location; 12 | List restaurants; 13 | MaklaTabViewItem({@required this.restaurants, @required this.location}); 14 | @override 15 | _MaklaTabViewItemState createState() => 16 | _MaklaTabViewItemState(restaurants: restaurants, location: location); 17 | } 18 | 19 | class _MaklaTabViewItemState extends State { 20 | String location; 21 | List restaurants; 22 | _MaklaTabViewItemState({@required this.restaurants, @required this.location}); 23 | @override 24 | void dispose() { 25 | // TODO: implement dispose 26 | super.dispose(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | Size size = MediaQuery.of(context).size; 32 | return Container( 33 | color: CustomStyle.scaffoldBackgroundColor, 34 | child: FutureBuilder( 35 | future: Manager.getRestaurantByLocation(restaurants, location), 36 | builder: (context, snapshot) { 37 | if (snapshot.hasData) { 38 | print("Building List "); 39 | return ListView.builder( 40 | itemCount: snapshot.data.length, 41 | itemBuilder: (context, index) { 42 | int r = index % 18; 43 | return InkWell( 44 | onTap: () => Manager.customPageRoute( 45 | context, 46 | RestaurantPage(restaurant: snapshot.data[index]), 47 | Offset(1.0, 0.0), 48 | Offset.zero, 49 | Duration(milliseconds: 400)), 50 | child: Padding( 51 | padding: 52 | const EdgeInsets.only(top: 10, right: 10, left: 10), 53 | child: ClipRRect( 54 | borderRadius: BorderRadius.circular(8), 55 | child: Container( 56 | height: 210, 57 | child: Stack( 58 | fit: StackFit.expand, 59 | children: [ 60 | FadeInImage( 61 | placeholder: AssetImage( 62 | "assets/img/placeholders/img$r.jpg"), 63 | image: 64 | NetworkImage(snapshot.data[index].banner), 65 | fit: BoxFit.fill, 66 | ), 67 | Column( 68 | mainAxisAlignment: MainAxisAlignment.end, 69 | children: [ 70 | Opacity( 71 | opacity: 0.35, 72 | child: Container( 73 | height: 75, 74 | color: Color(0xff292c30), 75 | ), 76 | ) 77 | ], 78 | ), 79 | Column( 80 | mainAxisAlignment: MainAxisAlignment.end, 81 | children: [ 82 | Container( 83 | height: 75, 84 | child: Padding( 85 | padding: const EdgeInsets.symmetric( 86 | horizontal: 8.0), 87 | child: Row( 88 | mainAxisAlignment: 89 | MainAxisAlignment.spaceBetween, 90 | children: [ 91 | Padding( 92 | padding: const EdgeInsets.only( 93 | top: 20.0, left: 5), 94 | child: Column( 95 | crossAxisAlignment: 96 | CrossAxisAlignment.start, 97 | children: [ 98 | Text( 99 | snapshot.data[index] 100 | .nameRestaurant, 101 | style: CustomStyle 102 | .cardStyleLeft(), 103 | ), 104 | Row( 105 | children: [ 106 | SmoothStarRating( 107 | allowHalfRating: false, 108 | starCount: 5, 109 | rating: snapshot 110 | .data[index].rating, 111 | size: 20.0, 112 | filledIconData: 113 | Icons.star, 114 | halfFilledIconData: 115 | Icons.star_half, 116 | color: 117 | Colors.yellow[700], 118 | borderColor: 119 | Colors.yellow[700], 120 | spacing: 1.0), 121 | Text( 122 | snapshot 123 | .data[index].rating 124 | .toString(), 125 | style: CustomStyle 126 | .cardStyleRight(), 127 | ) 128 | ], 129 | ) 130 | /* 131 | getRate( 132 | snapshot.data[index].rating) 133 | Text("Rate", 134 | style: CustomStyle 135 | .cardStyleRight())*/ 136 | ], 137 | ), 138 | ), 139 | Padding( 140 | padding: const EdgeInsets.only( 141 | top: 10.0, 142 | ), 143 | child: Column( 144 | children: [ 145 | Text( 146 | "45-55 Mins", 147 | style: CustomStyle 148 | .cardStyleRight(), 149 | ), 150 | SizedBox( 151 | height: 7, 152 | ), 153 | ClipRRect( 154 | borderRadius: 155 | BorderRadius.circular( 156 | 15), 157 | child: Container( 158 | child: Padding( 159 | padding: 160 | const EdgeInsets 161 | .symmetric( 162 | horizontal: 15, 163 | vertical: 5), 164 | child: Text( 165 | snapshot.data[index] 166 | .isOpen 167 | ? "OPEN" 168 | : "CLOSED", 169 | style: CustomStyle 170 | .cardStyleRight()), 171 | ), 172 | color: snapshot 173 | .data[index] 174 | .isOpen 175 | ? Color(0xFF24B42E) 176 | : CustomStyle 177 | .selectedTabColor, 178 | )) 179 | ], 180 | ), 181 | ) 182 | ], 183 | ), 184 | ), 185 | ), 186 | ], 187 | ) 188 | ], 189 | ), 190 | ), 191 | ), 192 | ), 193 | ); 194 | }); 195 | } else { 196 | return ErrorWidgets.error( 197 | context: context, 198 | header: "No restaurants available", 199 | subHeader: 200 | "No restaurants available in your location, please check with some other locations", 201 | asset: "shop"); 202 | } 203 | }, 204 | ), 205 | ); 206 | } 207 | 208 | Widget getRate(double rate) { 209 | int count = rate.floor(); 210 | bool delta = rate - count < 0.5; 211 | return Row( 212 | children: List.generate(count + 2, (index) { 213 | if (index < count) { 214 | return ImageIcon( 215 | AssetImage("assets/img/star.png"), 216 | size: 20, 217 | color: Colors.yellow[700], 218 | ); 219 | } else { 220 | if (index == count) { 221 | if (delta) 222 | return Container(); 223 | else 224 | return ImageIcon( 225 | AssetImage("assets/img/half-star.png"), 226 | size: 20, 227 | color: Colors.yellow[700], 228 | ); 229 | } else { 230 | return Text( 231 | rate.toString(), 232 | style: CustomStyle.cardStyleRight(), 233 | ); 234 | } 235 | } 236 | }), 237 | ); 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /yassir_food_prototype/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = "The Chromium Authors"; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 1100; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.yassirFoodPrototype; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 5.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.yassirFoodPrototype; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 5.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.yassirFoodPrototype; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 5.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | }; 517 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 518 | } 519 | -------------------------------------------------------------------------------- /yassir_food_prototype/lib/components/CartTabViewItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yassir_food_prototype/components/Separator.dart'; 3 | import 'package:yassir_food_prototype/config/manager.dart'; 4 | import 'package:yassir_food_prototype/config/style.dart'; 5 | import 'package:yassir_food_prototype/pages/RestaurantPage.dart'; 6 | import 'package:yassir_food_prototype/staticData.dart'; 7 | 8 | import 'errorWidgets.dart'; 9 | 10 | class CartTabViewItem extends StatefulWidget { 11 | @override 12 | _CartTabViewItemState createState() => _CartTabViewItemState(); 13 | } 14 | 15 | class _CartTabViewItemState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return StaticData.cart.orders.length == 0 19 | ? ErrorWidgets.error( 20 | context: context, 21 | header: "Your cart is empty", 22 | subHeader: "Your cart is empty. Kindly add something from menu", 23 | asset: "burger") 24 | : SingleChildScrollView( 25 | child: Column( 26 | children: [ 27 | //-------- Restaurant Info ------------ 28 | Container( 29 | color: CustomStyle.scaffoldBackgroundColor, 30 | child: Padding( 31 | padding: const EdgeInsets.all(20.0), 32 | child: Row( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | ClipRRect( 36 | borderRadius: BorderRadius.circular(5), 37 | child: FadeInImage( 38 | placeholder: 39 | AssetImage("assets/placeholders/img0.jpg"), 40 | image: 41 | NetworkImage(StaticData.cart.restaurant.banner), 42 | width: 65, 43 | height: 60, 44 | fit: BoxFit.fill, 45 | ), 46 | ), 47 | SizedBox( 48 | width: 23, 49 | ), 50 | Column( 51 | mainAxisAlignment: MainAxisAlignment.start, 52 | crossAxisAlignment: CrossAxisAlignment.start, 53 | children: [ 54 | SizedBox( 55 | height: 8, 56 | ), 57 | Text(StaticData.cart.restaurant.nameRestaurant, 58 | style: TextStyle( 59 | fontFamily: "Sofia", 60 | fontSize: 18, 61 | fontWeight: FontWeight.w700)), 62 | SizedBox( 63 | height: 5, 64 | ), 65 | Text(StaticData.cart.restaurant.delivers_in, 66 | style: TextStyle( 67 | fontFamily: "Sofia", 68 | fontSize: 14, 69 | fontWeight: FontWeight.w700, 70 | color: Colors.grey)) 71 | ], 72 | ) 73 | ], 74 | ), 75 | ), 76 | ), 77 | //-------- Orders ------------ 78 | Container( 79 | color: Colors.white, 80 | child: Padding( 81 | padding: const EdgeInsets.all(20.0), 82 | child: Column( 83 | children: getOrders(), 84 | ), 85 | ), 86 | ), 87 | //-------- Fees ------------ 88 | Container( 89 | color: Colors.white, 90 | child: Padding( 91 | padding: const EdgeInsets.all(20.0), 92 | child: Column( 93 | children: [ 94 | InkWell( 95 | onTap: () => Manager.customPageRoute( 96 | context, 97 | RestaurantPage( 98 | restaurant: StaticData.cart.restaurant), 99 | Offset(0, 1), 100 | Offset.zero, 101 | Duration(milliseconds: 350)), 102 | child: Container( 103 | decoration: BoxDecoration( 104 | borderRadius: BorderRadius.circular(5), 105 | border: Border.all(color: Colors.grey[400]), 106 | color: CustomStyle.scaffoldBackgroundColor), 107 | height: 50, 108 | child: Center( 109 | child: Text("ADD OTHER FOOD", 110 | style: TextStyle( 111 | color: Colors.black, 112 | fontFamily: "Sofia", 113 | fontSize: 16, 114 | fontWeight: FontWeight.w600)), 115 | ), 116 | ), 117 | ), 118 | SizedBox( 119 | height: 15, 120 | ), 121 | Separator(color: CustomStyle.scaffoldBackgroundColor), 122 | SizedBox( 123 | height: 8, 124 | ), 125 | Row( 126 | mainAxisAlignment: MainAxisAlignment.start, 127 | crossAxisAlignment: CrossAxisAlignment.start, 128 | children: [ 129 | Column( 130 | crossAxisAlignment: CrossAxisAlignment.start, 131 | mainAxisSize: MainAxisSize.min, 132 | children: [ 133 | Text( 134 | "Estimated Subtotal", 135 | style: TextStyle( 136 | color: Colors.grey[500], 137 | fontFamily: "Sofia", 138 | fontSize: 16, 139 | fontWeight: FontWeight.w700), 140 | ), 141 | SizedBox( 142 | height: 5, 143 | ), 144 | Text( 145 | StaticData.cart.restaurant.nameRestaurant, 146 | style: TextStyle( 147 | color: Colors.black, 148 | fontFamily: "Sofia", 149 | fontSize: 14, 150 | fontWeight: FontWeight.w400)), 151 | ], 152 | ), 153 | Expanded( 154 | child: Row( 155 | mainAxisAlignment: MainAxisAlignment.end, 156 | children: [ 157 | Text( 158 | StaticData.orders 159 | .map((order) => 160 | order.quantity * 161 | order.food.price) 162 | .toList() 163 | .reduce((curr, next) => curr + next) 164 | .toString(), 165 | style: TextStyle( 166 | color: Colors.grey[350], 167 | fontFamily: "Sofia", 168 | fontSize: 14, 169 | fontWeight: FontWeight.w500)) 170 | ], 171 | ), 172 | ) 173 | ], 174 | ), 175 | SizedBox( 176 | height: 10, 177 | ), 178 | Separator(color: CustomStyle.scaffoldBackgroundColor), 179 | SizedBox( 180 | height: 10, 181 | ), 182 | Row( 183 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 184 | crossAxisAlignment: CrossAxisAlignment.center, 185 | children: [ 186 | Text("Coupon discount", 187 | style: TextStyle( 188 | fontFamily: "Sofia", 189 | fontSize: 14, 190 | fontWeight: FontWeight.w400, 191 | color: Colors.grey)), 192 | ClipRRect( 193 | borderRadius: BorderRadius.circular(5), 194 | child: Container( 195 | height: 25, 196 | width: 60, 197 | color: Colors.red[50], 198 | child: Center( 199 | child: Text("APPLY", 200 | style: TextStyle( 201 | fontFamily: "Sofia", 202 | fontSize: 10, 203 | fontWeight: FontWeight.w600, 204 | color: Colors.red)), 205 | ), 206 | ), 207 | ) 208 | ], 209 | ), 210 | SizedBox( 211 | height: 10, 212 | ), 213 | Row( 214 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 215 | crossAxisAlignment: CrossAxisAlignment.center, 216 | children: [ 217 | Text("Delivery charges", 218 | style: TextStyle( 219 | fontFamily: "Sofia", 220 | fontSize: 14, 221 | fontWeight: FontWeight.w400, 222 | color: Colors.grey)), 223 | Text("0.00", 224 | style: TextStyle( 225 | color: Colors.grey[350], 226 | fontFamily: "Sofia", 227 | fontSize: 14, 228 | fontWeight: FontWeight.w400)) 229 | ], 230 | ), 231 | SizedBox( 232 | height: 15, 233 | ), 234 | Row( 235 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 236 | crossAxisAlignment: CrossAxisAlignment.center, 237 | children: [ 238 | Text("SubTotal", 239 | style: TextStyle( 240 | fontFamily: "Sofia", 241 | fontSize: 14, 242 | fontWeight: FontWeight.w400, 243 | color: Colors.grey)), 244 | Text( 245 | StaticData.orders 246 | .map((order) => 247 | order.quantity * order.food.price) 248 | .toList() 249 | .reduce((curr, next) => curr + next) 250 | .toStringAsFixed(2), 251 | style: TextStyle( 252 | color: Colors.grey[350], 253 | fontFamily: "Sofia", 254 | fontSize: 14, 255 | fontWeight: FontWeight.w500)) 256 | ], 257 | ), 258 | Divider( 259 | color: Colors.grey[350], 260 | thickness: 1, 261 | ), 262 | Row( 263 | crossAxisAlignment: CrossAxisAlignment.end, 264 | mainAxisAlignment: MainAxisAlignment.end, 265 | children: [ 266 | Text("Total to pay", 267 | style: TextStyle( 268 | fontFamily: "Sofia", 269 | fontSize: 16, 270 | fontWeight: FontWeight.w700, 271 | color: Colors.black)), 272 | SizedBox( 273 | width: 50, 274 | ), 275 | Text( 276 | StaticData.orders 277 | .map((order) => 278 | order.quantity * order.food.price) 279 | .toList() 280 | .reduce((curr, next) => curr + next) 281 | .toStringAsFixed(2), 282 | style: TextStyle( 283 | color: Colors.red[600], 284 | fontFamily: "Sofia", 285 | fontSize: 15, 286 | fontWeight: FontWeight.w700)) 287 | ], 288 | ), 289 | ], 290 | ), 291 | )), 292 | SizedBox(height: 15), 293 | //-------- ADDRESS ------------ 294 | Container( 295 | width: double.infinity, 296 | color: Colors.white, 297 | child: Padding( 298 | padding: const EdgeInsets.all(20), 299 | child: Column( 300 | mainAxisAlignment: MainAxisAlignment.start, 301 | crossAxisAlignment: CrossAxisAlignment.start, 302 | mainAxisSize: MainAxisSize.max, 303 | children: [ 304 | Text("Saved address", 305 | style: TextStyle( 306 | fontFamily: "Sofia", 307 | fontSize: 16, 308 | fontWeight: FontWeight.w700, 309 | color: Colors.black)), 310 | SizedBox( 311 | height: 10, 312 | ), 313 | Container( 314 | width: double.infinity, 315 | height: 70, 316 | decoration: BoxDecoration( 317 | borderRadius: BorderRadius.circular(3), 318 | border: Border.all( 319 | color: Colors.grey[400], width: 2)), 320 | child: Center( 321 | child: Text("No Address", 322 | style: TextStyle( 323 | color: Colors.black, 324 | fontFamily: "Sofia", 325 | fontSize: 14, 326 | fontWeight: FontWeight.w300)), 327 | ), 328 | ) 329 | ], 330 | ), 331 | ), 332 | ), 333 | SizedBox(height: 15), 334 | Container( 335 | color: Colors.white, 336 | width: double.infinity, 337 | child: Padding( 338 | padding: EdgeInsets.all(20), 339 | child: Container( 340 | height: 50, 341 | decoration: BoxDecoration( 342 | color: Colors.red[800], 343 | borderRadius: BorderRadius.circular(5)), 344 | child: Center( 345 | child: Text( 346 | "PROCEED", 347 | style: TextStyle( 348 | color: Colors.white, 349 | fontFamily: "Sofia", 350 | fontSize: 18, 351 | fontWeight: FontWeight.w500), 352 | ), 353 | ), 354 | ), 355 | ), 356 | ) 357 | ], 358 | ), 359 | ); 360 | } 361 | 362 | _qChange(bool inc, int index) => inc 363 | ? setState(() => StaticData.cart.orders[index].quantity < 98 364 | ? StaticData.cart.orders[index].quantity++ 365 | : null) 366 | : setState(() => StaticData.cart.orders[index].quantity > 1 367 | ? StaticData.cart.orders[index].quantity-- 368 | : null); 369 | _removeOrder(int index) => 370 | setState(() => StaticData.cart.orders.removeAt(index)); 371 | getOrders() => List.generate(StaticData.cart.orders.length, (index) { 372 | return Padding( 373 | padding: const EdgeInsets.only(bottom: 10.0), 374 | child: InkWell( 375 | onLongPress: () => showDialog( 376 | context: context, 377 | barrierDismissible: true, 378 | builder: (context) { 379 | return AlertDialog( 380 | elevation: 5, 381 | title: Text("Deleting"), 382 | content: Text( 383 | "Are you sure you want to dismiss the selected portion?", 384 | style: TextStyle(fontFamily: "Sofia"), 385 | ), 386 | actions: [ 387 | FlatButton( 388 | color: Colors.black, 389 | child: Text("YES"), 390 | onPressed: () { 391 | _removeOrder(index); 392 | Navigator.of(context).pop(); 393 | }, 394 | ), 395 | FlatButton( 396 | color: Colors.red[900], 397 | child: Text("NO"), 398 | onPressed: () => Navigator.of(context).pop()), 399 | ], 400 | ); 401 | }), 402 | child: Row( 403 | children: [ 404 | Column( 405 | crossAxisAlignment: CrossAxisAlignment.start, 406 | mainAxisAlignment: MainAxisAlignment.start, 407 | mainAxisSize: MainAxisSize.min, 408 | children: [ 409 | Text( 410 | StaticData.cart.orders[index].food.nameFood, 411 | style: CustomStyle.foodNameStyle(), 412 | ), 413 | Text( 414 | '${(StaticData.cart.orders[index].food.price * StaticData.cart.orders[index].quantity).toStringAsFixed(2)}', 415 | style: CustomStyle.priceStyle(), 416 | ) 417 | ], 418 | ), 419 | Expanded( 420 | child: Row( 421 | mainAxisAlignment: MainAxisAlignment.end, 422 | crossAxisAlignment: CrossAxisAlignment.center, 423 | children: [ 424 | InkWell( 425 | onTap: () => _qChange(false, index), 426 | child: Container( 427 | width: 35, 428 | height: 25, 429 | decoration: BoxDecoration( 430 | borderRadius: BorderRadius.circular(2), 431 | border: Border.all(color: Colors.grey[350])), 432 | child: Center( 433 | child: Text( 434 | "-", 435 | style: TextStyle( 436 | color: Colors.black, 437 | fontFamily: "Sofia", 438 | fontSize: 18), 439 | )), 440 | ), 441 | ), 442 | SizedBox(width: 10), 443 | Text(StaticData.cart.orders[index].quantity.toString(), 444 | style: TextStyle( 445 | color: Colors.black, 446 | fontFamily: "Sofia", 447 | fontSize: 16)), 448 | SizedBox(width: 10), 449 | InkWell( 450 | onTap: () => _qChange(true, index), 451 | child: Container( 452 | width: 35, 453 | height: 25, 454 | decoration: BoxDecoration( 455 | color: Colors.red[700], 456 | borderRadius: BorderRadius.circular(2), 457 | border: Border.all(color: Colors.red[700])), 458 | child: Center( 459 | child: Text( 460 | "+", 461 | style: TextStyle( 462 | color: Colors.white, 463 | fontFamily: "Sofia", 464 | fontSize: 18), 465 | )), 466 | ), 467 | ), 468 | ], 469 | ), 470 | ), 471 | ], 472 | ), 473 | ), 474 | ); 475 | }); 476 | } 477 | --------------------------------------------------------------------------------