├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── ysn │ │ │ │ └── com │ │ │ │ └── food_recipe │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── key.properties └── settings.gradle ├── assets └── images │ ├── img_logo_512.png │ ├── img_logo_themealdb.png │ ├── img_not_found.jpg │ ├── img_placeholder.jpg │ └── img_yudi_setiawan.jpeg ├── design ├── cover google play.sketch ├── food recipe 1.png ├── food recipe 2.png ├── food recipe 3.png ├── food recipe 4.png ├── food recipe cover 1.png ├── food recipe cover 2.png ├── food recipe cover 3.png ├── food recipe cover 4.png ├── food recipe cover 5.png └── ic_launcher │ ├── res │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ └── mipmap-xxxhdpi │ │ └── ic_launcher.png │ ├── web_hi_res_1024.png │ ├── web_hi_res_120.png │ ├── web_hi_res_152.png │ ├── web_hi_res_167.png │ ├── web_hi_res_180.png │ ├── web_hi_res_20.png │ ├── web_hi_res_29.png │ ├── web_hi_res_40.png │ ├── web_hi_res_512.png │ ├── web_hi_res_58.png │ ├── web_hi_res_60.png │ ├── web_hi_res_76.png │ ├── web_hi_res_80.png │ └── web_hi_res_87.png ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── web_hi_res_1024.png │ │ ├── web_hi_res_120-1.png │ │ ├── web_hi_res_120.png │ │ ├── web_hi_res_152.png │ │ ├── web_hi_res_167.png │ │ ├── web_hi_res_180.png │ │ ├── web_hi_res_20.png │ │ ├── web_hi_res_29-1.png │ │ ├── web_hi_res_29.png │ │ ├── web_hi_res_40-1.png │ │ ├── web_hi_res_40-2.png │ │ ├── web_hi_res_40.png │ │ ├── web_hi_res_58-1.png │ │ ├── web_hi_res_58.png │ │ ├── web_hi_res_60.png │ │ ├── web_hi_res_76.png │ │ ├── web_hi_res_80-1.png │ │ ├── web_hi_res_80.png │ │ └── web_hi_res_87.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── Runner-Bridging-Header.h │ └── ic_launcher.png ├── lib ├── main.dart ├── src │ ├── app.dart │ ├── blocs │ │ ├── detailmeals │ │ │ └── detail_meals_bloc.dart │ │ ├── favorite │ │ │ ├── favorite_bloc.dart │ │ │ └── favorite_meals_bloc_model.dart │ │ ├── home │ │ │ └── home_bloc.dart │ │ ├── listmeals │ │ │ └── list_meals_bloc.dart │ │ └── searchmeals │ │ │ └── search_meals_bloc.dart │ ├── database │ │ ├── dao │ │ │ └── favorite_meal_dao.dart │ │ ├── database.dart │ │ ├── entity │ │ │ ├── favorite_meal.dart │ │ │ └── favorite_meal.g.dart │ │ └── repository │ │ │ └── favorite_meal_repository.dart │ ├── models │ │ ├── area │ │ │ ├── area_meals.dart │ │ │ └── area_meals.g.dart │ │ ├── categories │ │ │ ├── categories.dart │ │ │ └── categories.g.dart │ │ ├── filterarea │ │ │ ├── filter_area_meals.dart │ │ │ └── filter_area_meals.g.dart │ │ ├── filtercategories │ │ │ ├── filter_categories.dart │ │ │ └── filter_categories.g.dart │ │ ├── latest │ │ │ ├── latest_meals.dart │ │ │ └── latest_meals.g.dart │ │ ├── lookupmealsbyid │ │ │ ├── lookup_meals_by_id.dart │ │ │ └── lookup_meals_by_id.g.dart │ │ ├── randommeals │ │ │ ├── random_meals.dart │ │ │ └── random_meals.g.dart │ │ └── searchmeals │ │ │ ├── search_meals.dart │ │ │ └── search_meals.g.dart │ ├── resources │ │ ├── food_api_provider.dart │ │ └── food_api_repository.dart │ ├── ui │ │ ├── detailmeals │ │ │ └── detail_meals_screen.dart │ │ ├── favorite │ │ │ └── favorite_screen.dart │ │ ├── home │ │ │ └── home_screen.dart │ │ ├── infoapp │ │ │ └── info_app_screen.dart │ │ ├── listmeals │ │ │ └── list_meals_screen.dart │ │ └── searchmeals │ │ │ └── search_meals_screen.dart │ └── utils │ │ └── utils.dart └── values │ └── color_assets.dart ├── pubspec.lock └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 1bd85dd6c207d69c148b92ec8f68244c00dec503 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Food Recipe 2 | Application that presents information about food recipes from [TheMealDb](https://www.themealdb.com) API.
3 | 4 | 5 | 6 | [](https://play.google.com/store/apps/details?id=ysn.com.food_recipe) 7 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | def keystoreProperties = new Properties() 29 | def keystorePropertiesFile = rootProject.file('key.properties') 30 | if (keystorePropertiesFile.exists()) { 31 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 32 | } 33 | 34 | android { 35 | compileSdkVersion 28 36 | 37 | sourceSets { 38 | main.java.srcDirs += 'src/main/kotlin' 39 | } 40 | 41 | lintOptions { 42 | disable 'InvalidPackage' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "ysn.com.food_recipe" 48 | minSdkVersion 16 49 | targetSdkVersion 28 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 53 | } 54 | 55 | signingConfigs { 56 | release { 57 | keyAlias keystoreProperties['keyAlias'] 58 | keyPassword keystoreProperties['keyPassword'] 59 | storeFile file(keystoreProperties['storeFile']) 60 | storePassword keystoreProperties['storePassword'] 61 | } 62 | } 63 | 64 | buildTypes { 65 | release { 66 | // TODO: Add your own signing config for the release build. 67 | // Signing with the debug keys for now, so `flutter run --release` works. 68 | // signingConfig signingConfigs.debug 69 | signingConfig signingConfigs.release 70 | 71 | /*minifyEnabled true 72 | useProguard true 73 | 74 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'*/ 75 | } 76 | } 77 | } 78 | 79 | flutter { 80 | source '../..' 81 | } 82 | 83 | dependencies { 84 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 85 | testImplementation 'junit:junit:4.12' 86 | androidTestImplementation 'androidx.test:runner:1.1.0' 87 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' 88 | } 89 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | ## Flutter wrapper 2 | -keep class io.flutter.app.** { *; } 3 | -keep class io.flutter.plugin.** { *; } 4 | -keep class io.flutter.util.** { *; } 5 | -keep class io.flutter.view.** { *; } 6 | -keep class io.flutter.** { *; } 7 | -keep class io.flutter.plugins.** { *; } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 22 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/ysn/com/food_recipe/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package ysn.com.food_recipe 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.31' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | android.enableJetifier=true 2 | android.useAndroidX=true 3 | org.gradle.jvmargs=-Xmx1536M 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 14 08:21:19 WIB 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /android/key.properties: -------------------------------------------------------------------------------- 1 | storePassword=nasigoreng 2 | keyPassword=nasigoreng 3 | keyAlias=ysn studio 4 | storeFile=/Users/yudisetiawan/AndroidStudioProjects/keystore_ysn.jks -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/images/img_logo_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/assets/images/img_logo_512.png -------------------------------------------------------------------------------- /assets/images/img_logo_themealdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/assets/images/img_logo_themealdb.png -------------------------------------------------------------------------------- /assets/images/img_not_found.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/assets/images/img_not_found.jpg -------------------------------------------------------------------------------- /assets/images/img_placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/assets/images/img_placeholder.jpg -------------------------------------------------------------------------------- /assets/images/img_yudi_setiawan.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/assets/images/img_yudi_setiawan.jpeg -------------------------------------------------------------------------------- /design/cover google play.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/cover google play.sketch -------------------------------------------------------------------------------- /design/food recipe 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe 1.png -------------------------------------------------------------------------------- /design/food recipe 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe 2.png -------------------------------------------------------------------------------- /design/food recipe 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe 3.png -------------------------------------------------------------------------------- /design/food recipe 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe 4.png -------------------------------------------------------------------------------- /design/food recipe cover 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe cover 1.png -------------------------------------------------------------------------------- /design/food recipe cover 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe cover 2.png -------------------------------------------------------------------------------- /design/food recipe cover 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe cover 3.png -------------------------------------------------------------------------------- /design/food recipe cover 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe cover 4.png -------------------------------------------------------------------------------- /design/food recipe cover 5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/food recipe cover 5.png -------------------------------------------------------------------------------- /design/ic_launcher/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /design/ic_launcher/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /design/ic_launcher/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /design/ic_launcher/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /design/ic_launcher/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_1024.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_120.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_152.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_167.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_180.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_20.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_29.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_40.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_512.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_58.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_60.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_76.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_80.png -------------------------------------------------------------------------------- /design/ic_launcher/web_hi_res_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/design/ic_launcher/web_hi_res_87.png -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | 38 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 39 | # referring to absolute paths on developers' machines. 40 | system('rm -rf .symlinks') 41 | system('mkdir -p .symlinks/plugins') 42 | 43 | # Flutter Pods 44 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 45 | if generated_xcode_build_settings.empty? 46 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 47 | end 48 | generated_xcode_build_settings.map { |p| 49 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 50 | symlink = File.join('.symlinks', 'flutter') 51 | File.symlink(File.dirname(p[:path]), symlink) 52 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 53 | end 54 | } 55 | 56 | # Plugin Pods 57 | plugin_pods = parse_KV_file('../.flutter-plugins') 58 | plugin_pods.map { |p| 59 | symlink = File.join('.symlinks', 'plugins', p[:name]) 60 | File.symlink(p[:path], symlink) 61 | pod p[:name], :path => File.join(symlink, 'ios') 62 | } 63 | end 64 | 65 | post_install do |installer| 66 | installer.pods_project.targets.each do |target| 67 | target.build_configurations.each do |config| 68 | config.build_settings['ENABLE_BITCODE'] = 'NO' 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - FMDB (2.7.5): 4 | - FMDB/standard (= 2.7.5) 5 | - FMDB/standard (2.7.5) 6 | - get_version (0.0.1): 7 | - Flutter 8 | - package_info (0.0.1): 9 | - Flutter 10 | - path_provider (0.0.1): 11 | - Flutter 12 | - sqflite (0.0.1): 13 | - Flutter 14 | - FMDB (~> 2.7.2) 15 | - url_launcher (0.0.1): 16 | - Flutter 17 | 18 | DEPENDENCIES: 19 | - Flutter (from `.symlinks/flutter/ios`) 20 | - get_version (from `.symlinks/plugins/get_version/ios`) 21 | - package_info (from `.symlinks/plugins/package_info/ios`) 22 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 23 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 24 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 25 | 26 | SPEC REPOS: 27 | https://github.com/cocoapods/specs.git: 28 | - FMDB 29 | 30 | EXTERNAL SOURCES: 31 | Flutter: 32 | :path: ".symlinks/flutter/ios" 33 | get_version: 34 | :path: ".symlinks/plugins/get_version/ios" 35 | package_info: 36 | :path: ".symlinks/plugins/package_info/ios" 37 | path_provider: 38 | :path: ".symlinks/plugins/path_provider/ios" 39 | sqflite: 40 | :path: ".symlinks/plugins/sqflite/ios" 41 | url_launcher: 42 | :path: ".symlinks/plugins/url_launcher/ios" 43 | 44 | SPEC CHECKSUMS: 45 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 46 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 47 | get_version: a59b7bd8fbf7543739bd853218b6685899419d05 48 | package_info: d7c98b64f60add4c2908b9d94d82a45d3c8827ad 49 | path_provider: 09407919825bfe3c2deae39453b7a5b44f467873 50 | sqflite: d1612813fa7db7c667bed9f1d1b508deffc56999 51 | url_launcher: 92b89c1029a0373879933c21642958c874539095 52 | 53 | PODFILE CHECKSUM: b7d0755641915265774624f3b3be49c5c073d379 54 | 55 | COCOAPODS: 1.5.3 56 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "web_hi_res_40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "web_hi_res_60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "web_hi_res_29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "web_hi_res_58.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "web_hi_res_87.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "web_hi_res_80.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "web_hi_res_120-1.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "web_hi_res_120.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "web_hi_res_180.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "web_hi_res_20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "web_hi_res_40-1.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "web_hi_res_29-1.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "web_hi_res_58-1.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "web_hi_res_40-2.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "web_hi_res_80-1.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "web_hi_res_76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "web_hi_res_152.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "web_hi_res_167.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "web_hi_res_1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_120-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_29-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_29-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40-2.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_58-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_80-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/web_hi_res_87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Food Recipe 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /ios/Runner/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJava/Food-Recipe/bf5c89e4e0df3f12c51f26f36477dbdb94fa77d4/ios/Runner/ic_launcher.png -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'src/app.dart'; 4 | 5 | void main() => runApp(App()); 6 | -------------------------------------------------------------------------------- /lib/src/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_recipe/values/color_assets.dart'; 3 | 4 | import 'ui/favorite/favorite_screen.dart'; 5 | import 'ui/home/home_screen.dart'; 6 | import 'ui/infoapp/info_app_screen.dart'; 7 | import 'ui/listmeals/list_meals_screen.dart'; 8 | import 'ui/searchmeals/search_meals_screen.dart'; 9 | import 'utils/utils.dart'; 10 | 11 | class App extends StatefulWidget { 12 | @override 13 | _AppState createState() => _AppState(); 14 | } 15 | 16 | class _AppState extends State { 17 | int _indexTabSelected = 0; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return MaterialApp( 22 | debugShowCheckedModeBanner: false, 23 | routes: { 24 | navigatorListMeals: (context) { 25 | return ListMealsScreen(); 26 | }, 27 | navigatorSearchMeals: (context) { 28 | return SearchMealsScreen(); 29 | }, 30 | navigatorInfoApp: (context) { 31 | return InfoAppScreen(); 32 | }, 33 | }, 34 | theme: ThemeData( 35 | primaryColor: ColorAssets.primarySwatchColor, 36 | accentColor: ColorAssets.accentColor, 37 | ), 38 | home: Scaffold( 39 | body: _buildBodyWidget(), 40 | bottomNavigationBar: BottomNavigationBar( 41 | currentIndex: _indexTabSelected, 42 | items: [ 43 | BottomNavigationBarItem( 44 | title: Text("Home"), 45 | icon: Icon(Icons.home), 46 | ), 47 | BottomNavigationBarItem( 48 | title: Text("Favorite"), 49 | icon: Icon(Icons.star), 50 | ), 51 | ], 52 | onTap: (indexTab) { 53 | setState(() => _indexTabSelected = indexTab); 54 | }, 55 | ), 56 | ), 57 | ); 58 | } 59 | 60 | Widget _buildBodyWidget() { 61 | if (_indexTabSelected == 0) { 62 | return HomeScreen(); 63 | } else { 64 | return FavoriteScreen(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/src/blocs/detailmeals/detail_meals_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 2 | import 'package:food_recipe/src/resources/food_api_repository.dart'; 3 | 4 | class DetailsMealsBloc { 5 | final _foodApiRepository = FoodApiRepository(); 6 | 7 | dispose() { 8 | // TODO: do something in here 9 | } 10 | 11 | Future getDetailsMealsById(String idMeal) async { 12 | return await _foodApiRepository.getLookupMealsById(idMeal); 13 | } 14 | 15 | } 16 | 17 | final detailsMealsBloc = DetailsMealsBloc(); -------------------------------------------------------------------------------- /lib/src/blocs/favorite/favorite_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 2 | import 'package:food_recipe/src/database/repository/favorite_meal_repository.dart'; 3 | import 'package:rxdart/rxdart.dart'; 4 | 5 | import 'favorite_meals_bloc_model.dart'; 6 | 7 | class FavoriteBloc { 8 | final _favoriteMealRepository = FavoriteMealRepository(); 9 | var _publishSubjectListFavoriteMeal = 10 | PublishSubject(); 11 | 12 | dispose() { 13 | _publishSubjectListFavoriteMeal.close(); 14 | } 15 | 16 | Observable get listFavoriteMeal => 17 | _publishSubjectListFavoriteMeal.stream; 18 | 19 | getAllFavoriteMeals() async { 20 | _publishSubjectListFavoriteMeal.sink 21 | .add(FavoriteMealsBlocModel(isLoading: true)); 22 | List listFavoriteMeals = 23 | await _favoriteMealRepository.getAllFavoriteMeals(); 24 | FavoriteMealsBlocModel favoriteMealsBlocModel = 25 | FavoriteMealsBlocModel(listFavoriteMeals: listFavoriteMeals); 26 | _publishSubjectListFavoriteMeal.sink.add(favoriteMealsBlocModel); 27 | } 28 | 29 | removeFavoriteMealById(String id) async { 30 | _publishSubjectListFavoriteMeal.sink.add(FavoriteMealsBlocModel(isLoading: true)); 31 | await _favoriteMealRepository.deleteFavoriteMealById(id); 32 | List listFavoriteMeals = 33 | await _favoriteMealRepository.getAllFavoriteMeals(); 34 | FavoriteMealsBlocModel favoriteMealsBlocModel = 35 | FavoriteMealsBlocModel(listFavoriteMeals: listFavoriteMeals); 36 | _publishSubjectListFavoriteMeal.sink.add(favoriteMealsBlocModel); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /lib/src/blocs/favorite/favorite_meals_bloc_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 2 | 3 | class FavoriteMealsBlocModel { 4 | List listFavoriteMeals; 5 | bool isLoading; 6 | 7 | FavoriteMealsBlocModel({this.listFavoriteMeals, this.isLoading = false,}); 8 | 9 | @override 10 | String toString() { 11 | return 'FavoriteMealsBlocModel{listFavoriteMeals: $listFavoriteMeals, isLoading: $isLoading}'; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /lib/src/blocs/home/home_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/models/categories/categories.dart'; 2 | import 'package:food_recipe/src/models/latest/latest_meals.dart'; 3 | import 'package:food_recipe/src/resources/food_api_repository.dart'; 4 | 5 | class HomeBloc { 6 | final _repository = FoodApiRepository(); 7 | 8 | dispose() { 9 | // TODO: do something in here 10 | } 11 | 12 | Future getLatestMeals() async { 13 | return await _repository.getLatestMeals(); 14 | } 15 | 16 | Future getCategories() async { 17 | return await _repository.getCategories(); 18 | } 19 | 20 | } 21 | 22 | final homeBloc = HomeBloc(); -------------------------------------------------------------------------------- /lib/src/blocs/listmeals/list_meals_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 2 | import 'package:food_recipe/src/database/repository/favorite_meal_repository.dart'; 3 | import 'package:food_recipe/src/models/filtercategories/filter_categories.dart'; 4 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 5 | import 'package:food_recipe/src/resources/food_api_repository.dart'; 6 | 7 | class ListMealsBloc { 8 | final _foodApiRepository = FoodApiRepository(); 9 | final _favoriteMealRepository = FavoriteMealRepository(); 10 | 11 | dispose() { 12 | // TODO: do something in here 13 | } 14 | 15 | Future getFilterCategories(String category) async { 16 | FilterCategories filterCategories = 17 | await _foodApiRepository.getFilterByCategories(category); 18 | List listFavoriteMeals = 19 | await _favoriteMealRepository.getAllFavoriteMeals(); 20 | List listFilterCategoryItems = 21 | filterCategories.filterCategoryItems.where((item) { 22 | bool isFavorite = false; 23 | for (FavoriteMeal favoriteMeal in listFavoriteMeals) { 24 | if (item.idMeal == favoriteMeal.idMeal) { 25 | isFavorite = true; 26 | break; 27 | } 28 | } 29 | item.isFavorite = isFavorite; 30 | return true; 31 | }).toList(); 32 | filterCategories.filterCategoryItems = listFilterCategoryItems; 33 | return filterCategories; 34 | } 35 | 36 | Future getDetailMealById(String id) async { 37 | LookupMealsById lookupMealsById = await _foodApiRepository.getLookupMealsById(id); 38 | return lookupMealsById; 39 | } 40 | 41 | Future addFavoriteMeal(FavoriteMeal favoriteMeal) async { 42 | return await _favoriteMealRepository.insertFavoriteMeal(favoriteMeal); 43 | } 44 | 45 | Future deleteFavoriteMealById(String id) async { 46 | return await _favoriteMealRepository.deleteFavoriteMealById(id); 47 | } 48 | } 49 | 50 | final listMealsBloc = ListMealsBloc(); 51 | -------------------------------------------------------------------------------- /lib/src/blocs/searchmeals/search_meals_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 2 | import 'package:food_recipe/src/database/repository/favorite_meal_repository.dart'; 3 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 4 | import 'package:food_recipe/src/models/searchmeals/search_meals.dart'; 5 | import 'package:food_recipe/src/resources/food_api_repository.dart'; 6 | import 'package:rxdart/rxdart.dart'; 7 | 8 | class SearchMealsBloc { 9 | final _publishSubjectSearchMealsByKeyword = PublishSubject(); 10 | final _foodApiRepository = FoodApiRepository(); 11 | final _favoriteMealRepository = FavoriteMealRepository(); 12 | 13 | dispose() { 14 | _publishSubjectSearchMealsByKeyword.close(); 15 | } 16 | 17 | Observable get resultSearchMealsByKeyword => 18 | _publishSubjectSearchMealsByKeyword.stream; 19 | 20 | searchMealsByKeyword(String keyword) async { 21 | _publishSubjectSearchMealsByKeyword.sink.add(SearchMeals(isLoading: true)); 22 | if (keyword.trim().isEmpty) { 23 | _publishSubjectSearchMealsByKeyword.sink 24 | .add(SearchMeals(searchMealsItems: [])); 25 | } else { 26 | SearchMeals searchMeals = 27 | await _foodApiRepository.getSearchMealsByKeyword(keyword); 28 | List listFavoriteMeals = 29 | await _favoriteMealRepository.getAllFavoriteMeals(); 30 | if (searchMeals.searchMealsItems == null) { 31 | _publishSubjectSearchMealsByKeyword.sink.add(SearchMeals(searchMealsItems: [])); 32 | return; 33 | } 34 | List listSearchMealsItem = 35 | searchMeals.searchMealsItems.where((searchMealsItem) { 36 | for (FavoriteMeal favoriteMeal in listFavoriteMeals) { 37 | if (favoriteMeal.idMeal == searchMealsItem.idMeal) { 38 | searchMealsItem.isFavorite = true; 39 | break; 40 | } 41 | } 42 | return true; 43 | }).toList(); 44 | searchMeals.searchMealsItems = listSearchMealsItem; 45 | _publishSubjectSearchMealsByKeyword.sink.add(searchMeals); 46 | } 47 | } 48 | 49 | Future getDetailMealById(String id) async { 50 | LookupMealsById lookupMealsById = 51 | await _foodApiRepository.getLookupMealsById(id); 52 | return lookupMealsById; 53 | } 54 | 55 | Future addFavoriteMeal(FavoriteMeal favoriteMeal) async { 56 | return await _favoriteMealRepository.insertFavoriteMeal(favoriteMeal); 57 | } 58 | 59 | Future deleteFavoriteMealById(String id) async { 60 | return await _favoriteMealRepository.deleteFavoriteMealById(id); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/src/database/dao/favorite_meal_dao.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 2 | 3 | import '../database.dart'; 4 | 5 | class FavoriteMealDao { 6 | final dbProvider = DatabaseProvider.dbProvider; 7 | 8 | Future createFavoriteMeal(FavoriteMeal favoriteMeal) async { 9 | final db = await dbProvider.database; 10 | var result = db.insert(favoriteTable, favoriteMeal.toJson()); 11 | return result; 12 | } 13 | 14 | Future> getAllFavoriteMeals() async { 15 | final db = await dbProvider.database; 16 | List> result; 17 | result = await db.query(favoriteTable); 18 | List listFavoriteMeals = result.isNotEmpty 19 | ? result.map((resultMap) { 20 | return FavoriteMeal.fromJson(resultMap); 21 | }).toList() 22 | : []; 23 | return listFavoriteMeals; 24 | } 25 | 26 | Future> getFavoriteMealById(String id) async { 27 | final db = await dbProvider.database; 28 | List> result; 29 | result = await db.query(favoriteTable, where: "idMeal = ?", whereArgs: [id]); 30 | List listFavoriteMeals = result.isNotEmpty 31 | ? result.map((resultMap) { 32 | return FavoriteMeal.fromJson(resultMap); 33 | }).toList() 34 | : []; 35 | return listFavoriteMeals; 36 | } 37 | 38 | Future deleteFavoriteMeal(String id) async { 39 | final db = await dbProvider.database; 40 | var result = 41 | await db.delete(favoriteTable, where: "idMeal = ?", whereArgs: [id]); 42 | return result; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/src/database/database.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:path/path.dart'; 4 | import 'package:sqflite/sqflite.dart'; 5 | import 'package:path_provider/path_provider.dart'; 6 | 7 | final favoriteTable = "favorite"; 8 | 9 | class DatabaseProvider { 10 | static final DatabaseProvider dbProvider = DatabaseProvider(); 11 | 12 | Database _database; 13 | 14 | Future get database async { 15 | if (_database != null) return _database; 16 | _database = await createDatabase(); 17 | return _database; 18 | } 19 | 20 | createDatabase() async { 21 | Directory documentsDirectory = await getApplicationDocumentsDirectory(); 22 | String path = join(documentsDirectory.path, "FoodRecipe.db"); 23 | 24 | var database = await openDatabase( 25 | path, version: 1, onCreate: initDb, onUpgrade: onUpgrade); 26 | return database; 27 | } 28 | 29 | void onUpgrade(Database database, int oldVersion, int newVersion) { 30 | if (newVersion > oldVersion) { 31 | // TODO: do something in here if needed to upgrade database version 32 | } 33 | } 34 | 35 | void initDb(Database database, int version) async { 36 | String queryCreateTableFavorite = "CREATE TABLE $favoriteTable (" 37 | "idMeal TEXT PRIMARY KEY, " 38 | "strMeal TEXT, " 39 | "strMealThumb TEXT, " 40 | "strCategory TEXT, " 41 | "strTags TEXT, " 42 | "strYoutube TEXT, " 43 | "strArea TEXT, " 44 | "strInstructions TEXT, " 45 | "strIngredient1 TEXT, " 46 | "strIngredient2 TEXT, " 47 | "strIngredient3 TEXT, " 48 | "strIngredient4 TEXT, " 49 | "strIngredient5 TEXT, " 50 | "strIngredient6 TEXT, " 51 | "strIngredient7 TEXT, " 52 | "strIngredient8 TEXT, " 53 | "strIngredient9 TEXT, " 54 | "strIngredient10 TEXT, " 55 | "strIngredient11 TEXT, " 56 | "strIngredient12 TEXT, " 57 | "strIngredient13 TEXT, " 58 | "strIngredient14 TEXT, " 59 | "strIngredient15 TEXT, " 60 | "strIngredient16 TEXT, " 61 | "strIngredient17 TEXT, " 62 | "strIngredient18 TEXT, " 63 | "strIngredient19 TEXT, " 64 | "strIngredient20 TEXT, " 65 | "strMeasure1 TEXT, " 66 | "strMeasure2 TEXT, " 67 | "strMeasure3 TEXT, " 68 | "strMeasure4 TEXT, " 69 | "strMeasure5 TEXT, " 70 | "strMeasure6 TEXT, " 71 | "strMeasure7 TEXT, " 72 | "strMeasure8 TEXT, " 73 | "strMeasure9 TEXT, " 74 | "strMeasure10 TEXT, " 75 | "strMeasure11 TEXT, " 76 | "strMeasure12 TEXT, " 77 | "strMeasure13 TEXT, " 78 | "strMeasure14 TEXT, " 79 | "strMeasure15 TEXT, " 80 | "strMeasure16 TEXT, " 81 | "strMeasure17 TEXT, " 82 | "strMeasure18 TEXT, " 83 | "strMeasure19 TEXT, " 84 | "strMeasure20 TEXT " 85 | ")"; 86 | await database.execute(queryCreateTableFavorite); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/src/database/entity/favorite_meal.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'favorite_meal.g.dart'; 4 | 5 | @JsonSerializable() 6 | class FavoriteMeal { 7 | String idMeal; 8 | String strMeal; 9 | String strMealThumb; 10 | String strCategory; 11 | String strTags; 12 | String strYoutube; 13 | String strArea; 14 | String strInstructions; 15 | String strIngredient1; 16 | String strIngredient2; 17 | String strIngredient3; 18 | String strIngredient4; 19 | String strIngredient5; 20 | String strIngredient6; 21 | String strIngredient7; 22 | String strIngredient8; 23 | String strIngredient9; 24 | String strIngredient10; 25 | String strIngredient11; 26 | String strIngredient12; 27 | String strIngredient13; 28 | String strIngredient14; 29 | String strIngredient15; 30 | String strIngredient16; 31 | String strIngredient17; 32 | String strIngredient18; 33 | String strIngredient19; 34 | String strIngredient20; 35 | String strMeasure1; 36 | String strMeasure2; 37 | String strMeasure3; 38 | String strMeasure4; 39 | String strMeasure5; 40 | String strMeasure6; 41 | String strMeasure7; 42 | String strMeasure8; 43 | String strMeasure9; 44 | String strMeasure10; 45 | String strMeasure11; 46 | String strMeasure12; 47 | String strMeasure13; 48 | String strMeasure14; 49 | String strMeasure15; 50 | String strMeasure16; 51 | String strMeasure17; 52 | String strMeasure18; 53 | String strMeasure19; 54 | String strMeasure20; 55 | 56 | FavoriteMeal( 57 | {this.idMeal, 58 | this.strMeal, 59 | this.strMealThumb, 60 | this.strCategory, 61 | this.strTags, 62 | this.strYoutube, 63 | this.strArea, 64 | this.strInstructions, 65 | this.strIngredient1, 66 | this.strIngredient2, 67 | this.strIngredient3, 68 | this.strIngredient4, 69 | this.strIngredient5, 70 | this.strIngredient6, 71 | this.strIngredient7, 72 | this.strIngredient8, 73 | this.strIngredient9, 74 | this.strIngredient10, 75 | this.strIngredient11, 76 | this.strIngredient12, 77 | this.strIngredient13, 78 | this.strIngredient14, 79 | this.strIngredient15, 80 | this.strIngredient16, 81 | this.strIngredient17, 82 | this.strIngredient18, 83 | this.strIngredient19, 84 | this.strIngredient20, 85 | this.strMeasure1, 86 | this.strMeasure2, 87 | this.strMeasure3, 88 | this.strMeasure4, 89 | this.strMeasure5, 90 | this.strMeasure6, 91 | this.strMeasure7, 92 | this.strMeasure8, 93 | this.strMeasure9, 94 | this.strMeasure10, 95 | this.strMeasure11, 96 | this.strMeasure12, 97 | this.strMeasure13, 98 | this.strMeasure14, 99 | this.strMeasure15, 100 | this.strMeasure16, 101 | this.strMeasure17, 102 | this.strMeasure18, 103 | this.strMeasure19, 104 | this.strMeasure20}); 105 | 106 | @override 107 | String toString() { 108 | return 'FavoriteMeal{idMeal: $idMeal, strMeal: $strMeal, strMealThumb: $strMealThumb, strCategory: $strCategory, strTags: $strTags, strYoutube: $strYoutube, strArea: $strArea, strInstructions: $strInstructions, strIngredient1: $strIngredient1, strIngredient2: $strIngredient2, strIngredient3: $strIngredient3, strIngredient4: $strIngredient4, strIngredient5: $strIngredient5, strIngredient6: $strIngredient6, strIngredient7: $strIngredient7, strIngredient8: $strIngredient8, strIngredient9: $strIngredient9, strIngredient10: $strIngredient10, strIngredient11: $strIngredient11, strIngredient12: $strIngredient12, strIngredient13: $strIngredient13, strIngredient14: $strIngredient14, strIngredient15: $strIngredient15, strIngredient16: $strIngredient16, strIngredient17: $strIngredient17, strIngredient18: $strIngredient18, strIngredient19: $strIngredient19, strIngredient20: $strIngredient20, strMeasure1: $strMeasure1, strMeasure2: $strMeasure2, strMeasure3: $strMeasure3, strMeasure4: $strMeasure4, strMeasure5: $strMeasure5, strMeasure6: $strMeasure6, strMeasure7: $strMeasure7, strMeasure8: $strMeasure8, strMeasure9: $strMeasure9, strMeasure10: $strMeasure10, strMeasure11: $strMeasure11, strMeasure12: $strMeasure12, strMeasure13: $strMeasure13, strMeasure14: $strMeasure14, strMeasure15: $strMeasure15, strMeasure16: $strMeasure16, strMeasure17: $strMeasure17, strMeasure18: $strMeasure18, strMeasure19: $strMeasure19, strMeasure20: $strMeasure20}'; 109 | } 110 | 111 | factory FavoriteMeal.fromJson(Map json) => 112 | _$FavoriteMealFromJson(json); 113 | 114 | Map toJson() => _$FavoriteMealToJson(this); 115 | } 116 | -------------------------------------------------------------------------------- /lib/src/database/entity/favorite_meal.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'favorite_meal.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FavoriteMeal _$FavoriteMealFromJson(Map json) { 10 | return FavoriteMeal( 11 | idMeal: json['idMeal'] as String, 12 | strMeal: json['strMeal'] as String, 13 | strMealThumb: json['strMealThumb'] as String, 14 | strCategory: json['strCategory'] as String, 15 | strTags: json['strTags'] as String, 16 | strYoutube: json['strYoutube'] as String, 17 | strArea: json['strArea'] as String, 18 | strInstructions: json['strInstructions'] as String, 19 | strIngredient1: json['strIngredient1'] as String, 20 | strIngredient2: json['strIngredient2'] as String, 21 | strIngredient3: json['strIngredient3'] as String, 22 | strIngredient4: json['strIngredient4'] as String, 23 | strIngredient5: json['strIngredient5'] as String, 24 | strIngredient6: json['strIngredient6'] as String, 25 | strIngredient7: json['strIngredient7'] as String, 26 | strIngredient8: json['strIngredient8'] as String, 27 | strIngredient9: json['strIngredient9'] as String, 28 | strIngredient10: json['strIngredient10'] as String, 29 | strIngredient11: json['strIngredient11'] as String, 30 | strIngredient12: json['strIngredient12'] as String, 31 | strIngredient13: json['strIngredient13'] as String, 32 | strIngredient14: json['strIngredient14'] as String, 33 | strIngredient15: json['strIngredient15'] as String, 34 | strIngredient16: json['strIngredient16'] as String, 35 | strIngredient17: json['strIngredient17'] as String, 36 | strIngredient18: json['strIngredient18'] as String, 37 | strIngredient19: json['strIngredient19'] as String, 38 | strIngredient20: json['strIngredient20'] as String, 39 | strMeasure1: json['strMeasure1'] as String, 40 | strMeasure2: json['strMeasure2'] as String, 41 | strMeasure3: json['strMeasure3'] as String, 42 | strMeasure4: json['strMeasure4'] as String, 43 | strMeasure5: json['strMeasure5'] as String, 44 | strMeasure6: json['strMeasure6'] as String, 45 | strMeasure7: json['strMeasure7'] as String, 46 | strMeasure8: json['strMeasure8'] as String, 47 | strMeasure9: json['strMeasure9'] as String, 48 | strMeasure10: json['strMeasure10'] as String, 49 | strMeasure11: json['strMeasure11'] as String, 50 | strMeasure12: json['strMeasure12'] as String, 51 | strMeasure13: json['strMeasure13'] as String, 52 | strMeasure14: json['strMeasure14'] as String, 53 | strMeasure15: json['strMeasure15'] as String, 54 | strMeasure16: json['strMeasure16'] as String, 55 | strMeasure17: json['strMeasure17'] as String, 56 | strMeasure18: json['strMeasure18'] as String, 57 | strMeasure19: json['strMeasure19'] as String, 58 | strMeasure20: json['strMeasure20'] as String); 59 | } 60 | 61 | Map _$FavoriteMealToJson(FavoriteMeal instance) => 62 | { 63 | 'idMeal': instance.idMeal, 64 | 'strMeal': instance.strMeal, 65 | 'strMealThumb': instance.strMealThumb, 66 | 'strCategory': instance.strCategory, 67 | 'strTags': instance.strTags, 68 | 'strYoutube': instance.strYoutube, 69 | 'strArea': instance.strArea, 70 | 'strInstructions': instance.strInstructions, 71 | 'strIngredient1': instance.strIngredient1, 72 | 'strIngredient2': instance.strIngredient2, 73 | 'strIngredient3': instance.strIngredient3, 74 | 'strIngredient4': instance.strIngredient4, 75 | 'strIngredient5': instance.strIngredient5, 76 | 'strIngredient6': instance.strIngredient6, 77 | 'strIngredient7': instance.strIngredient7, 78 | 'strIngredient8': instance.strIngredient8, 79 | 'strIngredient9': instance.strIngredient9, 80 | 'strIngredient10': instance.strIngredient10, 81 | 'strIngredient11': instance.strIngredient11, 82 | 'strIngredient12': instance.strIngredient12, 83 | 'strIngredient13': instance.strIngredient13, 84 | 'strIngredient14': instance.strIngredient14, 85 | 'strIngredient15': instance.strIngredient15, 86 | 'strIngredient16': instance.strIngredient16, 87 | 'strIngredient17': instance.strIngredient17, 88 | 'strIngredient18': instance.strIngredient18, 89 | 'strIngredient19': instance.strIngredient19, 90 | 'strIngredient20': instance.strIngredient20, 91 | 'strMeasure1': instance.strMeasure1, 92 | 'strMeasure2': instance.strMeasure2, 93 | 'strMeasure3': instance.strMeasure3, 94 | 'strMeasure4': instance.strMeasure4, 95 | 'strMeasure5': instance.strMeasure5, 96 | 'strMeasure6': instance.strMeasure6, 97 | 'strMeasure7': instance.strMeasure7, 98 | 'strMeasure8': instance.strMeasure8, 99 | 'strMeasure9': instance.strMeasure9, 100 | 'strMeasure10': instance.strMeasure10, 101 | 'strMeasure11': instance.strMeasure11, 102 | 'strMeasure12': instance.strMeasure12, 103 | 'strMeasure13': instance.strMeasure13, 104 | 'strMeasure14': instance.strMeasure14, 105 | 'strMeasure15': instance.strMeasure15, 106 | 'strMeasure16': instance.strMeasure16, 107 | 'strMeasure17': instance.strMeasure17, 108 | 'strMeasure18': instance.strMeasure18, 109 | 'strMeasure19': instance.strMeasure19, 110 | 'strMeasure20': instance.strMeasure20 111 | }; 112 | -------------------------------------------------------------------------------- /lib/src/database/repository/favorite_meal_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:food_recipe/src/database/dao/favorite_meal_dao.dart'; 2 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 3 | 4 | class FavoriteMealRepository { 5 | final _favoriteMealDao = FavoriteMealDao(); 6 | 7 | Future insertFavoriteMeal(FavoriteMeal favoriteMeal) => 8 | _favoriteMealDao.createFavoriteMeal(favoriteMeal); 9 | 10 | Future> getAllFavoriteMeals() => _favoriteMealDao.getAllFavoriteMeals(); 11 | 12 | Future> getFavoriteMealsById(String id) => _favoriteMealDao.getFavoriteMealById(id); 13 | 14 | Future deleteFavoriteMealById(String id) => _favoriteMealDao.deleteFavoriteMeal(id); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/models/area/area_meals.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'area_meals.g.dart'; 3 | 4 | @JsonSerializable() 5 | class AreaMeals { 6 | @JsonKey(name: "meals") 7 | List areaMealsItems; 8 | 9 | AreaMeals({this.areaMealsItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'AreaMeals{areaMealsItems: $areaMealsItems}'; 14 | } 15 | 16 | factory AreaMeals.fromJson(Map json) => _$AreaMealsFromJson(json); 17 | 18 | Map toJson() => _$AreaMealsToJson(this); 19 | 20 | } 21 | 22 | @JsonSerializable() 23 | class AreaMealsItem { 24 | String strArea; 25 | 26 | AreaMealsItem({this.strArea}); 27 | 28 | @override 29 | String toString() { 30 | return 'AreaMealsItem{strArea: $strArea}'; 31 | } 32 | 33 | factory AreaMealsItem.fromJson(Map json) => _$AreaMealsItemFromJson(json); 34 | 35 | Map toJson() => _$AreaMealsItemToJson(this); 36 | 37 | } -------------------------------------------------------------------------------- /lib/src/models/area/area_meals.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'area_meals.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AreaMeals _$AreaMealsFromJson(Map json) { 10 | return AreaMeals( 11 | areaMealsItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : AreaMealsItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$AreaMealsToJson(AreaMeals instance) => 19 | {'meals': instance.areaMealsItems}; 20 | 21 | AreaMealsItem _$AreaMealsItemFromJson(Map json) { 22 | return AreaMealsItem(strArea: json['strArea'] as String); 23 | } 24 | 25 | Map _$AreaMealsItemToJson(AreaMealsItem instance) => 26 | {'strArea': instance.strArea}; 27 | -------------------------------------------------------------------------------- /lib/src/models/categories/categories.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'categories.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Categories { 6 | @JsonKey(name: "categories") 7 | List categoryItems; 8 | 9 | Categories({this.categoryItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'Categories{categoryItems: $categoryItems}'; 14 | } 15 | 16 | factory Categories.fromJson(Map json) => _$CategoriesFromJson(json); 17 | 18 | Map toJson() => _$CategoriesToJson(this); 19 | 20 | } 21 | 22 | @JsonSerializable() 23 | class CategoryItem { 24 | String idCategory; 25 | String strCategory; 26 | String strCategoryThumb; 27 | String strCategoryDescription; 28 | 29 | CategoryItem({this.idCategory, this.strCategory, this.strCategoryThumb, this.strCategoryDescription}); 30 | 31 | @override 32 | String toString() { 33 | return 'CategoryItem{idCategory: $idCategory, strCategory: $strCategory, strCategoryThumb: $strCategoryThumb, strCategoryDescription: $strCategoryDescription}'; 34 | } 35 | 36 | factory CategoryItem.fromJson(Map json) => _$CategoryItemFromJson(json); 37 | 38 | Map toJson() => _$CategoryItemToJson(this); 39 | } -------------------------------------------------------------------------------- /lib/src/models/categories/categories.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'categories.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Categories _$CategoriesFromJson(Map json) { 10 | return Categories( 11 | categoryItems: (json['categories'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : CategoryItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$CategoriesToJson(Categories instance) => 19 | {'categories': instance.categoryItems}; 20 | 21 | CategoryItem _$CategoryItemFromJson(Map json) { 22 | return CategoryItem( 23 | idCategory: json['idCategory'] as String, 24 | strCategory: json['strCategory'] as String, 25 | strCategoryThumb: json['strCategoryThumb'] as String, 26 | strCategoryDescription: json['strCategoryDescription'] as String); 27 | } 28 | 29 | Map _$CategoryItemToJson(CategoryItem instance) => 30 | { 31 | 'idCategory': instance.idCategory, 32 | 'strCategory': instance.strCategory, 33 | 'strCategoryThumb': instance.strCategoryThumb, 34 | 'strCategoryDescription': instance.strCategoryDescription 35 | }; 36 | -------------------------------------------------------------------------------- /lib/src/models/filterarea/filter_area_meals.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'filter_area_meals.g.dart'; 3 | 4 | @JsonSerializable() 5 | class FilterAreaMeals { 6 | @JsonKey(name: "meals") 7 | List filterAreaMealsItems; 8 | 9 | FilterAreaMeals({this.filterAreaMealsItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'FilterAreaMeals{filterAreaMealsItems: $filterAreaMealsItems}'; 14 | } 15 | 16 | factory FilterAreaMeals.fromJson(Map json) => _$FilterAreaMealsFromJson(json); 17 | 18 | Map toJson() => _$FilterAreaMealsToJson(this); 19 | 20 | } 21 | 22 | @JsonSerializable() 23 | class FilterAreaMealsItem { 24 | String strMeal; 25 | String strMealThumb; 26 | String idMeal; 27 | 28 | FilterAreaMealsItem({this.strMeal, this.strMealThumb, this.idMeal}); 29 | 30 | @override 31 | String toString() { 32 | return 'FilterAreaMealsItem{strMeal: $strMeal, strMealThumb: $strMealThumb, idMeal: $idMeal}'; 33 | } 34 | 35 | factory FilterAreaMealsItem.fromJson(Map json) => _$FilterAreaMealsItemFromJson(json); 36 | 37 | Map toJson() => _$FilterAreaMealsItemToJson(this); 38 | 39 | 40 | } -------------------------------------------------------------------------------- /lib/src/models/filterarea/filter_area_meals.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'filter_area_meals.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FilterAreaMeals _$FilterAreaMealsFromJson(Map json) { 10 | return FilterAreaMeals( 11 | filterAreaMealsItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : FilterAreaMealsItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$FilterAreaMealsToJson(FilterAreaMeals instance) => 19 | {'meals': instance.filterAreaMealsItems}; 20 | 21 | FilterAreaMealsItem _$FilterAreaMealsItemFromJson(Map json) { 22 | return FilterAreaMealsItem( 23 | strMeal: json['strMeal'] as String, 24 | strMealThumb: json['strMealThumb'] as String, 25 | idMeal: json['idMeal'] as String); 26 | } 27 | 28 | Map _$FilterAreaMealsItemToJson( 29 | FilterAreaMealsItem instance) => 30 | { 31 | 'strMeal': instance.strMeal, 32 | 'strMealThumb': instance.strMealThumb, 33 | 'idMeal': instance.idMeal 34 | }; 35 | -------------------------------------------------------------------------------- /lib/src/models/filtercategories/filter_categories.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'filter_categories.g.dart'; 3 | 4 | @JsonSerializable() 5 | class FilterCategories { 6 | @JsonKey(name: "meals") 7 | List filterCategoryItems; 8 | 9 | FilterCategories({this.filterCategoryItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'FilterCategories{filterCategoryItems: $filterCategoryItems}'; 14 | } 15 | 16 | factory FilterCategories.fromJson(Map json) => _$FilterCategoriesFromJson(json); 17 | 18 | Map toJson() => _$FilterCategoriesToJson(this); 19 | 20 | } 21 | 22 | @JsonSerializable() 23 | class FilterCategoryItem { 24 | String strMeal; 25 | String strMealThumb; 26 | String idMeal; 27 | @JsonKey(ignore: true) 28 | bool isFavorite; 29 | 30 | FilterCategoryItem({this.strMeal, this.strMealThumb, this.idMeal, this.isFavorite = false}); 31 | 32 | @override 33 | String toString() { 34 | return 'FilterCategoryItem{strMeal: $strMeal, strMealThumb: $strMealThumb, idMeal: $idMeal}'; 35 | } 36 | 37 | factory FilterCategoryItem.fromJson(Map json) => _$FilterCategoryItemFromJson(json); 38 | 39 | Map toJson() => _$FilterCategoryItemToJson(this); 40 | 41 | } -------------------------------------------------------------------------------- /lib/src/models/filtercategories/filter_categories.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'filter_categories.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FilterCategories _$FilterCategoriesFromJson(Map json) { 10 | return FilterCategories( 11 | filterCategoryItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : FilterCategoryItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$FilterCategoriesToJson(FilterCategories instance) => 19 | {'meals': instance.filterCategoryItems}; 20 | 21 | FilterCategoryItem _$FilterCategoryItemFromJson(Map json) { 22 | return FilterCategoryItem( 23 | strMeal: json['strMeal'] as String, 24 | strMealThumb: json['strMealThumb'] as String, 25 | idMeal: json['idMeal'] as String); 26 | } 27 | 28 | Map _$FilterCategoryItemToJson(FilterCategoryItem instance) => 29 | { 30 | 'strMeal': instance.strMeal, 31 | 'strMealThumb': instance.strMealThumb, 32 | 'idMeal': instance.idMeal 33 | }; 34 | -------------------------------------------------------------------------------- /lib/src/models/latest/latest_meals.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'latest_meals.g.dart'; 3 | 4 | @JsonSerializable() 5 | class LatestMeals { 6 | @JsonKey(name: "meals") 7 | List latestMealsItems; 8 | 9 | LatestMeals({this.latestMealsItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'LatestMeals{latestMealsItems: $latestMealsItems}'; 14 | } 15 | 16 | factory LatestMeals.fromJson(Map json) => 17 | _$LatestMealsFromJson(json); 18 | 19 | Map toJson() => _$LatestMealsToJson(this); 20 | } 21 | 22 | @JsonSerializable() 23 | class LatestMealsItem { 24 | String idMeal; 25 | String strMeal; 26 | String strDrinkAlternate; 27 | String strCategory; 28 | String strArea; 29 | String strInstructions; 30 | String strMealThumb; 31 | String strTags; 32 | String strYoutube; 33 | String strIngredient1; 34 | String strIngredient2; 35 | String strIngredient3; 36 | String strIngredient4; 37 | String strIngredient5; 38 | String strIngredient6; 39 | String strIngredient7; 40 | String strIngredient8; 41 | String strIngredient9; 42 | String strIngredient10; 43 | String strIngredient11; 44 | String strIngredient12; 45 | String strIngredient13; 46 | String strIngredient14; 47 | String strIngredient15; 48 | String strIngredient16; 49 | String strIngredient17; 50 | String strIngredient18; 51 | String strIngredient19; 52 | String strIngredient20; 53 | String strMeasure1; 54 | String strMeasure2; 55 | String strMeasure3; 56 | String strMeasure4; 57 | String strMeasure5; 58 | String strMeasure6; 59 | String strMeasure7; 60 | String strMeasure8; 61 | String strMeasure9; 62 | String strMeasure10; 63 | String strMeasure11; 64 | String strMeasure12; 65 | String strMeasure13; 66 | String strMeasure14; 67 | String strMeasure15; 68 | String strMeasure16; 69 | String strMeasure17; 70 | String strMeasure18; 71 | String strMeasure19; 72 | String strMeasure20; 73 | String strSource; 74 | String dateModified; 75 | 76 | LatestMealsItem( 77 | {this.idMeal, 78 | this.strMeal, 79 | this.strDrinkAlternate, 80 | this.strCategory, 81 | this.strArea, 82 | this.strInstructions, 83 | this.strMealThumb, 84 | this.strTags, 85 | this.strYoutube, 86 | this.strIngredient1, 87 | this.strIngredient2, 88 | this.strIngredient3, 89 | this.strIngredient4, 90 | this.strIngredient5, 91 | this.strIngredient6, 92 | this.strIngredient7, 93 | this.strIngredient8, 94 | this.strIngredient9, 95 | this.strIngredient10, 96 | this.strIngredient11, 97 | this.strIngredient12, 98 | this.strIngredient13, 99 | this.strIngredient14, 100 | this.strIngredient15, 101 | this.strIngredient16, 102 | this.strIngredient17, 103 | this.strIngredient18, 104 | this.strIngredient19, 105 | this.strIngredient20, 106 | this.strMeasure1, 107 | this.strMeasure2, 108 | this.strMeasure3, 109 | this.strMeasure4, 110 | this.strMeasure5, 111 | this.strMeasure6, 112 | this.strMeasure7, 113 | this.strMeasure8, 114 | this.strMeasure9, 115 | this.strMeasure10, 116 | this.strMeasure11, 117 | this.strMeasure12, 118 | this.strMeasure13, 119 | this.strMeasure14, 120 | this.strMeasure15, 121 | this.strMeasure16, 122 | this.strMeasure17, 123 | this.strMeasure18, 124 | this.strMeasure19, 125 | this.strMeasure20, 126 | this.strSource, 127 | this.dateModified}); 128 | 129 | 130 | @override 131 | String toString() { 132 | return 'LatestMealsItem{idMeal: $idMeal, strMeal: $strMeal, strDrinkAlternate: $strDrinkAlternate, strCategory: $strCategory, strArea: $strArea, strInstructions: $strInstructions, strMealThumb: $strMealThumb, strTags: $strTags, strYoutube: $strYoutube, strIngredient1: $strIngredient1, strIngredient2: $strIngredient2, strIngredient3: $strIngredient3, strIngredient4: $strIngredient4, strIngredient5: $strIngredient5, strIngredient6: $strIngredient6, strIngredient7: $strIngredient7, strIngredient8: $strIngredient8, strIngredient9: $strIngredient9, strIngredient10: $strIngredient10, strIngredient11: $strIngredient11, strIngredient12: $strIngredient12, strIngredient13: $strIngredient13, strIngredient14: $strIngredient14, strIngredient15: $strIngredient15, strIngredient16: $strIngredient16, strIngredient17: $strIngredient17, strIngredient18: $strIngredient18, strIngredient19: $strIngredient19, strIngredient20: $strIngredient20, strMeasure1: $strMeasure1, strMeasure2: $strMeasure2, strMeasure3: $strMeasure3, strMeasure4: $strMeasure4, strMeasure5: $strMeasure5, strMeasure6: $strMeasure6, strMeasure7: $strMeasure7, strMeasure8: $strMeasure8, strMeasure9: $strMeasure9, strMeasure10: $strMeasure10, strMeasure11: $strMeasure11, strMeasure12: $strMeasure12, strMeasure13: $strMeasure13, strMeasure14: $strMeasure14, strMeasure15: $strMeasure15, strMeasure16: $strMeasure16, strMeasure17: $strMeasure17, strMeasure18: $strMeasure18, strMeasure19: $strMeasure19, strMeasure20: $strMeasure20, strSource: $strSource, dateModified: $dateModified}'; 133 | } 134 | 135 | factory LatestMealsItem.fromJson(Map json) => _$LatestMealsItemFromJson(json); 136 | 137 | Map toJson() => _$LatestMealsItemToJson(this); 138 | 139 | } 140 | -------------------------------------------------------------------------------- /lib/src/models/latest/latest_meals.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'latest_meals.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | LatestMeals _$LatestMealsFromJson(Map json) { 10 | return LatestMeals( 11 | latestMealsItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : LatestMealsItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$LatestMealsToJson(LatestMeals instance) => 19 | {'meals': instance.latestMealsItems}; 20 | 21 | LatestMealsItem _$LatestMealsItemFromJson(Map json) { 22 | return LatestMealsItem( 23 | idMeal: json['idMeal'] as String, 24 | strMeal: json['strMeal'] as String, 25 | strDrinkAlternate: json['strDrinkAlternate'] as String, 26 | strCategory: json['strCategory'] as String, 27 | strArea: json['strArea'] as String, 28 | strInstructions: json['strInstructions'] as String, 29 | strMealThumb: json['strMealThumb'] as String, 30 | strTags: json['strTags'] as String, 31 | strYoutube: json['strYoutube'] as String, 32 | strIngredient1: json['strIngredient1'] as String, 33 | strIngredient2: json['strIngredient2'] as String, 34 | strIngredient3: json['strIngredient3'] as String, 35 | strIngredient4: json['strIngredient4'] as String, 36 | strIngredient5: json['strIngredient5'] as String, 37 | strIngredient6: json['strIngredient6'] as String, 38 | strIngredient7: json['strIngredient7'] as String, 39 | strIngredient8: json['strIngredient8'] as String, 40 | strIngredient9: json['strIngredient9'] as String, 41 | strIngredient10: json['strIngredient10'] as String, 42 | strIngredient11: json['strIngredient11'] as String, 43 | strIngredient12: json['strIngredient12'] as String, 44 | strIngredient13: json['strIngredient13'] as String, 45 | strIngredient14: json['strIngredient14'] as String, 46 | strIngredient15: json['strIngredient15'] as String, 47 | strIngredient16: json['strIngredient16'] as String, 48 | strIngredient17: json['strIngredient17'] as String, 49 | strIngredient18: json['strIngredient18'] as String, 50 | strIngredient19: json['strIngredient19'] as String, 51 | strIngredient20: json['strIngredient20'] as String, 52 | strMeasure1: json['strMeasure1'] as String, 53 | strMeasure2: json['strMeasure2'] as String, 54 | strMeasure3: json['strMeasure3'] as String, 55 | strMeasure4: json['strMeasure4'] as String, 56 | strMeasure5: json['strMeasure5'] as String, 57 | strMeasure6: json['strMeasure6'] as String, 58 | strMeasure7: json['strMeasure7'] as String, 59 | strMeasure8: json['strMeasure8'] as String, 60 | strMeasure9: json['strMeasure9'] as String, 61 | strMeasure10: json['strMeasure10'] as String, 62 | strMeasure11: json['strMeasure11'] as String, 63 | strMeasure12: json['strMeasure12'] as String, 64 | strMeasure13: json['strMeasure13'] as String, 65 | strMeasure14: json['strMeasure14'] as String, 66 | strMeasure15: json['strMeasure15'] as String, 67 | strMeasure16: json['strMeasure16'] as String, 68 | strMeasure17: json['strMeasure17'] as String, 69 | strMeasure18: json['strMeasure18'] as String, 70 | strMeasure19: json['strMeasure19'] as String, 71 | strMeasure20: json['strMeasure20'] as String, 72 | strSource: json['strSource'] as String, 73 | dateModified: json['dateModified'] as String); 74 | } 75 | 76 | Map _$LatestMealsItemToJson(LatestMealsItem instance) => 77 | { 78 | 'idMeal': instance.idMeal, 79 | 'strMeal': instance.strMeal, 80 | 'strDrinkAlternate': instance.strDrinkAlternate, 81 | 'strCategory': instance.strCategory, 82 | 'strArea': instance.strArea, 83 | 'strInstructions': instance.strInstructions, 84 | 'strMealThumb': instance.strMealThumb, 85 | 'strTags': instance.strTags, 86 | 'strYoutube': instance.strYoutube, 87 | 'strIngredient1': instance.strIngredient1, 88 | 'strIngredient2': instance.strIngredient2, 89 | 'strIngredient3': instance.strIngredient3, 90 | 'strIngredient4': instance.strIngredient4, 91 | 'strIngredient5': instance.strIngredient5, 92 | 'strIngredient6': instance.strIngredient6, 93 | 'strIngredient7': instance.strIngredient7, 94 | 'strIngredient8': instance.strIngredient8, 95 | 'strIngredient9': instance.strIngredient9, 96 | 'strIngredient10': instance.strIngredient10, 97 | 'strIngredient11': instance.strIngredient11, 98 | 'strIngredient12': instance.strIngredient12, 99 | 'strIngredient13': instance.strIngredient13, 100 | 'strIngredient14': instance.strIngredient14, 101 | 'strIngredient15': instance.strIngredient15, 102 | 'strIngredient16': instance.strIngredient16, 103 | 'strIngredient17': instance.strIngredient17, 104 | 'strIngredient18': instance.strIngredient18, 105 | 'strIngredient19': instance.strIngredient19, 106 | 'strIngredient20': instance.strIngredient20, 107 | 'strMeasure1': instance.strMeasure1, 108 | 'strMeasure2': instance.strMeasure2, 109 | 'strMeasure3': instance.strMeasure3, 110 | 'strMeasure4': instance.strMeasure4, 111 | 'strMeasure5': instance.strMeasure5, 112 | 'strMeasure6': instance.strMeasure6, 113 | 'strMeasure7': instance.strMeasure7, 114 | 'strMeasure8': instance.strMeasure8, 115 | 'strMeasure9': instance.strMeasure9, 116 | 'strMeasure10': instance.strMeasure10, 117 | 'strMeasure11': instance.strMeasure11, 118 | 'strMeasure12': instance.strMeasure12, 119 | 'strMeasure13': instance.strMeasure13, 120 | 'strMeasure14': instance.strMeasure14, 121 | 'strMeasure15': instance.strMeasure15, 122 | 'strMeasure16': instance.strMeasure16, 123 | 'strMeasure17': instance.strMeasure17, 124 | 'strMeasure18': instance.strMeasure18, 125 | 'strMeasure19': instance.strMeasure19, 126 | 'strMeasure20': instance.strMeasure20, 127 | 'strSource': instance.strSource, 128 | 'dateModified': instance.dateModified 129 | }; 130 | -------------------------------------------------------------------------------- /lib/src/models/lookupmealsbyid/lookup_meals_by_id.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'lookup_meals_by_id.g.dart'; 3 | 4 | @JsonSerializable() 5 | class LookupMealsById { 6 | @JsonKey(name: "meals") 7 | List lookupMealsbyIdItems; 8 | 9 | LookupMealsById({this.lookupMealsbyIdItems}); 10 | 11 | @override 12 | String toString() { 13 | return 'LookupMealsById{lookupMealsbyIdItems: $lookupMealsbyIdItems}'; 14 | } 15 | 16 | factory LookupMealsById.fromJson(Map json) => 17 | _$LookupMealsByIdFromJson(json); 18 | 19 | Map toJson() => _$LookupMealsByIdToJson(this); 20 | } 21 | 22 | @JsonSerializable() 23 | class LookupMealsByIdItem { 24 | String idMeal; 25 | String strMeal; 26 | String strDrinkAlternate; 27 | String strCategory; 28 | String strArea; 29 | String strInstructions; 30 | String strMealThumb; 31 | String strTags; 32 | String strYoutube; 33 | String strIngredient1; 34 | String strIngredient2; 35 | String strIngredient3; 36 | String strIngredient4; 37 | String strIngredient5; 38 | String strIngredient6; 39 | String strIngredient7; 40 | String strIngredient8; 41 | String strIngredient9; 42 | String strIngredient10; 43 | String strIngredient11; 44 | String strIngredient12; 45 | String strIngredient13; 46 | String strIngredient14; 47 | String strIngredient15; 48 | String strIngredient16; 49 | String strIngredient17; 50 | String strIngredient18; 51 | String strIngredient19; 52 | String strIngredient20; 53 | String strMeasure1; 54 | String strMeasure2; 55 | String strMeasure3; 56 | String strMeasure4; 57 | String strMeasure5; 58 | String strMeasure6; 59 | String strMeasure7; 60 | String strMeasure8; 61 | String strMeasure9; 62 | String strMeasure10; 63 | String strMeasure11; 64 | String strMeasure12; 65 | String strMeasure13; 66 | String strMeasure14; 67 | String strMeasure15; 68 | String strMeasure16; 69 | String strMeasure17; 70 | String strMeasure18; 71 | String strMeasure19; 72 | String strMeasure20; 73 | String strSource; 74 | String dateModified; 75 | 76 | LookupMealsByIdItem( 77 | {this.idMeal, 78 | this.strMeal, 79 | this.strDrinkAlternate, 80 | this.strCategory, 81 | this.strArea, 82 | this.strInstructions, 83 | this.strMealThumb, 84 | this.strTags, 85 | this.strYoutube, 86 | this.strIngredient1, 87 | this.strIngredient2, 88 | this.strIngredient3, 89 | this.strIngredient4, 90 | this.strIngredient5, 91 | this.strIngredient6, 92 | this.strIngredient7, 93 | this.strIngredient8, 94 | this.strIngredient9, 95 | this.strIngredient10, 96 | this.strIngredient11, 97 | this.strIngredient12, 98 | this.strIngredient13, 99 | this.strIngredient14, 100 | this.strIngredient15, 101 | this.strIngredient16, 102 | this.strIngredient17, 103 | this.strIngredient18, 104 | this.strIngredient19, 105 | this.strIngredient20, 106 | this.strMeasure1, 107 | this.strMeasure2, 108 | this.strMeasure3, 109 | this.strMeasure4, 110 | this.strMeasure5, 111 | this.strMeasure6, 112 | this.strMeasure7, 113 | this.strMeasure8, 114 | this.strMeasure9, 115 | this.strMeasure10, 116 | this.strMeasure11, 117 | this.strMeasure12, 118 | this.strMeasure13, 119 | this.strMeasure14, 120 | this.strMeasure15, 121 | this.strMeasure16, 122 | this.strMeasure17, 123 | this.strMeasure18, 124 | this.strMeasure19, 125 | this.strMeasure20, 126 | this.strSource, 127 | this.dateModified}); 128 | 129 | @override 130 | String toString() { 131 | return 'LookupMealsByIdItem{idMeal: $idMeal, strMeal: $strMeal, strDrinkAlternate: $strDrinkAlternate, strCategory: $strCategory, strArea: $strArea, strInstructions: $strInstructions, strMealThumb: $strMealThumb, strTags: $strTags, strYoutube: $strYoutube, strIngredient1: $strIngredient1, strIngredient2: $strIngredient2, strIngredient3: $strIngredient3, strIngredient4: $strIngredient4, strIngredient5: $strIngredient5, strIngredient6: $strIngredient6, strIngredient7: $strIngredient7, strIngredient8: $strIngredient8, strIngredient9: $strIngredient9, strIngredient10: $strIngredient10, strIngredient11: $strIngredient11, strIngredient12: $strIngredient12, strIngredient13: $strIngredient13, strIngredient14: $strIngredient14, strIngredient15: $strIngredient15, strIngredient16: $strIngredient16, strIngredient17: $strIngredient17, strIngredient18: $strIngredient18, strIngredient19: $strIngredient19, strIngredient20: $strIngredient20, strMeasure1: $strMeasure1, strMeasure2: $strMeasure2, strMeasure3: $strMeasure3, strMeasure4: $strMeasure4, strMeasure5: $strMeasure5, strMeasure6: $strMeasure6, strMeasure7: $strMeasure7, strMeasure8: $strMeasure8, strMeasure9: $strMeasure9, strMeasure10: $strMeasure10, strMeasure11: $strMeasure11, strMeasure12: $strMeasure12, strMeasure13: $strMeasure13, strMeasure14: $strMeasure14, strMeasure15: $strMeasure15, strMeasure16: $strMeasure16, strMeasure17: $strMeasure17, strMeasure18: $strMeasure18, strMeasure19: $strMeasure19, strMeasure20: $strMeasure20, strSource: $strSource, dateModified: $dateModified}'; 132 | } 133 | 134 | factory LookupMealsByIdItem.fromJson(Map json) => _$LookupMealsByIdItemFromJson(json); 135 | 136 | Map toJson() => _$LookupMealsByIdItemToJson(this); 137 | 138 | } 139 | -------------------------------------------------------------------------------- /lib/src/models/lookupmealsbyid/lookup_meals_by_id.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'lookup_meals_by_id.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | LookupMealsById _$LookupMealsByIdFromJson(Map json) { 10 | return LookupMealsById( 11 | lookupMealsbyIdItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : LookupMealsByIdItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$LookupMealsByIdToJson(LookupMealsById instance) => 19 | {'meals': instance.lookupMealsbyIdItems}; 20 | 21 | LookupMealsByIdItem _$LookupMealsByIdItemFromJson(Map json) { 22 | return LookupMealsByIdItem( 23 | idMeal: json['idMeal'] as String, 24 | strMeal: json['strMeal'] as String, 25 | strDrinkAlternate: json['strDrinkAlternate'] as String, 26 | strCategory: json['strCategory'] as String, 27 | strArea: json['strArea'] as String, 28 | strInstructions: json['strInstructions'] as String, 29 | strMealThumb: json['strMealThumb'] as String, 30 | strTags: json['strTags'] as String, 31 | strYoutube: json['strYoutube'] as String, 32 | strIngredient1: json['strIngredient1'] as String, 33 | strIngredient2: json['strIngredient2'] as String, 34 | strIngredient3: json['strIngredient3'] as String, 35 | strIngredient4: json['strIngredient4'] as String, 36 | strIngredient5: json['strIngredient5'] as String, 37 | strIngredient6: json['strIngredient6'] as String, 38 | strIngredient7: json['strIngredient7'] as String, 39 | strIngredient8: json['strIngredient8'] as String, 40 | strIngredient9: json['strIngredient9'] as String, 41 | strIngredient10: json['strIngredient10'] as String, 42 | strIngredient11: json['strIngredient11'] as String, 43 | strIngredient12: json['strIngredient12'] as String, 44 | strIngredient13: json['strIngredient13'] as String, 45 | strIngredient14: json['strIngredient14'] as String, 46 | strIngredient15: json['strIngredient15'] as String, 47 | strIngredient16: json['strIngredient16'] as String, 48 | strIngredient17: json['strIngredient17'] as String, 49 | strIngredient18: json['strIngredient18'] as String, 50 | strIngredient19: json['strIngredient19'] as String, 51 | strIngredient20: json['strIngredient20'] as String, 52 | strMeasure1: json['strMeasure1'] as String, 53 | strMeasure2: json['strMeasure2'] as String, 54 | strMeasure3: json['strMeasure3'] as String, 55 | strMeasure4: json['strMeasure4'] as String, 56 | strMeasure5: json['strMeasure5'] as String, 57 | strMeasure6: json['strMeasure6'] as String, 58 | strMeasure7: json['strMeasure7'] as String, 59 | strMeasure8: json['strMeasure8'] as String, 60 | strMeasure9: json['strMeasure9'] as String, 61 | strMeasure10: json['strMeasure10'] as String, 62 | strMeasure11: json['strMeasure11'] as String, 63 | strMeasure12: json['strMeasure12'] as String, 64 | strMeasure13: json['strMeasure13'] as String, 65 | strMeasure14: json['strMeasure14'] as String, 66 | strMeasure15: json['strMeasure15'] as String, 67 | strMeasure16: json['strMeasure16'] as String, 68 | strMeasure17: json['strMeasure17'] as String, 69 | strMeasure18: json['strMeasure18'] as String, 70 | strMeasure19: json['strMeasure19'] as String, 71 | strMeasure20: json['strMeasure20'] as String, 72 | strSource: json['strSource'] as String, 73 | dateModified: json['dateModified'] as String); 74 | } 75 | 76 | Map _$LookupMealsByIdItemToJson( 77 | LookupMealsByIdItem instance) => 78 | { 79 | 'idMeal': instance.idMeal, 80 | 'strMeal': instance.strMeal, 81 | 'strDrinkAlternate': instance.strDrinkAlternate, 82 | 'strCategory': instance.strCategory, 83 | 'strArea': instance.strArea, 84 | 'strInstructions': instance.strInstructions, 85 | 'strMealThumb': instance.strMealThumb, 86 | 'strTags': instance.strTags, 87 | 'strYoutube': instance.strYoutube, 88 | 'strIngredient1': instance.strIngredient1, 89 | 'strIngredient2': instance.strIngredient2, 90 | 'strIngredient3': instance.strIngredient3, 91 | 'strIngredient4': instance.strIngredient4, 92 | 'strIngredient5': instance.strIngredient5, 93 | 'strIngredient6': instance.strIngredient6, 94 | 'strIngredient7': instance.strIngredient7, 95 | 'strIngredient8': instance.strIngredient8, 96 | 'strIngredient9': instance.strIngredient9, 97 | 'strIngredient10': instance.strIngredient10, 98 | 'strIngredient11': instance.strIngredient11, 99 | 'strIngredient12': instance.strIngredient12, 100 | 'strIngredient13': instance.strIngredient13, 101 | 'strIngredient14': instance.strIngredient14, 102 | 'strIngredient15': instance.strIngredient15, 103 | 'strIngredient16': instance.strIngredient16, 104 | 'strIngredient17': instance.strIngredient17, 105 | 'strIngredient18': instance.strIngredient18, 106 | 'strIngredient19': instance.strIngredient19, 107 | 'strIngredient20': instance.strIngredient20, 108 | 'strMeasure1': instance.strMeasure1, 109 | 'strMeasure2': instance.strMeasure2, 110 | 'strMeasure3': instance.strMeasure3, 111 | 'strMeasure4': instance.strMeasure4, 112 | 'strMeasure5': instance.strMeasure5, 113 | 'strMeasure6': instance.strMeasure6, 114 | 'strMeasure7': instance.strMeasure7, 115 | 'strMeasure8': instance.strMeasure8, 116 | 'strMeasure9': instance.strMeasure9, 117 | 'strMeasure10': instance.strMeasure10, 118 | 'strMeasure11': instance.strMeasure11, 119 | 'strMeasure12': instance.strMeasure12, 120 | 'strMeasure13': instance.strMeasure13, 121 | 'strMeasure14': instance.strMeasure14, 122 | 'strMeasure15': instance.strMeasure15, 123 | 'strMeasure16': instance.strMeasure16, 124 | 'strMeasure17': instance.strMeasure17, 125 | 'strMeasure18': instance.strMeasure18, 126 | 'strMeasure19': instance.strMeasure19, 127 | 'strMeasure20': instance.strMeasure20, 128 | 'strSource': instance.strSource, 129 | 'dateModified': instance.dateModified 130 | }; 131 | -------------------------------------------------------------------------------- /lib/src/models/randommeals/random_meals.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'package:food_recipe/src/models/randommeals/random_meals.g.dart'; 3 | 4 | @JsonSerializable() 5 | class RandomMeals { 6 | @JsonKey(name: "meals") 7 | List randomMealsItem; 8 | 9 | RandomMeals({this.randomMealsItem}); 10 | 11 | @override 12 | String toString() { 13 | return 'RandomMeals{randomMealsItem: $randomMealsItem}'; 14 | } 15 | 16 | factory RandomMeals.fromJson(Map json) => 17 | _$RandomMealsFromJson(json); 18 | 19 | Map toJson() => _$RandomMealsToJson(this); 20 | } 21 | 22 | @JsonSerializable() 23 | class RandomMealsItem { 24 | String idMeal; 25 | String strMeal; 26 | String strDrinkAlternate; 27 | String strCategory; 28 | String strArea; 29 | String strInstructions; 30 | String strMealThumb; 31 | String strTags; 32 | String strYoutube; 33 | String strIngredient1; 34 | String strIngredient2; 35 | String strIngredient3; 36 | String strIngredient4; 37 | String strIngredient5; 38 | String strIngredient6; 39 | String strIngredient7; 40 | String strIngredient8; 41 | String strIngredient9; 42 | String strIngredient10; 43 | String strIngredient11; 44 | String strIngredient12; 45 | String strIngredient13; 46 | String strIngredient14; 47 | String strIngredient15; 48 | String strIngredient16; 49 | String strIngredient17; 50 | String strIngredient18; 51 | String strIngredient19; 52 | String strIngredient20; 53 | String strMeasure1; 54 | String strMeasure2; 55 | String strMeasure3; 56 | String strMeasure4; 57 | String strMeasure5; 58 | String strMeasure6; 59 | String strMeasure7; 60 | String strMeasure8; 61 | String strMeasure9; 62 | String strMeasure10; 63 | String strMeasure11; 64 | String strMeasure12; 65 | String strMeasure13; 66 | String strMeasure14; 67 | String strMeasure15; 68 | String strMeasure16; 69 | String strMeasure17; 70 | String strMeasure18; 71 | String strMeasure19; 72 | String strMeasure20; 73 | String strSource; 74 | String dateModified; 75 | 76 | RandomMealsItem( 77 | {this.idMeal, 78 | this.strMeal, 79 | this.strDrinkAlternate, 80 | this.strCategory, 81 | this.strArea, 82 | this.strInstructions, 83 | this.strMealThumb, 84 | this.strTags, 85 | this.strYoutube, 86 | this.strIngredient1, 87 | this.strIngredient2, 88 | this.strIngredient3, 89 | this.strIngredient4, 90 | this.strIngredient5, 91 | this.strIngredient6, 92 | this.strIngredient7, 93 | this.strIngredient8, 94 | this.strIngredient9, 95 | this.strIngredient10, 96 | this.strIngredient11, 97 | this.strIngredient12, 98 | this.strIngredient13, 99 | this.strIngredient14, 100 | this.strIngredient15, 101 | this.strIngredient16, 102 | this.strIngredient17, 103 | this.strIngredient18, 104 | this.strIngredient19, 105 | this.strIngredient20, 106 | this.strMeasure1, 107 | this.strMeasure2, 108 | this.strMeasure3, 109 | this.strMeasure4, 110 | this.strMeasure5, 111 | this.strMeasure6, 112 | this.strMeasure7, 113 | this.strMeasure8, 114 | this.strMeasure9, 115 | this.strMeasure10, 116 | this.strMeasure11, 117 | this.strMeasure12, 118 | this.strMeasure13, 119 | this.strMeasure14, 120 | this.strMeasure15, 121 | this.strMeasure16, 122 | this.strMeasure17, 123 | this.strMeasure18, 124 | this.strMeasure19, 125 | this.strMeasure20, 126 | this.strSource, 127 | this.dateModified}); 128 | 129 | @override 130 | String toString() { 131 | return 'RandomMealsItem{idMeal: $idMeal, strMeal: $strMeal, strDrinkAlternate: $strDrinkAlternate, strCategory: $strCategory, strArea: $strArea, strInstructions: $strInstructions, strMealThumb: $strMealThumb, strTags: $strTags, strYoutube: $strYoutube, strIngredient1: $strIngredient1, strIngredient2: $strIngredient2, strIngredient3: $strIngredient3, strIngredient4: $strIngredient4, strIngredient5: $strIngredient5, strIngredient6: $strIngredient6, strIngredient7: $strIngredient7, strIngredient8: $strIngredient8, strIngredient9: $strIngredient9, strIngredient10: $strIngredient10, strIngredient11: $strIngredient11, strIngredient12: $strIngredient12, strIngredient13: $strIngredient13, strIngredient14: $strIngredient14, strIngredient15: $strIngredient15, strIngredient16: $strIngredient16, strIngredient17: $strIngredient17, strIngredient18: $strIngredient18, strIngredient19: $strIngredient19, strIngredient20: $strIngredient20, strMeasure1: $strMeasure1, strMeasure2: $strMeasure2, strMeasure3: $strMeasure3, strMeasure4: $strMeasure4, strMeasure5: $strMeasure5, strMeasure6: $strMeasure6, strMeasure7: $strMeasure7, strMeasure8: $strMeasure8, strMeasure9: $strMeasure9, strMeasure10: $strMeasure10, strMeasure11: $strMeasure11, strMeasure12: $strMeasure12, strMeasure13: $strMeasure13, strMeasure14: $strMeasure14, strMeasure15: $strMeasure15, strMeasure16: $strMeasure16, strMeasure17: $strMeasure17, strMeasure18: $strMeasure18, strMeasure19: $strMeasure19, strMeasure20: $strMeasure20, strSource: $strSource, dateModified: $dateModified}'; 132 | } 133 | 134 | factory RandomMealsItem.fromJson(Map json) => 135 | _$RandomMealsItemFromJson(json); 136 | 137 | Map toJson() => _$RandomMealsItemToJson(this); 138 | } 139 | -------------------------------------------------------------------------------- /lib/src/models/randommeals/random_meals.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'random_meals.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RandomMeals _$RandomMealsFromJson(Map json) { 10 | return RandomMeals( 11 | randomMealsItem: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : RandomMealsItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$RandomMealsToJson(RandomMeals instance) => 19 | {'meals': instance.randomMealsItem}; 20 | 21 | RandomMealsItem _$RandomMealsItemFromJson(Map json) { 22 | return RandomMealsItem( 23 | idMeal: json['idMeal'] as String, 24 | strMeal: json['strMeal'] as String, 25 | strDrinkAlternate: json['strDrinkAlternate'] as String, 26 | strCategory: json['strCategory'] as String, 27 | strArea: json['strArea'] as String, 28 | strInstructions: json['strInstructions'] as String, 29 | strMealThumb: json['strMealThumb'] as String, 30 | strTags: json['strTags'] as String, 31 | strYoutube: json['strYoutube'] as String, 32 | strIngredient1: json['strIngredient1'] as String, 33 | strIngredient2: json['strIngredient2'] as String, 34 | strIngredient3: json['strIngredient3'] as String, 35 | strIngredient4: json['strIngredient4'] as String, 36 | strIngredient5: json['strIngredient5'] as String, 37 | strIngredient6: json['strIngredient6'] as String, 38 | strIngredient7: json['strIngredient7'] as String, 39 | strIngredient8: json['strIngredient8'] as String, 40 | strIngredient9: json['strIngredient9'] as String, 41 | strIngredient10: json['strIngredient10'] as String, 42 | strIngredient11: json['strIngredient11'] as String, 43 | strIngredient12: json['strIngredient12'] as String, 44 | strIngredient13: json['strIngredient13'] as String, 45 | strIngredient14: json['strIngredient14'] as String, 46 | strIngredient15: json['strIngredient15'] as String, 47 | strIngredient16: json['strIngredient16'] as String, 48 | strIngredient17: json['strIngredient17'] as String, 49 | strIngredient18: json['strIngredient18'] as String, 50 | strIngredient19: json['strIngredient19'] as String, 51 | strIngredient20: json['strIngredient20'] as String, 52 | strMeasure1: json['strMeasure1'] as String, 53 | strMeasure2: json['strMeasure2'] as String, 54 | strMeasure3: json['strMeasure3'] as String, 55 | strMeasure4: json['strMeasure4'] as String, 56 | strMeasure5: json['strMeasure5'] as String, 57 | strMeasure6: json['strMeasure6'] as String, 58 | strMeasure7: json['strMeasure7'] as String, 59 | strMeasure8: json['strMeasure8'] as String, 60 | strMeasure9: json['strMeasure9'] as String, 61 | strMeasure10: json['strMeasure10'] as String, 62 | strMeasure11: json['strMeasure11'] as String, 63 | strMeasure12: json['strMeasure12'] as String, 64 | strMeasure13: json['strMeasure13'] as String, 65 | strMeasure14: json['strMeasure14'] as String, 66 | strMeasure15: json['strMeasure15'] as String, 67 | strMeasure16: json['strMeasure16'] as String, 68 | strMeasure17: json['strMeasure17'] as String, 69 | strMeasure18: json['strMeasure18'] as String, 70 | strMeasure19: json['strMeasure19'] as String, 71 | strMeasure20: json['strMeasure20'] as String, 72 | strSource: json['strSource'] as String, 73 | dateModified: json['dateModified'] as String); 74 | } 75 | 76 | Map _$RandomMealsItemToJson(RandomMealsItem instance) => 77 | { 78 | 'idMeal': instance.idMeal, 79 | 'strMeal': instance.strMeal, 80 | 'strDrinkAlternate': instance.strDrinkAlternate, 81 | 'strCategory': instance.strCategory, 82 | 'strArea': instance.strArea, 83 | 'strInstructions': instance.strInstructions, 84 | 'strMealThumb': instance.strMealThumb, 85 | 'strTags': instance.strTags, 86 | 'strYoutube': instance.strYoutube, 87 | 'strIngredient1': instance.strIngredient1, 88 | 'strIngredient2': instance.strIngredient2, 89 | 'strIngredient3': instance.strIngredient3, 90 | 'strIngredient4': instance.strIngredient4, 91 | 'strIngredient5': instance.strIngredient5, 92 | 'strIngredient6': instance.strIngredient6, 93 | 'strIngredient7': instance.strIngredient7, 94 | 'strIngredient8': instance.strIngredient8, 95 | 'strIngredient9': instance.strIngredient9, 96 | 'strIngredient10': instance.strIngredient10, 97 | 'strIngredient11': instance.strIngredient11, 98 | 'strIngredient12': instance.strIngredient12, 99 | 'strIngredient13': instance.strIngredient13, 100 | 'strIngredient14': instance.strIngredient14, 101 | 'strIngredient15': instance.strIngredient15, 102 | 'strIngredient16': instance.strIngredient16, 103 | 'strIngredient17': instance.strIngredient17, 104 | 'strIngredient18': instance.strIngredient18, 105 | 'strIngredient19': instance.strIngredient19, 106 | 'strIngredient20': instance.strIngredient20, 107 | 'strMeasure1': instance.strMeasure1, 108 | 'strMeasure2': instance.strMeasure2, 109 | 'strMeasure3': instance.strMeasure3, 110 | 'strMeasure4': instance.strMeasure4, 111 | 'strMeasure5': instance.strMeasure5, 112 | 'strMeasure6': instance.strMeasure6, 113 | 'strMeasure7': instance.strMeasure7, 114 | 'strMeasure8': instance.strMeasure8, 115 | 'strMeasure9': instance.strMeasure9, 116 | 'strMeasure10': instance.strMeasure10, 117 | 'strMeasure11': instance.strMeasure11, 118 | 'strMeasure12': instance.strMeasure12, 119 | 'strMeasure13': instance.strMeasure13, 120 | 'strMeasure14': instance.strMeasure14, 121 | 'strMeasure15': instance.strMeasure15, 122 | 'strMeasure16': instance.strMeasure16, 123 | 'strMeasure17': instance.strMeasure17, 124 | 'strMeasure18': instance.strMeasure18, 125 | 'strMeasure19': instance.strMeasure19, 126 | 'strMeasure20': instance.strMeasure20, 127 | 'strSource': instance.strSource, 128 | 'dateModified': instance.dateModified 129 | }; 130 | -------------------------------------------------------------------------------- /lib/src/models/searchmeals/search_meals.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'search_meals.g.dart'; 3 | 4 | @JsonSerializable() 5 | class SearchMeals { 6 | @JsonKey(name: "meals") 7 | List searchMealsItems; 8 | @JsonKey(ignore: true) 9 | bool isLoading; 10 | 11 | SearchMeals({this.searchMealsItems, this.isLoading = false}); 12 | 13 | @override 14 | String toString() { 15 | return 'SearchMeals{searchMealsItems: $searchMealsItems}'; 16 | } 17 | 18 | factory SearchMeals.fromJson(Map json) => _$SearchMealsFromJson(json); 19 | 20 | Map toJson() => _$SearchMealsToJson(this); 21 | 22 | } 23 | 24 | @JsonSerializable() 25 | class SearchMealsItem { 26 | String idMeal; 27 | String strMeal; 28 | String strDrinkAlternate; 29 | String strCategory; 30 | String strArea; 31 | String strInstructions; 32 | String strMealThumb; 33 | String strTags; 34 | String strYoutube; 35 | String strIngredient1; 36 | String strIngredient2; 37 | String strIngredient3; 38 | String strIngredient4; 39 | String strIngredient5; 40 | String strIngredient6; 41 | String strIngredient7; 42 | String strIngredient8; 43 | String strIngredient9; 44 | String strIngredient10; 45 | String strIngredient11; 46 | String strIngredient12; 47 | String strIngredient13; 48 | String strIngredient14; 49 | String strIngredient15; 50 | String strIngredient16; 51 | String strIngredient17; 52 | String strIngredient18; 53 | String strIngredient19; 54 | String strIngredient20; 55 | String strMeasure1; 56 | String strMeasure2; 57 | String strMeasure3; 58 | String strMeasure4; 59 | String strMeasure5; 60 | String strMeasure6; 61 | String strMeasure7; 62 | String strMeasure8; 63 | String strMeasure9; 64 | String strMeasure10; 65 | String strMeasure11; 66 | String strMeasure12; 67 | String strMeasure13; 68 | String strMeasure14; 69 | String strMeasure15; 70 | String strMeasure16; 71 | String strMeasure17; 72 | String strMeasure18; 73 | String strMeasure19; 74 | String strMeasure20; 75 | String strSource; 76 | String dateModified; 77 | @JsonKey(ignore: true) 78 | bool isFavorite; 79 | 80 | SearchMealsItem({this.idMeal, this.strMeal, this.strDrinkAlternate, 81 | this.strCategory, this.strArea, this.strInstructions, this.strMealThumb, 82 | this.strTags, this.strYoutube, this.strIngredient1, this.strIngredient2, 83 | this.strIngredient3, this.strIngredient4, this.strIngredient5, 84 | this.strIngredient6, this.strIngredient7, this.strIngredient8, 85 | this.strIngredient9, this.strIngredient10, this.strIngredient11, 86 | this.strIngredient12, this.strIngredient13, this.strIngredient14, 87 | this.strIngredient15, this.strIngredient16, this.strIngredient17, 88 | this.strIngredient18, this.strIngredient19, this.strIngredient20, 89 | this.strMeasure1, this.strMeasure2, this.strMeasure3, this.strMeasure4, 90 | this.strMeasure5, this.strMeasure6, this.strMeasure7, this.strMeasure8, 91 | this.strMeasure9, this.strMeasure10, this.strMeasure11, this.strMeasure12, 92 | this.strMeasure13, this.strMeasure14, this.strMeasure15, 93 | this.strMeasure16, this.strMeasure17, this.strMeasure18, 94 | this.strMeasure19, this.strMeasure20, this.strSource, this.dateModified, this.isFavorite = false}); 95 | 96 | @override 97 | String toString() { 98 | return 'SearchMealsItem{idMeal: $idMeal, strMeal: $strMeal, strDrinkAlternate: $strDrinkAlternate, strCategory: $strCategory, strArea: $strArea, strInstructions: $strInstructions, strMealThumb: $strMealThumb, strTags: $strTags, strYoutube: $strYoutube, strIngredient1: $strIngredient1, strIngredient2: $strIngredient2, strIngredient3: $strIngredient3, strIngredient4: $strIngredient4, strIngredient5: $strIngredient5, strIngredient6: $strIngredient6, strIngredient7: $strIngredient7, strIngredient8: $strIngredient8, strIngredient9: $strIngredient9, strIngredient10: $strIngredient10, strIngredient11: $strIngredient11, strIngredient12: $strIngredient12, strIngredient13: $strIngredient13, strIngredient14: $strIngredient14, strIngredient15: $strIngredient15, strIngredient16: $strIngredient16, strIngredient17: $strIngredient17, strIngredient18: $strIngredient18, strIngredient19: $strIngredient19, strIngredient20: $strIngredient20, strMeasure1: $strMeasure1, strMeasure2: $strMeasure2, strMeasure3: $strMeasure3, strMeasure4: $strMeasure4, strMeasure5: $strMeasure5, strMeasure6: $strMeasure6, strMeasure7: $strMeasure7, strMeasure8: $strMeasure8, strMeasure9: $strMeasure9, strMeasure10: $strMeasure10, strMeasure11: $strMeasure11, strMeasure12: $strMeasure12, strMeasure13: $strMeasure13, strMeasure14: $strMeasure14, strMeasure15: $strMeasure15, strMeasure16: $strMeasure16, strMeasure17: $strMeasure17, strMeasure18: $strMeasure18, strMeasure19: $strMeasure19, strMeasure20: $strMeasure20, strSource: $strSource, dateModified: $dateModified}'; 99 | } 100 | 101 | factory SearchMealsItem.fromJson(Map json) => _$SearchMealsItemFromJson(json); 102 | 103 | Map toJson() => _$SearchMealsItemToJson(this); 104 | 105 | 106 | } -------------------------------------------------------------------------------- /lib/src/models/searchmeals/search_meals.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_meals.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchMeals _$SearchMealsFromJson(Map json) { 10 | return SearchMeals( 11 | searchMealsItems: (json['meals'] as List) 12 | ?.map((e) => e == null 13 | ? null 14 | : SearchMealsItem.fromJson(e as Map)) 15 | ?.toList()); 16 | } 17 | 18 | Map _$SearchMealsToJson(SearchMeals instance) => 19 | {'meals': instance.searchMealsItems}; 20 | 21 | SearchMealsItem _$SearchMealsItemFromJson(Map json) { 22 | return SearchMealsItem( 23 | idMeal: json['idMeal'] as String, 24 | strMeal: json['strMeal'] as String, 25 | strDrinkAlternate: json['strDrinkAlternate'] as String, 26 | strCategory: json['strCategory'] as String, 27 | strArea: json['strArea'] as String, 28 | strInstructions: json['strInstructions'] as String, 29 | strMealThumb: json['strMealThumb'] as String, 30 | strTags: json['strTags'] as String, 31 | strYoutube: json['strYoutube'] as String, 32 | strIngredient1: json['strIngredient1'] as String, 33 | strIngredient2: json['strIngredient2'] as String, 34 | strIngredient3: json['strIngredient3'] as String, 35 | strIngredient4: json['strIngredient4'] as String, 36 | strIngredient5: json['strIngredient5'] as String, 37 | strIngredient6: json['strIngredient6'] as String, 38 | strIngredient7: json['strIngredient7'] as String, 39 | strIngredient8: json['strIngredient8'] as String, 40 | strIngredient9: json['strIngredient9'] as String, 41 | strIngredient10: json['strIngredient10'] as String, 42 | strIngredient11: json['strIngredient11'] as String, 43 | strIngredient12: json['strIngredient12'] as String, 44 | strIngredient13: json['strIngredient13'] as String, 45 | strIngredient14: json['strIngredient14'] as String, 46 | strIngredient15: json['strIngredient15'] as String, 47 | strIngredient16: json['strIngredient16'] as String, 48 | strIngredient17: json['strIngredient17'] as String, 49 | strIngredient18: json['strIngredient18'] as String, 50 | strIngredient19: json['strIngredient19'] as String, 51 | strIngredient20: json['strIngredient20'] as String, 52 | strMeasure1: json['strMeasure1'] as String, 53 | strMeasure2: json['strMeasure2'] as String, 54 | strMeasure3: json['strMeasure3'] as String, 55 | strMeasure4: json['strMeasure4'] as String, 56 | strMeasure5: json['strMeasure5'] as String, 57 | strMeasure6: json['strMeasure6'] as String, 58 | strMeasure7: json['strMeasure7'] as String, 59 | strMeasure8: json['strMeasure8'] as String, 60 | strMeasure9: json['strMeasure9'] as String, 61 | strMeasure10: json['strMeasure10'] as String, 62 | strMeasure11: json['strMeasure11'] as String, 63 | strMeasure12: json['strMeasure12'] as String, 64 | strMeasure13: json['strMeasure13'] as String, 65 | strMeasure14: json['strMeasure14'] as String, 66 | strMeasure15: json['strMeasure15'] as String, 67 | strMeasure16: json['strMeasure16'] as String, 68 | strMeasure17: json['strMeasure17'] as String, 69 | strMeasure18: json['strMeasure18'] as String, 70 | strMeasure19: json['strMeasure19'] as String, 71 | strMeasure20: json['strMeasure20'] as String, 72 | strSource: json['strSource'] as String, 73 | dateModified: json['dateModified'] as String); 74 | } 75 | 76 | Map _$SearchMealsItemToJson(SearchMealsItem instance) => 77 | { 78 | 'idMeal': instance.idMeal, 79 | 'strMeal': instance.strMeal, 80 | 'strDrinkAlternate': instance.strDrinkAlternate, 81 | 'strCategory': instance.strCategory, 82 | 'strArea': instance.strArea, 83 | 'strInstructions': instance.strInstructions, 84 | 'strMealThumb': instance.strMealThumb, 85 | 'strTags': instance.strTags, 86 | 'strYoutube': instance.strYoutube, 87 | 'strIngredient1': instance.strIngredient1, 88 | 'strIngredient2': instance.strIngredient2, 89 | 'strIngredient3': instance.strIngredient3, 90 | 'strIngredient4': instance.strIngredient4, 91 | 'strIngredient5': instance.strIngredient5, 92 | 'strIngredient6': instance.strIngredient6, 93 | 'strIngredient7': instance.strIngredient7, 94 | 'strIngredient8': instance.strIngredient8, 95 | 'strIngredient9': instance.strIngredient9, 96 | 'strIngredient10': instance.strIngredient10, 97 | 'strIngredient11': instance.strIngredient11, 98 | 'strIngredient12': instance.strIngredient12, 99 | 'strIngredient13': instance.strIngredient13, 100 | 'strIngredient14': instance.strIngredient14, 101 | 'strIngredient15': instance.strIngredient15, 102 | 'strIngredient16': instance.strIngredient16, 103 | 'strIngredient17': instance.strIngredient17, 104 | 'strIngredient18': instance.strIngredient18, 105 | 'strIngredient19': instance.strIngredient19, 106 | 'strIngredient20': instance.strIngredient20, 107 | 'strMeasure1': instance.strMeasure1, 108 | 'strMeasure2': instance.strMeasure2, 109 | 'strMeasure3': instance.strMeasure3, 110 | 'strMeasure4': instance.strMeasure4, 111 | 'strMeasure5': instance.strMeasure5, 112 | 'strMeasure6': instance.strMeasure6, 113 | 'strMeasure7': instance.strMeasure7, 114 | 'strMeasure8': instance.strMeasure8, 115 | 'strMeasure9': instance.strMeasure9, 116 | 'strMeasure10': instance.strMeasure10, 117 | 'strMeasure11': instance.strMeasure11, 118 | 'strMeasure12': instance.strMeasure12, 119 | 'strMeasure13': instance.strMeasure13, 120 | 'strMeasure14': instance.strMeasure14, 121 | 'strMeasure15': instance.strMeasure15, 122 | 'strMeasure16': instance.strMeasure16, 123 | 'strMeasure17': instance.strMeasure17, 124 | 'strMeasure18': instance.strMeasure18, 125 | 'strMeasure19': instance.strMeasure19, 126 | 'strMeasure20': instance.strMeasure20, 127 | 'strSource': instance.strSource, 128 | 'dateModified': instance.dateModified 129 | }; 130 | -------------------------------------------------------------------------------- /lib/src/resources/food_api_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:food_recipe/src/models/area/area_meals.dart'; 3 | import 'package:food_recipe/src/models/categories/categories.dart'; 4 | import 'package:food_recipe/src/models/filterarea/filter_area_meals.dart'; 5 | import 'package:food_recipe/src/models/filtercategories/filter_categories.dart'; 6 | import 'package:food_recipe/src/models/latest/latest_meals.dart'; 7 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 8 | import 'package:food_recipe/src/models/randommeals/random_meals.dart'; 9 | import 'package:food_recipe/src/models/searchmeals/search_meals.dart'; 10 | 11 | class FoodApiProvider { 12 | Dio dio = Dio(); 13 | final _baseUrl = "https://www.themealdb.com"; 14 | 15 | Future getRandomMeals() async { 16 | final response = await dio.get("$_baseUrl/api/json/v1/1/random.php"); 17 | if (response.statusCode == 200) { 18 | return RandomMeals.fromJson(response.data); 19 | } else { 20 | throw Exception("Failed to get random meals"); 21 | } 22 | } 23 | 24 | Future getCategories() async { 25 | final response = await dio.get("$_baseUrl/api/json/v1/1/categories.php"); 26 | if (response.statusCode == 200) { 27 | return Categories.fromJson(response.data); 28 | } else { 29 | throw Exception("Failed to get categories"); 30 | } 31 | } 32 | 33 | Future getLatestMeals() async { 34 | final response = await dio.get("$_baseUrl/api/json/v1/1/latest.php"); 35 | if (response.statusCode == 200) { 36 | return LatestMeals.fromJson(response.data); 37 | } else { 38 | throw Exception("Failed to get latest meals"); 39 | } 40 | } 41 | 42 | Future getAreaMeals() async { 43 | final response = await dio.get("$_baseUrl/api/json/v1/1/list.php?a=list"); 44 | if (response.statusCode == 200) { 45 | return AreaMeals.fromJson(response.data); 46 | } else { 47 | throw Exception("Failed to get area meals"); 48 | } 49 | } 50 | 51 | Future getFilterByCategories(String category) async { 52 | final response = await dio.get("$_baseUrl/api/json/v1/1/filter.php?c=$category"); 53 | if (response.statusCode == 200) { 54 | return FilterCategories.fromJson(response.data); 55 | } else { 56 | throw Exception("Failed to get filter by categories"); 57 | } 58 | } 59 | 60 | Future getFilterByArea(String area) async { 61 | final response = await dio.get("$_baseUrl/api/json/v1/1/filter.php?a=$area"); 62 | if (response.statusCode == 200) { 63 | return FilterAreaMeals.fromJson(response.data); 64 | } else { 65 | throw Exception("Failed to get filter by area"); 66 | } 67 | } 68 | 69 | Future getLookupMealsById(String id) async { 70 | final response = await dio.get("$_baseUrl/api/json/v1/1/lookup.php?i=$id"); 71 | if (response.statusCode == 200) { 72 | return LookupMealsById.fromJson(response.data); 73 | } else { 74 | throw Exception("Failed to get lookup meals by id"); 75 | } 76 | } 77 | 78 | Future getSearchMealsByKeyword(String keyword) async { 79 | final response = await dio.get("$_baseUrl/api/json/v1/1/search.php?s=$keyword"); 80 | if (response.statusCode == 200) { 81 | return SearchMeals.fromJson(response.data); 82 | } else { 83 | throw Exception("Failed to get search meals by id keyword"); 84 | } 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /lib/src/resources/food_api_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:food_recipe/src/models/area/area_meals.dart'; 4 | import 'package:food_recipe/src/models/categories/categories.dart'; 5 | import 'package:food_recipe/src/models/filterarea/filter_area_meals.dart'; 6 | import 'package:food_recipe/src/models/filtercategories/filter_categories.dart'; 7 | import 'package:food_recipe/src/models/latest/latest_meals.dart'; 8 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 9 | import 'package:food_recipe/src/models/randommeals/random_meals.dart'; 10 | import 'package:food_recipe/src/models/searchmeals/search_meals.dart'; 11 | 12 | import 'food_api_provider.dart'; 13 | 14 | class FoodApiRepository { 15 | final foodApiProvider = FoodApiProvider(); 16 | 17 | Future getRandomMeals() => foodApiProvider.getRandomMeals(); 18 | 19 | Future getCategories() => foodApiProvider.getCategories(); 20 | 21 | Future getLatestMeals() => foodApiProvider.getLatestMeals(); 22 | 23 | Future getAreaMeals() => foodApiProvider.getAreaMeals(); 24 | 25 | Future getFilterByCategories(String category) => 26 | foodApiProvider.getFilterByCategories(category); 27 | 28 | Future getFilterByArea(String area) => 29 | foodApiProvider.getFilterByArea(area); 30 | 31 | Future getLookupMealsById(String id) => 32 | foodApiProvider.getLookupMealsById(id); 33 | 34 | Future getSearchMealsByKeyword(String keyword) => 35 | foodApiProvider.getSearchMealsByKeyword(keyword); 36 | } 37 | -------------------------------------------------------------------------------- /lib/src/ui/favorite/favorite_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_recipe/src/blocs/favorite/favorite_bloc.dart'; 3 | import 'package:food_recipe/src/blocs/favorite/favorite_meals_bloc_model.dart'; 4 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 5 | import 'package:food_recipe/src/ui/detailmeals/detail_meals_screen.dart'; 6 | import 'package:food_recipe/src/utils/utils.dart'; 7 | 8 | class FavoriteScreen extends StatefulWidget { 9 | @override 10 | _FavoriteScreenState createState() => _FavoriteScreenState(); 11 | } 12 | 13 | class _FavoriteScreenState extends State { 14 | FavoriteBloc _favoriteBloc; 15 | 16 | @override 17 | void initState() { 18 | _favoriteBloc = FavoriteBloc(); 19 | _favoriteBloc.getAllFavoriteMeals(); 20 | super.initState(); 21 | } 22 | 23 | @override 24 | void dispose() { 25 | _favoriteBloc.dispose(); 26 | super.dispose(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | var mediaQuery = MediaQuery.of(context); 32 | return Scaffold( 33 | body: Container( 34 | width: double.infinity, 35 | height: double.infinity, 36 | child: Stack( 37 | children: [ 38 | buildWidgetBackgroundCircle(mediaQuery), 39 | _buildWidgetContent(mediaQuery), 40 | ], 41 | ), 42 | ), 43 | ); 44 | } 45 | 46 | Widget _buildWidgetContent(MediaQueryData mediaQuery) { 47 | return SafeArea( 48 | minimum: EdgeInsets.symmetric(horizontal: 16.0), 49 | child: Column( 50 | crossAxisAlignment: CrossAxisAlignment.start, 51 | children: [ 52 | Padding(padding: EdgeInsets.only(top: 16.0)), 53 | Text( 54 | "Favorite\nRecipe", 55 | style: Theme.of(context) 56 | .textTheme 57 | .display2 58 | .merge(TextStyle(fontWeight: FontWeight.bold)), 59 | ), 60 | Padding(padding: EdgeInsets.only(top: 16)), 61 | Expanded( 62 | child: StreamBuilder( 63 | stream: _favoriteBloc.listFavoriteMeal, 64 | builder: (BuildContext context, 65 | AsyncSnapshot snapshot) { 66 | if (snapshot.hasData) { 67 | FavoriteMealsBlocModel favoriteMealsBlocModel = snapshot.data; 68 | if (favoriteMealsBlocModel.isLoading) { 69 | return Center(child: buildCircularProgressIndicator()); 70 | } else { 71 | List listFavoriteMeals = 72 | favoriteMealsBlocModel.listFavoriteMeals; 73 | return ListView.builder( 74 | shrinkWrap: true, 75 | itemCount: listFavoriteMeals.length, 76 | itemBuilder: (context, index) { 77 | FavoriteMeal favoriteMeal = listFavoriteMeals[index]; 78 | return Padding( 79 | padding: const EdgeInsets.only(bottom: 16.0), 80 | child: GestureDetector( 81 | onTap: () { 82 | Navigator.push(context, MaterialPageRoute( 83 | builder: (context) { 84 | return DetailMealsScreen( 85 | favoriteMeal: favoriteMeal, 86 | ); 87 | }, 88 | )); 89 | }, 90 | child: Card( 91 | elevation: 8.0, 92 | shape: RoundedRectangleBorder( 93 | borderRadius: BorderRadius.circular(16.0), 94 | ), 95 | child: ClipRRect( 96 | borderRadius: BorderRadius.circular(16.0), 97 | child: Stack( 98 | children: [ 99 | Hero( 100 | tag: 101 | "image_detail_meals_${favoriteMeal.idMeal}", 102 | child: FadeInImage( 103 | image: NetworkImage( 104 | favoriteMeal.strMealThumb), 105 | placeholder: AssetImage( 106 | "assets/images/img_placeholder.jpg"), 107 | fit: BoxFit.cover, 108 | width: double.infinity, 109 | height: mediaQuery.size.width / 1.5, 110 | ), 111 | ), 112 | Container( 113 | width: double.infinity, 114 | height: mediaQuery.size.width / 1.5, 115 | decoration: BoxDecoration( 116 | gradient: LinearGradient( 117 | begin: Alignment.topCenter, 118 | end: Alignment.bottomCenter, 119 | stops: [0.1, 0.9], 120 | colors: [ 121 | Color(0xFFFFFFFF), 122 | Color(0x00FFFFFF) 123 | ], 124 | ), 125 | ), 126 | ), 127 | Padding( 128 | padding: const EdgeInsets.all(16.0), 129 | child: Row( 130 | crossAxisAlignment: 131 | CrossAxisAlignment.start, 132 | children: [ 133 | Expanded( 134 | child: Text( 135 | favoriteMeal.strMeal, 136 | style: Theme.of(context) 137 | .textTheme 138 | .title, 139 | maxLines: 2, 140 | ), 141 | ), 142 | GestureDetector( 143 | onTap: () { 144 | _favoriteBloc 145 | .removeFavoriteMealById( 146 | favoriteMeal.idMeal); 147 | }, 148 | child: CircleAvatar( 149 | backgroundColor: 150 | Color(0xAFE8364B), 151 | child: Icon( 152 | Icons.favorite, 153 | color: Colors.white, 154 | ), 155 | ), 156 | ) 157 | ], 158 | ), 159 | ), 160 | ], 161 | ), 162 | ), 163 | ), 164 | ), 165 | ); 166 | }, 167 | ); 168 | } 169 | } else if (snapshot.hasError) { 170 | return Text(snapshot.error.toString()); 171 | } 172 | return Container(); 173 | }, 174 | ), 175 | ), 176 | ], 177 | ), 178 | ); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /lib/src/ui/home/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:food_recipe/src/blocs/home/home_bloc.dart'; 4 | import 'package:food_recipe/src/models/categories/categories.dart'; 5 | import 'package:food_recipe/src/models/latest/latest_meals.dart'; 6 | import 'package:food_recipe/src/ui/detailmeals/detail_meals_screen.dart'; 7 | import 'package:food_recipe/src/utils/utils.dart'; 8 | import 'package:food_recipe/values/color_assets.dart'; 9 | 10 | class HomeScreen extends StatefulWidget { 11 | @override 12 | _HomeScreenState createState() => _HomeScreenState(); 13 | } 14 | 15 | class _HomeScreenState extends State { 16 | @override 17 | void dispose() { 18 | homeBloc.dispose(); 19 | super.dispose(); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Stack( 25 | children: [ 26 | _buildWidgetBackground(), 27 | SafeArea( 28 | child: ListView( 29 | children: [ 30 | Align( 31 | alignment: Alignment.topRight, 32 | child: GestureDetector( 33 | onTap: () { 34 | Navigator.pushNamed(context, navigatorInfoApp); 35 | }, 36 | child: Padding( 37 | padding: const EdgeInsets.only(top: 16.0, right: 16.0), 38 | child: Icon( 39 | Icons.info_outline, 40 | color: Colors.white, 41 | ), 42 | ), 43 | ), 44 | ), 45 | _buildWidgetContent(), 46 | ], 47 | ), 48 | ), 49 | ], 50 | ); 51 | } 52 | 53 | Widget _buildWidgetBackground() { 54 | return Column( 55 | children: [ 56 | Expanded( 57 | flex: 2, 58 | child: Container( 59 | color: ColorAssets.primarySwatchColor, 60 | ), 61 | ), 62 | Expanded( 63 | child: Container( 64 | color: Colors.white, 65 | ), 66 | ) 67 | ], 68 | ); 69 | } 70 | 71 | Widget _buildWidgetContent() { 72 | var mediaQuery = MediaQuery.of(context); 73 | return SafeArea( 74 | minimum: EdgeInsets.symmetric(horizontal: 16.0), 75 | child: Column( 76 | crossAxisAlignment: CrossAxisAlignment.start, 77 | children: [ 78 | Padding(padding: EdgeInsets.only(top: 16.0)), 79 | Text( 80 | "What are you\nCooking today ?", 81 | style: Theme.of(context).textTheme.display1.merge( 82 | TextStyle( 83 | color: Colors.white, 84 | fontWeight: FontWeight.bold, 85 | fontFamily: "Roboto", 86 | ), 87 | ), 88 | ), 89 | Padding(padding: EdgeInsets.only(top: 16.0)), 90 | _buildTextFieldSearchMeals(), 91 | Padding(padding: EdgeInsets.only(top: 24.0)), 92 | Text("Latest Recipe", 93 | style: Theme.of(context) 94 | .textTheme 95 | .title 96 | .merge(TextStyle(color: Colors.white))), 97 | Padding(padding: EdgeInsets.only(top: 8.0)), 98 | _buildListViewLatestRecipe(mediaQuery), 99 | Padding(padding: EdgeInsets.only(top: 24.0)), 100 | Text("Category", 101 | style: Theme.of(context) 102 | .textTheme 103 | .title 104 | .merge(TextStyle(color: ColorAssets.primaryTextColor))), 105 | Padding(padding: EdgeInsets.only(top: 8.0)), 106 | _buildListViewCategory(), 107 | ], 108 | ), 109 | ); 110 | } 111 | 112 | Widget _buildListViewCategory() { 113 | return FutureBuilder( 114 | future: homeBloc.getCategories(), 115 | builder: (BuildContext context, AsyncSnapshot snapshot) { 116 | if (snapshot.hasData) { 117 | int numberItem = 0; 118 | Categories categories = snapshot.data; 119 | return Container( 120 | height: 136.0, 121 | child: ListView.builder( 122 | scrollDirection: Axis.horizontal, 123 | itemCount: categories.categoryItems.length, 124 | itemBuilder: (context, index) { 125 | numberItem += 1; 126 | if (numberItem > 3) { 127 | numberItem = 1; 128 | } 129 | var category = categories.categoryItems[index]; 130 | return Container( 131 | width: 136.0, 132 | child: Padding( 133 | padding: const EdgeInsets.only(right: 4.0), 134 | child: GestureDetector( 135 | onTap: () { 136 | Navigator.pushNamed(context, navigatorListMeals, 137 | arguments: category); 138 | }, 139 | child: Card( 140 | shape: RoundedRectangleBorder( 141 | borderRadius: BorderRadius.circular(16.0)), 142 | color: _setColorItemCategory(numberItem), 143 | child: Padding( 144 | padding: const EdgeInsets.symmetric( 145 | horizontal: 8.0, vertical: 12.0), 146 | child: Column( 147 | children: [ 148 | Hero( 149 | tag: 150 | "label_item_category_${category.idCategory}", 151 | child: Text( 152 | category.strCategory, 153 | textAlign: TextAlign.center, 154 | style: TextStyle( 155 | color: Colors.white, 156 | ), 157 | ), 158 | ), 159 | Padding(padding: const EdgeInsets.only(top: 8.0)), 160 | Container( 161 | width: 136.0, 162 | height: 72.0, 163 | child: FadeInImage( 164 | fit: BoxFit.cover, 165 | image: NetworkImage( 166 | category.strCategoryThumb, 167 | ), 168 | placeholder: AssetImage( 169 | "assets/images/img_placeholder.jpg"), 170 | ), 171 | ), 172 | ], 173 | ), 174 | ), 175 | ), 176 | ), 177 | ), 178 | ); 179 | }, 180 | ), 181 | ); 182 | } else if (snapshot.hasError) { 183 | return Text(snapshot.error.toString()); 184 | } 185 | return Center(child: buildCircularProgressIndicator()); 186 | }, 187 | ); 188 | } 189 | 190 | Widget _buildListViewLatestRecipe(MediaQueryData mediaQuery) { 191 | return FutureBuilder( 192 | future: homeBloc.getLatestMeals(), 193 | builder: (BuildContext context, AsyncSnapshot snapshot) { 194 | if (snapshot.hasData) { 195 | var latestMeals = snapshot.data; 196 | return Container( 197 | height: mediaQuery.size.width / 2 + 64.0, // 256.0 198 | child: ListView.builder( 199 | scrollDirection: Axis.horizontal, 200 | itemCount: latestMeals.latestMealsItems.length, 201 | itemBuilder: (context, index) { 202 | var latestMealsItem = latestMeals.latestMealsItems[index]; 203 | return Padding( 204 | padding: const EdgeInsets.only(right: 8.0), 205 | child: GestureDetector( 206 | onTap: () { 207 | Navigator.push( 208 | context, 209 | MaterialPageRoute( 210 | builder: (context) { 211 | return DetailMealsScreen( 212 | idMeal: latestMealsItem.idMeal, 213 | strMeal: latestMealsItem.strMeal, 214 | strMealThumb: latestMealsItem.strMealThumb, 215 | ); 216 | }, 217 | ), 218 | ); 219 | }, 220 | child: Card( 221 | elevation: 4.0, 222 | shape: RoundedRectangleBorder( 223 | borderRadius: BorderRadius.circular(16.0)), 224 | child: ClipRRect( 225 | borderRadius: BorderRadius.only( 226 | topLeft: Radius.circular(16.0), 227 | topRight: Radius.circular(16.0), 228 | ), 229 | child: Column( 230 | crossAxisAlignment: CrossAxisAlignment.start, 231 | children: [ 232 | Container( 233 | child: Hero( 234 | tag: 235 | "image_detail_meals_${latestMealsItem.idMeal}", 236 | child: FadeInImage( 237 | image: NetworkImage( 238 | latestMealsItem.strMealThumb, 239 | ), 240 | placeholder: AssetImage( 241 | "assets/images/img_placeholder.jpg", 242 | ), 243 | fit: BoxFit.cover, 244 | ), 245 | ), 246 | width: mediaQuery.size.width - 96.0, 247 | height: mediaQuery.size.width / 2, // 192.0 248 | ), 249 | Padding( 250 | padding: const EdgeInsets.all(8.0), 251 | child: Text(latestMealsItem.strMeal, 252 | maxLines: 2, 253 | style: Theme.of(context).textTheme.subhead), 254 | ), 255 | ], 256 | ), 257 | ), 258 | ), 259 | ), 260 | ); 261 | }, 262 | ), 263 | ); 264 | } else if (snapshot.hasError) { 265 | return Text(snapshot.error.toString()); 266 | } 267 | return Container( 268 | height: 128.0, 269 | child: Center( 270 | child: buildCircularProgressIndicator(), 271 | ), 272 | ); 273 | }, 274 | ); 275 | } 276 | 277 | Widget _buildTextFieldSearchMeals() { 278 | return GestureDetector( 279 | onTap: () { 280 | Navigator.pushNamed(context, navigatorSearchMeals); 281 | }, 282 | child: Container( 283 | decoration: BoxDecoration( 284 | borderRadius: BorderRadius.circular(36.0), 285 | color: Color(0x2FFFFFFF), 286 | ), 287 | child: Padding( 288 | padding: const EdgeInsets.symmetric( 289 | horizontal: 12.0, 290 | vertical: 8.0, 291 | ), 292 | child: Row( 293 | children: [ 294 | Icon( 295 | Icons.search, 296 | color: Colors.white, 297 | ), 298 | Padding(padding: EdgeInsets.only(right: 8.0)), 299 | Expanded( 300 | child: TextField( 301 | decoration: InputDecoration.collapsed( 302 | hintText: "Search...", 303 | hintStyle: TextStyle( 304 | color: Colors.white70, 305 | ), 306 | ), 307 | style: TextStyle(color: Colors.white), 308 | maxLines: 1, 309 | enabled: false, 310 | ), 311 | ), 312 | ], 313 | ), 314 | ), 315 | ), 316 | ); 317 | } 318 | 319 | Color _setColorItemCategory(int number) { 320 | if (number == 1) { 321 | return ColorAssets.accentColor; 322 | } else if (number == 2) { 323 | return ColorAssets.secondColorCategoryItem; 324 | } else { 325 | return ColorAssets.thirdColorCategoryItem; 326 | } 327 | } 328 | } 329 | -------------------------------------------------------------------------------- /lib/src/ui/infoapp/info_app_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get_version/get_version.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | class InfoAppScreen extends StatefulWidget { 6 | @override 7 | _InfoAppScreenState createState() => _InfoAppScreenState(); 8 | } 9 | 10 | class _InfoAppScreenState extends State { 11 | String versionName = "1.0.1"; 12 | 13 | @override 14 | void initState() { 15 | getVersionApp(); 16 | super.initState(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | body: SafeArea( 23 | child: Padding( 24 | padding: const EdgeInsets.all(16.0), 25 | child: ListView( 26 | children: [ 27 | Image.asset( 28 | "assets/images/img_logo_512.png", 29 | width: 72.0, 30 | height: 72.0, 31 | ), 32 | Padding( 33 | padding: EdgeInsets.only( 34 | top: 4.0, 35 | ), 36 | ), 37 | SizedBox( 38 | width: double.infinity, 39 | child: Text( 40 | "Food Recipe", 41 | textAlign: TextAlign.center, 42 | style: Theme 43 | .of(context) 44 | .textTheme 45 | .title, 46 | ), 47 | ), 48 | Center( 49 | child: Text( 50 | versionName, 51 | style: Theme 52 | .of(context) 53 | .textTheme 54 | .subtitle, 55 | ), 56 | ), 57 | SizedBox( 58 | width: double.infinity, 59 | child: Text( 60 | "Aplikasi yang menyajikan informasi resep makanan dari seluruh dunia", 61 | textAlign: TextAlign.center, 62 | style: Theme 63 | .of(context) 64 | .textTheme 65 | .subtitle, 66 | ), 67 | ), 68 | Padding(padding: EdgeInsets.only(top: 16.0)), 69 | Container( 70 | width: double.infinity, 71 | height: 1.0, 72 | color: Colors.grey, 73 | ), 74 | Padding(padding: EdgeInsets.only(top: 16.0)), 75 | Text( 76 | "Developer", 77 | style: Theme 78 | .of(context) 79 | .textTheme 80 | .headline, 81 | textAlign: TextAlign.center, 82 | ), 83 | Padding(padding: EdgeInsets.only(top: 8.0)), 84 | Center( 85 | child: ClipRRect( 86 | borderRadius: BorderRadius.circular(900.0), 87 | child: Container( 88 | width: 128.0, 89 | height: 128.0, 90 | child: Image.asset("assets/images/img_yudi_setiawan.jpeg"), 91 | ), 92 | ), 93 | ), 94 | Padding(padding: EdgeInsets.only(top: 8.0)), 95 | Center( 96 | child: Text( 97 | "Yudi Setiawan", 98 | style: Theme 99 | .of(context) 100 | .textTheme 101 | .headline 102 | .merge( 103 | TextStyle(fontSize: 20.0), 104 | ), 105 | ), 106 | ), 107 | Center( 108 | child: Text( 109 | "Software Developer\n specialize in Android development", 110 | textAlign: TextAlign.center, 111 | ), 112 | ), 113 | Padding( 114 | padding: EdgeInsets.only(top: 20.0), 115 | ), 116 | Text( 117 | "API Service", 118 | style: Theme 119 | .of(context) 120 | .textTheme 121 | .headline, 122 | textAlign: TextAlign.center, 123 | ), 124 | Padding( 125 | padding: const EdgeInsets.only(top: 8.0), 126 | child: Center( 127 | child: Image.asset("assets/images/img_logo_themealdb.png"), 128 | ), 129 | ), 130 | Center( 131 | child: Text( 132 | "An open source database of Recipes from around the world", 133 | textAlign: TextAlign.center, 134 | ), 135 | ), 136 | ], 137 | ), 138 | ), 139 | ), 140 | ); 141 | } 142 | 143 | getVersionApp() async { 144 | try { 145 | versionName = await GetVersion.projectVersion; 146 | setState(() {}); 147 | } on PlatformException { 148 | versionName = "1.0.1"; 149 | } 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /lib/src/ui/listmeals/list_meals_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:food_recipe/src/blocs/listmeals/list_meals_bloc.dart'; 4 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 5 | import 'package:food_recipe/src/models/categories/categories.dart'; 6 | import 'package:food_recipe/src/models/filtercategories/filter_categories.dart'; 7 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 8 | import 'package:food_recipe/src/ui/detailmeals/detail_meals_screen.dart'; 9 | import 'package:food_recipe/src/utils/utils.dart'; 10 | 11 | class ListMealsScreen extends StatefulWidget { 12 | @override 13 | _ListMealsScreenState createState() => _ListMealsScreenState(); 14 | } 15 | 16 | class _ListMealsScreenState extends State { 17 | CategoryItem categoryItem; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | var mediaQuery = MediaQuery.of(context); 27 | categoryItem = ModalRoute.of(context).settings.arguments; 28 | 29 | return Scaffold( 30 | body: Container( 31 | width: double.infinity, 32 | height: double.infinity, 33 | child: Stack( 34 | children: [ 35 | buildWidgetBackgroundCircle(mediaQuery), 36 | _buildWidgetContent(mediaQuery), 37 | ], 38 | ), 39 | ), 40 | ); 41 | } 42 | 43 | Widget _buildWidgetContent(MediaQueryData mediaQuery) { 44 | return SafeArea( 45 | minimum: EdgeInsets.symmetric(horizontal: 16.0), 46 | child: Column( 47 | crossAxisAlignment: CrossAxisAlignment.start, 48 | children: [ 49 | Padding(padding: EdgeInsets.only(top: 16.0)), 50 | Hero( 51 | tag: "label_item_category_${categoryItem.idCategory}", 52 | child: Text( 53 | categoryItem.strCategory, 54 | style: Theme.of(context) 55 | .textTheme 56 | .display2 57 | .merge(TextStyle(fontWeight: FontWeight.bold)), 58 | maxLines: 1, 59 | ), 60 | ), 61 | Padding(padding: EdgeInsets.only(top: 16.0)), 62 | Expanded( 63 | child: FutureBuilder( 64 | future: 65 | listMealsBloc.getFilterCategories(categoryItem.strCategory), 66 | builder: (BuildContext context, 67 | AsyncSnapshot snapshot) { 68 | if (snapshot.hasData) { 69 | FilterCategories filterCategories = snapshot.data; 70 | return ListView.builder( 71 | shrinkWrap: true, 72 | itemCount: filterCategories.filterCategoryItems.length, 73 | itemBuilder: (context, index) { 74 | FilterCategoryItem filterCategoryItem = 75 | filterCategories.filterCategoryItems[index]; 76 | return CardMeal(filterCategoryItem); 77 | }, 78 | ); 79 | } else if (snapshot.hasError) { 80 | return Text(snapshot.error.toString()); 81 | } 82 | return Center(child: buildCircularProgressIndicator()); 83 | }, 84 | ), 85 | ), 86 | ], 87 | ), 88 | ); 89 | } 90 | } 91 | 92 | class CardMeal extends StatefulWidget { 93 | final FilterCategoryItem filterCategoryItem; 94 | 95 | CardMeal(this.filterCategoryItem); 96 | 97 | @override 98 | _CardMealState createState() => _CardMealState(); 99 | } 100 | 101 | class _CardMealState extends State { 102 | @override 103 | Widget build(BuildContext context) { 104 | var mediaQuery = MediaQuery.of(context); 105 | return Padding( 106 | padding: const EdgeInsets.only(bottom: 16.0), 107 | child: GestureDetector( 108 | onTap: () { 109 | Navigator.push( 110 | context, 111 | MaterialPageRoute(builder: (context) { 112 | return DetailMealsScreen( 113 | idMeal: widget.filterCategoryItem.idMeal, 114 | strMeal: widget.filterCategoryItem.strMeal, 115 | strMealThumb: widget.filterCategoryItem.strMealThumb, 116 | ); 117 | }), 118 | ); 119 | }, 120 | child: Card( 121 | elevation: 8.0, 122 | shape: RoundedRectangleBorder( 123 | borderRadius: BorderRadius.circular(16.0), 124 | ), 125 | child: ClipRRect( 126 | borderRadius: BorderRadius.circular(16.0), 127 | child: Stack( 128 | children: [ 129 | Hero( 130 | tag: "image_detail_meals_${widget.filterCategoryItem.idMeal}", 131 | child: FadeInImage( 132 | image: NetworkImage(widget.filterCategoryItem.strMealThumb), 133 | placeholder: 134 | AssetImage("assets/images/img_placeholder.jpg"), 135 | fit: BoxFit.cover, 136 | width: double.infinity, 137 | height: mediaQuery.size.width / 1.5, 138 | ), 139 | ), 140 | Container( 141 | width: double.infinity, 142 | height: mediaQuery.size.width / 1.5, 143 | decoration: BoxDecoration( 144 | gradient: LinearGradient( 145 | begin: Alignment.topCenter, 146 | end: Alignment.bottomCenter, 147 | stops: [0.1, 0.9], 148 | colors: [ 149 | Color(0xFFFFFFFF), 150 | Color(0x00FFFFFF), 151 | ], 152 | ), 153 | ), 154 | ), 155 | Padding( 156 | padding: const EdgeInsets.all(16.0), 157 | child: Row( 158 | crossAxisAlignment: CrossAxisAlignment.start, 159 | children: [ 160 | Expanded( 161 | child: Text( 162 | widget.filterCategoryItem.strMeal, 163 | style: Theme.of(context).textTheme.title, 164 | maxLines: 2, 165 | ), 166 | ), 167 | GestureDetector( 168 | onTap: () { 169 | var isFavorite = widget.filterCategoryItem.isFavorite; 170 | if (isFavorite) { 171 | listMealsBloc 172 | .deleteFavoriteMealById( 173 | widget.filterCategoryItem.idMeal) 174 | .then((status) { 175 | setState(() { 176 | widget.filterCategoryItem.isFavorite = 177 | !isFavorite; 178 | }); 179 | }); 180 | } else { 181 | Future lookupMealsById = 182 | listMealsBloc.getDetailMealById( 183 | widget.filterCategoryItem.idMeal); 184 | lookupMealsById.then((value) { 185 | if (value != null) { 186 | var item = value.lookupMealsbyIdItems[0]; 187 | FavoriteMeal favoriteMeal = 188 | FavoriteMeal.fromJson(item.toJson()); 189 | listMealsBloc 190 | .addFavoriteMeal(favoriteMeal) 191 | .then((status) { 192 | setState(() { 193 | widget.filterCategoryItem.isFavorite = 194 | !isFavorite; 195 | }); 196 | }); 197 | } else { 198 | Scaffold.of(context).showSnackBar(SnackBar( 199 | content: 200 | Text("Failed added to favorite meal"))); 201 | } 202 | }); 203 | } 204 | }, 205 | child: CircleAvatar( 206 | backgroundColor: Color(0xAFE8364B), 207 | child: Icon( 208 | widget.filterCategoryItem.isFavorite 209 | ? Icons.favorite 210 | : Icons.favorite_border, 211 | color: Colors.white, 212 | ), 213 | ), 214 | ), 215 | ], 216 | ), 217 | ), 218 | ], 219 | ), 220 | ), 221 | ), 222 | ), 223 | ); 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /lib/src/ui/searchmeals/search_meals_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_recipe/src/blocs/searchmeals/search_meals_bloc.dart'; 3 | import 'package:food_recipe/src/database/entity/favorite_meal.dart'; 4 | import 'package:food_recipe/src/models/lookupmealsbyid/lookup_meals_by_id.dart'; 5 | import 'package:food_recipe/src/models/searchmeals/search_meals.dart'; 6 | import 'package:food_recipe/src/ui/detailmeals/detail_meals_screen.dart'; 7 | import 'package:food_recipe/src/utils/utils.dart'; 8 | import 'package:food_recipe/values/color_assets.dart'; 9 | 10 | class SearchMealsScreen extends StatefulWidget { 11 | @override 12 | _SearchMealsScreenState createState() => _SearchMealsScreenState(); 13 | } 14 | 15 | class _SearchMealsScreenState extends State { 16 | SearchMealsBloc _searchMealsBloc; 17 | 18 | @override 19 | void initState() { 20 | _searchMealsBloc = SearchMealsBloc(); 21 | super.initState(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | _searchMealsBloc.dispose(); 27 | super.dispose(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | var mediaQuery = MediaQuery.of(context); 33 | 34 | return Scaffold( 35 | resizeToAvoidBottomInset: false, 36 | body: Container( 37 | child: Stack( 38 | children: [ 39 | _buildWidgetBackground(), 40 | _buildWidgetContent(mediaQuery, context), 41 | ], 42 | ), 43 | ), 44 | ); 45 | } 46 | 47 | Widget _buildWidgetContent(MediaQueryData mediaQuery, BuildContext context) { 48 | return SafeArea( 49 | minimum: EdgeInsets.symmetric(horizontal: 16.0), 50 | child: Column( 51 | crossAxisAlignment: CrossAxisAlignment.start, 52 | children: [ 53 | Padding(padding: EdgeInsets.only(top: 16.0 + mediaQuery.padding.top)), 54 | Text( 55 | "Search\nSomething ?", 56 | style: Theme.of(context).textTheme.display1.merge( 57 | TextStyle( 58 | color: Colors.white, 59 | fontWeight: FontWeight.bold, 60 | fontFamily: "Roboto", 61 | ), 62 | ), 63 | ), 64 | Padding(padding: EdgeInsets.only(top: 16.0)), 65 | _buildTextFieldSearchMeals(), 66 | Padding(padding: EdgeInsets.only(top: 16.0)), 67 | Expanded(child: _buildResultSearchMeals(mediaQuery)), 68 | ], 69 | ), 70 | ); 71 | } 72 | 73 | Widget _buildResultSearchMeals(MediaQueryData mediaQuery) { 74 | return StreamBuilder( 75 | stream: _searchMealsBloc.resultSearchMealsByKeyword, 76 | builder: (BuildContext context, AsyncSnapshot snapshot) { 77 | if (snapshot.hasData) { 78 | SearchMeals searchMeals = snapshot.data; 79 | if (searchMeals.isLoading) { 80 | return Center(child: buildCircularProgressIndicator()); 81 | } else if (searchMeals.searchMealsItems == null || 82 | searchMeals.searchMealsItems.isEmpty) { 83 | return Container(); 84 | } 85 | return ListView.builder( 86 | shrinkWrap: true, 87 | itemCount: searchMeals.searchMealsItems.length, 88 | itemBuilder: (context, index) { 89 | var searchMealsItem = searchMeals.searchMealsItems[index]; 90 | return CardMeal(searchMealsItem, _searchMealsBloc); 91 | }, 92 | ); 93 | } else if (snapshot.hasError) { 94 | return Text(snapshot.error.toString()); 95 | } 96 | return Container(); 97 | }, 98 | ); 99 | } 100 | 101 | Widget _buildTextFieldSearchMeals() { 102 | return Container( 103 | decoration: BoxDecoration( 104 | borderRadius: BorderRadius.circular(36.0), 105 | color: Color(0x2FFFFFFF), 106 | ), 107 | child: Padding( 108 | padding: const EdgeInsets.symmetric( 109 | horizontal: 12.0, 110 | vertical: 8.0, 111 | ), 112 | child: TextFieldSearch(_searchMealsBloc), 113 | ), 114 | ); 115 | } 116 | 117 | Widget _buildWidgetBackground() { 118 | return Column( 119 | children: [ 120 | Expanded( 121 | child: Container( 122 | color: ColorAssets.primarySwatchColor, 123 | ), 124 | ), 125 | Expanded( 126 | child: Container( 127 | color: Colors.white, 128 | ), 129 | ) 130 | ], 131 | ); 132 | } 133 | } 134 | 135 | class CardMeal extends StatefulWidget { 136 | final SearchMealsItem searchMealsItem; 137 | final SearchMealsBloc searchMealsBloc; 138 | 139 | CardMeal(this.searchMealsItem, this.searchMealsBloc); 140 | 141 | @override 142 | _CardMealState createState() => _CardMealState(); 143 | } 144 | 145 | class _CardMealState extends State { 146 | @override 147 | Widget build(BuildContext context) { 148 | var mediaQuery = MediaQuery.of(context); 149 | return Padding( 150 | padding: EdgeInsets.only(bottom: 16.0), 151 | child: GestureDetector( 152 | onTap: () { 153 | Navigator.push( 154 | context, 155 | MaterialPageRoute( 156 | builder: (context) { 157 | return DetailMealsScreen( 158 | idMeal: widget.searchMealsItem.idMeal, 159 | strMeal: widget.searchMealsItem.strMeal, 160 | strMealThumb: widget.searchMealsItem.strMealThumb, 161 | ); 162 | }, 163 | ), 164 | ); 165 | }, 166 | child: Card( 167 | elevation: 8.0, 168 | shape: RoundedRectangleBorder( 169 | borderRadius: BorderRadius.circular(16.0), 170 | ), 171 | child: ClipRRect( 172 | borderRadius: BorderRadius.circular(16.0), 173 | child: Stack( 174 | children: [ 175 | Hero( 176 | tag: "image_detail_meals_${widget.searchMealsItem.idMeal}", 177 | child: FadeInImage( 178 | image: NetworkImage(widget.searchMealsItem.strMealThumb), 179 | placeholder: 180 | AssetImage("assets/images/img_placeholder.jpg"), 181 | fit: BoxFit.cover, 182 | width: double.infinity, 183 | height: mediaQuery.size.width / 1.5, 184 | ), 185 | ), 186 | Container( 187 | width: double.infinity, 188 | height: mediaQuery.size.width / 1.5, 189 | decoration: BoxDecoration( 190 | gradient: LinearGradient( 191 | begin: Alignment.topCenter, 192 | end: Alignment.bottomCenter, 193 | stops: [ 194 | 0.1, 195 | 0.9 196 | ], 197 | colors: [ 198 | Color(0xFFFFFFFF), 199 | Color(0x00FFFFFF), 200 | ]), 201 | ), 202 | ), 203 | Padding( 204 | padding: EdgeInsets.all(16.0), 205 | child: Row( 206 | crossAxisAlignment: CrossAxisAlignment.start, 207 | children: [ 208 | Expanded( 209 | child: Text( 210 | widget.searchMealsItem.strMeal, 211 | style: Theme.of(context).textTheme.title, 212 | maxLines: 2, 213 | ), 214 | ), 215 | GestureDetector( 216 | onTap: () { 217 | var isFavorite = widget.searchMealsItem.isFavorite; 218 | if (isFavorite) { 219 | widget.searchMealsBloc 220 | .deleteFavoriteMealById( 221 | widget.searchMealsItem.idMeal) 222 | .then((status) { 223 | setState(() { 224 | widget.searchMealsItem.isFavorite = !isFavorite; 225 | }); 226 | }); 227 | } else { 228 | Future lookupMealsById = 229 | widget.searchMealsBloc.getDetailMealById( 230 | widget.searchMealsItem.idMeal); 231 | lookupMealsById.then((value) { 232 | if (value != null) { 233 | var item = value.lookupMealsbyIdItems[0]; 234 | FavoriteMeal favoriteMeal = 235 | FavoriteMeal.fromJson(item.toJson()); 236 | widget.searchMealsBloc 237 | .addFavoriteMeal(favoriteMeal) 238 | .then((status) { 239 | setState(() { 240 | widget.searchMealsItem.isFavorite = 241 | !isFavorite; 242 | }); 243 | }); 244 | } else { 245 | Scaffold.of(context).showSnackBar(SnackBar( 246 | content: 247 | Text("Failed added to favorite meal"))); 248 | } 249 | }); 250 | } 251 | }, 252 | child: CircleAvatar( 253 | backgroundColor: Color(0xAFE8364B), 254 | child: widget.searchMealsItem.isFavorite 255 | ? Icon( 256 | Icons.favorite, 257 | color: Colors.white, 258 | ) 259 | : Icon( 260 | Icons.favorite_border, 261 | color: Colors.white, 262 | ), 263 | ), 264 | ), 265 | ], 266 | ), 267 | ), 268 | ], 269 | ), 270 | ), 271 | ), 272 | ), 273 | ); 274 | } 275 | } 276 | 277 | class TextFieldSearch extends StatefulWidget { 278 | final SearchMealsBloc searchMealsBloc; 279 | 280 | TextFieldSearch(this.searchMealsBloc); 281 | 282 | @override 283 | _TextFieldSearchState createState() => _TextFieldSearchState(); 284 | } 285 | 286 | class _TextFieldSearchState extends State { 287 | var _textEditingControllerKeyword = TextEditingController(); 288 | 289 | @override 290 | Widget build(BuildContext context) { 291 | return Row( 292 | children: [ 293 | Icon( 294 | Icons.search, 295 | color: Colors.white, 296 | ), 297 | Padding(padding: EdgeInsets.only(right: 8.0)), 298 | Expanded( 299 | child: TextField( 300 | autofocus: true, 301 | controller: _textEditingControllerKeyword, 302 | decoration: InputDecoration.collapsed( 303 | hintText: "Search...", 304 | hintStyle: TextStyle( 305 | color: Colors.white70, 306 | ), 307 | ), 308 | style: TextStyle(color: Colors.white), 309 | maxLines: 1, 310 | textInputAction: TextInputAction.search, 311 | onChanged: (value) { 312 | setState(() {}); 313 | if (value.isEmpty) { 314 | widget.searchMealsBloc.searchMealsByKeyword(value); 315 | } 316 | }, 317 | onSubmitted: (value) { 318 | setState(() {}); 319 | widget.searchMealsBloc.searchMealsByKeyword(value); 320 | }, 321 | ), 322 | ), 323 | _textEditingControllerKeyword.text.isEmpty 324 | ? Container() 325 | : GestureDetector( 326 | onTap: () { 327 | setState(() => _textEditingControllerKeyword.clear()); 328 | widget.searchMealsBloc.searchMealsByKeyword(""); 329 | }, 330 | child: Icon( 331 | Icons.clear, 332 | color: Colors.white, 333 | ), 334 | ), 335 | ], 336 | ); 337 | } 338 | } 339 | -------------------------------------------------------------------------------- /lib/src/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | const navigatorListMeals = "/list_meals"; 7 | const navigatorSearchMeals = "/search_meals"; 8 | const navigatorInfoApp = "/info_app"; 9 | 10 | Widget buildCircularProgressIndicator() { 11 | if (Platform.isIOS) { 12 | return CupertinoActivityIndicator(); 13 | } else { 14 | return CircularProgressIndicator(); 15 | } 16 | } 17 | 18 | Widget buildWidgetBackgroundCircle(MediaQueryData mediaQuery) { 19 | return Positioned( 20 | top: -100.0, 21 | left: -100.0, 22 | child: Container( 23 | width: mediaQuery.size.height / 2.2, 24 | height: mediaQuery.size.height / 2.2, 25 | decoration: BoxDecoration( 26 | color: Color(0x3FE8364B), 27 | shape: BoxShape.circle, 28 | ), 29 | ), 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /lib/values/color_assets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorAssets { 4 | static final Color primarySwatchColor = Color(0xFFE8364B); 5 | static final Color accentColor = Color(0xFFEE8F3B); 6 | static final Color primaryTextColor = Colors.grey[900]; 7 | static final Color secondColorCategoryItem = Color(0xFF3FD231); 8 | static final Color thirdColorCategoryItem = Color(0xFFF03F7D); 9 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.36.3" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.2.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.4" 32 | build: 33 | dependency: transitive 34 | description: 35 | name: build 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.4" 39 | build_config: 40 | dependency: transitive 41 | description: 42 | name: build_config 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.4.0" 46 | build_daemon: 47 | dependency: transitive 48 | description: 49 | name: build_daemon 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.0" 53 | build_resolvers: 54 | dependency: transitive 55 | description: 56 | name: build_resolvers 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.5" 60 | build_runner: 61 | dependency: "direct main" 62 | description: 63 | name: build_runner 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.5.1" 67 | build_runner_core: 68 | dependency: transitive 69 | description: 70 | name: build_runner_core 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "3.0.6" 74 | built_collection: 75 | dependency: transitive 76 | description: 77 | name: built_collection 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "4.2.2" 81 | built_value: 82 | dependency: transitive 83 | description: 84 | name: built_value 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "6.6.0" 88 | charcode: 89 | dependency: transitive 90 | description: 91 | name: charcode 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.1.2" 95 | code_builder: 96 | dependency: transitive 97 | description: 98 | name: code_builder 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.2.0" 102 | collection: 103 | dependency: transitive 104 | description: 105 | name: collection 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.14.11" 109 | convert: 110 | dependency: transitive 111 | description: 112 | name: convert 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.1.1" 116 | cookie_jar: 117 | dependency: transitive 118 | description: 119 | name: cookie_jar 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.0.0" 123 | crypto: 124 | dependency: transitive 125 | description: 126 | name: crypto 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "2.0.6" 130 | csslib: 131 | dependency: transitive 132 | description: 133 | name: csslib 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "0.16.0" 137 | cupertino_icons: 138 | dependency: "direct main" 139 | description: 140 | name: cupertino_icons 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "0.1.2" 144 | dart_style: 145 | dependency: transitive 146 | description: 147 | name: dart_style 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.2.8" 151 | dio: 152 | dependency: "direct main" 153 | description: 154 | name: dio 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "2.1.7" 158 | fixnum: 159 | dependency: transitive 160 | description: 161 | name: fixnum 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "0.10.9" 165 | flutter: 166 | dependency: "direct main" 167 | description: flutter 168 | source: sdk 169 | version: "0.0.0" 170 | flutter_test: 171 | dependency: "direct dev" 172 | description: flutter 173 | source: sdk 174 | version: "0.0.0" 175 | front_end: 176 | dependency: transitive 177 | description: 178 | name: front_end 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.1.18" 182 | get_version: 183 | dependency: "direct main" 184 | description: 185 | name: get_version 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "0.1.0" 189 | glob: 190 | dependency: transitive 191 | description: 192 | name: glob 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "1.1.7" 196 | graphs: 197 | dependency: transitive 198 | description: 199 | name: graphs 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "0.2.0" 203 | html: 204 | dependency: transitive 205 | description: 206 | name: html 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "0.14.0+2" 210 | http: 211 | dependency: transitive 212 | description: 213 | name: http 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "0.12.0+2" 217 | http_multi_server: 218 | dependency: transitive 219 | description: 220 | name: http_multi_server 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "2.1.0" 224 | http_parser: 225 | dependency: transitive 226 | description: 227 | name: http_parser 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "3.1.3" 231 | io: 232 | dependency: transitive 233 | description: 234 | name: io 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "0.3.3" 238 | js: 239 | dependency: transitive 240 | description: 241 | name: js 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "0.6.1+1" 245 | json_annotation: 246 | dependency: transitive 247 | description: 248 | name: json_annotation 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "2.4.0" 252 | json_serializable: 253 | dependency: "direct main" 254 | description: 255 | name: json_serializable 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "3.0.0" 259 | kernel: 260 | dependency: transitive 261 | description: 262 | name: kernel 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.3.18" 266 | logging: 267 | dependency: transitive 268 | description: 269 | name: logging 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "0.11.3+2" 273 | matcher: 274 | dependency: transitive 275 | description: 276 | name: matcher 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.12.5" 280 | meta: 281 | dependency: transitive 282 | description: 283 | name: meta 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "1.1.6" 287 | mime: 288 | dependency: transitive 289 | description: 290 | name: mime 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "0.9.6+3" 294 | package_config: 295 | dependency: transitive 296 | description: 297 | name: package_config 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "1.0.5" 301 | package_info: 302 | dependency: transitive 303 | description: 304 | name: package_info 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "0.4.0+4" 308 | package_resolver: 309 | dependency: transitive 310 | description: 311 | name: package_resolver 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.0.10" 315 | path: 316 | dependency: transitive 317 | description: 318 | name: path 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "1.6.2" 322 | path_provider: 323 | dependency: "direct main" 324 | description: 325 | name: path_provider 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "1.1.0" 329 | pedantic: 330 | dependency: transitive 331 | description: 332 | name: pedantic 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "1.7.0" 336 | pool: 337 | dependency: transitive 338 | description: 339 | name: pool 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.4.0" 343 | pub_semver: 344 | dependency: transitive 345 | description: 346 | name: pub_semver 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "1.4.2" 350 | pubspec_parse: 351 | dependency: transitive 352 | description: 353 | name: pubspec_parse 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "0.1.4" 357 | quiver: 358 | dependency: transitive 359 | description: 360 | name: quiver 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "2.0.3" 364 | rxdart: 365 | dependency: "direct main" 366 | description: 367 | name: rxdart 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "0.22.0" 371 | shelf: 372 | dependency: transitive 373 | description: 374 | name: shelf 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "0.7.5" 378 | shelf_web_socket: 379 | dependency: transitive 380 | description: 381 | name: shelf_web_socket 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "0.2.3" 385 | sky_engine: 386 | dependency: transitive 387 | description: flutter 388 | source: sdk 389 | version: "0.0.99" 390 | source_gen: 391 | dependency: transitive 392 | description: 393 | name: source_gen 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "0.9.4+2" 397 | source_span: 398 | dependency: transitive 399 | description: 400 | name: source_span 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.5.5" 404 | sqflite: 405 | dependency: "direct main" 406 | description: 407 | name: sqflite 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "1.1.5" 411 | stack_trace: 412 | dependency: transitive 413 | description: 414 | name: stack_trace 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "1.9.3" 418 | stream_channel: 419 | dependency: transitive 420 | description: 421 | name: stream_channel 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "2.0.0" 425 | stream_transform: 426 | dependency: transitive 427 | description: 428 | name: stream_transform 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "0.0.19" 432 | string_scanner: 433 | dependency: transitive 434 | description: 435 | name: string_scanner 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "1.0.4" 439 | synchronized: 440 | dependency: transitive 441 | description: 442 | name: synchronized 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "2.1.0" 446 | term_glyph: 447 | dependency: transitive 448 | description: 449 | name: term_glyph 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "1.1.0" 453 | test_api: 454 | dependency: transitive 455 | description: 456 | name: test_api 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "0.2.5" 460 | timing: 461 | dependency: transitive 462 | description: 463 | name: timing 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "0.1.1+1" 467 | typed_data: 468 | dependency: transitive 469 | description: 470 | name: typed_data 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "1.1.6" 474 | url_launcher: 475 | dependency: "direct main" 476 | description: 477 | name: url_launcher 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "5.0.3" 481 | vector_math: 482 | dependency: transitive 483 | description: 484 | name: vector_math 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.0.8" 488 | watcher: 489 | dependency: transitive 490 | description: 491 | name: watcher 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "0.9.7+10" 495 | web_socket_channel: 496 | dependency: transitive 497 | description: 498 | name: web_socket_channel 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "1.0.13" 502 | yaml: 503 | dependency: transitive 504 | description: 505 | name: yaml 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "2.1.15" 509 | sdks: 510 | dart: ">=2.3.0 <3.0.0" 511 | flutter: ">=1.5.0 <2.0.0" 512 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: food_recipe 2 | description: Food Recipe - Challenge Dicoding (Create Beautiful Apps Using Flutter) 3 | 4 | version: 1.0.3+4 5 | 6 | environment: 7 | sdk: ">=2.1.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | # The following adds the Cupertino Icons font to your application. 14 | # Use with the CupertinoIcons class for iOS style icons. 15 | cupertino_icons: ^0.1.2 16 | 17 | # Reactive functional programming library for Google Dart, based on ReactiveX. 18 | rxdart: ^0.22.0 19 | 20 | # A powerful Http client for Dart. 21 | dio: ^2.1.7 22 | 23 | # Automatically generate code for converting to and from JSON 24 | json_serializable: ^3.0.0 25 | 26 | # Tools to write binaries that run builders. 27 | build_runner: ^1.5.1 28 | 29 | # Flutter plugin for launching a URL on Android and iOS. 30 | url_launcher: ^5.0.3 31 | 32 | # Flutter plugin for SQLite. 33 | sqflite: ^1.1.5 34 | 35 | # Flutter plugin for getting commonly used locations on the Android & iOS. 36 | path_provider: ^1.1.0 37 | 38 | # Get the version name, version code, platform, OS version and app ID. 39 | get_version: ^0.1.0 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | flutter: 46 | 47 | # The following line ensures that the Material Icons font is 48 | # included with your application, so that you can use the icons in 49 | # the material Icons class. 50 | uses-material-design: true 51 | 52 | assets: 53 | - assets/images/img_not_found.jpg 54 | - assets/images/img_placeholder.jpg 55 | - assets/images/img_logo_512.png 56 | - assets/images/img_yudi_setiawan.jpeg 57 | - assets/images/img_logo_themealdb.png 58 | 59 | # An image asset can refer to one or more resolution-specific "variants", see 60 | # https://flutter.dev/assets-and-images/#resolution-aware. 61 | 62 | # For details regarding adding assets from package dependencies, see 63 | # https://flutter.dev/assets-and-images/#from-packages 64 | 65 | # To add custom fonts to your application, add a fonts section here, 66 | # in this "flutter" section. Each entry in this list should have a 67 | # "family" key with the font family name, and a "fonts" key with a 68 | # list giving the asset and other descriptors for the font. For 69 | # example: 70 | # fonts: 71 | # - family: Schyler 72 | # fonts: 73 | # - asset: fonts/Schyler-Regular.ttf 74 | # - asset: fonts/Schyler-Italic.ttf 75 | # style: italic 76 | # - family: Trajan Pro 77 | # fonts: 78 | # - asset: fonts/TrajanPro.ttf 79 | # - asset: fonts/TrajanPro_Bold.ttf 80 | # weight: 700 81 | # 82 | # For details regarding fonts from package dependencies, 83 | # see https://flutter.dev/custom-fonts/#from-packages 84 | --------------------------------------------------------------------------------