diff --git a/README.md b/README.md index a62148d..cc5964c 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ -# FoodDelivery-Flutter \ No newline at end of file +# restaurant template + + + diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..0a741cb --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,11 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..ef42009 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,63 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 29 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.laodev.restaurant" + minSdkVersion 16 + targetSdkVersion 29 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..773753c --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..60f39ba --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/laodev/restaurant/MainActivity.kt b/android/app/src/main/kotlin/com/laodev/restaurant/MainActivity.kt new file mode 100644 index 0000000..517de5c --- /dev/null +++ b/android/app/src/main/kotlin/com/laodev/restaurant/MainActivity.kt @@ -0,0 +1,6 @@ +package com.laodev.restaurant + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..1f83a33 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..773753c --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..3100ad2 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..a673820 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..296b146 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/android/restaurant_android.iml b/android/restaurant_android.iml new file mode 100644 index 0000000..655d2fa --- /dev/null +++ b/android/restaurant_android.iml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/assets/cc.png b/assets/cc.png new file mode 100755 index 0000000..b8c862b Binary files /dev/null and b/assets/cc.png differ diff --git a/assets/cm1.jpeg b/assets/cm1.jpeg new file mode 100755 index 0000000..80c207f Binary files /dev/null and b/assets/cm1.jpeg differ diff --git a/assets/cm2.jpeg b/assets/cm2.jpeg new file mode 100755 index 0000000..cbfdf18 Binary files /dev/null and b/assets/cm2.jpeg differ diff --git a/assets/cm3.jpeg b/assets/cm3.jpeg new file mode 100755 index 0000000..cbe7e80 Binary files /dev/null and b/assets/cm3.jpeg differ diff --git a/assets/cm4.jpeg b/assets/cm4.jpeg new file mode 100755 index 0000000..6d8d764 Binary files /dev/null and b/assets/cm4.jpeg differ diff --git a/assets/food1.jpeg b/assets/food1.jpeg new file mode 100755 index 0000000..46f6e3e Binary files /dev/null and b/assets/food1.jpeg differ diff --git a/assets/food10.jpeg b/assets/food10.jpeg new file mode 100755 index 0000000..d5f7de6 Binary files /dev/null and b/assets/food10.jpeg differ diff --git a/assets/food11.jpeg b/assets/food11.jpeg new file mode 100755 index 0000000..1eb51b3 Binary files /dev/null and b/assets/food11.jpeg differ diff --git a/assets/food12.jpg b/assets/food12.jpg new file mode 100755 index 0000000..b0db9b3 Binary files /dev/null and b/assets/food12.jpg differ diff --git a/assets/food2.jpeg b/assets/food2.jpeg new file mode 100755 index 0000000..e26ac77 Binary files /dev/null and b/assets/food2.jpeg differ diff --git a/assets/food3.jpeg b/assets/food3.jpeg new file mode 100755 index 0000000..2bf8cf1 Binary files /dev/null and b/assets/food3.jpeg differ diff --git a/assets/food4.jpeg b/assets/food4.jpeg new file mode 100755 index 0000000..491af83 Binary files /dev/null and b/assets/food4.jpeg differ diff --git a/assets/food5.jpeg b/assets/food5.jpeg new file mode 100755 index 0000000..51a43de Binary files /dev/null and b/assets/food5.jpeg differ diff --git a/assets/food6.jpeg b/assets/food6.jpeg new file mode 100755 index 0000000..42cb54c Binary files /dev/null and b/assets/food6.jpeg differ diff --git a/assets/food7.jpeg b/assets/food7.jpeg new file mode 100755 index 0000000..629dee4 Binary files /dev/null and b/assets/food7.jpeg differ diff --git a/assets/food8.jpeg b/assets/food8.jpeg new file mode 100755 index 0000000..7bd5a85 Binary files /dev/null and b/assets/food8.jpeg differ diff --git a/assets/food9.jpeg b/assets/food9.jpeg new file mode 100755 index 0000000..7191b5a Binary files /dev/null and b/assets/food9.jpeg differ diff --git a/assets/logo.png b/assets/logo.png new file mode 100755 index 0000000..33131f5 Binary files /dev/null and b/assets/logo.png differ diff --git a/assets/on1.png b/assets/on1.png new file mode 100755 index 0000000..754712a Binary files /dev/null and b/assets/on1.png differ diff --git a/assets/on2.png b/assets/on2.png new file mode 100755 index 0000000..cf12ed0 Binary files /dev/null and b/assets/on2.png differ diff --git a/assets/on3.png b/assets/on3.png new file mode 100755 index 0000000..124bec4 Binary files /dev/null and b/assets/on3.png differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..e96ef60 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..f2872cf --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..e8efba1 --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..399e934 --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..1e8c3c9 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6c58e61 --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,495 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.laodev.restaurant; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.laodev.restaurant; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.laodev.restaurant; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..cfda466 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + restaurant + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart new file mode 100644 index 0000000..9f6808e --- /dev/null +++ b/lib/generated_plugin_registrant.dart @@ -0,0 +1,16 @@ +// +// Generated file. Do not edit. +// + +// ignore: unused_import +import 'dart:ui'; + +import 'package:shared_preferences_web/shared_preferences_web.dart'; + +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; + +// ignore: public_member_api_docs +void registerPlugins(PluginRegistry registry) { + SharedPreferencesPlugin.registerWith(registry.registrarFor(SharedPreferencesPlugin)); + registry.registerMessageHandler(); +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100755 index 0000000..7e19df3 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:restaurant/providers/app_provider.dart'; +import 'package:restaurant/screens/splash.dart'; +import 'package:restaurant/util/const.dart'; + +import 'util/const.dart'; + +void main() { + runApp( + MultiProvider( + providers: [ + ChangeNotifierProvider(create: (_) => AppProvider()), + ], + child: MyApp(), + ), + ); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Consumer( + builder: (BuildContext context, AppProvider appProvider, Widget child) { + return MaterialApp( + key: appProvider.key, + debugShowCheckedModeBanner: false, + navigatorKey: appProvider.navigatorKey, + title: Constants.appName, + theme: appProvider.theme, + darkTheme: Constants.darkTheme, + home: SplashScreen(), + ); + }, + ); + } +} \ No newline at end of file diff --git a/lib/podo/food.dart b/lib/podo/food.dart new file mode 100755 index 0000000..77adb8c --- /dev/null +++ b/lib/podo/food.dart @@ -0,0 +1,20 @@ +class Food { + String img; + String name; + + Food( + {this.img, + this.name}); + + Food.fromJson(Map json) { + name = json['name']; + img = json['img']; + } + + Map toJson() { + final Map data = new Map(); + data['img'] = this.img; + data['name'] = this.name; + return data; + } +} \ No newline at end of file diff --git a/lib/providers/app_provider.dart b/lib/providers/app_provider.dart new file mode 100755 index 0000000..0f3c41d --- /dev/null +++ b/lib/providers/app_provider.dart @@ -0,0 +1,61 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class AppProvider extends ChangeNotifier{ + AppProvider(){ + checkTheme(); + } + + + ThemeData theme = Constants.lightTheme; + Key key = UniqueKey(); + GlobalKey navigatorKey = GlobalKey(); + + void setKey(value) { + key = value; + notifyListeners(); + } + + void setNavigatorKey(value) { + navigatorKey = value; + notifyListeners(); + } + + void setTheme(value, c) { + theme = value; + SharedPreferences.getInstance().then((prefs){ + prefs.setString("theme", c).then((val){ + SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + statusBarColor: c == "dark" ? Constants.darkPrimary : Constants.lightPrimary, + statusBarIconBrightness: c == "dark" ? Brightness.light:Brightness.dark, + )); + }); + }); + notifyListeners(); + } + + ThemeData getTheme(value) { + return theme; + } + + Future checkTheme() async{ + SharedPreferences prefs = await SharedPreferences.getInstance(); + ThemeData t; + String r = prefs.getString("theme") == null ? "light" : prefs.getString( + "theme"); + + if(r == "light"){ + t = Constants.lightTheme; + setTheme(Constants.lightTheme, "light"); + }else{ + t = Constants.darkTheme; + setTheme(Constants.darkTheme, "dark"); + } + + return t; + } +} \ No newline at end of file diff --git a/lib/screens/cart.dart b/lib/screens/cart.dart new file mode 100755 index 0000000..ce94072 --- /dev/null +++ b/lib/screens/cart.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/checkout.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/cart_item.dart'; + + +class CartScreen extends StatefulWidget { + @override + _CartScreenState createState() => _CartScreenState(); +} + +class _CartScreenState extends State with AutomaticKeepAliveClientMixin{ + @override + Widget build(BuildContext context) { + super.build(context); + return Scaffold( + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView.builder( + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { +// Food food = Food.fromJson(foods[index]); + Map food = foods[index]; +// print(foods); +// print(foods.length); + return CartItem( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + ), + + floatingActionButton: FloatingActionButton( + tooltip: "Checkout", + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Checkout(); + }, + ), + ); + }, + child: Icon( + Icons.arrow_forward, + ), + heroTag: Object(), + ), + ); + } + + @override + bool get wantKeepAlive => true; +} diff --git a/lib/screens/categories_screen.dart b/lib/screens/categories_screen.dart new file mode 100755 index 0000000..763b5b5 --- /dev/null +++ b/lib/screens/categories_screen.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/notifications.dart'; +import 'package:restaurant/util/categories.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/badge.dart'; +import 'package:restaurant/widgets/grid_product.dart'; +import 'package:restaurant/widgets/home_category.dart'; + +class CategoriesScreen extends StatefulWidget { + @override + _CategoriesScreenState createState() => _CategoriesScreenState(); +} + +class _CategoriesScreenState extends State { + + String catie = "Drinks"; + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + icon: Icon( + Icons.keyboard_backspace, + ), + onPressed: ()=>Navigator.pop(context), + ), + centerTitle: true, + title: Text( + "Categories", + ), + elevation: 0.0, + actions: [ + IconButton( + icon: IconBadge( + icon: Icons.notifications, + size: 22.0, + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Notifications(); + }, + ), + ); + }, + ), + ], + ), + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + SizedBox(height: 10.0), + Container( + height: 65.0, + child: ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + itemCount: categories == null?0:categories.length, + itemBuilder: (BuildContext context, int index) { + Map cat = categories[index]; + return HomeCategory( + icon: cat['icon'], + title: cat['name'], + items: cat['items'].toString(), + isHome: false, + tap: (){ + setState((){catie = "${cat['name']}";}); + }, + ); + }, + ), + ), + + SizedBox(height: 20.0), + + Text( + "$catie", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + Divider(), + SizedBox(height: 10.0), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { + Map food = foods[index]; + return GridProduct( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + + ], + ), + ), + ); + } +} diff --git a/lib/screens/checkout.dart b/lib/screens/checkout.dart new file mode 100755 index 0000000..d016a5f --- /dev/null +++ b/lib/screens/checkout.dart @@ -0,0 +1,264 @@ +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/cart_item.dart'; + +class Checkout extends StatefulWidget { + @override + _CheckoutState createState() => _CheckoutState(); +} + +class _CheckoutState extends State { + + final TextEditingController _couponlControl = new TextEditingController(); + + + @override + void initState() { + super.initState(); + + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: Text( + "Checkout", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + elevation: 0.0, + actions: [ + IconButton( + tooltip: "Back", + icon: Icon( + Icons.clear, + color: Theme.of(context).accentColor, + ), + onPressed: ()=>Navigator.pop(context), + ), + ], + ), + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,130), + child: ListView( + children: [ + SizedBox(height: 10.0), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Shipping Address", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w400, + ), + ), + + IconButton( + onPressed: (){}, + icon: Icon( + Icons.edit, + ), + ), + ], + ), + SizedBox(height: 10.0), + ListTile( + title: Text( + "John Doe", + style: TextStyle( +// fontSize: 15, + fontWeight: FontWeight.w900, + ), + ), + subtitle: Text("1278 Loving Acres Road Kansas City, MO 64110"), + ), + + SizedBox(height: 10.0), + + Text( + "Payment Method", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w400, + ), + ), + + Card( + elevation: 4.0, + child: ListTile( + title: Text("John Doe"), + subtitle: Text( + "5506 7744 8610 9638", + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w900, + ), + ), + leading: Icon( + FontAwesomeIcons.creditCard, + size: 50.0, + color: Theme.of(context).accentColor, + ), + trailing: IconButton( + onPressed: (){}, + icon: Icon( + Icons.keyboard_arrow_down, + ), + ), + ), + ), + + SizedBox(height: 20.0), + + Text( + "Items", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w400, + ), + ), + + ListView.builder( + primary: false, + shrinkWrap: true, + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { +// Food food = Food.fromJson(foods[index]); + Map food = foods[index]; +// print(foods); +// print(foods.length); + return CartItem( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + ], + ), + ), + + bottomSheet: Card( + elevation: 4.0, + child: Container( + + child: ListView( + physics: NeverScrollableScrollPhysics(), + children: [ + Padding( + padding: EdgeInsets.all(10), + child: Container( + + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.grey[200],), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[200],), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Coupon Code", + prefixIcon: Icon( + Icons.redeem, + color: Theme.of(context).accentColor, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + maxLines: 1, + controller: _couponlControl, + ), + ), + ), + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + + Padding( + padding: EdgeInsets.fromLTRB(10,5,5,5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Total", + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w400, + ), + ), + + Text( + r"$ 212", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w900, + color: Theme.of(context).accentColor, + ), + ), + + Text( + "Delivery charges included", + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + + Container( + padding: EdgeInsets.fromLTRB(5,5,10,5), + width: 150.0, + height: 50.0, + child: FlatButton( + color: Theme.of(context).accentColor, + child: Text( + "Place Order".toUpperCase(), + style: TextStyle( + color: Colors.white, + ), + ), + onPressed: (){}, + ), + ), + + ], + ), + + + + ], + ), + + height: 130, + ), + ), + ); + } +} diff --git a/lib/screens/details.dart b/lib/screens/details.dart new file mode 100755 index 0000000..2425fc3 --- /dev/null +++ b/lib/screens/details.dart @@ -0,0 +1,269 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/notifications.dart'; +import 'package:restaurant/util/comments.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/badge.dart'; +import 'package:restaurant/widgets/smooth_star_rating.dart'; + +class ProductDetails extends StatefulWidget { + @override + _ProductDetailsState createState() => _ProductDetailsState(); +} + +class _ProductDetailsState extends State { + bool isFav = false; + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + icon: Icon( + Icons.keyboard_backspace, + ), + onPressed: ()=>Navigator.pop(context), + ), + centerTitle: true, + title: Text( + "Item Details", + ), + elevation: 0.0, + actions: [ + IconButton( + icon: IconBadge( + icon: Icons.notifications, + size: 22.0, + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Notifications(); + }, + ), + ); + }, + ), + ], + ), + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + SizedBox(height: 10.0), + Stack( + children: [ + Container( + height: MediaQuery.of(context).size.height / 3.2, + width: MediaQuery.of(context).size.width, + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), + child: Image.asset( + "${foods[1]['img']}", + fit: BoxFit.cover, + ), + ), + ), + + Positioned( + right: -10.0, + bottom: 3.0, + child: RawMaterialButton( + onPressed: (){}, + fillColor: Colors.white, + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(5), + child: Icon( + isFav + ?Icons.favorite + :Icons.favorite_border, + color: Colors.red, + size: 17, + ), + ), + ), + ), + ], + ), + + SizedBox(height: 10.0), + + Text( + "${foods[1]['name']}", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + + Padding( + padding: EdgeInsets.only(bottom: 5.0, top: 2.0), + child: Row( + children: [ + SmoothStarRating( + starCount: 5, + color: Constants.ratingBG, + allowHalfRating: true, + rating: 5.0, + size: 10.0, + ), + SizedBox(width: 10.0), + + Text( + "5.0 (23 Reviews)", + style: TextStyle( + fontSize: 11.0, + ), + ), + + ], + ), + ), + + + Padding( + padding: EdgeInsets.only(bottom: 5.0, top: 2.0), + child: Row( + children: [ + Text( + "20 Pieces", + style: TextStyle( + fontSize: 11.0, + fontWeight: FontWeight.w300, + ), + ), + SizedBox(width: 10.0), + + Text( + r"$90", + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w900, + color: Theme.of(context).accentColor, + ), + ), + + ], + ), + ), + + + SizedBox(height: 20.0), + + Text( + "Product Description", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + + SizedBox(height: 10.0), + + Text( + "Nulla quis lorem ut libero malesuada feugiat. Lorem ipsum dolor " + "sit amet, consectetur adipiscing elit. Curabitur aliquet quam " + "id dui posuere blandit. Pellentesque in ipsum id orci porta " + "dapibus. Vestibulum ante ipsum primis in faucibus orci luctus " + "et ultrices posuere cubilia Curae; Donec velit neque, auctor " + "sit amet aliquam vel, ullamcorper sit amet ligula. Donec" + " rutrum congue leo eget malesuada. Vivamus magna justo," + " lacinia eget consectetur sed, convallis at tellus." + " Vivamus suscipit tortor eget felis porttitor volutpat." + " Donec rutrum congue leo eget malesuada." + " Pellentesque in ipsum id orci porta dapibus.", + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w300, + ), + ), + + SizedBox(height: 20.0), + + Text( + "Reviews", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + SizedBox(height: 20.0), + + ListView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + itemCount: comments == null?0:comments.length, + itemBuilder: (BuildContext context, int index) { + Map comment = comments[index]; + return ListTile( + leading: CircleAvatar( + radius: 25.0, + backgroundImage: AssetImage( + "${comment['img']}", + ), + ), + + title: Text("${comment['name']}"), + subtitle: Column( + children: [ + Row( + children: [ + SmoothStarRating( + starCount: 5, + color: Constants.ratingBG, + allowHalfRating: true, + rating: 5.0, + size: 12.0, + ), + SizedBox(width: 6.0), + Text( + "February 14, 2020", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w300, + ), + ), + ], + ), + + SizedBox(height: 7.0), + Text( + "${comment["comment"]}", + ), + ], + ), + ); + }, + ), + + SizedBox(height: 10.0), + ], + ), + ), + + + + bottomNavigationBar: Container( + height: 50.0, + child: RaisedButton( + child: Text( + "ADD TO CART", + style: TextStyle( + color: Colors.white, + ), + ), + color: Theme.of(context).accentColor, + onPressed: (){}, + ), + ), + ); + } +} diff --git a/lib/screens/dishes.dart b/lib/screens/dishes.dart new file mode 100755 index 0000000..74aad30 --- /dev/null +++ b/lib/screens/dishes.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/notifications.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/badge.dart'; +import 'package:restaurant/widgets/grid_product.dart'; + + +class DishesScreen extends StatefulWidget { + @override + _DishesScreenState createState() => _DishesScreenState(); +} + +class _DishesScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + icon: Icon( + Icons.keyboard_backspace, + ), + onPressed: ()=>Navigator.pop(context), + ), + centerTitle: true, + title: Text( + "Dishes", + ), + elevation: 0.0, + actions: [ + IconButton( + icon: IconBadge( + icon: Icons.notifications, + size: 22.0, + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Notifications(); + }, + ), + ); + }, + ), + ], + ), + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + + children: [ + Text( + "Chinese", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + Divider(), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: 4, + itemBuilder: (BuildContext context, int index) { + Map food = foods[index]; + return GridProduct( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + + SizedBox(height: 20.0), + Text( + "Italian", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + Divider(), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: 4, + itemBuilder: (BuildContext context, int index) { + Map food = foods[index]; + return GridProduct( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + + SizedBox(height: 20.0), + Text( + "African", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w800, + ), + maxLines: 2, + ), + Divider(), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: 4, + itemBuilder: (BuildContext context, int index) { + Map food = foods[index]; + return GridProduct( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/favorite_screen.dart b/lib/screens/favorite_screen.dart new file mode 100755 index 0000000..8c2c5e8 --- /dev/null +++ b/lib/screens/favorite_screen.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/grid_product.dart'; + +class FavoriteScreen extends StatefulWidget { + @override + _FavoriteScreenState createState() => _FavoriteScreenState(); +} + +class _FavoriteScreenState extends State with AutomaticKeepAliveClientMixin{ + @override + Widget build(BuildContext context) { + super.build(context); + return Scaffold( + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + SizedBox(height: 10.0), + Text( + "My Favorite Items", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + SizedBox(height: 10.0), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { +// Food food = Food.fromJson(foods[index]); + Map food = foods[index]; +// print(foods); +// print(foods.length); + return GridProduct( + img: food['img'], + isFav: true, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + + SizedBox(height: 30), + ], + ), + ), + ); + } + + @override + bool get wantKeepAlive => true; +} diff --git a/lib/screens/home.dart b/lib/screens/home.dart new file mode 100755 index 0000000..ecd84a7 --- /dev/null +++ b/lib/screens/home.dart @@ -0,0 +1,192 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/dishes.dart'; +import 'package:restaurant/widgets/grid_product.dart'; +import 'package:restaurant/widgets/home_category.dart'; +import 'package:restaurant/widgets/slider_item.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/util/categories.dart'; +import 'package:carousel_slider/carousel_slider.dart'; + + +class Home extends StatefulWidget { + @override + _HomeState createState() => _HomeState(); +} + +class _HomeState extends State with AutomaticKeepAliveClientMixin{ + + List map(List list, Function handler) { + List result = []; + for (var i = 0; i < list.length; i++) { + result.add(handler(i, list[i])); + } + + return result; + } + + int _current = 0; + + + @override + Widget build(BuildContext context) { + super.build(context); + return Scaffold( + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Dishes", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + + FlatButton( + child: Text( + "View More", + style: TextStyle( +// fontSize: 22, +// fontWeight: FontWeight.w800, + color: Theme.of(context).accentColor, + ), + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return DishesScreen(); + }, + ), + ); + }, + ), + ], + ), + + SizedBox(height: 10.0), + + //Slider Here + + CarouselSlider( + height: MediaQuery.of(context).size.height/2.4, + items: map( + foods, + (index, i){ + Map food = foods[index]; + return SliderItem( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ).toList(), + autoPlay: true, +// enlargeCenterPage: true, + viewportFraction: 1.0, +// aspectRatio: 2.0, + onPageChanged: (index) { + setState(() { + _current = index; + }); + }, + ), + SizedBox(height: 20.0), + + Text( + "Food Categories", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + SizedBox(height: 10.0), + + Container( + height: 65.0, + child: ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + itemCount: categories == null?0:categories.length, + itemBuilder: (BuildContext context, int index) { + Map cat = categories[index]; + return HomeCategory( + icon: cat['icon'], + title: cat['name'], + items: cat['items'].toString(), + isHome: true, + ); + }, + ), + ), + + SizedBox(height: 20.0), + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Popular Items", + style: TextStyle( + fontSize: 23, + fontWeight: FontWeight.w800, + ), + ), + + FlatButton( + child: Text( + "View More", + style: TextStyle( +// fontSize: 22, +// fontWeight: FontWeight.w800, + color: Theme.of(context).accentColor, + ), + ), + onPressed: (){}, + ), + ], + ), + SizedBox(height: 10.0), + + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { +// Food food = Food.fromJson(foods[index]); + Map food = foods[index]; +// print(foods); +// print(foods.length); + return GridProduct( + img: food['img'], + isFav: false, + name: food['name'], + rating: 5.0, + raters: 23, + ); + }, + ), + + SizedBox(height: 30), + ], + ), + ), + ); + } + + @override + bool get wantKeepAlive => true; +} diff --git a/lib/screens/join.dart b/lib/screens/join.dart new file mode 100755 index 0000000..9bbf11e --- /dev/null +++ b/lib/screens/join.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/login.dart'; +import 'package:restaurant/screens/register.dart'; +import 'package:flutter/services.dart'; + + +class JoinApp extends StatefulWidget { + @override + _JoinAppState createState() => _JoinAppState(); +} + + + +class _JoinAppState extends State with SingleTickerProviderStateMixin{ + + TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(vsync: this, initialIndex: 1, length: 2); + SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); + } + + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + icon: Icon( + Icons.keyboard_backspace, + ), + onPressed: ()=>Navigator.pop(context), + ), + bottom: TabBar( + controller: _tabController, + indicatorColor: Theme.of(context).accentColor, + labelColor: Theme.of(context).accentColor, + unselectedLabelColor: Colors.grey, + labelStyle: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w800, + ), + unselectedLabelStyle: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w800, + ), + tabs: [ + Tab( + text: "Login", + ), + Tab( + text: "Register", + ), + ], + ), + ), + + body: TabBarView( + controller: _tabController, + children: [ + LoginScreen(), + RegisterScreen(), + ], + ), + + + ); + } +} diff --git a/lib/screens/login.dart b/lib/screens/login.dart new file mode 100755 index 0000000..3fed621 --- /dev/null +++ b/lib/screens/login.dart @@ -0,0 +1,218 @@ +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:restaurant/screens/main_screen.dart'; + + + +class LoginScreen extends StatefulWidget { + @override + _LoginScreenState createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + + final TextEditingController _usernameControl = new TextEditingController(); + final TextEditingController _passwordControl = new TextEditingController(); + + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.fromLTRB(20.0,0,20,0), + child: ListView( + shrinkWrap: true, + children: [ + + SizedBox(height: 10.0), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 25.0, + ), + child: Text( + "Log in to your account", + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).accentColor, + ), + ), + ), + + SizedBox(height: 30.0), + + Card( + elevation: 3.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Username", + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + prefixIcon: Icon( + Icons.perm_identity, + color: Colors.black, + ), + ), + maxLines: 1, + controller: _usernameControl, + ), + ), + ), + + SizedBox(height: 10.0), + + Card( + elevation: 3.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Password", + prefixIcon: Icon( + Icons.lock_outline, + color: Colors.black, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + obscureText: true, + maxLines: 1, + controller: _passwordControl, + ), + ), + ), + + SizedBox(height: 10.0), + + Container( + alignment: Alignment.centerRight, + child: FlatButton( + child: Text( + "Forgot Password?", + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentColor, + ), + ), + onPressed: (){}, + ), + ), + + SizedBox(height: 30.0), + + Container( + height: 50.0, + child: RaisedButton( + child: Text( + "LOGIN".toUpperCase(), + style: TextStyle( + color: Colors.white, + ), + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return MainScreen(); + }, + ), + ); + }, + color: Theme.of(context).accentColor, + ), + ), + + SizedBox(height: 10.0), + Divider(color: Theme.of(context).accentColor,), + SizedBox(height: 10.0), + + + Center( + child: Container( + width: MediaQuery.of(context).size.width/2, + child: Row( + children: [ + RawMaterialButton( + onPressed: (){}, + fillColor: Colors.blue[800], + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(15), + child: Icon( + FontAwesomeIcons.facebookF, + color: Colors.white, +// size: 24.0, + ), + ), + ), + + RawMaterialButton( + onPressed: (){}, + fillColor: Colors.white, + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(15), + child: Icon( + FontAwesomeIcons.google, + color: Colors.blue[800], +// size: 24.0, + ), + ), + ), + ], + ), + ), + ), + + SizedBox(height: 20.0), + + ], + ), + ); + } +} diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart new file mode 100755 index 0000000..af346de --- /dev/null +++ b/lib/screens/main_screen.dart @@ -0,0 +1,180 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/cart.dart'; +import 'package:restaurant/screens/favorite_screen.dart'; +import 'package:restaurant/screens/home.dart'; +import 'package:restaurant/screens/notifications.dart'; +import 'package:restaurant/screens/profile.dart'; +import 'package:restaurant/screens/search.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/widgets/badge.dart'; + + +class MainScreen extends StatefulWidget { + @override + _MainScreenState createState() => _MainScreenState(); +} + +class _MainScreenState extends State { + PageController _pageController; + int _page = 0; + + @override + Widget build(BuildContext context) { + return WillPopScope( + onWillPop: ()=>Future.value(false), + child: Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + centerTitle: true, + title: Text( + Constants.appName, + ), + elevation: 0.0, + actions: [ + IconButton( + icon: IconBadge( + icon: Icons.notifications, + size: 22.0, + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Notifications(); + }, + ), + ); + }, + tooltip: "Notifications", + ), + ], + ), + + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _pageController, + onPageChanged: onPageChanged, + children: [ + Home(), + FavoriteScreen(), + SearchScreen(), + CartScreen(), + Profile(), + ], + ), + + bottomNavigationBar: BottomAppBar( + child: new Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox(width:7), + IconButton( + icon: Icon( + Icons.home, + size: 24.0, + ), + color: _page == 0 + ? Theme.of(context).accentColor + : Theme + .of(context) + .textTheme.caption.color, + onPressed: ()=>_pageController.jumpToPage(0), + ), + + IconButton( + icon:Icon( + Icons.favorite, + size: 24.0, + ), + color: _page == 1 + ? Theme.of(context).accentColor + : Theme + .of(context) + .textTheme.caption.color, + onPressed: ()=>_pageController.jumpToPage(1), + ), + + IconButton( + icon: Icon( + Icons.search, + size: 24.0, + color: Theme.of(context).primaryColor, + ), + color: _page == 2 + ? Theme.of(context).accentColor + : Theme + .of(context) + .textTheme.caption.color, + onPressed: ()=>_pageController.jumpToPage(2), + ), + + IconButton( + icon: IconBadge( + icon: Icons.shopping_cart, + size: 24.0, + ), + color: _page == 3 + ? Theme.of(context).accentColor + : Theme + .of(context) + .textTheme.caption.color, + onPressed: ()=>_pageController.jumpToPage(3), + ), + + IconButton( + icon: Icon( + Icons.person, + size: 24.0, + ), + color: _page == 4 + ? Theme.of(context).accentColor + : Theme + .of(context) + .textTheme.caption.color, + onPressed: ()=>_pageController.jumpToPage(4), + ), + + SizedBox(width:7), + ], + ), + color: Theme.of(context).primaryColor, + shape: CircularNotchedRectangle(), + ), + floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling, + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: FloatingActionButton( + elevation: 4.0, + child: Icon( + Icons.search, + ), + onPressed: ()=>_pageController.jumpToPage(2), + ), + + ), + ); + } + + void navigationTapped(int page) { + _pageController.jumpToPage(page); + } + + @override + void initState() { + super.initState(); + _pageController = PageController(); + } + + @override + void dispose() { + super.dispose(); + _pageController.dispose(); + } + + void onPageChanged(int page) { + setState(() { + this._page = page; + }); + } +} diff --git a/lib/screens/notifications.dart b/lib/screens/notifications.dart new file mode 100755 index 0000000..fa16d93 --- /dev/null +++ b/lib/screens/notifications.dart @@ -0,0 +1,83 @@ +import 'package:flutter/material.dart'; + +class Notifications extends StatefulWidget { + @override + _NotificationsState createState() => _NotificationsState(); +} + +class _NotificationsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + icon: Icon( + Icons.keyboard_backspace, + ), + onPressed: ()=>Navigator.pop(context), + ), + centerTitle: true, + title: Text( + "Notifications", + ), + elevation: 0.0, + ), + + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.green, + child: Icon( + Icons.check, + color: Colors.white, + ), + ), + title: Text("Your Order has been delivered successfully"), + onTap: (){}, + ), + Divider(), + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.red, + child: Icon( + Icons.clear, + color: Colors.white, + ), + ), + title: Text("Error processing your order"), + onTap: (){}, + ), + Divider(), + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.orange, + child: Icon( + Icons.directions_bike, + color: Colors.white, + ), + ), + title: Text("You order has been processed and will be delivered shortly"), + onTap: (){}, + ), + Divider(), + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.blue, + child: Icon( + Icons.email, + color: Colors.white, + ), + ), + title: Text("Please Verify your email address"), + onTap: (){}, + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/profile.dart b/lib/screens/profile.dart new file mode 100755 index 0000000..e454214 --- /dev/null +++ b/lib/screens/profile.dart @@ -0,0 +1,240 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:restaurant/providers/app_provider.dart'; +import 'package:restaurant/screens/splash.dart'; +import 'package:restaurant/util/const.dart'; + +class Profile extends StatefulWidget { + @override + _ProfileState createState() => _ProfileState(); +} + +class _ProfileState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + + child: ListView( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10.0, right: 10.0), + child: Image.asset( + "assets/cm4.jpeg", + fit: BoxFit.cover, + width: 100.0, + height: 100.0, + ), + ), + + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Jane Doe", + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + + SizedBox(height: 5.0), + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "jane@doefamily.com", + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + + SizedBox(height: 20.0), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return SplashScreen(); + }, + ), + ); + }, + child: Text("Logout", + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.w400, + color: Theme.of(context).accentColor, + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + + ], + ), + flex: 3, + ), + ], + ), + + Divider(), + Container(height: 15.0), + + Padding( + padding: EdgeInsets.all(5.0), + child: Text( + "Account Information".toUpperCase(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + + ListTile( + title: Text( + "Full Name", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "Jane Mary Doe", + ), + + trailing: IconButton( + icon: Icon( + Icons.edit, + size: 20.0, + ), + onPressed: (){ + }, + tooltip: "Edit", + ), + ), + + ListTile( + title: Text( + "Email", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "jane@doefamily.com", + ), + ), + + ListTile( + title: Text( + "Phone", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "+1 816-926-6241", + ), + ), + + ListTile( + title: Text( + "Address", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "1278 Loving Acres RoadKansas City, MO 64110", + ), + ), + + ListTile( + title: Text( + "Gender", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "Female", + ), + ), + + ListTile( + title: Text( + "Date of Birth", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + subtitle: Text( + "April 9, 1995", + ), + ), + + MediaQuery.of(context).platformBrightness == Brightness.dark + ? SizedBox() + : ListTile( + title: Text( + "Dark Theme", + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w700, + ), + ), + + trailing: Switch( + value: Provider.of(context).theme == Constants.lightTheme + ? false + : true, + onChanged: (v) async{ + if (v) { + Provider.of(context, listen: false) + .setTheme(Constants.darkTheme, "dark"); + } else { + Provider.of(context, listen: false) + .setTheme(Constants.lightTheme, "light"); + } + }, + activeColor: Theme.of(context).accentColor, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/register.dart b/lib/screens/register.dart new file mode 100755 index 0000000..4c11b4e --- /dev/null +++ b/lib/screens/register.dart @@ -0,0 +1,243 @@ +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:restaurant/screens/main_screen.dart'; + + +class RegisterScreen extends StatefulWidget { + @override + _RegisterScreenState createState() => _RegisterScreenState(); +} + +class _RegisterScreenState extends State { + final TextEditingController _usernameControl = new TextEditingController(); + final TextEditingController _emailControl = new TextEditingController(); + final TextEditingController _passwordControl = new TextEditingController(); + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.fromLTRB(20.0,0,20,0), + child: ListView( + shrinkWrap: true, + children: [ + + SizedBox(height: 10.0), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 25.0, + ), + child: Text( + "Create an account", + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).accentColor, + ), + ), + ), + + SizedBox(height: 30.0), + + Card( + elevation: 3.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Username", + prefixIcon: Icon( + Icons.perm_identity, + color: Colors.black, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + maxLines: 1, + controller: _usernameControl, + ), + ), + ), + + SizedBox(height: 10.0), + + Card( + elevation: 3.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Email", + prefixIcon: Icon( + Icons.mail_outline, + color: Colors.black, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + maxLines: 1, + controller: _emailControl, + ), + ), + ), + + SizedBox(height: 10.0), + + Card( + elevation: 3.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Password", + prefixIcon: Icon( + Icons.lock_outline, + color: Colors.black, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + obscureText: true, + maxLines: 1, + controller: _passwordControl, + ), + ), + ), + + + SizedBox(height: 40.0), + + Container( + height: 50.0, + child: RaisedButton( + child: Text( + "Register".toUpperCase(), + style: TextStyle( + color: Colors.white, + ), + ), + onPressed: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return MainScreen(); + }, + ), + ); + }, + color: Theme.of(context).accentColor, + ), + ), + + SizedBox(height: 10.0), + Divider(color: Theme.of(context).accentColor,), + SizedBox(height: 10.0), + + + Center( + child: Container( + width: MediaQuery.of(context).size.width/2, + child: Row( + children: [ + RawMaterialButton( + onPressed: (){}, + fillColor: Colors.blue[800], + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(15), + child: Icon( + FontAwesomeIcons.facebookF, + color: Colors.white, +// size: 24.0, + ), + ), + ), + + RawMaterialButton( + onPressed: (){}, + fillColor: Colors.white, + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(15), + child: Icon( + FontAwesomeIcons.google, + color: Colors.blue[800], +// size: 24.0, + ), + ), + ), + ], + ), + ), + ), + + SizedBox(height: 20.0), + + + ], + ), + ); + } +} diff --git a/lib/screens/search.dart b/lib/screens/search.dart new file mode 100755 index 0000000..92e95a4 --- /dev/null +++ b/lib/screens/search.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/util/foods.dart'; +import 'package:restaurant/widgets/smooth_star_rating.dart'; + + +class SearchScreen extends StatefulWidget { + @override + _SearchScreenState createState() => _SearchScreenState(); +} + +class _SearchScreenState extends State with AutomaticKeepAliveClientMixin{ + final TextEditingController _searchControl = new TextEditingController(); + + @override + Widget build(BuildContext context) { + super.build(context); + return Padding( + padding: EdgeInsets.fromLTRB(10.0,0,10.0,0), + child: ListView( + children: [ + SizedBox(height: 10.0), + + Card( + elevation: 6.0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), + child: TextField( + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: BorderSide(color: Colors.white,), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white,), + borderRadius: BorderRadius.circular(5.0), + ), + hintText: "Search..", + suffixIcon: Icon( + Icons.search, + color: Colors.black, + ), + hintStyle: TextStyle( + fontSize: 15.0, + color: Colors.black, + ), + ), + maxLines: 1, + controller: _searchControl, + ), + ), + ), + + SizedBox(height: 5.0), + + Padding( + padding: EdgeInsets.all(20.0), + child: Text( + "History", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w400, + ), + ), + ), + + ListView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + itemCount: foods == null ? 0 :foods.length, + itemBuilder: (BuildContext context, int index) { + Map food = foods[index]; + return ListTile( + title: Text( + "${food['name']}", + style: TextStyle( +// fontSize: 15, + fontWeight: FontWeight.w900, + ), + ), + leading: CircleAvatar( + radius: 25.0, + backgroundImage: AssetImage( + "${food['img']}", + ), + ), + trailing: Text(r"$10"), + subtitle: Row( + children: [ + SmoothStarRating( + starCount: 1, + color: Constants.ratingBG, + allowHalfRating: true, + rating: 5.0, + size: 12.0, + ), + SizedBox(width: 6.0), + Text( + "5.0 (23 Reviews)", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w300, + ), + ), + ], + ), + onTap: (){}, + ); + }, + ), + + SizedBox(height: 30), + ], + ), + ); + } + + @override + bool get wantKeepAlive => true; +} diff --git a/lib/screens/splash.dart b/lib/screens/splash.dart new file mode 100755 index 0000000..c35751f --- /dev/null +++ b/lib/screens/splash.dart @@ -0,0 +1,78 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:restaurant/screens/walkthrough.dart'; +import 'package:restaurant/util/const.dart'; + + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + + startTimeout() { + return Timer(Duration(seconds: 2), changeScreen); + } + + changeScreen() async{ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return Walkthrough(); + }, + ), + ); + } + + @override + void initState() { + super.initState(); + SystemChrome.setEnabledSystemUIOverlays([]); + startTimeout(); + } + + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Theme.of(context).primaryColor, + body: Container( + margin: EdgeInsets.only(left: 40.0, right: 40.0), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Icon( + Icons.fastfood, + size: 150.0, + color: Theme.of(context).accentColor, + ), + + SizedBox(width: 40.0), + + Container( + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 15.0, + ), + child: Text( + "${Constants.appName}", + style: TextStyle( + fontSize: 25.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).accentColor, + ), + ), + ), + ], + ), + ), + ), + ); + } + + +} diff --git a/lib/screens/walkthrough.dart b/lib/screens/walkthrough.dart new file mode 100755 index 0000000..c2c7d8d --- /dev/null +++ b/lib/screens/walkthrough.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:introduction_screen/introduction_screen.dart'; +import 'package:restaurant/screens/join.dart'; + + +class Walkthrough extends StatefulWidget { + @override + _WalkthroughState createState() => _WalkthroughState(); +} + +class _WalkthroughState extends State { + + List pageInfos = [ + { + "title": "Fresh Food", + "body": "Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus." + " Vestibulum ac diam sit amet quam vehicula elementum sed sit amet " + "dui. Nulla porttitor accumsan tincidunt.", + "img": "assets/on1.png", + }, + { + "title": "Fast Delivery", + "body": "Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus." + " Vestibulum ac diam sit amet quam vehicula elementum sed sit amet " + "dui. Nulla porttitor accumsan tincidunt.", + "img": "assets/on2.png", + }, + { + "title": "Easy Payment", + "body": "Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus." + " Vestibulum ac diam sit amet quam vehicula elementum sed sit amet " + "dui. Nulla porttitor accumsan tincidunt.", + "img": "assets/on3.png", + }, + ]; + @override + Widget build(BuildContext context) { + List pages = [ + for(int i = 0; iFuture.value(false), + child: Scaffold( + backgroundColor: Theme.of(context).primaryColor, + body: Padding( + padding: EdgeInsets.all(10.0), + child: IntroductionScreen( + pages: pages, + onDone: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return JoinApp(); + }, + ), + ); + }, + onSkip: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return JoinApp(); + }, + ), + ); + }, + showSkipButton: true, + skip: Text("Skip"), + next: Text( + "Next", + style: TextStyle( + fontWeight: FontWeight.w800, + color: Theme.of(context).accentColor, + ), + ), + done: Text( + "Done", + style: TextStyle( + fontWeight: FontWeight.w800, + color: Theme.of(context).accentColor, + ), + ), + ), + ), + ), + ); + } + + _buildPageModel(Map item){ + return PageViewModel( + title: item['title'], + body: item['body'], + image: Image.asset( + item['img'], + height: 185.0, + ), + decoration: PageDecoration( + titleTextStyle: TextStyle( + fontSize: 28.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).accentColor, + ), + bodyTextStyle: TextStyle(fontSize: 15.0), +// dotsDecorator: DotsDecorator( +// activeColor: Theme.of(context).accentColor, +// activeSize: Size.fromRadius(8), +// ), + pageColor: Theme.of(context).primaryColor, + ), + ); + } +} \ No newline at end of file diff --git a/lib/util/categories.dart b/lib/util/categories.dart new file mode 100755 index 0000000..84564a8 --- /dev/null +++ b/lib/util/categories.dart @@ -0,0 +1,29 @@ +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +List categories = [ + { + "name": "Drinks", + "icon": FontAwesomeIcons.wineBottle, + "items": 5 + }, + { + "name": "Miscellaneous", + "icon": FontAwesomeIcons.cannabis, + "items": 20 + }, + { + "name": "Desert", + "icon": FontAwesomeIcons.birthdayCake, + "items": 9 + }, + { + "name": "Fast Food", + "icon": FontAwesomeIcons.pizzaSlice, + "items": 5 + }, + { + "name": "Meals", + "icon": FontAwesomeIcons.breadSlice, + "items": 15 + }, +]; \ No newline at end of file diff --git a/lib/util/comments.dart b/lib/util/comments.dart new file mode 100755 index 0000000..4ab2b5f --- /dev/null +++ b/lib/util/comments.dart @@ -0,0 +1,30 @@ +List comments = [ + { + "img": "assets/cm1.jpeg", + "comment": "Nulla porttitor accumsan tincidunt. Vestibulum ante " + "ipsum primis in faucibus orci luctus et ultrices posuere " + "cubilia Curae", + "name": "Jane Doe" + }, + { + "img": "assets/cm2.jpeg", + "comment": "Nulla porttitor accumsan tincidunt. Vestibulum ante " + "ipsum primis in faucibus orci luctus et ultrices posuere " + "cubilia Curae", + "name": "Jane Joe" + }, + { + "img": "assets/cm3.jpeg", + "comment": "Nulla porttitor accumsan tincidunt. Vestibulum ante " + "ipsum primis in faucibus orci luctus et ultrices posuere " + "cubilia Curae", + "name": "Mary Jane" + }, + { + "img": "assets/cm4.jpeg", + "comment": "Nulla porttitor accumsan tincidunt. Vestibulum ante " + "ipsum primis in faucibus orci luctus et ultrices posuere " + "cubilia Curae", + "name": "Jane Jones" + } +]; \ No newline at end of file diff --git a/lib/util/const.dart b/lib/util/const.dart new file mode 100755 index 0000000..c8f231d --- /dev/null +++ b/lib/util/const.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; +class Constants{ + + static String appName = "Restaurant App UI KIT"; + + //Colors for theme +// Color(0xfffcfcff); + static Color lightPrimary = Color(0xfffcfcff); + static Color darkPrimary = Colors.black; + static Color lightAccent = Colors.red; + static Color darkAccent = Colors.red[400]; + static Color lightBG = Color(0xfffcfcff); + static Color darkBG = Colors.black; + static Color ratingBG = Colors.yellow[600]; + + static ThemeData lightTheme = ThemeData( + backgroundColor: lightBG, + primaryColor: lightPrimary, + accentColor: lightAccent, + cursorColor: lightAccent, + scaffoldBackgroundColor: lightBG, + appBarTheme: AppBarTheme( + textTheme: TextTheme( + title: TextStyle( + color: darkBG, + fontSize: 18.0, + fontWeight: FontWeight.w800, + ), + ), +// iconTheme: IconThemeData( +// color: lightAccent, +// ), + ), + ); + + static ThemeData darkTheme = ThemeData( + brightness: Brightness.dark, + backgroundColor: darkBG, + primaryColor: darkPrimary, + accentColor: darkAccent, + scaffoldBackgroundColor: darkBG, + cursorColor: darkAccent, + appBarTheme: AppBarTheme( + textTheme: TextTheme( + title: TextStyle( + color: lightBG, + fontSize: 18.0, + fontWeight: FontWeight.w800, + ), + ), +// iconTheme: IconThemeData( +// color: darkAccent, +// ), + ), + ); + + +} \ No newline at end of file diff --git a/lib/util/foods.dart b/lib/util/foods.dart new file mode 100755 index 0000000..b61acaa --- /dev/null +++ b/lib/util/foods.dart @@ -0,0 +1,50 @@ +List foods = [ + { + "img": "assets/food1.jpeg", + "name": "Fruit Salad" + }, + { + "img": "assets/food2.jpeg", + "name": "Fruit Salad" + }, + { + "img": "assets/food3.jpeg", + "name": "Hamburger" + }, + { + "img": "assets/food4.jpeg", + "name": "Fruit Salad" + }, + { + "img": "assets/food5.jpeg", + "name": "Hamburger" + }, + { + "img": "assets/food6.jpeg", + "name": "Steak" + }, + { + "img": "assets/food7.jpeg", + "name": "Pizza" + }, + { + "img": "assets/food8.jpeg", + "name": "Asparagus" + }, + { + "img": "assets/food9.jpeg", + "name": "Salad" + }, + { + "img": "assets/food10.jpeg", + "name": "Pizza" + }, + { + "img": "assets/food11.jpeg", + "name": "Pizza" + }, + { + "img": "assets/food12.jpg", + "name": "Salad" + }, +]; \ No newline at end of file diff --git a/lib/widgets/badge.dart b/lib/widgets/badge.dart new file mode 100755 index 0000000..dd73ee4 --- /dev/null +++ b/lib/widgets/badge.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; + +class IconBadge extends StatefulWidget { + + final IconData icon; + final double size; + + IconBadge({Key key, @required this.icon, @required this.size}) + : super(key: key); + + + @override + _IconBadgeState createState() => _IconBadgeState(); +} + +class _IconBadgeState extends State { + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Icon( + widget.icon, + size: widget.size, + ), + Positioned( + right: 0.0, + child: Container( + padding: EdgeInsets.all(1), + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(6), + ), + constraints: BoxConstraints( + minWidth: 13, + minHeight: 13, + ), + child: Padding( + padding: EdgeInsets.only(top: 1), + child:Text( + "3", + style: TextStyle( + color: Colors.white, + fontSize: 8, + ), + textAlign: TextAlign.center, + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/widgets/cart_item.dart b/lib/widgets/cart_item.dart new file mode 100755 index 0000000..f9867c8 --- /dev/null +++ b/lib/widgets/cart_item.dart @@ -0,0 +1,127 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/details.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/widgets/smooth_star_rating.dart'; + + +class CartItem extends StatelessWidget { + final String name; + final String img; + final bool isFav; + final double rating; + final int raters; + + + CartItem({ + Key key, + @required this.name, + @required this.img, + @required this.isFav, + @required this.rating, + @required this.raters}) + :super(key: key); + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.fromLTRB(0, 4, 0, 4), + child: InkWell( + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return ProductDetails(); + }, + ), + ); + }, + child: Row( + children: [ + Padding( + padding: EdgeInsets.only(left: 0.0, right: 10.0), + child: Container( + height: MediaQuery.of(context).size.width/3.5, + width: MediaQuery.of(context).size.width/3, + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), + child: Image.asset( + "$img", + fit: BoxFit.cover, + ), + ), + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "$name", + style: TextStyle( +// fontSize: 15, + fontWeight: FontWeight.w900, + ), + ), + SizedBox(height: 10.0), + Row( + children: [ + SmoothStarRating( + starCount: 1, + color: Constants.ratingBG, + allowHalfRating: true, + rating: 5.0, + size: 12.0, + ), + SizedBox(width: 6.0), + Text( + "5.0 (23 Reviews)", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w300, + ), + ), + ], + ), + SizedBox(height: 10.0), + Row( + children: [ + Text( + "20 Pieces", + style: TextStyle( + fontSize: 11.0, + fontWeight: FontWeight.w300, + ), + ), + SizedBox(width: 10.0), + + Text( + r"$90", + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w900, + color: Theme.of(context).accentColor, + ), + ), + + ], + ), + + SizedBox(height: 10.0), + + Text( + "Quantity: 1", + style: TextStyle( + fontSize: 11.0, + fontWeight: FontWeight.w300, + ), + ), + + + ], + + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/grid_product.dart b/lib/widgets/grid_product.dart new file mode 100755 index 0000000..107e4d3 --- /dev/null +++ b/lib/widgets/grid_product.dart @@ -0,0 +1,119 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/details.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/widgets/smooth_star_rating.dart'; + +class GridProduct extends StatelessWidget { + + final String name; + final String img; + final bool isFav; + final double rating; + final int raters; + + + GridProduct({ + Key key, + @required this.name, + @required this.img, + @required this.isFav, + @required this.rating, + @required this.raters}) + :super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + child: ListView( + shrinkWrap: true, + primary: false, + children: [ + Stack( + children: [ + Container( + height: MediaQuery.of(context).size.height / 3.6, + width: MediaQuery.of(context).size.width / 2.2, + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), + child: Image.asset( + "$img", + fit: BoxFit.cover, + ), + ), + ), + + Positioned( + right: -10.0, + bottom: 3.0, + child: RawMaterialButton( + onPressed: (){}, + fillColor: Colors.white, + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(5), + child: Icon( + isFav + ?Icons.favorite + :Icons.favorite_border, + color: Colors.red, + size: 17, + ), + ), + ), + ), + ], + + + ), + + Padding( + padding: EdgeInsets.only(bottom: 2.0, top: 8.0), + child: Text( + "$name", + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w900, + ), + maxLines: 2, + ), + ), + + Padding( + padding: EdgeInsets.only(bottom: 5.0, top: 2.0), + child: Row( + children: [ + SmoothStarRating( + starCount: 5, + color: Constants.ratingBG, + allowHalfRating: true, + rating: rating, + size: 10.0, + ), + + Text( + " $rating ($raters Reviews)", + style: TextStyle( + fontSize: 11.0, + ), + ), + + ], + ), + ), + + + ], + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return ProductDetails(); + }, + ), + ); + }, + ); + } +} diff --git a/lib/widgets/home_category.dart b/lib/widgets/home_category.dart new file mode 100755 index 0000000..4a5c52d --- /dev/null +++ b/lib/widgets/home_category.dart @@ -0,0 +1,82 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/categories_screen.dart'; + + +class HomeCategory extends StatefulWidget { + final IconData icon; + final String title; + final String items; + final Function tap; + final bool isHome; + + HomeCategory({ + Key key, + @required this.icon, + @required this.title, + @required this.items, + this.tap, this.isHome}) + : super(key: key); + + @override + _HomeCategoryState createState() => _HomeCategoryState(); +} + +class _HomeCategoryState extends State { + @override + Widget build(BuildContext context) { + return InkWell( + onTap: widget.isHome?(){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return CategoriesScreen(); + }, + ), + ); + }:widget.tap, + child: Card( + shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0)), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), + child: Row( + children: [ + Padding( + padding: EdgeInsets.only(left: 0.0, right: 10.0), + child: Icon( + widget.icon, + color: Theme.of(context).accentColor, + ), + ), + SizedBox(width: 5), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 10.0), + Text( + "${widget.title}", + style: TextStyle( + fontWeight: FontWeight.w900, + fontSize: 17, + ), + ), + + Text( + "${widget.items} Items", + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: 10, + ), + ), + SizedBox(height: 5), + ], + ), + SizedBox(width: 5), + ], + ), + ), + ), + ); + } +} diff --git a/lib/widgets/slider_item.dart b/lib/widgets/slider_item.dart new file mode 100755 index 0000000..069fbd2 --- /dev/null +++ b/lib/widgets/slider_item.dart @@ -0,0 +1,119 @@ +import 'package:flutter/material.dart'; +import 'package:restaurant/screens/details.dart'; +import 'package:restaurant/util/const.dart'; +import 'package:restaurant/widgets/smooth_star_rating.dart'; + +class SliderItem extends StatelessWidget { + + final String name; + final String img; + final bool isFav; + final double rating; + final int raters; + + + SliderItem({ + Key key, + @required this.name, + @required this.img, + @required this.isFav, + @required this.rating, + @required this.raters}) + :super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + child: ListView( + shrinkWrap: true, + primary: false, + children: [ + Stack( + children: [ + Container( + height: MediaQuery.of(context).size.height / 3.2, + width: MediaQuery.of(context).size.width, + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), + child: Image.asset( + "$img", + fit: BoxFit.cover, + ), + ), + ), + + Positioned( + right: -10.0, + bottom: 3.0, + child: RawMaterialButton( + onPressed: (){}, + fillColor: Colors.white, + shape: CircleBorder(), + elevation: 4.0, + child: Padding( + padding: EdgeInsets.all(5), + child: Icon( + isFav + ?Icons.favorite + :Icons.favorite_border, + color: Colors.red, + size: 17, + ), + ), + ), + ), + ], + + + ), + + Padding( + padding: EdgeInsets.only(bottom: 2.0, top: 8.0), + child: Text( + "$name", + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w900, + ), + maxLines: 2, + ), + ), + + Padding( + padding: EdgeInsets.only(bottom: 5.0, top: 2.0), + child: Row( + children: [ + SmoothStarRating( + starCount: 5, + color: Constants.ratingBG, + allowHalfRating: true, + rating: rating, + size: 10.0, + ), + + Text( + " $rating ($raters Reviews)", + style: TextStyle( + fontSize: 11.0, + ), + ), + + ], + ), + ), + + + ], + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context){ + return ProductDetails(); + }, + ), + ); + }, + ); + } +} diff --git a/lib/widgets/smooth_star_rating.dart b/lib/widgets/smooth_star_rating.dart new file mode 100755 index 0000000..d61a610 --- /dev/null +++ b/lib/widgets/smooth_star_rating.dart @@ -0,0 +1,82 @@ +import 'package:flutter/material.dart'; + +typedef void RatingChangeCallback(double rating); + +class SmoothStarRating extends StatelessWidget { + final int starCount; + final double rating; + final RatingChangeCallback onRatingChanged; + final Color color; + final Color borderColor; + final double size; + final bool allowHalfRating; + final double spacing; + + SmoothStarRating( + {this.starCount = 5, + this.rating = 0.0, + this.onRatingChanged, + this.color, + this.borderColor, + this.size, + this.spacing = 0.0, + this.allowHalfRating = true}) { + assert(this.rating != null); + } + + Widget buildStar(BuildContext context, int index) { + Icon icon; + if (index >= rating) { + icon = new Icon( + Icons.star_border, + color: borderColor ?? Theme.of(context).primaryColor, + size: size ?? 25.0, + ); + } else if (index > rating - (allowHalfRating ? 0.5 : 1.0) && + index < rating) { + icon = new Icon( + Icons.star_half, + color: color ?? Theme.of(context).primaryColor, + size: size ?? 25.0, + ); + } else { + icon = new Icon( + Icons.star, + color: color ?? Theme.of(context).primaryColor, + size: size ?? 25.0, + ); + } + + return new GestureDetector( + onTap: () { + if (this.onRatingChanged != null) onRatingChanged(index + 1.0); + }, + onHorizontalDragUpdate: (dragDetails) { + RenderBox box = context.findRenderObject(); + var _pos = box.globalToLocal(dragDetails.globalPosition); + var i = _pos.dx / size; + var newRating = allowHalfRating ? i : i.round().toDouble(); + if (newRating > starCount) { + newRating = starCount.toDouble(); + } + if (newRating < 0) { + newRating = 0.0; + } + if (this.onRatingChanged != null) onRatingChanged(newRating); + }, + child: icon, + ); + } + + @override + Widget build(BuildContext context) { + return new Material( + color: Colors.transparent, + child: new Wrap( + alignment: WrapAlignment.start, + spacing: spacing, + children: new List.generate( + starCount, (index) => buildStar(context, index))), + ); + } +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..252a1da --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,320 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.5.0-nullsafety" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety" + carousel_slider: + dependency: "direct dev" + description: + name: carousel_slider + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.2" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0-nullsafety.2" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + dots_indicator: + dependency: transitive + description: + name: dots_indicator + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + font_awesome_flutter: + dependency: "direct dev" + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "8.10.0" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" + introduction_screen: + dependency: "direct dev" + description: + name: introduction_screen + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10-nullsafety" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.2" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+1" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.13" + provider: + dependency: "direct dev" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.2+2" + shared_preferences: + dependency: "direct dev" + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.12+2" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.2+2" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+10" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2+7" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0-nullsafety" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.19-nullsafety" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.2" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.2" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" +sdks: + dart: ">=2.10.0-0.0.dev <2.10.0" + flutter: ">=1.16.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..5b3065d --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,105 @@ +name: restaurant +description: A new Flutter application. + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.0 + +dev_dependencies: + flutter_test: + sdk: flutter + + introduction_screen: ^1.0.8 + shared_preferences: ^0.5.4+5 + font_awesome_flutter: ^8.5.0 + carousel_slider: ^1.4.1 + provider: ^4.0.1 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + assets: + - assets/logo.png + - assets/cc.png + - assets/on1.png + - assets/on2.png + - assets/on3.png + - assets/food1.jpeg + - assets/food2.jpeg + - assets/food3.jpeg + - assets/food4.jpeg + - assets/food5.jpeg + - assets/food6.jpeg + - assets/food7.jpeg + - assets/food8.jpeg + - assets/food9.jpeg + - assets/food10.jpeg + - assets/food11.jpeg + - assets/food12.jpg + - assets/cm1.jpeg + - assets/cm2.jpeg + - assets/cm3.jpeg + - assets/cm4.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/restaurant.iml b/restaurant.iml new file mode 100644 index 0000000..e5c8371 --- /dev/null +++ b/restaurant.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restaurant/.gitignore b/restaurant/.gitignore new file mode 100644 index 0000000..9d532b1 --- /dev/null +++ b/restaurant/.gitignore @@ -0,0 +1,41 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json diff --git a/restaurant/.metadata b/restaurant/.metadata new file mode 100644 index 0000000..7282834 --- /dev/null +++ b/restaurant/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 8b3760638a189741cd9ca881aa2dd237c1df1be5 + channel: beta + +project_type: app diff --git a/restaurant/checkout.JPEG b/restaurant/checkout.JPEG new file mode 100644 index 0000000..c80aa3c Binary files /dev/null and b/restaurant/checkout.JPEG differ diff --git a/restaurant/favorite.JPEG b/restaurant/favorite.JPEG new file mode 100644 index 0000000..1d6be90 Binary files /dev/null and b/restaurant/favorite.JPEG differ diff --git a/restaurant/home.JPEG b/restaurant/home.JPEG new file mode 100644 index 0000000..2e9c77b Binary files /dev/null and b/restaurant/home.JPEG differ diff --git a/restaurant/intro1.JPEG b/restaurant/intro1.JPEG new file mode 100644 index 0000000..7f5383b Binary files /dev/null and b/restaurant/intro1.JPEG differ diff --git a/restaurant/intro2.JPEG b/restaurant/intro2.JPEG new file mode 100644 index 0000000..b3d0a1d Binary files /dev/null and b/restaurant/intro2.JPEG differ diff --git a/restaurant/intro3.JPEG b/restaurant/intro3.JPEG new file mode 100644 index 0000000..c691c80 Binary files /dev/null and b/restaurant/intro3.JPEG differ diff --git a/restaurant/login.JPEG b/restaurant/login.JPEG new file mode 100644 index 0000000..0d660ab Binary files /dev/null and b/restaurant/login.JPEG differ diff --git a/restaurant/mycart.JPEG b/restaurant/mycart.JPEG new file mode 100644 index 0000000..e085f41 Binary files /dev/null and b/restaurant/mycart.JPEG differ diff --git a/restaurant/profile.JPEG b/restaurant/profile.JPEG new file mode 100644 index 0000000..6957a4a Binary files /dev/null and b/restaurant/profile.JPEG differ diff --git a/restaurant/register.JPEG b/restaurant/register.JPEG new file mode 100644 index 0000000..c93e30c Binary files /dev/null and b/restaurant/register.JPEG differ diff --git a/restaurant/search.JPEG b/restaurant/search.JPEG new file mode 100644 index 0000000..5b4eed4 Binary files /dev/null and b/restaurant/search.JPEG differ diff --git a/restaurant/splash.JPEG b/restaurant/splash.JPEG new file mode 100644 index 0000000..9669bea Binary files /dev/null and b/restaurant/splash.JPEG differ diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..49a8215 --- /dev/null +++ b/web/index.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + restaurant + + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..07348fb --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,23 @@ +{ + "name": "restaurant", + "short_name": "restaurant", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter application.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +}