├── .idea
├── .gitignore
├── vcs.xml
├── modules.xml
├── libraries
│ └── Dart_SDK.xml
└── Flutter-Rest-Api-Tutorials-With-Example.iml
├── ios
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── .gitignore
├── Podfile.lock
└── Podfile
├── .gitattributes
├── .gitignore
├── .DS_Store
├── lib
├── .DS_Store
├── generated_plugin_registrant.dart
├── main.dart
├── Models
│ ├── posts_model.dart
│ ├── user_model.dart
│ └── products_model.dart
├── postapi
│ └── post_api_screen.dart
├── draggable_widget.dart
├── practice.dart
├── getapi
│ ├── example_two.dart
│ ├── example_four.dart
│ ├── exmaple_one.dart
│ ├── get_api_screen.dart
│ ├── drop_down_api.dart
│ ├── example_three.dart
│ └── example_fiver.dart
├── signup.dart
├── home_screen.dart
└── upload_image.dart
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── manifest.json
└── index.html
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-v21
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── values-night
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── apitutorials
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
├── build.gradle
└── apitutorials_android.iml
├── .flutter-plugins
├── test
└── widget_test.dart
├── apitutorials.iml
├── analysis_options.yaml
├── README.md
├── .flutter-plugins-dependencies
├── pubspec.yaml
└── pubspec.lock
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .dart_tool
2 | build
3 | .idea
4 | .flutter-plugins
5 | .flutter-plugins-dependencies
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/.DS_Store
--------------------------------------------------------------------------------
/lib/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/lib/.DS_Store
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/apitutorials/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.apitutorials
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/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-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/generated_plugin_registrant.dart:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // ignore_for_file: directives_ordering
6 | // ignore_for_file: lines_longer_than_80_chars
7 |
8 | import 'package:image_picker_for_web/image_picker_for_web.dart';
9 |
10 | import 'package:flutter_web_plugins/flutter_web_plugins.dart';
11 |
12 | // ignore: public_member_api_docs
13 | void registerPlugins(Registrar registrar) {
14 | ImagePickerPlugin.registerWith(registrar);
15 | registrar.registerMessageHandler();
16 | }
17 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:apitutorials/home_screen.dart';
2 | import 'package:apitutorials/practice.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | import 'getapi/drop_down_api.dart';
6 |
7 | void main() {
8 | runApp(const MyApp());
9 | }
10 |
11 | class MyApp extends StatelessWidget {
12 |
13 | const MyApp({Key? key}) : super(key: key);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'Flutter Demo',
19 | theme: ThemeData.dark(),
20 | home: const Practice(),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.5.0'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/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 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - image_picker_ios (0.0.1):
4 | - Flutter
5 | - modal_progress_hud_nsn (0.4.0):
6 | - Flutter
7 |
8 | DEPENDENCIES:
9 | - Flutter (from `Flutter`)
10 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
11 | - modal_progress_hud_nsn (from `.symlinks/plugins/modal_progress_hud_nsn/ios`)
12 |
13 | EXTERNAL SOURCES:
14 | Flutter:
15 | :path: Flutter
16 | image_picker_ios:
17 | :path: ".symlinks/plugins/image_picker_ios/ios"
18 | modal_progress_hud_nsn:
19 | :path: ".symlinks/plugins/modal_progress_hud_nsn/ios"
20 |
21 | SPEC CHECKSUMS:
22 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
23 | image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
24 | modal_progress_hud_nsn: b66f99f02da7de83484e50dfe1fe2d71ac406e67
25 |
26 | PODFILE CHECKSUM: 21b64fbb12492d731c9be90cbe0f2d328bef4b49
27 |
28 | COCOAPODS: 1.12.1
29 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "apitutorials",
3 | "short_name": "apitutorials",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/.flutter-plugins:
--------------------------------------------------------------------------------
1 | # This is a generated file; do not edit or check into version control.
2 | file_selector_linux=/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2/
3 | file_selector_macos=/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.3+1/
4 | file_selector_windows=/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3/
5 | flutter_plugin_android_lifecycle=/Users/asiftaj/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.5/
6 | image_picker=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker-1.0.1/
7 | image_picker_android=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_android-0.8.7+4/
8 | image_picker_for_web=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_for_web-2.2.0/
9 | image_picker_ios=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.8/
10 | image_picker_linux=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1/
11 | image_picker_macos=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1/
12 | image_picker_windows=/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1/
13 | modal_progress_hud_nsn=/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/
14 |
--------------------------------------------------------------------------------
/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:apitutorials/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(const 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 |
--------------------------------------------------------------------------------
/lib/Models/posts_model.dart:
--------------------------------------------------------------------------------
1 | /// userId : 1
2 | /// id : 1
3 | /// title : "sunt aut facere repellat provident occaecati excepturi optio reprehenderit"
4 | /// body : "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
5 |
6 | class PostsModel {
7 | PostsModel({
8 | int? userId,
9 | int? id,
10 | String? title,
11 | String? body,}){
12 | _userId = userId;
13 | _id = id;
14 | _title = title;
15 | _body = body;
16 | }
17 |
18 | PostsModel.fromJson(dynamic json) {
19 | _userId = json['userId'];
20 | _id = json['id'];
21 | _title = json['title'];
22 | _body = json['body'];
23 | }
24 | int? _userId;
25 | int? _id;
26 | String? _title;
27 | String? _body;
28 |
29 | int? get userId => _userId;
30 | int? get id => _id;
31 | String? get title => _title;
32 | String? get body => _body;
33 |
34 | Map toJson() {
35 | final map = {};
36 | map['userId'] = _userId;
37 | map['id'] = _id;
38 | map['title'] = _title;
39 | map['body'] = _body;
40 | return map;
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/apitutorials.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lib/postapi/post_api_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:apitutorials/getapi/get_api_screen.dart';
2 | import 'package:apitutorials/signup.dart';
3 | import 'package:apitutorials/upload_image.dart';
4 | import 'package:flutter/material.dart';
5 |
6 |
7 | class PostApiScreen extends StatefulWidget {
8 | const PostApiScreen({Key? key}) : super(key: key);
9 |
10 | @override
11 | _PostApiScreenState createState() => _PostApiScreenState();
12 | }
13 |
14 | class _PostApiScreenState extends State {
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | appBar: AppBar(
20 | centerTitle: true,
21 | title: Text('Api Course'),
22 | ),
23 | body: Padding(
24 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
25 | child: Column(
26 | children: [
27 | ReusableWidget(title: 'Login & SignUp',
28 | subTitle: 'Login and sign up api integration using open source api',onPress: (){
29 | Navigator.push(context, MaterialPageRoute(builder: (context) => SignUpScreen()));
30 | },),
31 | ReusableWidget(title: 'Upload image to server', subTitle:
32 | 'Upload image to server using image path(url)',onPress: (){
33 | Navigator.push(context, MaterialPageRoute(builder: (context) => UploadImageScreen()));
34 | },),
35 |
36 |
37 | ],
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/draggable_widget.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class DragbaleWidgetScreen extends StatefulWidget {
6 | const DragbaleWidgetScreen({Key? key}) : super(key: key);
7 |
8 | @override
9 | _DragbaleWidgetScreenState createState() => _DragbaleWidgetScreenState();
10 | }
11 |
12 | class _DragbaleWidgetScreenState extends State {
13 |
14 | double left = 0.0 ;
15 | double top =0.0 ;
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | appBar: AppBar(
20 | title: Text('Draggable Widget'),
21 | ),
22 | body: Stack(
23 | children: [
24 | Positioned(
25 | left: left,
26 | top: top,
27 | child: GestureDetector(
28 | onPanUpdate: (details){
29 | left = max(0, left +details.delta.dx);
30 | top = max(0, top +details.delta.dy);
31 | setState(() {
32 |
33 | });
34 | },
35 | onTap: (){
36 |
37 | },
38 | child: Container(
39 | height: 100,
40 | width: 100,
41 | decoration: BoxDecoration(
42 | color: Colors.red,
43 | borderRadius: BorderRadius.circular(50)
44 | ),
45 | ),
46 | ),
47 | )
48 | ],
49 | ),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/ios/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 |
--------------------------------------------------------------------------------
/android/apitutorials_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/lib/practice.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Practice extends StatefulWidget {
4 | const Practice({Key? key}) : super(key: key);
5 |
6 | @override
7 | _PracticeState createState() => _PracticeState();
8 | }
9 |
10 | class _PracticeState extends State {
11 |
12 | final List myProducts = [ "Posts" , "Comments" , "Albums" , "Todos" , "Users" ,
13 | 'Login & SignUp' ,"Upload Image To Server"] ;
14 | final List colors = [Colors.red, Colors.green,Colors.amber , Colors.red, Colors.blue,Colors.amber, Colors.red, ];
15 |
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 |
20 | return Scaffold(
21 | appBar: AppBar(title: Text('APIs Course'),),
22 | body: Column(
23 | children: [
24 | Expanded(
25 | child: Padding(
26 | padding: const EdgeInsets.all(20.0),
27 | child: GridView.builder(
28 | gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
29 | maxCrossAxisExtent: 200,
30 | childAspectRatio: 3 / 2,
31 | crossAxisSpacing: 10,
32 | mainAxisSpacing: 10),
33 | itemCount: myProducts.length,
34 | itemBuilder: (BuildContext ctx, index) {
35 | return Container(
36 | alignment: Alignment.center,
37 | child: Text(myProducts[index].toString(),textAlign: TextAlign.center , style: Theme.of(context).textTheme.headline6,),
38 | decoration: BoxDecoration(
39 | color: colors[index],
40 | borderRadius: BorderRadius.circular(15)),
41 | );
42 | }),
43 | ),
44 | ),
45 | ],
46 | ),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | NSCameraUsageDescription
8 | hello app camera description.
9 |
10 |
11 | NSPhotoLibraryUsageDescription
12 | hello app photos description.
13 |
14 | CFBundleDevelopmentRegion
15 | $(DEVELOPMENT_LANGUAGE)
16 | CFBundleExecutable
17 | $(EXECUTABLE_NAME)
18 | CFBundleIdentifier
19 | $(PRODUCT_BUNDLE_IDENTIFIER)
20 | CFBundleInfoDictionaryVersion
21 | 6.0
22 | CFBundleName
23 | apitutorials
24 | CFBundlePackageType
25 | APPL
26 | CFBundleShortVersionString
27 | $(FLUTTER_BUILD_NAME)
28 | CFBundleSignature
29 | ????
30 | CFBundleVersion
31 | $(FLUTTER_BUILD_NUMBER)
32 | LSRequiresIPhoneOS
33 |
34 | UILaunchStoryboardName
35 | LaunchScreen
36 | UIMainStoryboardFile
37 | Main
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UISupportedInterfaceOrientations~ipad
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationPortraitUpsideDown
48 | UIInterfaceOrientationLandscapeLeft
49 | UIInterfaceOrientationLandscapeRight
50 |
51 | UIViewControllerBasedStatusBarAppearance
52 |
53 | CADisableMinimumFrameDurationOnPhone
54 |
55 | UIApplicationSupportsIndirectInputEvents
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/.idea/Flutter-Rest-Api-Tutorials-With-Example.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/lib/getapi/example_two.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:http/http.dart' as http;
5 | class ExampleTwo extends StatefulWidget {
6 | const ExampleTwo({Key? key}) : super(key: key);
7 |
8 | @override
9 | _ExampleTwoState createState() => _ExampleTwoState();
10 | }
11 |
12 | class _ExampleTwoState extends State {
13 |
14 | List photosList = [];
15 |
16 | Future> getPhotos ()async{
17 | final response = await http.get(Uri.parse('https://jsonplaceholder.typicode.com/photos')) ;
18 | var data = jsonDecode(response.body.toString());
19 |
20 | print(data);
21 | if(response.statusCode == 200){
22 | for(Map i in data){
23 | Photos photos = Photos(title: i['title'], url: i['url'] , id: i['id']);
24 | photosList.add(photos);
25 | }
26 | return photosList ;
27 | }else {
28 | return photosList ;
29 | }
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | appBar: AppBar(
36 | centerTitle: true,
37 | title: Text('Api Course'),
38 | ),
39 | body: Column(
40 | children: [
41 | Expanded(
42 | child: FutureBuilder(
43 | future: getPhotos(),
44 | builder: (context,AsyncSnapshot> snapshot){
45 | return ListView.builder(
46 | itemCount: photosList.length ,
47 | itemBuilder: (context , index){
48 | return ListTile(
49 | leading:CircleAvatar(
50 | backgroundImage: NetworkImage(snapshot.data![index].url.toString()),
51 | ),
52 | subtitle: Text(snapshot.data![index].title.toString()),
53 | title: Text('Notes id:'+snapshot.data![index].id.toString()),
54 | );
55 | });
56 | }),
57 | ),
58 | ],
59 | ),
60 | );
61 | }
62 | }
63 |
64 | class Photos {
65 | String title , url ;
66 | int id ;
67 | Photos({required this.title ,required this.url , required this.id}) ;
68 | }
69 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 31
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 |
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | defaultConfig {
45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46 | applicationId "com.example.apitutorials"
47 | minSdkVersion 16
48 | targetSdkVersion 31
49 | versionCode flutterVersionCode.toInteger()
50 | versionName flutterVersionName
51 | }
52 |
53 | buildTypes {
54 | release {
55 | // TODO: Add your own signing config for the release build.
56 | // Signing with the debug keys for now, so `flutter run --release` works.
57 | signingConfig signingConfigs.debug
58 | }
59 | }
60 | }
61 |
62 | flutter {
63 | source '../..'
64 | }
65 |
66 | dependencies {
67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
68 | }
69 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 | I have created a full course on API integration in Flutter from scratch to advance level. If you are a new bee and looking for a flutter resource regarding API integration then you will find it interesting. These videos are not just simple tutorials that i have created, i am sharing my experience in the field of app development and what type of mistakes i did during my learning phase and that you are not supposed to do. So, all of your questions that are shaking your mind will be answered here.
5 | Here is what we will learn in this course.
6 | Introduction to APIS.
7 | 1. Understanding of JSON Structure.
8 | 2. What is Postman, how it helps us to understand the JSON Response.
9 | 3. What is model, what are Plugins and how different Plugins help us to create models of our API JSON data.
10 | 4. How we can parse JSON data via Model.
11 | GET APIS
12 |
13 | 1. What are Get APIS
14 | 2. What are different scenarios to handle Get API
15 | 3. Integrate Get APIS with Plugins Model and show data into List\
16 | 4. Integrate Get APIS with your own Model and show data into List
17 | 5. Integrate Get APIS with without Model and show data into List
18 | 6. Very Complex JSON practical Example
19 |
20 | POST APIS
21 | 1. What is POST API
22 | 2. How do Post APIS work
23 | 3. Implement Login & Sign Up with with REST API in flutter
24 | 4. Upload Single Image onto server via HTTP Request Example
25 | 5. Upload Multiple images to server
26 | 6. Upload data in arrays to server
27 | 7. What is MVVM, what is the importance of learning MVVM architecture.
28 |
29 | Covering all the above concepts into a single app that we will create at the end of this course.
30 | So what keeps you stopping to learn Flutter, let's start.
31 | Happy flirting with Flutter.
32 |
33 |
34 |
35 |
36 |  |
37 |  |
38 |
39 |
40 |
41 |
42 |
43 |
44 |  |
45 |  |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/lib/signup.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:http/http.dart';
5 | import 'package:http/http.dart';
6 | class SignUpScreen extends StatefulWidget {
7 | const SignUpScreen({Key? key}) : super(key: key);
8 |
9 | @override
10 | _SignUpScreenState createState() => _SignUpScreenState();
11 | }
12 |
13 | class _SignUpScreenState extends State {
14 |
15 | TextEditingController emailController = TextEditingController();
16 | TextEditingController passwordController = TextEditingController();
17 |
18 | void login(String email , password) async {
19 |
20 | try{
21 |
22 | Response response = await post(
23 | Uri.parse('https://reqres.in/api/login'),
24 | body: {
25 | 'email' : email,
26 | 'password' : password
27 | }
28 | );
29 |
30 | if(response.statusCode == 200){
31 |
32 | var data = jsonDecode(response.body.toString());
33 | print(data['token']);
34 | print('Login successfully');
35 |
36 | }else {
37 | print('failed');
38 | }
39 | }catch(e){
40 | print(e.toString());
41 | }
42 | }
43 | @override
44 | Widget build(BuildContext context) {
45 | return Scaffold(
46 | appBar: AppBar(
47 | title: const Text('Sign Up Api'),
48 | ),
49 | body: Padding(
50 | padding: const EdgeInsets.all(20.0),
51 | child: Column(
52 | crossAxisAlignment: CrossAxisAlignment.center,
53 | mainAxisAlignment: MainAxisAlignment.center,
54 | children: [
55 | TextFormField(
56 | controller: emailController,
57 | decoration: InputDecoration(
58 | hintText: 'Email'
59 | ),
60 | ),
61 | SizedBox(height: 20,),
62 | TextFormField(
63 | controller: passwordController,
64 | decoration: InputDecoration(
65 | hintText: 'Password'
66 | ),
67 | ),
68 | SizedBox(height: 40,),
69 | GestureDetector(
70 | onTap: (){
71 | login(emailController.text.toString(), passwordController.text.toString());
72 | },
73 | child: Container(
74 | height: 50,
75 | decoration: BoxDecoration(
76 | color: Colors.green,
77 | borderRadius: BorderRadius.circular(10)
78 | ),
79 | child: Center(child: Text('Login'),),
80 | ),
81 | )
82 | ],
83 | ),
84 | ),
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/lib/getapi/example_four.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:http/http.dart' as http;
5 |
6 | class ExampleFour extends StatefulWidget {
7 | const ExampleFour({Key? key}) : super(key: key);
8 |
9 | @override
10 | _ExampleFourState createState() => _ExampleFourState();
11 | }
12 |
13 | class _ExampleFourState extends State {
14 |
15 | var data ;
16 | Future getUserApi ()async{
17 | final response = await http.get(Uri.parse('https://jsonplaceholder.typicode.com/users'));
18 |
19 | if(response.statusCode == 200){
20 | data = jsonDecode(response.body.toString());
21 | }else {
22 |
23 | }
24 | }
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(
30 | centerTitle: true,
31 | title: Text('Api Course'),
32 | ),
33 | body: Column(
34 | children: [
35 | Expanded(
36 | child: FutureBuilder(
37 | future: getUserApi (),
38 | builder: (context , snapshot){
39 |
40 | if(snapshot.connectionState == ConnectionState.waiting){
41 | return Text('Loading');
42 | }else {
43 | return ListView.builder(
44 | itemCount: data.length,
45 | itemBuilder: (context, index){
46 | return Card(
47 | child: Column(
48 | children: [
49 | ReusbaleRow(title: 'name', value: data[index]['name'].toString(),),
50 | ReusbaleRow(title: 'Username', value: data[index]['username'].toString(),),
51 | ReusbaleRow(title: 'address', value: data[index]['address']['street'].toString(),),
52 | ReusbaleRow(title: 'Lat', value: data[index]['address']['geo']['lat'].toString(),),
53 | ReusbaleRow(title: 'Lat', value: data[index]['address']['geo']['lng'].toString(),),
54 |
55 | ],
56 | ),
57 | );
58 | });
59 | }
60 |
61 | },
62 | ),
63 | )
64 | ],
65 | ),
66 | );
67 | }
68 | }
69 |
70 | class ReusbaleRow extends StatelessWidget {
71 | String title , value ;
72 | ReusbaleRow({Key? key , required this.title , required this.value}) : super(key: key);
73 |
74 | @override
75 | Widget build(BuildContext context) {
76 | return Padding(
77 | padding: const EdgeInsets.all(8.0),
78 | child: Row(
79 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
80 | children: [
81 | Text(title),
82 | Text(value ),
83 |
84 | ],
85 | ),
86 | );
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/lib/getapi/exmaple_one.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:convert';
3 |
4 | import 'package:apitutorials/Models/posts_model.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:http/http.dart' as http;
8 |
9 | class ExampleOne extends StatelessWidget {
10 | ExampleOne({Key? key}) : super(key: key);
11 |
12 | List postList = [] ;
13 |
14 | Future> getPostApi ()async{
15 | final resposne = await http.get(Uri.parse('https://jsonplaceholder.typicode.com/posts')) ;
16 | var data = jsonDecode(resposne.body.toString());
17 | if(resposne.statusCode == 200){
18 | postList.clear();
19 | for(Map i in data){
20 | postList.add(PostsModel.fromJson(i));
21 | }
22 | return postList ;
23 | }else {
24 | return postList ;
25 | }
26 | }
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: AppBar(
31 | centerTitle: true,
32 | title: Text('Api Course'),
33 | ),
34 | body: Column(
35 | children: [
36 | Expanded(
37 | child: FutureBuilder(
38 | future: getPostApi(),
39 | builder: (context , snapshot){
40 | if(!snapshot.hasData){
41 | return Text('Loading');
42 | }else {
43 | return ListView.builder(
44 | itemCount: postList.length,
45 | itemBuilder: (context, index){
46 | return Card(
47 | child: Padding(
48 | padding: const EdgeInsets.all(8.0),
49 | child: Column(
50 | mainAxisAlignment: MainAxisAlignment.start,
51 | crossAxisAlignment: CrossAxisAlignment.start,
52 | children: [
53 |
54 | Text('Title' , style: TextStyle(fontSize: 15 , fontWeight: FontWeight.bold),),
55 | SizedBox(height: 3,),
56 | Text(postList[index].title.toString()),
57 | SizedBox(height: 5,),
58 | Text('Description' , style: TextStyle(fontSize: 15 , fontWeight: FontWeight.bold),),
59 | SizedBox(height: 3,),
60 | Text('Description\n'+postList[index].body.toString() , style: Theme.of(context).textTheme.bodyText1)
61 | ],
62 | ),
63 | ),
64 | );
65 | });
66 | }
67 | },
68 | ),
69 | )
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/getapi/get_api_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:apitutorials/getapi/example_fiver.dart';
2 | import 'package:apitutorials/getapi/example_four.dart';
3 | import 'package:apitutorials/getapi/example_three.dart';
4 | import 'package:apitutorials/getapi/example_two.dart';
5 | import 'package:apitutorials/getapi/exmaple_one.dart';
6 | import 'package:flutter/material.dart';
7 |
8 |
9 | class GetApiTutorials extends StatefulWidget {
10 | const GetApiTutorials({Key? key}) : super(key: key);
11 |
12 | @override
13 | _GetApiTutorialsState createState() => _GetApiTutorialsState();
14 | }
15 |
16 | class _GetApiTutorialsState extends State {
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(
22 | centerTitle: true,
23 | title: Text('Api Course'),
24 | ),
25 | body: Padding(
26 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
27 | child: Column(
28 | children: [
29 | ReusableWidget(title: 'Example one', subTitle: 'Example one where we create model using Plugin,click to see the source code',onPress: (){
30 | Navigator.push(context, MaterialPageRoute(builder: (context) => ExampleOne()));
31 | },),
32 | ReusableWidget(title: 'Example Two', subTitle: 'Example one where we create our own custom model',onPress: (){
33 | Navigator.push(context, MaterialPageRoute(builder: (context) => ExampleTwo()));
34 | },),
35 | ReusableWidget(title: 'Example Three', subTitle: 'Example four with complex JSON but we used plugins to create model and parse JSON data.',onPress: (){
36 | Navigator.push(context, MaterialPageRoute(builder: (context) => ExampleThree()));
37 | },),
38 | ReusableWidget(title: 'Example Four', subTitle: "Example four where we don't used model to fetch data from server and show in our api. Then we will use this method to fetch api",onPress: (){
39 | Navigator.push(context, MaterialPageRoute(builder: (context) => ExampleFour()));
40 | },),
41 | ReusableWidget(title: 'Example Five', subTitle: 'Example five, how to parse very complex JSON and show in api',onPress: (){
42 | Navigator.push(context, MaterialPageRoute(builder: (context) => LastExampleScreen()));
43 | },),
44 |
45 | ],
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
52 |
53 | class ReusableWidget extends StatelessWidget {
54 |
55 | late String title, subTitle ;
56 | final VoidCallback onPress ;
57 |
58 | ReusableWidget({Key? key, required this.title , required this.subTitle,required this.onPress}) : super(key: key);
59 |
60 |
61 |
62 | @override
63 | Widget build(BuildContext context) {
64 | return GestureDetector(
65 | onTap: onPress,
66 | child: ListTile(
67 | leading: const CircleAvatar(
68 | radius: 25,
69 | child: Text('G'),
70 | ),
71 | title: Text(title),
72 | subtitle: Text(subTitle),
73 | trailing: const Icon(Icons.arrow_forward),
74 | ),
75 | );
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/getapi/drop_down_api.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | import 'dart:async';
5 | import 'dart:convert';
6 | import 'dart:io';
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:http/http.dart' as http;
10 | import '../Models/posts_model.dart';
11 |
12 | class DropDownApi extends StatefulWidget {
13 | const DropDownApi({Key? key}) : super(key: key);
14 |
15 | @override
16 | State createState() => _DropDownApiState();
17 | }
18 |
19 | class _DropDownApiState extends State {
20 |
21 |
22 |
23 |
24 | Future> getPostApi ()async{
25 |
26 | try {
27 | final response = await http.get(Uri.parse('https://jsonplaceholder.typicode.com/posts')) ;
28 | final body = json.decode(response.body) as List;
29 | if(response.statusCode == 200) {
30 |
31 | return body.map((dynamic json) {
32 | final map = json as Map;
33 | return PostsModel(
34 | id: map['id'] as int,
35 | title: map['title'] as String,
36 | body: map['body'] as String,
37 | );
38 | }).toList();
39 | }
40 | } on SocketException {
41 | await Future.delayed(const Duration(milliseconds: 1800));
42 | throw Exception('No Internet Connection');
43 | } on TimeoutException {
44 | throw Exception('');
45 | }
46 | throw Exception('error fetching data');
47 |
48 | }
49 |
50 | var newData ;
51 | @override
52 | Widget build(BuildContext context) {
53 | return Scaffold(
54 | appBar: AppBar(
55 | title: Text('Dropdown Api'),
56 | ),
57 | body: Padding(
58 | padding: const EdgeInsets.symmetric(horizontal: 20),
59 | child: Column(
60 | crossAxisAlignment: CrossAxisAlignment.start,
61 | mainAxisAlignment: MainAxisAlignment.center,
62 | children: [
63 | FutureBuilder>(
64 | future: getPostApi(),
65 | builder: (context, snapshot) {
66 | if (snapshot.hasData) {
67 | return DropdownButton(
68 | // Initial Value
69 | value: newData,
70 | hint: Text('Select value'),
71 | isExpanded: true,
72 | // Down Arrow Icon
73 | icon: const Icon(Icons.keyboard_arrow_down),
74 |
75 | // Array list of items
76 | items: snapshot.data!.map((item) {
77 | return DropdownMenuItem(
78 | value: item.id,
79 | child: Text(item.id.toString()),
80 | );
81 | }).toList(),
82 | onChanged: (value) {
83 | newData = value ;
84 | setState(() {
85 |
86 | });
87 | },
88 |
89 | );
90 | } else {
91 | return Center(child: const CircularProgressIndicator());
92 | }
93 | },
94 | )
95 | ],
96 | ),
97 | ),
98 | );
99 | }
100 | }
--------------------------------------------------------------------------------
/lib/home_screen.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'dart:convert';
3 |
4 | import 'package:apitutorials/Models/posts_model.dart';
5 | import 'package:apitutorials/getapi/get_api_screen.dart';
6 | import 'package:apitutorials/postapi/post_api_screen.dart';
7 | import 'package:flutter/cupertino.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:http/http.dart' as http;
10 |
11 | import 'getapi/drop_down_api.dart';
12 |
13 | class HomScreen extends StatefulWidget {
14 | const HomScreen({Key? key}) : super(key: key);
15 |
16 | @override
17 | _HomScreenState createState() => _HomScreenState();
18 | }
19 |
20 | class _HomScreenState extends State {
21 |
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | appBar: AppBar(
27 | centerTitle: true,
28 | title: Text('Api Course'),
29 | ),
30 | body: Padding(
31 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
32 | child: Column(
33 | children: [
34 | GestureDetector(
35 | onTap: (){
36 | Navigator.push(context, MaterialPageRoute(builder: (context) => GetApiTutorials()));
37 | },
38 | child: const ListTile(
39 | leading: CircleAvatar(
40 | radius: 25,
41 | child: Text('G'),
42 | ),
43 | title: Text('Get Apis '),
44 | subtitle: Text("1. What are Get APIS \n"
45 | "2. What are different scenarios to handle Get API \n "
46 | "3. Integrate Get APIS Plugins Model and shows data into List\n "
47 | "4. Integrate Get APIS your own Model and show data into List\n "
48 | "5. Integrate Get APIS without Model and show data into List\n "
49 | "6. Very Complex JSON practical Example"),
50 | trailing: Icon(Icons.arrow_forward),
51 | ),
52 | ),
53 | GestureDetector(
54 | onTap: (){
55 |
56 | Navigator.push(context, MaterialPageRoute(builder: (context) => PostApiScreen()));
57 |
58 | },
59 | child: const ListTile(
60 | leading: CircleAvatar(
61 | radius: 25,
62 | child: Text('P'),
63 | ),
64 | title: Text('Post Apis '),
65 | subtitle: Text('Integration of post apis with example and with different scenario.'),
66 | trailing: Icon(Icons.arrow_forward),
67 | ),
68 | ),
69 | GestureDetector(
70 | onTap: (){
71 |
72 | Navigator.push(context, MaterialPageRoute(builder: (context) => DropDownApi()));
73 |
74 | },
75 | child: const ListTile(
76 | leading: CircleAvatar(
77 | radius: 25,
78 | child: Text('D'),
79 | ),
80 | title: Text('Drop Down'),
81 | subtitle: Text('Loading data from api into dropdown'),
82 | trailing: Icon(Icons.arrow_forward),
83 | ),
84 | )
85 |
86 | ],
87 | ),
88 | ),
89 | );
90 | }
91 | }
92 |
93 |
94 |
--------------------------------------------------------------------------------
/lib/getapi/example_three.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:apitutorials/Models/user_model.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:http/http.dart' as http;
6 |
7 | class ExampleThree extends StatefulWidget {
8 | const ExampleThree({Key? key}) : super(key: key);
9 |
10 | @override
11 | _ExampleThreeState createState() => _ExampleThreeState();
12 | }
13 |
14 | class _ExampleThreeState extends State {
15 |
16 | List userList = [] ;
17 |
18 | Future> getUserApi ()async{
19 | final response =await http.get(Uri.parse('https://jsonplaceholder.typicode.com/users'));
20 | var data = jsonDecode(response.body.toString());
21 | if(response.statusCode == 200){
22 | for(Map i in data){
23 | print(i['name']);
24 | userList.add(UserModel.fromJson(i));
25 | }
26 | return userList;
27 | }else {
28 | return userList;
29 |
30 | }
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | appBar: AppBar(
37 | centerTitle: true,
38 | title: Text('Api Course'),
39 | ),
40 | body: Column(
41 | children: [
42 | Expanded(
43 | child: FutureBuilder(
44 | future: getUserApi () ,
45 | builder: (context ,AsyncSnapshot> snapshot){
46 |
47 | if(!snapshot.hasData){
48 | return CircularProgressIndicator();
49 | }else{
50 | return ListView.builder(
51 | itemCount: userList.length,
52 | itemBuilder: (context , index){
53 | return Card(
54 | child: Padding(
55 | padding: const EdgeInsets.all(8.0),
56 | child: Column(
57 | children: [
58 | ReusbaleRow(title: 'Name', value: snapshot.data![index].name.toString()),
59 | ReusbaleRow(title: 'username', value: snapshot.data![index].username.toString()),
60 | ReusbaleRow(title: 'email', value: snapshot.data![index].email.toString()),
61 | ReusbaleRow(title: 'Address',
62 | value: snapshot.data![index].address!.geo!.lat.toString()
63 |
64 | )
65 | ],
66 | ),
67 | ),
68 | );
69 | });
70 | }
71 |
72 | },
73 | ),
74 | )
75 | ],
76 | ),
77 | );
78 | }
79 |
80 | }
81 |
82 | class ReusbaleRow extends StatelessWidget {
83 | String title , value ;
84 | ReusbaleRow({Key? key , required this.title , required this.value}) : super(key: key);
85 |
86 | @override
87 | Widget build(BuildContext context) {
88 | return Padding(
89 | padding: const EdgeInsets.all(8.0),
90 | child: Row(
91 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
92 | children: [
93 | Text(title),
94 | Text(value ),
95 |
96 | ],
97 | ),
98 | );
99 | }
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.8/","native_build":true,"dependencies":[]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.5/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_android-0.8.7+4/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_selector_macos","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.3+1/","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_selector_linux","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2/","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","native_build":true,"dependencies":[]}],"windows":[{"name":"file_selector_windows","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3/","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","native_build":true,"dependencies":[]}],"web":[{"name":"image_picker_for_web","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/image_picker_for_web-2.2.0/","dependencies":[]},{"name":"modal_progress_hud_nsn","path":"/Users/asiftaj/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/","dependencies":[]}]},"dependencyGraph":[{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"modal_progress_hud_nsn","dependencies":[]}],"date_created":"2023-07-21 11:24:43.694843","version":"3.10.6"}
--------------------------------------------------------------------------------
/lib/upload_image.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:io';
3 | import 'package:http/http.dart' as http;
4 | import 'package:flutter/material.dart';
5 | import 'package:image_picker/image_picker.dart';
6 | import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
7 |
8 |
9 | class UploadImageScreen extends StatefulWidget {
10 | const UploadImageScreen({Key? key}) : super(key: key);
11 |
12 | @override
13 | _UploadImageScreenState createState() => _UploadImageScreenState();
14 | }
15 |
16 | class _UploadImageScreenState extends State {
17 |
18 | File? image ;
19 | final _picker = ImagePicker();
20 | bool showSpinner = false ;
21 |
22 | Future getImage()async{
23 | final pickedFile = await _picker.pickImage(source: ImageSource.gallery , imageQuality: 80);
24 |
25 | if(pickedFile!= null ){
26 | image = File(pickedFile.path);
27 | setState(() {
28 |
29 | });
30 | }else {
31 | print('no image selected');
32 | }
33 | }
34 |
35 | Future uploadImage ()async{
36 |
37 | setState(() {
38 | showSpinner = true ;
39 | });
40 |
41 | var stream = new http.ByteStream(image!.openRead());
42 | stream.cast();
43 |
44 | var length = await image!.length();
45 |
46 | var uri = Uri.parse('https://fakestoreapi.com/products');
47 |
48 | var request = new http.MultipartRequest('POST', uri);
49 |
50 | request.fields['title'] = "Static title" ;
51 |
52 | var multiport = new http.MultipartFile(
53 | 'image',
54 | stream,
55 | length);
56 |
57 | request.files.add(multiport);
58 |
59 | var response = await request.send() ;
60 |
61 | print(response.stream.toString());
62 | if(response.statusCode == 200){
63 | setState(() {
64 | showSpinner = false ;
65 | });
66 | print('image uploaded');
67 | }else {
68 | print('failed');
69 | setState(() {
70 | showSpinner = false ;
71 | });
72 |
73 | }
74 |
75 | }
76 |
77 | @override
78 | Widget build(BuildContext context) {
79 | return ModalProgressHUD(
80 | inAsyncCall: showSpinner,
81 | child: Scaffold(
82 | appBar: AppBar(
83 | title: Text('Upload Image'),
84 | ),
85 | body: Column(
86 | mainAxisAlignment: MainAxisAlignment.center,
87 | crossAxisAlignment: CrossAxisAlignment.center,
88 | children: [
89 | GestureDetector(
90 | onTap: (){
91 | getImage();
92 | },
93 | child: Container(
94 | child: image == null ? Center(child: Text('Pick Image'),)
95 | :
96 | Container(
97 | child: Center(
98 | child: Image.file(
99 | File(image!.path).absolute,
100 | height: 100,
101 | width: 100,
102 | fit: BoxFit.cover,
103 | ),
104 | ),
105 | ),
106 | ),
107 | ),
108 | SizedBox(height: 150,),
109 | GestureDetector(
110 | onTap: (){
111 | uploadImage();
112 | },
113 | child: Container(
114 | height: 50,
115 | width: 200,
116 | color: Colors.green,
117 | child: Center(child: Text('Upload')),
118 | ),
119 | )
120 | ],
121 | ),
122 | ),
123 | );
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: apitutorials
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.12.0 <3.0.0"
22 |
23 | # Dependencies specify other packages that your package needs in order to work.
24 | # To automatically upgrade your package dependencies to the latest versions
25 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
26 | # dependencies can be manually updated by changing the version numbers below to
27 | # the latest version available on pub.dev. To see which dependencies have newer
28 | # versions available, run `flutter pub outdated`.
29 | dependencies:
30 | flutter:
31 | sdk: flutter
32 |
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 | modal_progress_hud_nsn: ^0.4.0
38 | http: ^1.1.0
39 | image_picker: ^1.0.1
40 |
41 |
42 |
43 | dev_dependencies:
44 | flutter_test:
45 | sdk: flutter
46 |
47 | # The "flutter_lints" package below contains a set of recommended lints to
48 | # encourage good coding practices. The lint set provided by the package is
49 | # activated in the `analysis_options.yaml` file located at the root of your
50 | # package. See that file for information about deactivating specific lint
51 | # rules and activating additional ones.
52 | flutter_lints: ^1.0.0
53 |
54 | # For information on the generic Dart part of this file, see the
55 | # following page: https://dart.dev/tools/pub/pubspec
56 |
57 | # The following section is specific to Flutter.
58 | flutter:
59 |
60 | # The following line ensures that the Material Icons font is
61 | # included with your application, so that you can use the icons in
62 | # the material Icons class.
63 | uses-material-design: true
64 |
65 | # To add assets to your application, add an assets section, like this:
66 | # assets:
67 | # - images/a_dot_burr.jpeg
68 | # - images/a_dot_ham.jpeg
69 |
70 | # An image asset can refer to one or more resolution-specific "variants", see
71 | # https://flutter.dev/assets-and-images/#resolution-aware.
72 |
73 | # For details regarding adding assets from package dependencies, see
74 | # https://flutter.dev/assets-and-images/#from-packages
75 |
76 | # To add custom fonts to your application, add a fonts section here,
77 | # in this "flutter" section. Each entry in this list should have a
78 | # "family" key with the font family name, and a "fonts" key with a
79 | # list giving the asset and other descriptors for the font. For
80 | # example:
81 | # fonts:
82 | # - family: Schyler
83 | # fonts:
84 | # - asset: fonts/Schyler-Regular.ttf
85 | # - asset: fonts/Schyler-Italic.ttf
86 | # style: italic
87 | # - family: Trajan Pro
88 | # fonts:
89 | # - asset: fonts/TrajanPro.ttf
90 | # - asset: fonts/TrajanPro_Bold.ttf
91 | # weight: 700
92 | #
93 | # For details regarding fonts from package dependencies,
94 | # see https://flutter.dev/custom-fonts/#from-packages
95 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | apitutorials
30 |
31 |
32 |
33 |
36 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/lib/getapi/example_fiver.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:math';
3 |
4 | import 'package:apitutorials/Models/products_model.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:http/http.dart' as http;
7 | class LastExampleScreen extends StatefulWidget {
8 | const LastExampleScreen({Key? key}) : super(key: key);
9 |
10 | @override
11 | _LastExampleScreenState createState() => _LastExampleScreenState();
12 | }
13 |
14 | class _LastExampleScreenState extends State {
15 |
16 |
17 |
18 | Future getProductsApi () async {
19 |
20 | //create your own api
21 | final response = await http.get(Uri.parse('https://webhook.site/d24f9761-dfba-4759-bcda-f42f3dd539b7'));
22 | var data = jsonDecode(response.body.toString());
23 | if(response.statusCode == 200){
24 | return ProductsModel.fromJson(data);
25 | }else {
26 | return ProductsModel.fromJson(data);
27 |
28 | }
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return Scaffold(
34 | appBar: AppBar(
35 | centerTitle: true,
36 | title: Text('Api Course'),
37 | ),
38 | body: Padding(
39 | padding: const EdgeInsets.all(20.0),
40 | child: Column(
41 | children: [
42 | Expanded(
43 | child: FutureBuilder(
44 | future: getProductsApi (),
45 | builder: (context , snapshot){
46 | if(snapshot.hasData){
47 | return ListView.builder(
48 | itemCount: snapshot.data!.data!.length,
49 | itemBuilder: (context, index){
50 | return Column(
51 | mainAxisAlignment: MainAxisAlignment.start,
52 | crossAxisAlignment: CrossAxisAlignment.start,
53 | children: [
54 | ListTile(
55 | title: Text(snapshot.data!.data![index].shop!.name.toString()),
56 | subtitle: Text(snapshot.data!.data![index].shop!.shopemail.toString()),
57 | leading: CircleAvatar(
58 | backgroundImage: NetworkImage(snapshot.data!.data![index].shop!.image.toString()),
59 | ),
60 | ),
61 | Container(
62 | height: MediaQuery.of(context).size.height *.3,
63 | width: MediaQuery.of(context).size.width * 1,
64 | child: ListView.builder(
65 | scrollDirection: Axis.horizontal,
66 | itemCount: snapshot.data!.data![index].images!.length,
67 | itemBuilder: (context, position){
68 | return Padding(
69 | padding: const EdgeInsets.only(right: 10),
70 | child: Container(
71 | height: MediaQuery.of(context).size.height *.25,
72 | width: MediaQuery.of(context).size.width * .5,
73 | decoration: BoxDecoration(
74 | borderRadius: BorderRadius.circular(10),
75 | image: DecorationImage(
76 | fit: BoxFit.cover,
77 | image: NetworkImage(snapshot.data!.data![index].images![position].url.toString())
78 | )
79 | ),
80 | ),
81 | );
82 | }),
83 | ),
84 | Icon(snapshot.data!.data![index].inWishlist! == false ? Icons.favorite : Icons.favorite_outline)
85 | ],
86 | );
87 | });
88 | }else {
89 | return Text('Loading');
90 | }
91 | },
92 | ),
93 | )
94 | ],
95 | ),
96 | ),
97 | );
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/lib/Models/user_model.dart:
--------------------------------------------------------------------------------
1 | /// id : 1
2 | /// name : "Leanne Graham"
3 | /// username : "Bret"
4 | /// email : "Sincere@april.biz"
5 | /// address : {"street":"Kulas Light","suite":"Apt. 556","city":"Gwenborough","zipcode":"92998-3874","geo":{"lat":"-37.3159","lng":"81.1496"}}
6 | /// phone : "1-770-736-8031 x56442"
7 | /// website : "hildegard.org"
8 | /// company : {"name":"Romaguera-Crona","catchPhrase":"Multi-layered client-server neural-net","bs":"harness real-time e-markets"}
9 |
10 | class UserModel {
11 | UserModel({
12 | int? id,
13 | String? name,
14 | String? username,
15 | String? email,
16 | Address? address,
17 | String? phone,
18 | String? website,
19 | Company? company,}){
20 | _id = id;
21 | _name = name;
22 | _username = username;
23 | _email = email;
24 | _address = address;
25 | _phone = phone;
26 | _website = website;
27 | _company = company;
28 | }
29 |
30 | UserModel.fromJson(dynamic json) {
31 | _id = json['id'];
32 | _name = json['name'];
33 | _username = json['username'];
34 | _email = json['email'];
35 | _address = json['address'] != null ? Address.fromJson(json['address']) : null;
36 | _phone = json['phone'];
37 | _website = json['website'];
38 | _company = json['company'] != null ? Company.fromJson(json['company']) : null;
39 | }
40 | int? _id;
41 | String? _name;
42 | String? _username;
43 | String? _email;
44 | Address? _address;
45 | String? _phone;
46 | String? _website;
47 | Company? _company;
48 |
49 | int? get id => _id;
50 | String? get name => _name;
51 | String? get username => _username;
52 | String? get email => _email;
53 | Address? get address => _address;
54 | String? get phone => _phone;
55 | String? get website => _website;
56 | Company? get company => _company;
57 |
58 | Map toJson() {
59 | final map = {};
60 | map['id'] = _id;
61 | map['name'] = _name;
62 | map['username'] = _username;
63 | map['email'] = _email;
64 | if (_address != null) {
65 | map['address'] = _address?.toJson();
66 | }
67 | map['phone'] = _phone;
68 | map['website'] = _website;
69 | if (_company != null) {
70 | map['company'] = _company?.toJson();
71 | }
72 | return map;
73 | }
74 |
75 | }
76 |
77 | /// name : "Romaguera-Crona"
78 | /// catchPhrase : "Multi-layered client-server neural-net"
79 | /// bs : "harness real-time e-markets"
80 |
81 | class Company {
82 | Company({
83 | String? name,
84 | String? catchPhrase,
85 | String? bs,}){
86 | _name = name;
87 | _catchPhrase = catchPhrase;
88 | _bs = bs;
89 | }
90 |
91 | Company.fromJson(dynamic json) {
92 | _name = json['name'];
93 | _catchPhrase = json['catchPhrase'];
94 | _bs = json['bs'];
95 | }
96 | String? _name;
97 | String? _catchPhrase;
98 | String? _bs;
99 |
100 | String? get name => _name;
101 | String? get catchPhrase => _catchPhrase;
102 | String? get bs => _bs;
103 |
104 | Map toJson() {
105 | final map = {};
106 | map['name'] = _name;
107 | map['catchPhrase'] = _catchPhrase;
108 | map['bs'] = _bs;
109 | return map;
110 | }
111 |
112 | }
113 |
114 | /// street : "Kulas Light"
115 | /// suite : "Apt. 556"
116 | /// city : "Gwenborough"
117 | /// zipcode : "92998-3874"
118 | /// geo : {"lat":"-37.3159","lng":"81.1496"}
119 |
120 | class Address {
121 | Address({
122 | String? street,
123 | String? suite,
124 | String? city,
125 | String? zipcode,
126 | Geo? geo,}){
127 | _street = street;
128 | _suite = suite;
129 | _city = city;
130 | _zipcode = zipcode;
131 | _geo = geo;
132 | }
133 |
134 | Address.fromJson(dynamic json) {
135 | _street = json['street'];
136 | _suite = json['suite'];
137 | _city = json['city'];
138 | _zipcode = json['zipcode'];
139 | _geo = json['geo'] != null ? Geo.fromJson(json['geo']) : null;
140 | }
141 | String? _street;
142 | String? _suite;
143 | String? _city;
144 | String? _zipcode;
145 | Geo? _geo;
146 |
147 | String? get street => _street;
148 | String? get suite => _suite;
149 | String? get city => _city;
150 | String? get zipcode => _zipcode;
151 | Geo? get geo => _geo;
152 |
153 | Map toJson() {
154 | final map = {};
155 | map['street'] = _street;
156 | map['suite'] = _suite;
157 | map['city'] = _city;
158 | map['zipcode'] = _zipcode;
159 | if (_geo != null) {
160 | map['geo'] = _geo?.toJson();
161 | }
162 | return map;
163 | }
164 |
165 | }
166 |
167 | /// lat : "-37.3159"
168 | /// lng : "81.1496"
169 |
170 | class Geo {
171 | Geo({
172 | String? lat,
173 | String? lng,}){
174 | _lat = lat;
175 | _lng = lng;
176 | }
177 |
178 | Geo.fromJson(dynamic json) {
179 | _lat = json['lat'];
180 | _lng = json['lng'];
181 | }
182 | String? _lat;
183 | String? _lng;
184 |
185 | String? get lat => _lat;
186 | String? get lng => _lng;
187 |
188 | Map toJson() {
189 | final map = {};
190 | map['lat'] = _lat;
191 | map['lng'] = _lng;
192 | return map;
193 | }
194 |
195 | }
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | charcode:
29 | dependency: transitive
30 | description:
31 | name: charcode
32 | sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.3.1"
36 | clock:
37 | dependency: transitive
38 | description:
39 | name: clock
40 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.1.1"
44 | collection:
45 | dependency: transitive
46 | description:
47 | name: collection
48 | sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.17.1"
52 | cross_file:
53 | dependency: transitive
54 | description:
55 | name: cross_file
56 | sha256: "552ffd2f851d4314958e6265452af1891959e00cd32b6d17452c5b836e27a0fa"
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "0.3.2"
60 | cupertino_icons:
61 | dependency: "direct main"
62 | description:
63 | name: cupertino_icons
64 | sha256: "1989d917fbe8e6b39806207df5a3fdd3d816cbd090fac2ce26fb45e9a71476e5"
65 | url: "https://pub.dev"
66 | source: hosted
67 | version: "1.0.4"
68 | fake_async:
69 | dependency: transitive
70 | description:
71 | name: fake_async
72 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
73 | url: "https://pub.dev"
74 | source: hosted
75 | version: "1.3.1"
76 | file_selector_linux:
77 | dependency: transitive
78 | description:
79 | name: file_selector_linux
80 | sha256: "770eb1ab057b5ae4326d1c24cc57710758b9a46026349d021d6311bd27580046"
81 | url: "https://pub.dev"
82 | source: hosted
83 | version: "0.9.2"
84 | file_selector_macos:
85 | dependency: transitive
86 | description:
87 | name: file_selector_macos
88 | sha256: "4ada532862917bf16e3adb3891fe3a5917a58bae03293e497082203a80909412"
89 | url: "https://pub.dev"
90 | source: hosted
91 | version: "0.9.3+1"
92 | file_selector_platform_interface:
93 | dependency: transitive
94 | description:
95 | name: file_selector_platform_interface
96 | sha256: "412705a646a0ae90f33f37acfae6a0f7cbc02222d6cd34e479421c3e74d3853c"
97 | url: "https://pub.dev"
98 | source: hosted
99 | version: "2.6.0"
100 | file_selector_windows:
101 | dependency: transitive
102 | description:
103 | name: file_selector_windows
104 | sha256: "1372760c6b389842b77156203308940558a2817360154084368608413835fc26"
105 | url: "https://pub.dev"
106 | source: hosted
107 | version: "0.9.3"
108 | flutter:
109 | dependency: "direct main"
110 | description: flutter
111 | source: sdk
112 | version: "0.0.0"
113 | flutter_lints:
114 | dependency: "direct dev"
115 | description:
116 | name: flutter_lints
117 | sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
118 | url: "https://pub.dev"
119 | source: hosted
120 | version: "1.0.4"
121 | flutter_plugin_android_lifecycle:
122 | dependency: transitive
123 | description:
124 | name: flutter_plugin_android_lifecycle
125 | sha256: "5c574d21b98ec92adab05ead10afd2b13ff5856c7ca79696edb338a9dd8ed387"
126 | url: "https://pub.dev"
127 | source: hosted
128 | version: "2.0.5"
129 | flutter_test:
130 | dependency: "direct dev"
131 | description: flutter
132 | source: sdk
133 | version: "0.0.0"
134 | flutter_web_plugins:
135 | dependency: transitive
136 | description: flutter
137 | source: sdk
138 | version: "0.0.0"
139 | http:
140 | dependency: "direct main"
141 | description:
142 | name: http
143 | sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
144 | url: "https://pub.dev"
145 | source: hosted
146 | version: "1.1.0"
147 | http_parser:
148 | dependency: transitive
149 | description:
150 | name: http_parser
151 | sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "4.0.0"
155 | image_picker:
156 | dependency: "direct main"
157 | description:
158 | name: image_picker
159 | sha256: "6296e98782726d37f59663f0727d0e978eee1ced1ffed45ccaba591786a7f7b3"
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.0.1"
163 | image_picker_android:
164 | dependency: transitive
165 | description:
166 | name: image_picker_android
167 | sha256: "8179b54039b50eee561676232304f487602e2950ffb3e8995ed9034d6505ca34"
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "0.8.7+4"
171 | image_picker_for_web:
172 | dependency: transitive
173 | description:
174 | name: image_picker_for_web
175 | sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "2.2.0"
179 | image_picker_ios:
180 | dependency: transitive
181 | description:
182 | name: image_picker_ios
183 | sha256: b3e2f21feb28b24dd73a35d7ad6e83f568337c70afab5eabac876e23803f264b
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "0.8.8"
187 | image_picker_linux:
188 | dependency: transitive
189 | description:
190 | name: image_picker_linux
191 | sha256: "02cbc21fe1706b97942b575966e5fbbeaac535e76deef70d3a242e4afb857831"
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "0.2.1"
195 | image_picker_macos:
196 | dependency: transitive
197 | description:
198 | name: image_picker_macos
199 | sha256: cee2aa86c56780c13af2c77b5f2f72973464db204569e1ba2dd744459a065af4
200 | url: "https://pub.dev"
201 | source: hosted
202 | version: "0.2.1"
203 | image_picker_platform_interface:
204 | dependency: transitive
205 | description:
206 | name: image_picker_platform_interface
207 | sha256: c1134543ae2187e85299996d21c526b2f403854994026d575ae4cf30d7bb2a32
208 | url: "https://pub.dev"
209 | source: hosted
210 | version: "2.9.0"
211 | image_picker_windows:
212 | dependency: transitive
213 | description:
214 | name: image_picker_windows
215 | sha256: c3066601ea42113922232c7b7b3330a2d86f029f685bba99d82c30e799914952
216 | url: "https://pub.dev"
217 | source: hosted
218 | version: "0.2.1"
219 | js:
220 | dependency: transitive
221 | description:
222 | name: js
223 | sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
224 | url: "https://pub.dev"
225 | source: hosted
226 | version: "0.6.7"
227 | lints:
228 | dependency: transitive
229 | description:
230 | name: lints
231 | sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
232 | url: "https://pub.dev"
233 | source: hosted
234 | version: "1.0.1"
235 | matcher:
236 | dependency: transitive
237 | description:
238 | name: matcher
239 | sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
240 | url: "https://pub.dev"
241 | source: hosted
242 | version: "0.12.15"
243 | material_color_utilities:
244 | dependency: transitive
245 | description:
246 | name: material_color_utilities
247 | sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
248 | url: "https://pub.dev"
249 | source: hosted
250 | version: "0.2.0"
251 | meta:
252 | dependency: transitive
253 | description:
254 | name: meta
255 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
256 | url: "https://pub.dev"
257 | source: hosted
258 | version: "1.9.1"
259 | mime:
260 | dependency: transitive
261 | description:
262 | name: mime
263 | sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
264 | url: "https://pub.dev"
265 | source: hosted
266 | version: "1.0.4"
267 | modal_progress_hud_nsn:
268 | dependency: "direct main"
269 | description:
270 | name: modal_progress_hud_nsn
271 | sha256: "0b0d95e5ce3e1884390624fbe79fcf90d7de10abe05d26c0e276c25e7130e3e0"
272 | url: "https://pub.dev"
273 | source: hosted
274 | version: "0.4.0"
275 | path:
276 | dependency: transitive
277 | description:
278 | name: path
279 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
280 | url: "https://pub.dev"
281 | source: hosted
282 | version: "1.8.3"
283 | plugin_platform_interface:
284 | dependency: transitive
285 | description:
286 | name: plugin_platform_interface
287 | sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
288 | url: "https://pub.dev"
289 | source: hosted
290 | version: "2.1.4"
291 | sky_engine:
292 | dependency: transitive
293 | description: flutter
294 | source: sdk
295 | version: "0.0.99"
296 | source_span:
297 | dependency: transitive
298 | description:
299 | name: source_span
300 | sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
301 | url: "https://pub.dev"
302 | source: hosted
303 | version: "1.9.1"
304 | stack_trace:
305 | dependency: transitive
306 | description:
307 | name: stack_trace
308 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
309 | url: "https://pub.dev"
310 | source: hosted
311 | version: "1.11.0"
312 | stream_channel:
313 | dependency: transitive
314 | description:
315 | name: stream_channel
316 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
317 | url: "https://pub.dev"
318 | source: hosted
319 | version: "2.1.1"
320 | string_scanner:
321 | dependency: transitive
322 | description:
323 | name: string_scanner
324 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
325 | url: "https://pub.dev"
326 | source: hosted
327 | version: "1.2.0"
328 | term_glyph:
329 | dependency: transitive
330 | description:
331 | name: term_glyph
332 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
333 | url: "https://pub.dev"
334 | source: hosted
335 | version: "1.2.1"
336 | test_api:
337 | dependency: transitive
338 | description:
339 | name: test_api
340 | sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
341 | url: "https://pub.dev"
342 | source: hosted
343 | version: "0.5.1"
344 | typed_data:
345 | dependency: transitive
346 | description:
347 | name: typed_data
348 | sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
349 | url: "https://pub.dev"
350 | source: hosted
351 | version: "1.3.0"
352 | vector_math:
353 | dependency: transitive
354 | description:
355 | name: vector_math
356 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
357 | url: "https://pub.dev"
358 | source: hosted
359 | version: "2.1.4"
360 | sdks:
361 | dart: ">=3.0.0 <4.0.0"
362 | flutter: ">=3.3.0"
363 |
--------------------------------------------------------------------------------
/lib/Models/products_model.dart:
--------------------------------------------------------------------------------
1 | /// success : true
2 | /// message : "All Data"
3 | /// data : [{"_id":"619c8e3500622d79441b9540","on_sale":true,"sale_percent":20,"sold":12,"slider_new":false,"slider_recent":false,"slider_sold":false,"date":"2021-11-18T09:03:04.358Z","title":"EMTSI21-50199","categories":{"_id":"612c8b2b674ad2107eb2d244","type":"Women","date":"2021-08-30T07:29:45.558Z","name":"Clothes","image":"http://54.219.221.136:5000/file-1635166478569-362580145.png","__v":0},"subcate":{"_id":"616e81dba17386218e27a2b5","date":"2021-10-18T10:52:11.222Z","name":"Shirts","parentid":"612c8b2b674ad2107eb2d244","__v":0},"shop":{"_id":"619c85e200622d79441b016f","is_active":false,"created_at":"2021-11-18T09:03:04.356Z","name":"Edenrobe","description":"The is Edenrobe brand","shopemail":"edenrobe@gmail.com","shopaddress":"Islamabad F8","shopcity":"Islamabad","userid":"619c85e100622d79441b015d","image":"https://image.shutterstock.com/image-photo/hong-kong-january-26-2016-600w-375233593.jpg","__v":0},"price":"2,790.00","sale_title":"Winter Sale","sale_price":"1,953.00","description":"Classic Collar\nGrey Texture Striped Dobby\nCotton\nBarrel Cuff\nSlim Fit\n100% Cotton\nSolid\nMachine Washable\nProduct Code: EMTSUC21-134","colors":"#FF6347,#CD5C5C","size":"S,M,L,XL,XXL","images":[{"_id":"619c8e4400622d79441b9631","filename":"images[0]-1637649987263-936766588.webp","url":"https://image.shutterstock.com/image-photo/sexy-woman-white-tshirt-on-600w-746398405.jpg"},{"_id":"619c8e4400622d79441b9632","filename":"images[1]-1637649987919-666952226.webp","url":"https://image.shutterstock.com/image-photo/stylish-blonde-girl-wearing-black-600w-1766656019.jpg"},{"_id":"619c8e4400622d79441b9633","filename":"images[2]-1637649988328-112759468.webp","url":"https://image.shutterstock.com/image-photo/tshirt-design-concept-woman-blank-600w-149214662.jpg"}],"__v":1,"in_wishlist":false},{"_id":"619c8e3500622d79441b9540","on_sale":true,"sale_percent":20,"sold":12,"slider_new":false,"slider_recent":false,"slider_sold":false,"date":"2021-11-18T09:03:04.358Z","title":"EMTSI21-50199","categories":{"_id":"612c8b2b674ad2107eb2d244","type":"Women","date":"2021-08-30T07:29:45.558Z","name":"Clothes","image":"http://54.219.221.136:5000/file-1635166478569-362580145.png","__v":0},"subcate":{"_id":"616e81dba17386218e27a2b5","date":"2021-10-18T10:52:11.222Z","name":"Shirts","parentid":"612c8b2b674ad2107eb2d244","__v":0},"shop":{"_id":"619c85e200622d79441b016f","is_active":false,"created_at":"2021-11-18T09:03:04.356Z","name":"Edenrobe","description":"The is Edenrobe brand","shopemail":"edenrobe@gmail.com","shopaddress":"Islamabad F8","shopcity":"Islamabad","userid":"619c85e100622d79441b015d","image":"https://image.shutterstock.com/image-photo/hong-kong-january-26-2016-600w-375233593.jpg","__v":0},"price":"2,790.00","sale_title":"Winter Sale","sale_price":"1,953.00","description":"Classic Collar\nGrey Texture Striped Dobby\nCotton\nBarrel Cuff\nSlim Fit\n100% Cotton\nSolid\nMachine Washable\nProduct Code: EMTSUC21-134","colors":"#FF6347,#CD5C5C","size":"S,M,L,XL,XXL","images":[{"_id":"619c8e4400622d79441b9631","filename":"images[0]-1637649987263-936766588.webp","url":"https://image.shutterstock.com/image-photo/sexy-woman-white-tshirt-on-600w-746398405.jpg"},{"_id":"619c8e4400622d79441b9632","filename":"images[1]-1637649987919-666952226.webp","url":"https://image.shutterstock.com/image-photo/stylish-blonde-girl-wearing-black-600w-1766656019.jpg"},{"_id":"619c8e4400622d79441b9633","filename":"images[2]-1637649988328-112759468.webp","url":"https://image.shutterstock.com/image-photo/tshirt-design-concept-woman-blank-600w-149214662.jpg"}],"__v":1,"in_wishlist":false},{"_id":"619c8e3500622d79441b9540","on_sale":true,"sale_percent":20,"sold":12,"slider_new":false,"slider_recent":false,"slider_sold":false,"date":"2021-11-18T09:03:04.358Z","title":"EMTSI21-50199","categories":{"_id":"612c8b2b674ad2107eb2d244","type":"Women","date":"2021-08-30T07:29:45.558Z","name":"Clothes","image":"http://54.219.221.136:5000/file-1635166478569-362580145.png","__v":0},"subcate":{"_id":"616e81dba17386218e27a2b5","date":"2021-10-18T10:52:11.222Z","name":"Shirts","parentid":"612c8b2b674ad2107eb2d244","__v":0},"shop":{"_id":"619c85e200622d79441b016f","is_active":false,"created_at":"2021-11-18T09:03:04.356Z","name":"Edenrobe","description":"The is Edenrobe brand","shopemail":"edenrobe@gmail.com","shopaddress":"Islamabad F8","shopcity":"Islamabad","userid":"619c85e100622d79441b015d","image":"https://image.shutterstock.com/image-photo/hong-kong-january-26-2016-600w-375233593.jpg","__v":0},"price":"2,790.00","sale_title":"Winter Sale","sale_price":"1,953.00","description":"Classic Collar\nGrey Texture Striped Dobby\nCotton\nBarrel Cuff\nSlim Fit\n100% Cotton\nSolid\nMachine Washable\nProduct Code: EMTSUC21-134","colors":"#FF6347,#CD5C5C","size":"S,M,L,XL,XXL","images":[{"_id":"619c8e4400622d79441b9631","filename":"images[0]-1637649987263-936766588.webp","url":"https://image.shutterstock.com/image-photo/sexy-woman-white-tshirt-on-600w-746398405.jpg"},{"_id":"619c8e4400622d79441b9632","filename":"images[1]-1637649987919-666952226.webp","url":"https://image.shutterstock.com/image-photo/stylish-blonde-girl-wearing-black-600w-1766656019.jpg"},{"_id":"619c8e4400622d79441b9633","filename":"images[2]-1637649988328-112759468.webp","url":"https://image.shutterstock.com/image-photo/tshirt-design-concept-woman-blank-600w-149214662.jpg"}],"__v":1,"in_wishlist":false}]
4 |
5 | class ProductsModel {
6 | ProductsModel({
7 | bool? success,
8 | String? message,
9 | List? data,}){
10 | _success = success;
11 | _message = message;
12 | _data = data;
13 | }
14 |
15 | ProductsModel.fromJson(dynamic json) {
16 | _success = json['success'];
17 | _message = json['message'];
18 | if (json['data'] != null) {
19 | _data = [];
20 | json['data'].forEach((v) {
21 | _data?.add(Data.fromJson(v));
22 | });
23 | }
24 | }
25 | bool? _success;
26 | String? _message;
27 | List? _data;
28 |
29 | bool? get success => _success;
30 | String? get message => _message;
31 | List? get data => _data;
32 |
33 | Map toJson() {
34 | final map = {};
35 | map['success'] = _success;
36 | map['message'] = _message;
37 | if (_data != null) {
38 | map['data'] = _data?.map((v) => v.toJson()).toList();
39 | }
40 | return map;
41 | }
42 |
43 | }
44 |
45 | /// _id : "619c8e3500622d79441b9540"
46 | /// on_sale : true
47 | /// sale_percent : 20
48 | /// sold : 12
49 | /// slider_new : false
50 | /// slider_recent : false
51 | /// slider_sold : false
52 | /// date : "2021-11-18T09:03:04.358Z"
53 | /// title : "EMTSI21-50199"
54 | /// categories : {"_id":"612c8b2b674ad2107eb2d244","type":"Women","date":"2021-08-30T07:29:45.558Z","name":"Clothes","image":"http://54.219.221.136:5000/file-1635166478569-362580145.png","__v":0}
55 | /// subcate : {"_id":"616e81dba17386218e27a2b5","date":"2021-10-18T10:52:11.222Z","name":"Shirts","parentid":"612c8b2b674ad2107eb2d244","__v":0}
56 | /// shop : {"_id":"619c85e200622d79441b016f","is_active":false,"created_at":"2021-11-18T09:03:04.356Z","name":"Edenrobe","description":"The is Edenrobe brand","shopemail":"edenrobe@gmail.com","shopaddress":"Islamabad F8","shopcity":"Islamabad","userid":"619c85e100622d79441b015d","image":"https://image.shutterstock.com/image-photo/hong-kong-january-26-2016-600w-375233593.jpg","__v":0}
57 | /// price : "2,790.00"
58 | /// sale_title : "Winter Sale"
59 | /// sale_price : "1,953.00"
60 | /// description : "Classic Collar\nGrey Texture Striped Dobby\nCotton\nBarrel Cuff\nSlim Fit\n100% Cotton\nSolid\nMachine Washable\nProduct Code: EMTSUC21-134"
61 | /// colors : "#FF6347,#CD5C5C"
62 | /// size : "S,M,L,XL,XXL"
63 | /// images : [{"_id":"619c8e4400622d79441b9631","filename":"images[0]-1637649987263-936766588.webp","url":"https://image.shutterstock.com/image-photo/sexy-woman-white-tshirt-on-600w-746398405.jpg"},{"_id":"619c8e4400622d79441b9632","filename":"images[1]-1637649987919-666952226.webp","url":"https://image.shutterstock.com/image-photo/stylish-blonde-girl-wearing-black-600w-1766656019.jpg"},{"_id":"619c8e4400622d79441b9633","filename":"images[2]-1637649988328-112759468.webp","url":"https://image.shutterstock.com/image-photo/tshirt-design-concept-woman-blank-600w-149214662.jpg"}]
64 | /// __v : 1
65 | /// in_wishlist : false
66 |
67 | class Data {
68 | Data({
69 | String? id,
70 | bool? onSale,
71 | int? salePercent,
72 | int? sold,
73 | bool? sliderNew,
74 | bool? sliderRecent,
75 | bool? sliderSold,
76 | String? date,
77 | String? title,
78 | Categories? categories,
79 | Subcate? subcate,
80 | Shop? shop,
81 | String? price,
82 | String? saleTitle,
83 | String? salePrice,
84 | String? description,
85 | String? colors,
86 | String? size,
87 | List? images,
88 | int? v,
89 | bool? inWishlist,}){
90 | _id = id;
91 | _onSale = onSale;
92 | _salePercent = salePercent;
93 | _sold = sold;
94 | _sliderNew = sliderNew;
95 | _sliderRecent = sliderRecent;
96 | _sliderSold = sliderSold;
97 | _date = date;
98 | _title = title;
99 | _categories = categories;
100 | _subcate = subcate;
101 | _shop = shop;
102 | _price = price;
103 | _saleTitle = saleTitle;
104 | _salePrice = salePrice;
105 | _description = description;
106 | _colors = colors;
107 | _size = size;
108 | _images = images;
109 | _v = v;
110 | _inWishlist = inWishlist;
111 | }
112 |
113 | Data.fromJson(dynamic json) {
114 | _id = json['_id'];
115 | _onSale = json['on_sale'];
116 | _salePercent = json['sale_percent'];
117 | _sold = json['sold'];
118 | _sliderNew = json['slider_new'];
119 | _sliderRecent = json['slider_recent'];
120 | _sliderSold = json['slider_sold'];
121 | _date = json['date'];
122 | _title = json['title'];
123 | _categories = json['categories'] != null ? Categories.fromJson(json['categories']) : null;
124 | _subcate = json['subcate'] != null ? Subcate.fromJson(json['subcate']) : null;
125 | _shop = json['shop'] != null ? Shop.fromJson(json['shop']) : null;
126 | _price = json['price'];
127 | _saleTitle = json['sale_title'];
128 | _salePrice = json['sale_price'];
129 | _description = json['description'];
130 | _colors = json['colors'];
131 | _size = json['size'];
132 | if (json['images'] != null) {
133 | _images = [];
134 | json['images'].forEach((v) {
135 | _images?.add(Images.fromJson(v));
136 | });
137 | }
138 | _v = json['__v'];
139 | _inWishlist = json['in_wishlist'];
140 | }
141 | String? _id;
142 | bool? _onSale;
143 | int? _salePercent;
144 | int? _sold;
145 | bool? _sliderNew;
146 | bool? _sliderRecent;
147 | bool? _sliderSold;
148 | String? _date;
149 | String? _title;
150 | Categories? _categories;
151 | Subcate? _subcate;
152 | Shop? _shop;
153 | String? _price;
154 | String? _saleTitle;
155 | String? _salePrice;
156 | String? _description;
157 | String? _colors;
158 | String? _size;
159 | List? _images;
160 | int? _v;
161 | bool? _inWishlist;
162 |
163 | String? get id => _id;
164 | bool? get onSale => _onSale;
165 | int? get salePercent => _salePercent;
166 | int? get sold => _sold;
167 | bool? get sliderNew => _sliderNew;
168 | bool? get sliderRecent => _sliderRecent;
169 | bool? get sliderSold => _sliderSold;
170 | String? get date => _date;
171 | String? get title => _title;
172 | Categories? get categories => _categories;
173 | Subcate? get subcate => _subcate;
174 | Shop? get shop => _shop;
175 | String? get price => _price;
176 | String? get saleTitle => _saleTitle;
177 | String? get salePrice => _salePrice;
178 | String? get description => _description;
179 | String? get colors => _colors;
180 | String? get size => _size;
181 | List? get images => _images;
182 | int? get v => _v;
183 | bool? get inWishlist => _inWishlist;
184 |
185 | Map toJson() {
186 | final map = {};
187 | map['_id'] = _id;
188 | map['on_sale'] = _onSale;
189 | map['sale_percent'] = _salePercent;
190 | map['sold'] = _sold;
191 | map['slider_new'] = _sliderNew;
192 | map['slider_recent'] = _sliderRecent;
193 | map['slider_sold'] = _sliderSold;
194 | map['date'] = _date;
195 | map['title'] = _title;
196 | if (_categories != null) {
197 | map['categories'] = _categories?.toJson();
198 | }
199 | if (_subcate != null) {
200 | map['subcate'] = _subcate?.toJson();
201 | }
202 | if (_shop != null) {
203 | map['shop'] = _shop?.toJson();
204 | }
205 | map['price'] = _price;
206 | map['sale_title'] = _saleTitle;
207 | map['sale_price'] = _salePrice;
208 | map['description'] = _description;
209 | map['colors'] = _colors;
210 | map['size'] = _size;
211 | if (_images != null) {
212 | map['images'] = _images?.map((v) => v.toJson()).toList();
213 | }
214 | map['__v'] = _v;
215 | map['in_wishlist'] = _inWishlist;
216 | return map;
217 | }
218 |
219 | }
220 |
221 | /// _id : "619c8e4400622d79441b9631"
222 | /// filename : "images[0]-1637649987263-936766588.webp"
223 | /// url : "https://image.shutterstock.com/image-photo/sexy-woman-white-tshirt-on-600w-746398405.jpg"
224 |
225 | class Images {
226 | Images({
227 | String? id,
228 | String? filename,
229 | String? url,}){
230 | _id = id;
231 | _filename = filename;
232 | _url = url;
233 | }
234 |
235 | Images.fromJson(dynamic json) {
236 | _id = json['_id'];
237 | _filename = json['filename'];
238 | _url = json['url'];
239 | }
240 | String? _id;
241 | String? _filename;
242 | String? _url;
243 |
244 | String? get id => _id;
245 | String? get filename => _filename;
246 | String? get url => _url;
247 |
248 | Map toJson() {
249 | final map = {};
250 | map['_id'] = _id;
251 | map['filename'] = _filename;
252 | map['url'] = _url;
253 | return map;
254 | }
255 |
256 | }
257 |
258 | /// _id : "619c85e200622d79441b016f"
259 | /// is_active : false
260 | /// created_at : "2021-11-18T09:03:04.356Z"
261 | /// name : "Edenrobe"
262 | /// description : "The is Edenrobe brand"
263 | /// shopemail : "edenrobe@gmail.com"
264 | /// shopaddress : "Islamabad F8"
265 | /// shopcity : "Islamabad"
266 | /// userid : "619c85e100622d79441b015d"
267 | /// image : "https://image.shutterstock.com/image-photo/hong-kong-january-26-2016-600w-375233593.jpg"
268 | /// __v : 0
269 |
270 | class Shop {
271 | Shop({
272 | String? id,
273 | bool? isActive,
274 | String? createdAt,
275 | String? name,
276 | String? description,
277 | String? shopemail,
278 | String? shopaddress,
279 | String? shopcity,
280 | String? userid,
281 | String? image,
282 | int? v,}){
283 | _id = id;
284 | _isActive = isActive;
285 | _createdAt = createdAt;
286 | _name = name;
287 | _description = description;
288 | _shopemail = shopemail;
289 | _shopaddress = shopaddress;
290 | _shopcity = shopcity;
291 | _userid = userid;
292 | _image = image;
293 | _v = v;
294 | }
295 |
296 | Shop.fromJson(dynamic json) {
297 | _id = json['_id'];
298 | _isActive = json['is_active'];
299 | _createdAt = json['created_at'];
300 | _name = json['name'];
301 | _description = json['description'];
302 | _shopemail = json['shopemail'];
303 | _shopaddress = json['shopaddress'];
304 | _shopcity = json['shopcity'];
305 | _userid = json['userid'];
306 | _image = json['image'];
307 | _v = json['__v'];
308 | }
309 | String? _id;
310 | bool? _isActive;
311 | String? _createdAt;
312 | String? _name;
313 | String? _description;
314 | String? _shopemail;
315 | String? _shopaddress;
316 | String? _shopcity;
317 | String? _userid;
318 | String? _image;
319 | int? _v;
320 |
321 | String? get id => _id;
322 | bool? get isActive => _isActive;
323 | String? get createdAt => _createdAt;
324 | String? get name => _name;
325 | String? get description => _description;
326 | String? get shopemail => _shopemail;
327 | String? get shopaddress => _shopaddress;
328 | String? get shopcity => _shopcity;
329 | String? get userid => _userid;
330 | String? get image => _image;
331 | int? get v => _v;
332 |
333 | Map toJson() {
334 | final map = {};
335 | map['_id'] = _id;
336 | map['is_active'] = _isActive;
337 | map['created_at'] = _createdAt;
338 | map['name'] = _name;
339 | map['description'] = _description;
340 | map['shopemail'] = _shopemail;
341 | map['shopaddress'] = _shopaddress;
342 | map['shopcity'] = _shopcity;
343 | map['userid'] = _userid;
344 | map['image'] = _image;
345 | map['__v'] = _v;
346 | return map;
347 | }
348 |
349 | }
350 |
351 | /// _id : "616e81dba17386218e27a2b5"
352 | /// date : "2021-10-18T10:52:11.222Z"
353 | /// name : "Shirts"
354 | /// parentid : "612c8b2b674ad2107eb2d244"
355 | /// __v : 0
356 |
357 | class Subcate {
358 | Subcate({
359 | String? id,
360 | String? date,
361 | String? name,
362 | String? parentid,
363 | int? v,}){
364 | _id = id;
365 | _date = date;
366 | _name = name;
367 | _parentid = parentid;
368 | _v = v;
369 | }
370 |
371 | Subcate.fromJson(dynamic json) {
372 | _id = json['_id'];
373 | _date = json['date'];
374 | _name = json['name'];
375 | _parentid = json['parentid'];
376 | _v = json['__v'];
377 | }
378 | String? _id;
379 | String? _date;
380 | String? _name;
381 | String? _parentid;
382 | int? _v;
383 |
384 | String? get id => _id;
385 | String? get date => _date;
386 | String? get name => _name;
387 | String? get parentid => _parentid;
388 | int? get v => _v;
389 |
390 | Map toJson() {
391 | final map = {};
392 | map['_id'] = _id;
393 | map['date'] = _date;
394 | map['name'] = _name;
395 | map['parentid'] = _parentid;
396 | map['__v'] = _v;
397 | return map;
398 | }
399 |
400 | }
401 |
402 | /// _id : "612c8b2b674ad2107eb2d244"
403 | /// type : "Women"
404 | /// date : "2021-08-30T07:29:45.558Z"
405 | /// name : "Clothes"
406 | /// image : "http://54.219.221.136:5000/file-1635166478569-362580145.png"
407 | /// __v : 0
408 |
409 | class Categories {
410 | Categories({
411 | String? id,
412 | String? type,
413 | String? date,
414 | String? name,
415 | String? image,
416 | int? v,}){
417 | _id = id;
418 | _type = type;
419 | _date = date;
420 | _name = name;
421 | _image = image;
422 | _v = v;
423 | }
424 |
425 | Categories.fromJson(dynamic json) {
426 | _id = json['_id'];
427 | _type = json['type'];
428 | _date = json['date'];
429 | _name = json['name'];
430 | _image = json['image'];
431 | _v = json['__v'];
432 | }
433 | String? _id;
434 | String? _type;
435 | String? _date;
436 | String? _name;
437 | String? _image;
438 | int? _v;
439 |
440 | String? get id => _id;
441 | String? get type => _type;
442 | String? get date => _date;
443 | String? get name => _name;
444 | String? get image => _image;
445 | int? get v => _v;
446 |
447 | Map toJson() {
448 | final map = {};
449 | map['_id'] = _id;
450 | map['type'] = _type;
451 | map['date'] = _date;
452 | map['name'] = _name;
453 | map['image'] = _image;
454 | map['__v'] = _v;
455 | return map;
456 | }
457 |
458 | }
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 7EE51458D3E743BC20EB5350 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB52FB7B983F45D6F8567669 /* Pods_Runner.framework */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | );
27 | name = "Embed Frameworks";
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXCopyFilesBuildPhase section */
31 |
32 | /* Begin PBXFileReference section */
33 | 05D39C7FE5BBC037755BA868 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
34 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
35 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
36 | 30799305391E3106FEE12AA0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
48 | A1F05316D3DF4FB1171E8240 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
49 | DB52FB7B983F45D6F8567669 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 7EE51458D3E743BC20EB5350 /* Pods_Runner.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 9740EEB11CF90186004384FC /* Flutter */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
68 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
70 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
71 | );
72 | name = Flutter;
73 | sourceTree = "";
74 | };
75 | 97C146E51CF9000F007C117D = {
76 | isa = PBXGroup;
77 | children = (
78 | 9740EEB11CF90186004384FC /* Flutter */,
79 | 97C146F01CF9000F007C117D /* Runner */,
80 | 97C146EF1CF9000F007C117D /* Products */,
81 | F31063ACC0AD0C7888110784 /* Pods */,
82 | BDE10C0E2962BF3C595A8734 /* Frameworks */,
83 | );
84 | sourceTree = "";
85 | };
86 | 97C146EF1CF9000F007C117D /* Products */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146EE1CF9000F007C117D /* Runner.app */,
90 | );
91 | name = Products;
92 | sourceTree = "";
93 | };
94 | 97C146F01CF9000F007C117D /* Runner */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
98 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
99 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
100 | 97C147021CF9000F007C117D /* Info.plist */,
101 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
102 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
103 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
104 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
105 | );
106 | path = Runner;
107 | sourceTree = "";
108 | };
109 | BDE10C0E2962BF3C595A8734 /* Frameworks */ = {
110 | isa = PBXGroup;
111 | children = (
112 | DB52FB7B983F45D6F8567669 /* Pods_Runner.framework */,
113 | );
114 | name = Frameworks;
115 | sourceTree = "";
116 | };
117 | F31063ACC0AD0C7888110784 /* Pods */ = {
118 | isa = PBXGroup;
119 | children = (
120 | A1F05316D3DF4FB1171E8240 /* Pods-Runner.debug.xcconfig */,
121 | 05D39C7FE5BBC037755BA868 /* Pods-Runner.release.xcconfig */,
122 | 30799305391E3106FEE12AA0 /* Pods-Runner.profile.xcconfig */,
123 | );
124 | name = Pods;
125 | path = Pods;
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 97C146ED1CF9000F007C117D /* Runner */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134 | buildPhases = (
135 | FEDCD806E589EC8761F51EA1 /* [CP] Check Pods Manifest.lock */,
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | 9FA94FAAE2DA0DEF9DD724B4 /* [CP] Embed Pods Frameworks */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = Runner;
149 | productName = Runner;
150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | 97C146E61CF9000F007C117D /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastUpgradeCheck = 1300;
160 | ORGANIZATIONNAME = "";
161 | TargetAttributes = {
162 | 97C146ED1CF9000F007C117D = {
163 | CreatedOnToolsVersion = 7.3.1;
164 | LastSwiftMigration = 1100;
165 | };
166 | };
167 | };
168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
169 | compatibilityVersion = "Xcode 9.3";
170 | developmentRegion = en;
171 | hasScannedForEncodings = 0;
172 | knownRegions = (
173 | en,
174 | Base,
175 | );
176 | mainGroup = 97C146E51CF9000F007C117D;
177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
178 | projectDirPath = "";
179 | projectRoot = "";
180 | targets = (
181 | 97C146ED1CF9000F007C117D /* Runner */,
182 | );
183 | };
184 | /* End PBXProject section */
185 |
186 | /* Begin PBXResourcesBuildPhase section */
187 | 97C146EC1CF9000F007C117D /* Resources */ = {
188 | isa = PBXResourcesBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | alwaysOutOfDate = 1;
204 | buildActionMask = 2147483647;
205 | files = (
206 | );
207 | inputPaths = (
208 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
209 | );
210 | name = "Thin Binary";
211 | outputPaths = (
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | shellPath = /bin/sh;
215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
216 | };
217 | 9740EEB61CF901F6004384FC /* Run Script */ = {
218 | isa = PBXShellScriptBuildPhase;
219 | alwaysOutOfDate = 1;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | inputPaths = (
224 | );
225 | name = "Run Script";
226 | outputPaths = (
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | shellPath = /bin/sh;
230 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
231 | };
232 | 9FA94FAAE2DA0DEF9DD724B4 /* [CP] Embed Pods Frameworks */ = {
233 | isa = PBXShellScriptBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | );
237 | inputFileListPaths = (
238 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
239 | );
240 | name = "[CP] Embed Pods Frameworks";
241 | outputFileListPaths = (
242 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
243 | );
244 | runOnlyForDeploymentPostprocessing = 0;
245 | shellPath = /bin/sh;
246 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
247 | showEnvVarsInLog = 0;
248 | };
249 | FEDCD806E589EC8761F51EA1 /* [CP] Check Pods Manifest.lock */ = {
250 | isa = PBXShellScriptBuildPhase;
251 | buildActionMask = 2147483647;
252 | files = (
253 | );
254 | inputFileListPaths = (
255 | );
256 | inputPaths = (
257 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
258 | "${PODS_ROOT}/Manifest.lock",
259 | );
260 | name = "[CP] Check Pods Manifest.lock";
261 | outputFileListPaths = (
262 | );
263 | outputPaths = (
264 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | shellPath = /bin/sh;
268 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
269 | showEnvVarsInLog = 0;
270 | };
271 | /* End PBXShellScriptBuildPhase section */
272 |
273 | /* Begin PBXSourcesBuildPhase section */
274 | 97C146EA1CF9000F007C117D /* Sources */ = {
275 | isa = PBXSourcesBuildPhase;
276 | buildActionMask = 2147483647;
277 | files = (
278 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
279 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
280 | );
281 | runOnlyForDeploymentPostprocessing = 0;
282 | };
283 | /* End PBXSourcesBuildPhase section */
284 |
285 | /* Begin PBXVariantGroup section */
286 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
287 | isa = PBXVariantGroup;
288 | children = (
289 | 97C146FB1CF9000F007C117D /* Base */,
290 | );
291 | name = Main.storyboard;
292 | sourceTree = "";
293 | };
294 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
295 | isa = PBXVariantGroup;
296 | children = (
297 | 97C147001CF9000F007C117D /* Base */,
298 | );
299 | name = LaunchScreen.storyboard;
300 | sourceTree = "";
301 | };
302 | /* End PBXVariantGroup section */
303 |
304 | /* Begin XCBuildConfiguration section */
305 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | buildSettings = {
308 | ALWAYS_SEARCH_USER_PATHS = NO;
309 | CLANG_ANALYZER_NONNULL = YES;
310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
311 | CLANG_CXX_LIBRARY = "libc++";
312 | CLANG_ENABLE_MODULES = YES;
313 | CLANG_ENABLE_OBJC_ARC = YES;
314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
315 | CLANG_WARN_BOOL_CONVERSION = YES;
316 | CLANG_WARN_COMMA = YES;
317 | CLANG_WARN_CONSTANT_CONVERSION = YES;
318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
320 | CLANG_WARN_EMPTY_BODY = YES;
321 | CLANG_WARN_ENUM_CONVERSION = YES;
322 | CLANG_WARN_INFINITE_RECURSION = YES;
323 | CLANG_WARN_INT_CONVERSION = YES;
324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
329 | CLANG_WARN_STRICT_PROTOTYPES = YES;
330 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
331 | CLANG_WARN_UNREACHABLE_CODE = YES;
332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
334 | COPY_PHASE_STRIP = NO;
335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
336 | ENABLE_NS_ASSERTIONS = NO;
337 | ENABLE_STRICT_OBJC_MSGSEND = YES;
338 | GCC_C_LANGUAGE_STANDARD = gnu99;
339 | GCC_NO_COMMON_BLOCKS = YES;
340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
342 | GCC_WARN_UNDECLARED_SELECTOR = YES;
343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
344 | GCC_WARN_UNUSED_FUNCTION = YES;
345 | GCC_WARN_UNUSED_VARIABLE = YES;
346 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
347 | MTL_ENABLE_DEBUG_INFO = NO;
348 | SDKROOT = iphoneos;
349 | SUPPORTED_PLATFORMS = iphoneos;
350 | TARGETED_DEVICE_FAMILY = "1,2";
351 | VALIDATE_PRODUCT = YES;
352 | };
353 | name = Profile;
354 | };
355 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
356 | isa = XCBuildConfiguration;
357 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
358 | buildSettings = {
359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 | CLANG_ENABLE_MODULES = YES;
361 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
362 | ENABLE_BITCODE = NO;
363 | INFOPLIST_FILE = Runner/Info.plist;
364 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
365 | PRODUCT_BUNDLE_IDENTIFIER = com.example.apitutorials;
366 | PRODUCT_NAME = "$(TARGET_NAME)";
367 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
368 | SWIFT_VERSION = 5.0;
369 | VERSIONING_SYSTEM = "apple-generic";
370 | };
371 | name = Profile;
372 | };
373 | 97C147031CF9000F007C117D /* Debug */ = {
374 | isa = XCBuildConfiguration;
375 | buildSettings = {
376 | ALWAYS_SEARCH_USER_PATHS = NO;
377 | CLANG_ANALYZER_NONNULL = YES;
378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
379 | CLANG_CXX_LIBRARY = "libc++";
380 | CLANG_ENABLE_MODULES = YES;
381 | CLANG_ENABLE_OBJC_ARC = YES;
382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
383 | CLANG_WARN_BOOL_CONVERSION = YES;
384 | CLANG_WARN_COMMA = YES;
385 | CLANG_WARN_CONSTANT_CONVERSION = YES;
386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
388 | CLANG_WARN_EMPTY_BODY = YES;
389 | CLANG_WARN_ENUM_CONVERSION = YES;
390 | CLANG_WARN_INFINITE_RECURSION = YES;
391 | CLANG_WARN_INT_CONVERSION = YES;
392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
393 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
397 | CLANG_WARN_STRICT_PROTOTYPES = YES;
398 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
399 | CLANG_WARN_UNREACHABLE_CODE = YES;
400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
402 | COPY_PHASE_STRIP = NO;
403 | DEBUG_INFORMATION_FORMAT = dwarf;
404 | ENABLE_STRICT_OBJC_MSGSEND = YES;
405 | ENABLE_TESTABILITY = YES;
406 | GCC_C_LANGUAGE_STANDARD = gnu99;
407 | GCC_DYNAMIC_NO_PIC = NO;
408 | GCC_NO_COMMON_BLOCKS = YES;
409 | GCC_OPTIMIZATION_LEVEL = 0;
410 | GCC_PREPROCESSOR_DEFINITIONS = (
411 | "DEBUG=1",
412 | "$(inherited)",
413 | );
414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
416 | GCC_WARN_UNDECLARED_SELECTOR = YES;
417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
418 | GCC_WARN_UNUSED_FUNCTION = YES;
419 | GCC_WARN_UNUSED_VARIABLE = YES;
420 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
421 | MTL_ENABLE_DEBUG_INFO = YES;
422 | ONLY_ACTIVE_ARCH = YES;
423 | SDKROOT = iphoneos;
424 | TARGETED_DEVICE_FAMILY = "1,2";
425 | };
426 | name = Debug;
427 | };
428 | 97C147041CF9000F007C117D /* Release */ = {
429 | isa = XCBuildConfiguration;
430 | buildSettings = {
431 | ALWAYS_SEARCH_USER_PATHS = NO;
432 | CLANG_ANALYZER_NONNULL = YES;
433 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
434 | CLANG_CXX_LIBRARY = "libc++";
435 | CLANG_ENABLE_MODULES = YES;
436 | CLANG_ENABLE_OBJC_ARC = YES;
437 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
438 | CLANG_WARN_BOOL_CONVERSION = YES;
439 | CLANG_WARN_COMMA = YES;
440 | CLANG_WARN_CONSTANT_CONVERSION = YES;
441 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
442 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
443 | CLANG_WARN_EMPTY_BODY = YES;
444 | CLANG_WARN_ENUM_CONVERSION = YES;
445 | CLANG_WARN_INFINITE_RECURSION = YES;
446 | CLANG_WARN_INT_CONVERSION = YES;
447 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
448 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
449 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
450 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
451 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
452 | CLANG_WARN_STRICT_PROTOTYPES = YES;
453 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
454 | CLANG_WARN_UNREACHABLE_CODE = YES;
455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
456 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
457 | COPY_PHASE_STRIP = NO;
458 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
459 | ENABLE_NS_ASSERTIONS = NO;
460 | ENABLE_STRICT_OBJC_MSGSEND = YES;
461 | GCC_C_LANGUAGE_STANDARD = gnu99;
462 | GCC_NO_COMMON_BLOCKS = YES;
463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
465 | GCC_WARN_UNDECLARED_SELECTOR = YES;
466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
467 | GCC_WARN_UNUSED_FUNCTION = YES;
468 | GCC_WARN_UNUSED_VARIABLE = YES;
469 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
470 | MTL_ENABLE_DEBUG_INFO = NO;
471 | SDKROOT = iphoneos;
472 | SUPPORTED_PLATFORMS = iphoneos;
473 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
474 | TARGETED_DEVICE_FAMILY = "1,2";
475 | VALIDATE_PRODUCT = YES;
476 | };
477 | name = Release;
478 | };
479 | 97C147061CF9000F007C117D /* Debug */ = {
480 | isa = XCBuildConfiguration;
481 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
482 | buildSettings = {
483 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
484 | CLANG_ENABLE_MODULES = YES;
485 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
486 | ENABLE_BITCODE = NO;
487 | INFOPLIST_FILE = Runner/Info.plist;
488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
489 | PRODUCT_BUNDLE_IDENTIFIER = com.example.apitutorials;
490 | PRODUCT_NAME = "$(TARGET_NAME)";
491 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
492 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
493 | SWIFT_VERSION = 5.0;
494 | VERSIONING_SYSTEM = "apple-generic";
495 | };
496 | name = Debug;
497 | };
498 | 97C147071CF9000F007C117D /* Release */ = {
499 | isa = XCBuildConfiguration;
500 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
501 | buildSettings = {
502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
503 | CLANG_ENABLE_MODULES = YES;
504 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
505 | ENABLE_BITCODE = NO;
506 | INFOPLIST_FILE = Runner/Info.plist;
507 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
508 | PRODUCT_BUNDLE_IDENTIFIER = com.example.apitutorials;
509 | PRODUCT_NAME = "$(TARGET_NAME)";
510 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
511 | SWIFT_VERSION = 5.0;
512 | VERSIONING_SYSTEM = "apple-generic";
513 | };
514 | name = Release;
515 | };
516 | /* End XCBuildConfiguration section */
517 |
518 | /* Begin XCConfigurationList section */
519 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
520 | isa = XCConfigurationList;
521 | buildConfigurations = (
522 | 97C147031CF9000F007C117D /* Debug */,
523 | 97C147041CF9000F007C117D /* Release */,
524 | 249021D3217E4FDB00AE95B9 /* Profile */,
525 | );
526 | defaultConfigurationIsVisible = 0;
527 | defaultConfigurationName = Release;
528 | };
529 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
530 | isa = XCConfigurationList;
531 | buildConfigurations = (
532 | 97C147061CF9000F007C117D /* Debug */,
533 | 97C147071CF9000F007C117D /* Release */,
534 | 249021D4217E4FDB00AE95B9 /* Profile */,
535 | );
536 | defaultConfigurationIsVisible = 0;
537 | defaultConfigurationName = Release;
538 | };
539 | /* End XCConfigurationList section */
540 | };
541 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
542 | }
543 |
--------------------------------------------------------------------------------