├── .gitignore
├── .metadata
├── README.md
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_recipes
│ │ │ │ └── MainActivity.java
│ │ └── 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
└── settings.gradle
├── assets
├── barbeque.jpg
├── beef.jpg
├── breakfast.jpg
├── brunch.jpg
├── chicken.jpg
├── dinner.jpg
├── italian.jpg
└── wine.jpg
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── main.m
├── lib
├── main.dart
└── src
│ ├── app.dart
│ ├── blocs
│ ├── bloc_provider.dart
│ ├── recipe_detail_bloc.dart
│ └── recipe_list_bloc.dart
│ ├── models
│ ├── recipe.dart
│ ├── recipe_response.dart
│ └── recipe_search_response.dart
│ ├── resources
│ ├── data_provider.dart
│ └── repository.dart
│ ├── ui
│ ├── recipe_categories.dart
│ ├── recipe_detail.dart
│ └── recipe_list.dart
│ └── utils
│ └── constants.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.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 | # Visual Studio Code related
19 | .vscode/
20 |
21 | # Flutter/Dart/Pub related
22 | **/doc/api/
23 | .dart_tool/
24 | .flutter-plugins
25 | .packages
26 | .pub-cache/
27 | .pub/
28 | /build/
29 |
30 | # Android related
31 | **/android/**/gradle-wrapper.jar
32 | **/android/.gradle
33 | **/android/captures/
34 | **/android/gradlew
35 | **/android/gradlew.bat
36 | **/android/local.properties
37 | **/android/**/GeneratedPluginRegistrant.java
38 |
39 | # iOS/XCode related
40 | **/ios/**/*.mode1v3
41 | **/ios/**/*.mode2v3
42 | **/ios/**/*.moved-aside
43 | **/ios/**/*.pbxuser
44 | **/ios/**/*.perspectivev3
45 | **/ios/**/*sync/
46 | **/ios/**/.sconsign.dblite
47 | **/ios/**/.tags*
48 | **/ios/**/.vagrant/
49 | **/ios/**/DerivedData/
50 | **/ios/**/Icon?
51 | **/ios/**/Pods/
52 | **/ios/**/.symlinks/
53 | **/ios/**/profile
54 | **/ios/**/xcuserdata
55 | **/ios/.generated/
56 | **/ios/Flutter/App.framework
57 | **/ios/Flutter/Flutter.framework
58 | **/ios/Flutter/Generated.xcconfig
59 | **/ios/Flutter/app.flx
60 | **/ios/Flutter/app.zip
61 | **/ios/Flutter/flutter_assets/
62 | **/ios/ServiceDefinitions.json
63 | **/ios/Runner/GeneratedPluginRegistrant.*
64 |
65 | # Exceptions to above rules.
66 | !**/ios/**/default.mode1v3
67 | !**/ios/**/default.mode2v3
68 | !**/ios/**/default.pbxuser
69 | !**/ios/**/default.perspectivev3
70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
71 |
--------------------------------------------------------------------------------
/.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: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_recipes
2 |
3 | [](https://saythanks.io/to/Manik1094)
4 |
5 | A new Flutter App which shows list of Recipes and it's details . This project follows BLOC Architecture.
6 |
7 | The source code is **100% Dart**, and everything resides in the [/lib](https://github.com/Manik1094/Flutter-Recipes/tree/master/lib) folder.
8 |
9 | ## Show some :heart: and star the repo to support the project
10 |
11 | [](https://github.com/Manik1094) [](https://twitter.com/ManikGDev)
12 |
13 | [](https://opensource.org/licenses/Apache-2.0)
14 |
15 |
16 |
17 |
18 |
19 |
20 | ## Demo
21 |
22 | 
23 |
24 |
25 | ## 👨 Developed By
26 |
27 | ```
28 | Manik Gupta
29 | ```
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | # 👍 How to Contribute
38 |
39 | 1. Fork it
40 | 2. Create your feature branch (git checkout -b my-new-feature)
41 | 3. Commit your changes (git commit -am 'Add some feature')
42 | 4. Push to the branch (git push origin my-new-feature)
43 | 5. Create new Pull Request
44 |
45 | # 📃 License
46 |
47 | Copyright (c) 2019 Manik Gupta
48 |
49 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
50 |
51 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
52 |
53 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
54 |
55 | ## Getting Started
56 |
57 | For help getting started with Flutter, view our online [documentation](https://flutter.dev/).
58 |
59 | For help on editing package code, view the [documentation](https://flutter.dev/developing-packages/).
60 |
--------------------------------------------------------------------------------
/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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.example.flutter_recipes"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/flutter_recipes/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.flutter_recipes;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
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/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/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 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/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/barbeque.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/barbeque.jpg
--------------------------------------------------------------------------------
/assets/beef.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/beef.jpg
--------------------------------------------------------------------------------
/assets/breakfast.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/breakfast.jpg
--------------------------------------------------------------------------------
/assets/brunch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/brunch.jpg
--------------------------------------------------------------------------------
/assets/chicken.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/chicken.jpg
--------------------------------------------------------------------------------
/assets/dinner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/dinner.jpg
--------------------------------------------------------------------------------
/assets/italian.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/italian.jpg
--------------------------------------------------------------------------------
/assets/wine.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/assets/wine.jpg
--------------------------------------------------------------------------------
/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 "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXCopyFilesBuildPhase section */
25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
26 | isa = PBXCopyFilesBuildPhase;
27 | buildActionMask = 2147483647;
28 | dstPath = "";
29 | dstSubfolderSpec = 10;
30 | files = (
31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
33 | );
34 | name = "Embed Frameworks";
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXCopyFilesBuildPhase section */
38 |
39 | /* Begin PBXFileReference section */
40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 9740EEB11CF90186004384FC /* Flutter */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 3B80C3931E831B6300D905FE /* App.framework */,
75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
80 | );
81 | name = Flutter;
82 | sourceTree = "";
83 | };
84 | 97C146E51CF9000F007C117D = {
85 | isa = PBXGroup;
86 | children = (
87 | 9740EEB11CF90186004384FC /* Flutter */,
88 | 97C146F01CF9000F007C117D /* Runner */,
89 | 97C146EF1CF9000F007C117D /* Products */,
90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
91 | );
92 | sourceTree = "";
93 | };
94 | 97C146EF1CF9000F007C117D /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146EE1CF9000F007C117D /* Runner.app */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 97C146F01CF9000F007C117D /* Runner */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
107 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
110 | 97C147021CF9000F007C117D /* Info.plist */,
111 | 97C146F11CF9000F007C117D /* Supporting Files */,
112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
114 | );
115 | path = Runner;
116 | sourceTree = "";
117 | };
118 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 97C146F21CF9000F007C117D /* main.m */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | /* End PBXGroup section */
127 |
128 | /* Begin PBXNativeTarget section */
129 | 97C146ED1CF9000F007C117D /* Runner */ = {
130 | isa = PBXNativeTarget;
131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
132 | buildPhases = (
133 | 9740EEB61CF901F6004384FC /* Run Script */,
134 | 97C146EA1CF9000F007C117D /* Sources */,
135 | 97C146EB1CF9000F007C117D /* Frameworks */,
136 | 97C146EC1CF9000F007C117D /* Resources */,
137 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
139 | );
140 | buildRules = (
141 | );
142 | dependencies = (
143 | );
144 | name = Runner;
145 | productName = Runner;
146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
147 | productType = "com.apple.product-type.application";
148 | };
149 | /* End PBXNativeTarget section */
150 |
151 | /* Begin PBXProject section */
152 | 97C146E61CF9000F007C117D /* Project object */ = {
153 | isa = PBXProject;
154 | attributes = {
155 | LastUpgradeCheck = 0910;
156 | ORGANIZATIONNAME = "The Chromium Authors";
157 | TargetAttributes = {
158 | 97C146ED1CF9000F007C117D = {
159 | CreatedOnToolsVersion = 7.3.1;
160 | };
161 | };
162 | };
163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
164 | compatibilityVersion = "Xcode 3.2";
165 | developmentRegion = English;
166 | hasScannedForEncodings = 0;
167 | knownRegions = (
168 | en,
169 | Base,
170 | );
171 | mainGroup = 97C146E51CF9000F007C117D;
172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
173 | projectDirPath = "";
174 | projectRoot = "";
175 | targets = (
176 | 97C146ED1CF9000F007C117D /* Runner */,
177 | );
178 | };
179 | /* End PBXProject section */
180 |
181 | /* Begin PBXResourcesBuildPhase section */
182 | 97C146EC1CF9000F007C117D /* Resources */ = {
183 | isa = PBXResourcesBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
190 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
191 | );
192 | runOnlyForDeploymentPostprocessing = 0;
193 | };
194 | /* End PBXResourcesBuildPhase section */
195 |
196 | /* Begin PBXShellScriptBuildPhase section */
197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
198 | isa = PBXShellScriptBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | );
202 | inputPaths = (
203 | );
204 | name = "Thin Binary";
205 | outputPaths = (
206 | );
207 | runOnlyForDeploymentPostprocessing = 0;
208 | shellPath = /bin/sh;
209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
210 | };
211 | 9740EEB61CF901F6004384FC /* Run Script */ = {
212 | isa = PBXShellScriptBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | );
216 | inputPaths = (
217 | );
218 | name = "Run Script";
219 | outputPaths = (
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | shellPath = /bin/sh;
223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
224 | };
225 | /* End PBXShellScriptBuildPhase section */
226 |
227 | /* Begin PBXSourcesBuildPhase section */
228 | 97C146EA1CF9000F007C117D /* Sources */ = {
229 | isa = PBXSourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
233 | 97C146F31CF9000F007C117D /* main.m in Sources */,
234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXSourcesBuildPhase section */
239 |
240 | /* Begin PBXVariantGroup section */
241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
242 | isa = PBXVariantGroup;
243 | children = (
244 | 97C146FB1CF9000F007C117D /* Base */,
245 | );
246 | name = Main.storyboard;
247 | sourceTree = "";
248 | };
249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
250 | isa = PBXVariantGroup;
251 | children = (
252 | 97C147001CF9000F007C117D /* Base */,
253 | );
254 | name = LaunchScreen.storyboard;
255 | sourceTree = "";
256 | };
257 | /* End PBXVariantGroup section */
258 |
259 | /* Begin XCBuildConfiguration section */
260 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
261 | isa = XCBuildConfiguration;
262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
263 | buildSettings = {
264 | ALWAYS_SEARCH_USER_PATHS = NO;
265 | CLANG_ANALYZER_NONNULL = YES;
266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267 | CLANG_CXX_LIBRARY = "libc++";
268 | CLANG_ENABLE_MODULES = YES;
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
271 | CLANG_WARN_BOOL_CONVERSION = YES;
272 | CLANG_WARN_COMMA = YES;
273 | CLANG_WARN_CONSTANT_CONVERSION = YES;
274 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
275 | CLANG_WARN_EMPTY_BODY = YES;
276 | CLANG_WARN_ENUM_CONVERSION = YES;
277 | CLANG_WARN_INFINITE_RECURSION = YES;
278 | CLANG_WARN_INT_CONVERSION = YES;
279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
283 | CLANG_WARN_STRICT_PROTOTYPES = YES;
284 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
285 | CLANG_WARN_UNREACHABLE_CODE = YES;
286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
288 | COPY_PHASE_STRIP = NO;
289 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
290 | ENABLE_NS_ASSERTIONS = NO;
291 | ENABLE_STRICT_OBJC_MSGSEND = YES;
292 | GCC_C_LANGUAGE_STANDARD = gnu99;
293 | GCC_NO_COMMON_BLOCKS = YES;
294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
296 | GCC_WARN_UNDECLARED_SELECTOR = YES;
297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
298 | GCC_WARN_UNUSED_FUNCTION = YES;
299 | GCC_WARN_UNUSED_VARIABLE = YES;
300 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
301 | MTL_ENABLE_DEBUG_INFO = NO;
302 | SDKROOT = iphoneos;
303 | TARGETED_DEVICE_FAMILY = "1,2";
304 | VALIDATE_PRODUCT = YES;
305 | };
306 | name = Profile;
307 | };
308 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
309 | isa = XCBuildConfiguration;
310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
311 | buildSettings = {
312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
314 | DEVELOPMENT_TEAM = S8QB4VV633;
315 | ENABLE_BITCODE = NO;
316 | FRAMEWORK_SEARCH_PATHS = (
317 | "$(inherited)",
318 | "$(PROJECT_DIR)/Flutter",
319 | );
320 | INFOPLIST_FILE = Runner/Info.plist;
321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
322 | LIBRARY_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "$(PROJECT_DIR)/Flutter",
325 | );
326 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterRecipes;
327 | PRODUCT_NAME = "$(TARGET_NAME)";
328 | VERSIONING_SYSTEM = "apple-generic";
329 | };
330 | name = Profile;
331 | };
332 | 97C147031CF9000F007C117D /* Debug */ = {
333 | isa = XCBuildConfiguration;
334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
335 | buildSettings = {
336 | ALWAYS_SEARCH_USER_PATHS = NO;
337 | CLANG_ANALYZER_NONNULL = YES;
338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
339 | CLANG_CXX_LIBRARY = "libc++";
340 | CLANG_ENABLE_MODULES = YES;
341 | CLANG_ENABLE_OBJC_ARC = YES;
342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
343 | CLANG_WARN_BOOL_CONVERSION = YES;
344 | CLANG_WARN_COMMA = YES;
345 | CLANG_WARN_CONSTANT_CONVERSION = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
355 | CLANG_WARN_STRICT_PROTOTYPES = YES;
356 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
357 | CLANG_WARN_UNREACHABLE_CODE = YES;
358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
360 | COPY_PHASE_STRIP = NO;
361 | DEBUG_INFORMATION_FORMAT = dwarf;
362 | ENABLE_STRICT_OBJC_MSGSEND = YES;
363 | ENABLE_TESTABILITY = YES;
364 | GCC_C_LANGUAGE_STANDARD = gnu99;
365 | GCC_DYNAMIC_NO_PIC = NO;
366 | GCC_NO_COMMON_BLOCKS = YES;
367 | GCC_OPTIMIZATION_LEVEL = 0;
368 | GCC_PREPROCESSOR_DEFINITIONS = (
369 | "DEBUG=1",
370 | "$(inherited)",
371 | );
372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
374 | GCC_WARN_UNDECLARED_SELECTOR = YES;
375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
376 | GCC_WARN_UNUSED_FUNCTION = YES;
377 | GCC_WARN_UNUSED_VARIABLE = YES;
378 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
379 | MTL_ENABLE_DEBUG_INFO = YES;
380 | ONLY_ACTIVE_ARCH = YES;
381 | SDKROOT = iphoneos;
382 | TARGETED_DEVICE_FAMILY = "1,2";
383 | };
384 | name = Debug;
385 | };
386 | 97C147041CF9000F007C117D /* Release */ = {
387 | isa = XCBuildConfiguration;
388 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
389 | buildSettings = {
390 | ALWAYS_SEARCH_USER_PATHS = NO;
391 | CLANG_ANALYZER_NONNULL = YES;
392 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
393 | CLANG_CXX_LIBRARY = "libc++";
394 | CLANG_ENABLE_MODULES = YES;
395 | CLANG_ENABLE_OBJC_ARC = YES;
396 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
397 | CLANG_WARN_BOOL_CONVERSION = YES;
398 | CLANG_WARN_COMMA = YES;
399 | CLANG_WARN_CONSTANT_CONVERSION = YES;
400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
401 | CLANG_WARN_EMPTY_BODY = YES;
402 | CLANG_WARN_ENUM_CONVERSION = YES;
403 | CLANG_WARN_INFINITE_RECURSION = YES;
404 | CLANG_WARN_INT_CONVERSION = YES;
405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
406 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
409 | CLANG_WARN_STRICT_PROTOTYPES = YES;
410 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
411 | CLANG_WARN_UNREACHABLE_CODE = YES;
412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
414 | COPY_PHASE_STRIP = NO;
415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
416 | ENABLE_NS_ASSERTIONS = NO;
417 | ENABLE_STRICT_OBJC_MSGSEND = YES;
418 | GCC_C_LANGUAGE_STANDARD = gnu99;
419 | GCC_NO_COMMON_BLOCKS = YES;
420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
422 | GCC_WARN_UNDECLARED_SELECTOR = YES;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
427 | MTL_ENABLE_DEBUG_INFO = NO;
428 | SDKROOT = iphoneos;
429 | TARGETED_DEVICE_FAMILY = "1,2";
430 | VALIDATE_PRODUCT = YES;
431 | };
432 | name = Release;
433 | };
434 | 97C147061CF9000F007C117D /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
437 | buildSettings = {
438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
439 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
440 | ENABLE_BITCODE = NO;
441 | FRAMEWORK_SEARCH_PATHS = (
442 | "$(inherited)",
443 | "$(PROJECT_DIR)/Flutter",
444 | );
445 | INFOPLIST_FILE = Runner/Info.plist;
446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
447 | LIBRARY_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterRecipes;
452 | PRODUCT_NAME = "$(TARGET_NAME)";
453 | VERSIONING_SYSTEM = "apple-generic";
454 | };
455 | name = Debug;
456 | };
457 | 97C147071CF9000F007C117D /* Release */ = {
458 | isa = XCBuildConfiguration;
459 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
460 | buildSettings = {
461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
462 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
463 | ENABLE_BITCODE = NO;
464 | FRAMEWORK_SEARCH_PATHS = (
465 | "$(inherited)",
466 | "$(PROJECT_DIR)/Flutter",
467 | );
468 | INFOPLIST_FILE = Runner/Info.plist;
469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
470 | LIBRARY_SEARCH_PATHS = (
471 | "$(inherited)",
472 | "$(PROJECT_DIR)/Flutter",
473 | );
474 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterRecipes;
475 | PRODUCT_NAME = "$(TARGET_NAME)";
476 | VERSIONING_SYSTEM = "apple-generic";
477 | };
478 | name = Release;
479 | };
480 | /* End XCBuildConfiguration section */
481 |
482 | /* Begin XCConfigurationList section */
483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | 97C147031CF9000F007C117D /* Debug */,
487 | 97C147041CF9000F007C117D /* Release */,
488 | 249021D3217E4FDB00AE95B9 /* Profile */,
489 | );
490 | defaultConfigurationIsVisible = 0;
491 | defaultConfigurationName = Release;
492 | };
493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | 97C147061CF9000F007C117D /* Debug */,
497 | 97C147071CF9000F007C117D /* Release */,
498 | 249021D4217E4FDB00AE95B9 /* Profile */,
499 | );
500 | defaultConfigurationIsVisible = 0;
501 | defaultConfigurationName = Release;
502 | };
503 | /* End XCConfigurationList section */
504 | };
505 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
506 | }
507 |
--------------------------------------------------------------------------------
/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 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.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/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manik1094/Flutter-Recipes/401916cd3472917d4a51085d3556c5a7e7bb0e83/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 | flutter_recipes
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/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_recipes/src/app.dart';
3 |
4 | void main() => runApp(App());
--------------------------------------------------------------------------------
/lib/src/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
3 | import 'package:flutter_recipes/src/blocs/recipe_list_bloc.dart';
4 | import 'package:flutter_recipes/src/ui/recipe_categories.dart';
5 | import 'package:flutter_recipes/src/ui/recipe_list.dart';
6 | import 'package:flutter_recipes/src/utils/constants.dart';
7 |
8 | class App extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 | return MaterialApp(
12 | title: 'Flutter_recipes',
13 | home: new HomePage(),
14 | );
15 | }
16 | }
17 |
18 | class HomePage extends StatelessWidget {
19 | const HomePage({
20 | Key key,
21 | }) : super(key: key);
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | appBar: AppBar(
27 | title: Text('Flutter Recipes'),
28 | actions: [
29 | IconButton(
30 | icon: Icon(Icons.search),
31 | onPressed: () {
32 | showSearch(context: context, delegate: DataSearch());
33 | },
34 | )
35 | ],
36 | ),
37 | body: RecipeCategoriesScreen(),
38 | );
39 | }
40 | }
41 |
42 | class DataSearch extends SearchDelegate {
43 | @override
44 | List buildActions(BuildContext context) {
45 | return [
46 | IconButton(
47 | icon: Icon(Icons.clear),
48 | onPressed: () {
49 | query = "";
50 | },
51 | )
52 | ];
53 | }
54 |
55 | @override
56 | Widget buildLeading(BuildContext context) {
57 | return IconButton(
58 | icon: Icon(Icons.arrow_back),
59 | onPressed: () {
60 | close(context, null);
61 | },
62 | );
63 | }
64 |
65 | @override
66 | Widget buildResults(BuildContext context) {
67 | print('Query is : $query');
68 | return BlocProvider(
69 | bloc: RecipeListBloc(),
70 | child: RecipeListScreen(
71 | category: query,
72 | ));
73 |
74 | }
75 |
76 | @override
77 | Widget buildSuggestions(BuildContext context) {
78 | final suggestionsList = query.isEmpty
79 | ?Constants.DEFAULT_SEARCH_CATEGORIES
80 | :Constants.DEFAULT_SEARCH_CATEGORIES.where((p) => p.startsWith(query)).toList();
81 |
82 | return ListView.builder(
83 | itemBuilder: (context, index) {
84 | return ListTile(
85 | onTap: () {
86 | //
87 | Navigator.push(
88 | context,
89 | MaterialPageRoute(
90 | builder: ((context) =>
91 | BlocProvider(
92 | bloc: RecipeListBloc(),
93 | child:
94 | RecipeListScreen(
95 | category: suggestionsList[index],
96 | ))))
97 | );
98 | },
99 | title: Text(
100 | suggestionsList[index],
101 | style: TextStyle(color: Colors.black, fontSize: 15.0),
102 | ),
103 | );
104 | // return Text(suggestionsList[index] , style: TextStyle(color: Colors.black , fontSize: 15.0),);
105 | },
106 | itemCount: suggestionsList.length,
107 | );
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/lib/src/blocs/bloc_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 |
4 | abstract class BlocBase{
5 | void dispose();
6 | }
7 | class BlocProvider extends StatefulWidget {
8 |
9 | final T bloc;
10 | final Widget child;
11 |
12 | static Type _typeOf() => T;
13 |
14 | static T of(BuildContext context){
15 | final _type = _typeOf>();
16 | BlocProvider _provider = context.ancestorWidgetOfExactType(_type);
17 | return _provider.bloc;
18 | }
19 |
20 | BlocProvider({this.bloc , this.child});
21 | @override
22 | _BlocProviderState createState() => _BlocProviderState();
23 | }
24 |
25 | class _BlocProviderState extends State> {
26 |
27 | @override
28 | void dispose() {
29 | // TODO: implement dispose
30 | widget.bloc.dispose();
31 | super.dispose();
32 | }
33 | @override
34 | Widget build(BuildContext context) => widget.child;
35 | }
--------------------------------------------------------------------------------
/lib/src/blocs/recipe_detail_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
2 | import 'package:flutter_recipes/src/models/recipe_response.dart';
3 | import 'package:rxdart/rxdart.dart';
4 | import 'package:flutter_recipes/src/resources/repository.dart';
5 |
6 | class RecipeDetailBloc implements BlocBase{
7 | final _repository = Repository();
8 | final _recipeFetcher = BehaviorSubject();
9 |
10 | Observable get recipe => _recipeFetcher.stream;
11 |
12 | fetchRecipeById(String recipeId) async {
13 | RecipeResponse recipeResponse = await _repository.fetchRecipeById(recipeId);
14 | if (recipeResponse.recipe == null) {
15 | _recipeFetcher.sink.addError('Failed to load recipe details');
16 | } else {
17 | _recipeFetcher.sink.add(recipeResponse);
18 | }
19 | }
20 |
21 | @override
22 | void dispose() {
23 | // TODO: implement dispose
24 | _recipeFetcher.close();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/src/blocs/recipe_list_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
2 | import 'package:flutter_recipes/src/models/recipe.dart';
3 | import 'package:flutter_recipes/src/models/recipe_search_response.dart';
4 | import 'package:rxdart/rxdart.dart';
5 | import 'package:flutter_recipes/src/resources/repository.dart';
6 | import 'package:collection/collection.dart';
7 |
8 | class RecipeListBloc implements BlocBase {
9 | // final bloc = RecipeListBloc();
10 | Function eq = const ListEquality().equals;
11 |
12 | final _repository = Repository();
13 | final _recipesFetcher = PublishSubject();
14 | RecipeSearchResponse finalRecipes = RecipeSearchResponse();
15 |
16 | Observable get recipesList => _recipesFetcher.stream;
17 |
18 | fetchRecipesByCategory(String category, int page) async {
19 | RecipeSearchResponse recipeSearchResponse =
20 | await _repository.fetchRecipesByCategory(category, page);
21 | finalRecipes.recipes.clear();
22 | if (recipeSearchResponse.recipes.length == 0) {
23 | _recipesFetcher.sink.addError('No More results');
24 | } else {
25 | finalRecipes.recipes.addAll(recipeSearchResponse.recipes);
26 | _recipesFetcher.sink.add(finalRecipes);
27 |
28 | }
29 | }
30 |
31 | fetchNextPage(String category, int page) async {
32 | RecipeSearchResponse recipeSearchResponse =
33 | await _repository.fetchNextPage(category, page);
34 |
35 | if (recipeSearchResponse.recipes.length == 0) {
36 | _recipesFetcher.sink.addError('No more Results');
37 | } else {
38 | finalRecipes.recipes.addAll(recipeSearchResponse.recipes);
39 | _recipesFetcher.sink.add(finalRecipes);
40 | }
41 | }
42 |
43 | @override
44 | void dispose() {
45 | // TODO: implement dispose
46 | _recipesFetcher.close();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/src/models/recipe.dart:
--------------------------------------------------------------------------------
1 |
2 | class Recipe{
3 |
4 | String _title;
5 | String _publisher;
6 | String _recipe_id;
7 | String _image_url;
8 | double _social_rank;
9 | List _ingredients;
10 |
11 | Recipe( recipe){
12 | _title = recipe['title'];
13 | _publisher = recipe['publisher'];
14 | _recipe_id = recipe['recipe_id'];
15 | _image_url = recipe['image_url'];
16 | _social_rank = recipe['social_rank'];
17 |
18 | }
19 |
20 | Recipe.fromJson(Map recipe){
21 | _title = recipe['title'];
22 | _publisher = recipe['publisher'];
23 | _recipe_id = recipe['recipe_id'];
24 | _image_url = recipe['image_url'];
25 | _social_rank = recipe['social_rank'];
26 | _ingredients = new List();
27 | // recipe['ingredients'].forEach((p) => _ingredients.add());
28 | _ingredients = recipe['ingredients'].cast();
29 | }
30 |
31 | String get title => _title;
32 | String get publisher => _publisher;
33 | String get recipe_id => _recipe_id;
34 | String get image_url => _image_url;
35 | double get social_rank => _social_rank;
36 | List get ingredients => _ingredients;
37 |
38 |
39 |
40 | }
41 |
42 | class Ingredients{
43 |
44 | }
--------------------------------------------------------------------------------
/lib/src/models/recipe_response.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_recipes/src/models/recipe.dart';
3 |
4 | class RecipeResponse{
5 |
6 | Recipe _recipe;
7 |
8 | Recipe get recipe => _recipe;
9 |
10 | RecipeResponse();
11 |
12 | RecipeResponse.fromJson(Map parsedJson){
13 | Recipe recipe = Recipe.fromJson(parsedJson['recipe']);
14 | _recipe = recipe;
15 | }
16 | }
--------------------------------------------------------------------------------
/lib/src/models/recipe_search_response.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_recipes/src/models/recipe.dart';
2 |
3 | class RecipeSearchResponse {
4 | int _count;
5 | List _recipes = List();
6 |
7 | int get count => _count;
8 |
9 | List get recipes => _recipes;
10 |
11 |
12 |
13 | RecipeSearchResponse(
14 |
15 | );
16 |
17 | RecipeSearchResponse.fromJson(Map parsedJson) {
18 | print(parsedJson['recipes'].length);
19 | _count = parsedJson['count'];
20 | List _temp = [];
21 | for (var i = 0; i < parsedJson['recipes'].length; i++) {
22 | Recipe recipe = new Recipe(parsedJson['recipes'][i]);
23 | _temp.add(recipe);
24 |
25 | }
26 |
27 |
28 | _recipes = _temp;
29 |
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/lib/src/resources/data_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_recipes/src/models/recipe_response.dart';
2 | import 'package:flutter_recipes/src/models/recipe_search_response.dart';
3 | import 'package:flutter_recipes/src/utils/constants.dart';
4 | import 'package:http/http.dart' as http;
5 | import 'dart:async';
6 | import 'dart:convert';
7 |
8 | class DataProvider{
9 |
10 | Future fetchRecipesByCategory(String category , int page) async{
11 | final response = await http.Client()
12 | .get("${Constants.BASE_URL}/api/search?key=${Constants.API_KEY}&q=${category}&page=${page}");
13 |
14 | print(response.body.toString());
15 | if(response.statusCode == Constants.SUCCESS_CODE){
16 | return RecipeSearchResponse.fromJson(json.decode(response.body));
17 | } else{
18 | return RecipeSearchResponse();
19 | }
20 |
21 | }
22 |
23 | Future fetchNextPage(String category , int page) async{
24 | final response = await http.Client()
25 | .get("${Constants.BASE_URL}/api/search?key=${Constants.API_KEY}&q=${category}&page=${page}");
26 |
27 | print(response.body.toString());
28 | if(response.statusCode == Constants.SUCCESS_CODE){
29 | return RecipeSearchResponse.fromJson(json.decode(response.body));
30 | } else{
31 | return RecipeSearchResponse();
32 | }
33 |
34 | }
35 |
36 | Future fetchRecipeById(String recipeId) async{
37 | final response = await http.Client()
38 | .get("${Constants.BASE_URL}/api/get?key=${Constants.API_KEY}&rId=${recipeId}");
39 |
40 |
41 | print(response.body.toString());
42 | if(response.statusCode == Constants.SUCCESS_CODE){
43 | return RecipeResponse.fromJson(json.decode(response.body));
44 | }else{
45 | return RecipeResponse();
46 | }
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/lib/src/resources/repository.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_recipes/src/models/recipe_response.dart';
3 | import 'package:flutter_recipes/src/models/recipe_search_response.dart';
4 | import 'package:flutter_recipes/src/resources/data_provider.dart';
5 |
6 | class Repository {
7 |
8 | final _dataProvider = DataProvider();
9 |
10 | Future fetchRecipesByCategory(String category , int page) async{
11 | RecipeSearchResponse recipeSearchResponse = await _dataProvider.fetchRecipesByCategory(category , page);
12 | return recipeSearchResponse;
13 | }
14 |
15 | Future fetchNextPage(String category , int page) async{
16 | RecipeSearchResponse recipeSearchResponse = await _dataProvider.fetchNextPage(category , page );
17 | return recipeSearchResponse;
18 | }
19 |
20 | Future fetchRecipeById(String recipeId) async{
21 | RecipeResponse recipeResponse = await _dataProvider.fetchRecipeById(recipeId);
22 | return recipeResponse;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/ui/recipe_categories.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
3 | import 'package:flutter_recipes/src/blocs/recipe_list_bloc.dart';
4 |
5 | import 'package:flutter_recipes/src/ui/recipe_list.dart';
6 | import 'package:flutter_recipes/src/utils/constants.dart';
7 |
8 | class RecipeCategoriesScreen extends StatelessWidget {
9 |
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 |
14 | return Padding(
15 | padding: EdgeInsets.all(8.0),
16 | child: ListView.builder(
17 | itemCount: Constants.DEFAULT_SEARCH_CATEGORIES.length,
18 | itemBuilder: (BuildContext context, int index) {
19 | return Padding(
20 | padding: const EdgeInsets.all(8.0),
21 | child: GestureDetector(
22 | onTap: () {
23 | //TODO: Execute query based on category
24 | Navigator.push(context, MaterialPageRoute(builder: (context) {
25 | return BlocProvider(
26 | bloc: RecipeListBloc(),
27 | child: RecipeListScreen(
28 | category: Constants.DEFAULT_SEARCH_CATEGORIES[index],
29 | ));
30 | }));
31 | },
32 | child: Card(
33 | elevation: 10.0,
34 | child: Padding(
35 | padding: const EdgeInsets.only(
36 | top: 20.0, bottom: 20.0, left: 0.0, right: 0.0),
37 | child: ListTile(
38 | leading: CircleAvatar(
39 | backgroundImage: AssetImage(
40 | 'assets/${Constants.DEFAULT_CATEGORIES_IMAGES[index]}.jpg'),
41 | radius: 30.0,
42 | ),
43 | title: Text(
44 | Constants.DEFAULT_SEARCH_CATEGORIES[index],
45 | style: TextStyle(fontSize: 20.0, color: Colors.black),
46 | ),
47 | ),
48 | ),
49 | ),
50 | ),
51 | );
52 | },
53 | ),
54 | );
55 | }
56 | }
57 |
58 |
59 |
--------------------------------------------------------------------------------
/lib/src/ui/recipe_detail.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
3 | import 'package:flutter_recipes/src/blocs/recipe_detail_bloc.dart';
4 |
5 | import 'package:flutter_recipes/src/models/recipe.dart';
6 | import 'package:flutter_recipes/src/models/recipe_response.dart';
7 |
8 | class RecipeDetailScreen extends StatefulWidget {
9 | final Recipe recipe;
10 |
11 | RecipeDetailScreen({this.recipe});
12 |
13 | @override
14 | _RecipeDetailScreenState createState() => _RecipeDetailScreenState();
15 | }
16 |
17 | class _RecipeDetailScreenState extends State {
18 | RecipeDetailBloc bloc;
19 |
20 | @override
21 | void dispose() {
22 | // TODO: implement dispose
23 | super.dispose();
24 | print('Inside dispose of RecipeDetail Screen');
25 |
26 | bloc.dispose();
27 | }
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | bloc = BlocProvider.of(context);
32 | print('Inside build of RecipeDetailScreen and executing query');
33 | bloc.fetchRecipeById(widget.recipe.recipe_id);
34 | return Scaffold(
35 | appBar: AppBar(
36 | title: Text(widget.recipe.title),
37 | ),
38 | body: StreamBuilder(
39 | stream: bloc.recipe,
40 | builder: (context, AsyncSnapshot snapshot) {
41 | if (snapshot.hasData) {
42 | return ListView(
43 | children: [
44 | Padding(
45 | padding: const EdgeInsets.only(top: 8.0),
46 | child: Container(
47 | width: MediaQuery.of(context).size.width,
48 | height: 250.0,
49 | decoration: BoxDecoration(
50 | image: DecorationImage(
51 | image:
52 | NetworkImage(snapshot.data.recipe.image_url))),
53 | ),
54 | ),
55 | Padding(
56 | padding: const EdgeInsets.all(8.0),
57 | child: Text(
58 | snapshot.data.recipe.title,
59 | style: TextStyle(color: Colors.black, fontSize: 25.0),
60 | ),
61 | ),
62 | Padding(
63 | padding:
64 | const EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0),
65 | child: Row(
66 | mainAxisAlignment: MainAxisAlignment.spaceAround,
67 | children: [
68 | Text('Ingredients',
69 | style: TextStyle(
70 | color: Colors.black,
71 | fontWeight: FontWeight.bold,
72 | fontSize: 18.0,
73 | )),
74 | Text(snapshot.data.recipe.social_rank.toStringAsFixed(2),
75 | style: TextStyle(
76 | color: Colors.pink,
77 | fontSize: 18.0,
78 | )),
79 | ],
80 | ),
81 | ),
82 | Padding(
83 | padding:
84 | const EdgeInsets.only(left: 10.0, right: 10.0, top: 20.0),
85 | child: ListView.builder(
86 | shrinkWrap: true,
87 | itemCount: snapshot.data.recipe.ingredients.length,
88 | itemBuilder: (context, index) {
89 | return Padding(
90 | padding: const EdgeInsets.only(top: 8.0),
91 | child: Text(
92 | snapshot.data.recipe.ingredients[index],
93 | style: TextStyle(color: Colors.black, fontSize: 15.0),
94 | ),
95 | );
96 | },
97 | ),
98 | )
99 | ],
100 | );
101 | } else if (snapshot.hasError) {
102 | return Center(
103 | child: Text(
104 | snapshot.error.toString(),
105 | style: TextStyle(color: Colors.black, fontSize: 20.0),
106 | ));
107 | } else {
108 | return Center(child: CircularProgressIndicator());
109 | }
110 | },
111 | ),
112 | );
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/lib/src/ui/recipe_list.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_recipes/src/blocs/bloc_provider.dart';
3 | import 'package:flutter_recipes/src/blocs/recipe_detail_bloc.dart';
4 | import 'package:flutter_recipes/src/blocs/recipe_list_bloc.dart';
5 | import 'package:flutter_recipes/src/models/recipe_search_response.dart';
6 | import 'package:flutter_recipes/src/ui/recipe_detail.dart';
7 |
8 | class RecipeListScreen extends StatefulWidget {
9 | final String category;
10 | //final RecipeListBloc bloc;
11 |
12 | RecipeListScreen({this.category});
13 | @override
14 | _RecipeListScreenState createState() => _RecipeListScreenState();
15 | }
16 |
17 | class _RecipeListScreenState extends State {
18 | RecipeListBloc bloc;
19 | ScrollController _controller;
20 | int page = 1;
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 |
26 | // bloc.addInitialData();
27 | _controller = ScrollController();
28 | _controller.addListener(_scrollListener);
29 | }
30 |
31 | _scrollListener() {
32 | if (_controller.offset >= _controller.position.maxScrollExtent &&
33 | !_controller.position.outOfRange) {
34 | //ListView reached the bottom
35 |
36 | print('Reached bottom');
37 | bloc.fetchNextPage(widget.category, page + 1);
38 | }
39 | }
40 |
41 | @override
42 | void dispose() {
43 | // TODO: implement dispose
44 | print('Inside dispose of RecipeList Screen');
45 | super.dispose();
46 | bloc.dispose();
47 | }
48 |
49 | // @override
50 | // void didChangeDependencies() {
51 | // super.didChangeDependencies();
52 | // bloc = RecipeListBlocProvider.of(context);
53 | // print('Inside didChangeDependencies');
54 |
55 | // bloc.fetchRecipesByCategory(widget.category, page);
56 | // }
57 |
58 | @override
59 | Widget build(BuildContext context) {
60 | print('Inside build');
61 | bloc = BlocProvider.of(context);
62 | print('Inside build of RecipeListScreen and executing query');
63 |
64 | bloc.fetchRecipesByCategory(widget.category, page);
65 | return Scaffold(
66 | // appBar: AppBar(
67 | // title: Text('Recipes List'),
68 |
69 | // ),
70 | body: Padding(
71 | padding: EdgeInsets.all(8.0),
72 | child: StreamBuilder(
73 | stream: bloc.recipesList,
74 | builder: (BuildContext context,
75 | AsyncSnapshot snapshot) {
76 | if (snapshot.hasData) {
77 | print('Recipes list size : ${snapshot.data.recipes.length}');
78 | return ListView.builder(
79 | controller: _controller,
80 | itemCount: snapshot.data.recipes.length,
81 | itemBuilder: (context, int index) {
82 | return GestureDetector(
83 | onTap: () {
84 | Navigator.push(
85 | context,
86 | MaterialPageRoute(
87 | builder: ((context) => BlocProvider(
88 | bloc: RecipeDetailBloc(),
89 | child: RecipeDetailScreen(
90 | recipe: snapshot.data.recipes[index],
91 | ),
92 | ))));
93 | },
94 | child: Card(
95 | elevation: 10.0,
96 | child: Padding(
97 | padding: const EdgeInsets.only(
98 | bottom: 20.0, left: 0.0, right: 0.0),
99 | child: buildLayout(snapshot, index),
100 | ),
101 | ),
102 | );
103 | },
104 | );
105 | } else if (snapshot.hasError) {
106 | return Center(
107 | child: Text('Failed to load recipes',
108 | style: TextStyle(color: Colors.black, fontSize: 20.0)),
109 | );
110 | } else {
111 | return Center(child: CircularProgressIndicator());
112 | }
113 | },
114 | ),
115 | ),
116 | );
117 | }
118 |
119 | Widget buildLayout(AsyncSnapshot snapshot, int index) {
120 | return Column(
121 | children: [
122 | Container(
123 | width: MediaQuery.of(context).size.width,
124 | height: 200.0,
125 | decoration: BoxDecoration(
126 | image: DecorationImage(
127 | fit: BoxFit.cover,
128 | image: NetworkImage(snapshot.data.recipes[index].image_url))),
129 | ),
130 | Padding(
131 | padding: const EdgeInsets.all(8.0),
132 | child: Text(
133 | snapshot.data.recipes[index].title,
134 | style: TextStyle(fontSize: 20.0, color: Colors.black),
135 | ),
136 | ),
137 | Row(
138 | mainAxisAlignment: MainAxisAlignment.spaceAround,
139 | children: [
140 | Text(
141 | snapshot.data.recipes[index].publisher,
142 | style: TextStyle(color: Colors.grey, fontSize: 16.0),
143 | ),
144 | Text(
145 | snapshot.data.recipes[index].social_rank.toStringAsFixed(2),
146 | style: TextStyle(color: Colors.pink, fontSize: 16.0),
147 | )
148 | ],
149 | )
150 | ],
151 | );
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/lib/src/utils/constants.dart:
--------------------------------------------------------------------------------
1 | class Constants {
2 | static final String BASE_URL = "https://www.food2fork.com";
3 | static final String API_KEY = "cda0d9a9669bbb1a0b097d81fa44ce97";
4 | static final SUCCESS_CODE = 200;
5 |
6 | static final DEFAULT_SEARCH_CATEGORIES = [
7 | 'Barbeque',
8 | 'Breakfast',
9 | 'Chicken',
10 | 'Beef',
11 | 'Brunch',
12 | 'Dinner',
13 | 'Wine',
14 | 'Italian'
15 | ];
16 |
17 | static final DEFAULT_CATEGORIES_IMAGES = [
18 | 'barbeque',
19 | 'breakfast',
20 | 'chicken',
21 | 'beef',
22 | 'brunch',
23 | 'dinner',
24 | 'wine',
25 | 'italian'
26 | ];
27 | }
28 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.8"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_test:
45 | dependency: "direct dev"
46 | description: flutter
47 | source: sdk
48 | version: "0.0.0"
49 | http:
50 | dependency: "direct main"
51 | description:
52 | name: http
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "0.12.0+2"
56 | http_parser:
57 | dependency: transitive
58 | description:
59 | name: http_parser
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "3.1.3"
63 | matcher:
64 | dependency: transitive
65 | description:
66 | name: matcher
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "0.12.3+1"
70 | meta:
71 | dependency: transitive
72 | description:
73 | name: meta
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.1.6"
77 | path:
78 | dependency: transitive
79 | description:
80 | name: path
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.6.2"
84 | pedantic:
85 | dependency: transitive
86 | description:
87 | name: pedantic
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.4.0"
91 | quiver:
92 | dependency: transitive
93 | description:
94 | name: quiver
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "2.0.1"
98 | rxdart:
99 | dependency: "direct main"
100 | description:
101 | name: rxdart
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "0.21.0"
105 | sky_engine:
106 | dependency: transitive
107 | description: flutter
108 | source: sdk
109 | version: "0.0.99"
110 | source_span:
111 | dependency: transitive
112 | description:
113 | name: source_span
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.5.4"
117 | stack_trace:
118 | dependency: transitive
119 | description:
120 | name: stack_trace
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.9.3"
124 | stream_channel:
125 | dependency: transitive
126 | description:
127 | name: stream_channel
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.6.8"
131 | string_scanner:
132 | dependency: transitive
133 | description:
134 | name: string_scanner
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "1.0.4"
138 | term_glyph:
139 | dependency: transitive
140 | description:
141 | name: term_glyph
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.0"
145 | test_api:
146 | dependency: transitive
147 | description:
148 | name: test_api
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "0.2.2"
152 | typed_data:
153 | dependency: transitive
154 | description:
155 | name: typed_data
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.1.6"
159 | vector_math:
160 | dependency: transitive
161 | description:
162 | name: vector_math
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.0.8"
166 | sdks:
167 | dart: ">=2.1.0 <3.0.0"
168 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_recipes
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^0.1.2
26 | rxdart:
27 | http:
28 |
29 | dev_dependencies:
30 | flutter_test:
31 | sdk: flutter
32 |
33 |
34 | # For information on the generic Dart part of this file, see the
35 | # following page: https://www.dartlang.org/tools/pub/pubspec
36 |
37 | # The following section is specific to Flutter.
38 | flutter:
39 |
40 | # The following line ensures that the Material Icons font is
41 | # included with your application, so that you can use the icons in
42 | # the material Icons class.
43 | uses-material-design: true
44 |
45 | # To add assets to your application, add an assets section, like this:
46 | assets:
47 | - assets/barbeque.jpg
48 | - assets/beef.jpg
49 | - assets/breakfast.jpg
50 | - assets/brunch.jpg
51 | - assets/chicken.jpg
52 | - assets/dinner.jpg
53 | - assets/italian.jpg
54 | - assets/wine.jpg
55 | # - images/a_dot_ham.jpeg
56 |
57 | # An image asset can refer to one or more resolution-specific "variants", see
58 | # https://flutter.io/assets-and-images/#resolution-aware.
59 |
60 | # For details regarding adding assets from package dependencies, see
61 | # https://flutter.io/assets-and-images/#from-packages
62 |
63 | # To add custom fonts to your application, add a fonts section here,
64 | # in this "flutter" section. Each entry in this list should have a
65 | # "family" key with the font family name, and a "fonts" key with a
66 | # list giving the asset and other descriptors for the font. For
67 | # example:
68 | # fonts:
69 | # - family: Schyler
70 | # fonts:
71 | # - asset: fonts/Schyler-Regular.ttf
72 | # - asset: fonts/Schyler-Italic.ttf
73 | # style: italic
74 | # - family: Trajan Pro
75 | # fonts:
76 | # - asset: fonts/TrajanPro.ttf
77 | # - asset: fonts/TrajanPro_Bold.ttf
78 | # weight: 700
79 | #
80 | # For details regarding fonts from package dependencies,
81 | # see https://flutter.io/custom-fonts/#from-packages
82 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:flutter_recipes/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------