├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-50x50@1x.png
│ │ │ ├── Icon-App-50x50@2x.png
│ │ │ ├── Icon-App-57x57@1x.png
│ │ │ ├── Icon-App-57x57@2x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-72x72@1x.png
│ │ │ ├── Icon-App-72x72@2x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── sambhar-cover.png
├── fonts
├── Inter-Bold.ttf
├── Inter-Thin.ttf
├── Inter-Black.ttf
├── Inter-Light.ttf
├── Inter-Medium.ttf
├── Inter-Regular.ttf
├── Inter-ExtraBold.ttf
├── Inter-SemiBold.ttf
└── Inter-ExtraLight.ttf
├── assets
└── images
│ ├── bread.png
│ ├── dairy.png
│ ├── egg.png
│ ├── icons.png
│ ├── shop.png
│ ├── appbar.png
│ ├── fruits.png
│ ├── grains.png
│ ├── veggies.png
│ ├── app-logo.png
│ ├── sambhar-bg.png
│ ├── shopicon.png
│ └── app-bg-notext.png
├── consumer-dashboard.png
├── lib
├── states
│ ├── LoginStatus.dart
│ └── CartStatus.dart
├── models
│ ├── category_model.dart
│ ├── cart_item.dart
│ ├── product_model.dart
│ ├── consumer_model.dart
│ └── seller_model.dart
├── widgets
│ ├── sub_txt_widgets.dart
│ ├── dashboard_app_bar.dart
│ ├── ItemListTile.dart
│ ├── signup.dart
│ ├── grid_card_views_design.dart
│ ├── inputs.dart
│ ├── items_grid_card_veiws.dart
│ └── list_vewi_product.dart
├── dummy_data
│ └── category_data.dart
├── screens
│ ├── consumer_cart
│ │ ├── empty_cart.dart
│ │ ├── cart_refreshing.dart
│ │ ├── consumer_cart.dart
│ │ ├── cart_content.dart
│ │ └── edit_cart_item.dart
│ ├── product_category.dart
│ ├── sellers
│ │ ├── sellers_dashboard.dart
│ │ └── edit_items.dart
│ ├── seller_signin.dart
│ ├── customer_login_screens.dart
│ ├── login_selector.dart
│ ├── consumer_dashboard.dart
│ ├── add_shop.dart
│ ├── seller_signup.dart
│ └── consumer_signup.dart
├── provider
│ ├── firebase_data_queries.dart
│ ├── cart_provider.dart
│ └── firebase_consumer_login.dart
├── themes
│ └── main_themes.dart
├── main.dart
└── core
│ └── firebase_Mob_Auth.dart
├── android
├── gradle.properties
├── .gitignore
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── launcher_icon.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── launcher_icon.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── launcher_icon.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── launcher_icon.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── launcher_icon.png
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── sambharapp
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── .metadata
├── .gitignore
├── test
└── widget_test.dart
├── google-services.json
├── README.md
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/sambhar-cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/sambhar-cover.png
--------------------------------------------------------------------------------
/fonts/Inter-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Bold.ttf
--------------------------------------------------------------------------------
/fonts/Inter-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Thin.ttf
--------------------------------------------------------------------------------
/assets/images/bread.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/bread.png
--------------------------------------------------------------------------------
/assets/images/dairy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/dairy.png
--------------------------------------------------------------------------------
/assets/images/egg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/egg.png
--------------------------------------------------------------------------------
/assets/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/icons.png
--------------------------------------------------------------------------------
/assets/images/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/shop.png
--------------------------------------------------------------------------------
/consumer-dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/consumer-dashboard.png
--------------------------------------------------------------------------------
/fonts/Inter-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Black.ttf
--------------------------------------------------------------------------------
/fonts/Inter-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Light.ttf
--------------------------------------------------------------------------------
/fonts/Inter-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Medium.ttf
--------------------------------------------------------------------------------
/fonts/Inter-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-Regular.ttf
--------------------------------------------------------------------------------
/assets/images/appbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/appbar.png
--------------------------------------------------------------------------------
/assets/images/fruits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/fruits.png
--------------------------------------------------------------------------------
/assets/images/grains.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/grains.png
--------------------------------------------------------------------------------
/assets/images/veggies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/veggies.png
--------------------------------------------------------------------------------
/fonts/Inter-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-ExtraBold.ttf
--------------------------------------------------------------------------------
/fonts/Inter-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-SemiBold.ttf
--------------------------------------------------------------------------------
/lib/states/LoginStatus.dart:
--------------------------------------------------------------------------------
1 | enum LoginStatus {
2 | Checking,
3 | LoggedIn,
4 | NotLoggedIn,
5 | }
6 |
--------------------------------------------------------------------------------
/assets/images/app-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/app-logo.png
--------------------------------------------------------------------------------
/assets/images/sambhar-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/sambhar-bg.png
--------------------------------------------------------------------------------
/assets/images/shopicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/shopicon.png
--------------------------------------------------------------------------------
/fonts/Inter-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/fonts/Inter-ExtraLight.ttf
--------------------------------------------------------------------------------
/assets/images/app-bg-notext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/assets/images/app-bg-notext.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/lib/states/CartStatus.dart:
--------------------------------------------------------------------------------
1 | enum CartStatus {
2 | Uninitialised,
3 | Refreshing,
4 | CartIsEmpty,
5 | CartIsNotEmpty,
6 | Error,
7 | }
8 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKerala/Sambhar/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/FlutterKerala/Sambhar/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/lib/models/category_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CategoryModel {
4 | CategoryModel({
5 | @required this.catergoryName,
6 | });
7 | String catergoryName;
8 | }
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 26 12:55:13 IST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/lib/widgets/sub_txt_widgets.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | Text textCard(String data) {
4 | return Text(
5 | data,
6 | style: TextStyle(
7 | fontSize: 20,
8 | color: Color.fromRGBO(94, 191, 70, 1),
9 | fontWeight: FontWeight.w500,
10 |
11 | ),
12 | );
13 | }
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 0b8abb4724aa590dd0f429683339b1e045a1594d
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/lib/dummy_data/category_data.dart:
--------------------------------------------------------------------------------
1 | // dummy data
2 | import 'package:sambharapp/models/category_model.dart';
3 |
4 | List categoryCard = [
5 | CategoryModel(catergoryName: 'Vegitables'),
6 | CategoryModel(catergoryName: 'Fruits'),
7 | CategoryModel(catergoryName: 'Rices'),
8 | CategoryModel(catergoryName: 'Grains'),
9 | CategoryModel(catergoryName: 'Sugar'),
10 | ];
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/widgets/dashboard_app_bar.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter/material.dart';
3 |
4 | AppBar dashboardAppBar(String titleName) {
5 | return AppBar(
6 | title: Text(titleName),
7 | flexibleSpace: Image(
8 | image: AssetImage('assets/images/appbar.png'),
9 | fit: BoxFit.cover,
10 | height: double.infinity,
11 | ),
12 | actions: [
13 | CircleAvatar(
14 | backgroundColor: Colors.white,
15 | )
16 | ],
17 | );
18 | }
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/sambharapp/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.sambharapp
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/models/cart_item.dart:
--------------------------------------------------------------------------------
1 | class CartItem {
2 | String name, imageUrl;
3 | double price, quantity;
4 |
5 | CartItem();
6 |
7 | CartItem.fromJson(Map json)
8 | : name = json['name'],
9 | imageUrl = json['imageUrl'],
10 | price = json['price'],
11 | quantity = json['quantity'];
12 |
13 | Map toJson() => {
14 | 'name': name,
15 | 'imageUrl' : imageUrl,
16 | 'price': price,
17 | 'quantity': quantity,
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/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/screens/consumer_cart/empty_cart.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class EmptyCart extends StatelessWidget {
4 | @override
5 | Widget build(BuildContext context) {
6 | return Scaffold(
7 | appBar: AppBar(
8 | title: Text("Cart"),
9 | automaticallyImplyLeading: true,
10 | backgroundColor: Theme.of(context).accentColor,
11 | ),
12 | body: Container(
13 | child: Center(
14 | child: Text("Uh! oh. Cart is empty!"),
15 | ),
16 | ),
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/lib/screens/consumer_cart/cart_refreshing.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CartRefreshing extends StatelessWidget {
4 | @override
5 | Widget build(BuildContext context) {
6 | return Scaffold(
7 | appBar: AppBar(
8 | title: Text("Cart"),
9 | automaticallyImplyLeading: true,
10 | backgroundColor: Theme.of(context).accentColor,
11 | ),
12 | body: Container(
13 | child: Center(
14 | child: CircularProgressIndicator(),
15 | ),
16 | ),
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/models/product_model.dart:
--------------------------------------------------------------------------------
1 | class ProductModel {
2 | String name, category, imageUrl;
3 | int price;
4 | bool availability;
5 |
6 | ProductModel.fromJson(Map json)
7 | : name = json['name'],
8 | category = json['category'],
9 | imageUrl = json['imageUrl'],
10 | price = json['price'],
11 | availability = json['availability'];
12 |
13 | Map toJson() => {
14 | 'name': name,
15 | 'category': category,
16 | 'imageUrl': imageUrl,
17 | 'price': price,
18 | 'availability': availability,
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/lib/provider/firebase_data_queries.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/foundation.dart';
3 |
4 | class FirebaseDataQuieriesSellers with ChangeNotifier {
5 | final databaseReference = Firestore.instance;
6 |
7 | Future quieriesHandlerUpadte(String sellerId, String productid,
8 | Map updateData) async {
9 | try {
10 | await databaseReference
11 | .collection('Seller')
12 | .document(sellerId)
13 | .collection('products')
14 | .document(productid)
15 | .updateData(updateData);
16 | } catch (e) {
17 | print(e.toString());
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/themes/main_themes.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | ThemeData mainThemes() {
4 | return ThemeData(
5 | accentColor: Color(0xFF5EBF46),
6 | indicatorColor: Color(0xda158213),
7 | cursorColor: Colors.white,
8 | textTheme: TextTheme(
9 | subtitle: fontFamily(FontWeight.w400),
10 | body2: fontFamily(FontWeight.w400),
11 | button: fontFamily(FontWeight.w500),
12 | headline: fontFamily(FontWeight.w600),
13 | body1: fontFamily(FontWeight.w400),
14 | title: fontFamily(FontWeight.w700)));
15 | }
16 |
17 | TextStyle fontFamily(FontWeight fontWeight) =>
18 | TextStyle(fontFamily: "Inter", fontWeight: fontWeight);
19 |
--------------------------------------------------------------------------------
/lib/models/consumer_model.dart:
--------------------------------------------------------------------------------
1 | class ConsumerModel {
2 | String name, phone, gender, address, pincode, type;
3 | DateTime dob;
4 |
5 | ConsumerModel();
6 |
7 | ConsumerModel.fromJson(Map json)
8 | : name = json['name'],
9 | phone = json['phone'],
10 | gender = json['gender'],
11 | address = json['address'],
12 | pincode = json['pincode'],
13 | dob = json['dob'].toDate(),
14 | type = "consumer";
15 |
16 | Map toJson() => {
17 | 'name': name,
18 | 'phone': phone,
19 | 'gender': gender,
20 | 'address': address,
21 | 'pincode': pincode,
22 | 'dob': dob,
23 | 'type': "consumer"
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.6.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.3'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 | pubspec.lock
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Exceptions to above rules.
38 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
39 |
40 | # Firebase stuffs
41 | android/app/google-services.json
42 |
--------------------------------------------------------------------------------
/lib/widgets/ItemListTile.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:sambharapp/models/cart_item.dart';
3 |
4 | class ItemListTile extends StatelessWidget {
5 | CartItem cartItem;
6 | ItemListTile({this.cartItem});
7 | @override
8 | Widget build(BuildContext context) {
9 | return Container(
10 | child: Row(
11 | children: [
12 | CircleAvatar(
13 | backgroundImage: NetworkImage(
14 | cartItem.imageUrl,
15 | ),
16 | radius: 50.0,
17 | ),
18 | Container(
19 | child: Column(
20 | children: [
21 | Text('${cartItem.name}'),
22 | Text('${cartItem.price.toString()}'),
23 | ],
24 | ),
25 | ),
26 | ],
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/screens/consumer_cart/consumer_cart.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:sambharapp/provider/cart_provider.dart';
4 | import 'package:sambharapp/screens/consumer_cart/cart_content.dart';
5 | import 'package:sambharapp/screens/consumer_cart/cart_refreshing.dart';
6 | import 'package:sambharapp/screens/consumer_cart/empty_cart.dart';
7 | import 'package:sambharapp/states/CartStatus.dart';
8 |
9 | class ConsumerCart extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | final _cartProvider = Provider.of(context);
13 |
14 | if (_cartProvider.cartStatus == CartStatus.CartIsEmpty)
15 | return CartContent(_cartProvider.cartItems, _cartProvider.price);
16 | else if (_cartProvider.cartStatus == CartStatus.Refreshing)
17 | return CartRefreshing();
18 | else
19 | return EmptyCart();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/widgets/signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | Row siginPageTopWidgets(double screenWidth, TextStyle headingTxt,
4 | String firstTxt, String secondTxt) {
5 | return Row(
6 | mainAxisAlignment: MainAxisAlignment.center,
7 | children: [
8 | Image.asset(
9 | secondTxt.contains("Shop")
10 | ? 'assets/images/shop.png'
11 | : 'assets/images/icons.png',
12 | width: 140,
13 | height: 140,
14 | ),
15 | Container(
16 | width: screenWidth * 0.38,
17 | padding: const EdgeInsets.all(10.0),
18 | child: Column(
19 | mainAxisAlignment: MainAxisAlignment.start,
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | Text(
23 | firstTxt,
24 | style: headingTxt,
25 | ),
26 | Text(
27 | secondTxt,
28 | style: headingTxt,
29 | )
30 | ],
31 | ),
32 | )
33 | ],
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/lib/widgets/grid_card_views_design.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class GridCardsView extends StatelessWidget {
4 | GridCardsView({
5 | @required this.categoryname,
6 | });
7 |
8 | final String categoryname;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | margin: EdgeInsets.all(5),
14 | decoration: BoxDecoration(
15 | color: Colors.white,
16 | borderRadius: BorderRadius.all(
17 | Radius.circular(10.0),
18 | ),
19 | boxShadow: [
20 | BoxShadow(
21 | color: Color.fromRGBO(0, 0, 0, 0.25),
22 | blurRadius: 6.25,
23 | offset: Offset(0, 4.1))
24 | ]),
25 | child: Center(
26 | child: Container(
27 | decoration: BoxDecoration(
28 | color: Colors.redAccent,
29 | borderRadius: BorderRadius.all(Radius.circular(10.0))),
30 | child: Padding(
31 | padding: const EdgeInsets.all(8.0),
32 | child: Text(categoryname),
33 | ))),
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/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:sambharapp/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/lib/models/seller_model.dart:
--------------------------------------------------------------------------------
1 | class SellerModel {
2 | String name,
3 | phone,
4 | gender,
5 | address,
6 | shopname,
7 | shoploc,
8 | gstid,
9 | homePincode,
10 | shopPincode,
11 | type;
12 | DateTime dob;
13 |
14 | SellerModel();
15 |
16 | SellerModel.fromJson(Map json)
17 | : name = json['name'],
18 | phone = json['phone'],
19 | gender = json['gender'],
20 | address = json['address'],
21 | homePincode = json['homePincode'],
22 | shopPincode = json['shopPincode'],
23 | dob = json['dob'].toDate(),
24 | shopname = json['shopname'],
25 | gstid = json['gstid'],
26 | shoploc = json["shoplocation"],
27 | type = "seller";
28 |
29 | Map toJson() => {
30 | 'name': name,
31 | 'phone': phone,
32 | 'gender': gender,
33 | 'address': address,
34 | 'homePincode': homePincode,
35 | 'shopPincode': shopPincode,
36 | 'dob': dob,
37 | 'shopname': shopname,
38 | 'gstid': gstid,
39 | 'shoplocation': shoploc,
40 | 'type': "seller"
41 | };
42 | }
43 |
--------------------------------------------------------------------------------
/lib/widgets/inputs.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | BoxDecoration textFieldDecoration = BoxDecoration(
4 | color: const Color.fromRGBO(232, 238, 243, 1),
5 | borderRadius: new BorderRadius.all(
6 | const Radius.circular(10.0),
7 | ),
8 | boxShadow: [
9 | BoxShadow(
10 | color: const Color.fromRGBO(12, 7, 90, 0.1),
11 | offset: const Offset(0.0, 0.0),
12 | ),
13 | BoxShadow(
14 | color: const Color.fromRGBO(12, 7, 90, 0.1),
15 | offset: const Offset(0.0, 1.17),
16 | spreadRadius: -8.0,
17 | blurRadius: 8.0,
18 | ),
19 | ],
20 | );
21 |
22 | InputDecoration innerInputFieldDecoration(
23 | BuildContext context, String placeholder, String _validate) {
24 | return InputDecoration(
25 | border: InputBorder.none,
26 | hintText: placeholder,
27 | prefix: placeholder.contains("Phone")
28 | ? Padding(
29 | padding: const EdgeInsets.all(8.0),
30 | child: Text("+91"),
31 | )
32 | : SizedBox(),
33 | errorText: _validate,
34 | contentPadding: EdgeInsets.only(left: 10),
35 | hintStyle: TextStyle(fontSize: 20.0, color: Theme.of(context).accentColor),
36 | );
37 | }
38 |
--------------------------------------------------------------------------------
/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1081530155004",
4 | "firebase_url": "https://sambhar-68ab7.firebaseio.com",
5 | "project_id": "sambhar-68ab7",
6 | "storage_bucket": "sambhar-68ab7.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:1081530155004:android:997f8e77f6b1fa31a63c79",
12 | "android_client_info": {
13 | "package_name": "com.example.sambharapp"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "1081530155004-fvm8nm4d7p1u9j486psh78oqiuacilp8.apps.googleusercontent.com",
19 | "client_type": 3
20 | }
21 | ],
22 | "api_key": [
23 | {
24 | "current_key": "AIzaSyBHMuV0-MfU0fuyzBU5nefyD8jFsIaB4A8"
25 | }
26 | ],
27 | "services": {
28 | "appinvite_service": {
29 | "other_platform_oauth_client": [
30 | {
31 | "client_id": "1081530155004-fvm8nm4d7p1u9j486psh78oqiuacilp8.apps.googleusercontent.com",
32 | "client_type": 3
33 | }
34 | ]
35 | }
36 | }
37 | }
38 | ],
39 | "configuration_version": "1"
40 | }
--------------------------------------------------------------------------------
/lib/screens/product_category.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ProductCategory extends StatefulWidget {
5 | String pincode, category;
6 |
7 | ProductCategory({this.pincode, this.category});
8 |
9 | @override
10 | _ProductCategoryState createState() => _ProductCategoryState();
11 | }
12 |
13 | class _ProductCategoryState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | appBar: AppBar(
18 | title: Text(widget.category),
19 | automaticallyImplyLeading: true,
20 | backgroundColor: Theme.of(context).accentColor,
21 | ),
22 |
23 | body: StreamBuilder(
24 | stream: Firestore.instance
25 | .collection('Seller')
26 | .document(widget.pincode)
27 | .collection('Sellers')
28 | .getDocuments()
29 | .asStream(),
30 | builder: (context, snapshot) {
31 | //Have to display list with the datas
32 | if (!snapshot.hasData)
33 | return Center(
34 | child: Text("No data"),
35 | );
36 | else
37 | return Center(
38 | child: Text("Data"),
39 | );
40 | },
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/screens/consumer_cart/cart_content.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:sambharapp/models/cart_item.dart';
3 | import 'package:sambharapp/widgets/ItemListTile.dart';
4 |
5 | class CartContent extends StatelessWidget {
6 | List items;
7 | String price;
8 | CartContent(this.items, this.price);
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: AppBar(
13 | title: Column(
14 | mainAxisSize: MainAxisSize.min,
15 | children: [
16 | Text("Cart"),
17 | Text(items.length.toString() + ' items'),
18 | ],
19 | ),
20 | automaticallyImplyLeading: true,
21 | backgroundColor: Theme.of(context).accentColor,
22 | ),
23 | body: Container(
24 | padding: MediaQuery.of(context).padding,
25 | child: SingleChildScrollView(
26 | child: Column(
27 | children: [
28 | Text("Full amount"),
29 | Text('${price.toString()}'),
30 | _cartItemList(items),
31 | ],
32 | ),
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | _cartItemList(List cartItem) {
39 | return ListView(
40 | shrinkWrap: true,
41 | physics: ScrollPhysics(),
42 | children: cartItem.map((item) {
43 | return ItemListTile(
44 | cartItem: item,
45 | );
46 | }).toList(),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/widgets/items_grid_card_veiws.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:sambharapp/widgets/grid_card_views_design.dart';
3 | import '../dummy_data/category_data.dart';
4 |
5 | class ItemsGridViewCard extends StatelessWidget {
6 | ItemsGridViewCard({
7 | @required this.titleName,
8 | });
9 | final String titleName;
10 |
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Column(
15 | children: [
16 | dashboadSubHaeding(),
17 | const SizedBox(
18 | height: 30,
19 | ),
20 | Container(
21 | child: GridView.builder(
22 | physics: NeverScrollableScrollPhysics(),
23 | shrinkWrap: true,
24 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
25 | crossAxisCount: 3,
26 | crossAxisSpacing: 20.0,
27 | mainAxisSpacing: 10.0,
28 | ),
29 | itemCount: categoryCard.length,
30 | itemBuilder: (context, index) {
31 | return GridCardsView(
32 | categoryname: categoryCard[index].catergoryName,
33 | );
34 | }),
35 | ),
36 | ],
37 | );
38 | }
39 |
40 | Text dashboadSubHaeding() {
41 | return Text(
42 | titleName,
43 | style: TextStyle(
44 | fontSize: 26,
45 | fontWeight: FontWeight.w500,
46 | color: Color.fromRGBO(94, 191, 70, 1)),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | sambharapp
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/lib/provider/cart_provider.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/foundation.dart';
4 | import 'package:sambharapp/models/cart_item.dart';
5 | import 'package:sambharapp/states/CartStatus.dart';
6 | import 'package:shared_preferences/shared_preferences.dart';
7 |
8 | class CartProvider with ChangeNotifier {
9 | List _cartItems = [];
10 | SharedPreferences _preferences;
11 | double _price = 0.0;
12 |
13 | CartStatus _cartStatus = CartStatus.Uninitialised;
14 |
15 | //getters
16 |
17 | CartStatus get cartStatus => _cartStatus;
18 | List get cartItems => [..._cartItems];
19 | String get price => _price.toString();
20 |
21 | CartProvider() {
22 | _cartStatus = CartStatus.Refreshing;
23 | notifyListeners();
24 | _getCartItems();
25 | }
26 |
27 | _getCartItems() async {
28 | List _deserialisableCartItems = [];
29 | _cartItems.clear();
30 |
31 | _preferences = await SharedPreferences.getInstance();
32 | if (_preferences.containsKey('cartItem') &&
33 | _preferences.getStringList('cartIem').isNotEmpty) {
34 | _deserialisableCartItems = _preferences.getStringList('cartItems');
35 | for (String item in _deserialisableCartItems) {
36 | CartItem _cartItem = json.decode(item);
37 | _cartItems.add(_cartItem);
38 | // print(item);
39 | }
40 | }
41 | if (_cartItems.isNotEmpty)
42 | _cartStatus = CartStatus.CartIsNotEmpty;
43 | else
44 | _cartStatus = CartStatus.CartIsEmpty;
45 | _price = calculatePrice();
46 | notifyListeners();
47 | }
48 |
49 | double calculatePrice() {
50 | double temp = 0;
51 | for (CartItem item in _cartItems) temp += (item.quantity * item.price);
52 | return temp;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:sambharapp/provider/cart_provider.dart';
4 | import 'package:sambharapp/provider/firebase_consumer_login.dart';
5 | import 'package:sambharapp/provider/firebase_data_queries.dart';
6 | import 'package:sambharapp/screens/consumer_dashboard.dart';
7 | import 'package:sambharapp/screens/login_selector.dart';
8 | import 'package:sambharapp/screens/sellers/edit_items.dart';
9 | import 'package:sambharapp/states/LoginStatus.dart';
10 | import './screens/sellers/sellers_dashboard.dart';
11 | import './themes/main_themes.dart';
12 |
13 | void main() => runApp(MyApp());
14 |
15 | class MyApp extends StatelessWidget {
16 | @override
17 | Widget build(BuildContext context) {
18 | return MultiProvider(
19 | providers: [
20 | ChangeNotifierProvider(
21 | create: (context) => FirebaseLogin(),
22 | ),
23 | ChangeNotifierProvider(
24 | create: (context) => CartProvider(),
25 | ),
26 | ChangeNotifierProvider(
27 | create: (context) => FirebaseDataQuieriesSellers(),
28 | ),
29 | ],
30 | child: MaterialApp(
31 | debugShowCheckedModeBanner: false,
32 | theme: mainThemes(),
33 | routes: {
34 | ConsumerDashboard.routeName: (ctx) => ConsumerDashboard(),
35 | EditIteams.routeName: (ctx) => EditIteams(),
36 | },
37 | home: Consumer(
38 | builder: (context, firebaseprovider, child) {
39 | // Checks If User Is Already Logged In Or Not
40 | if (firebaseprovider.loginStatus ==
41 | LoginStatus
42 | .LoggedIn) if (firebaseprovider.userType == "Consumer")
43 | return ConsumerDashboard(); //If User Is Consumer Push To Consumer Dash
44 | else
45 | return SellerDashboard(); // Else Push To Seller Page
46 | else
47 | return LoginSelector(); //Else To Login Selector Page
48 | },
49 | )),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/provider/firebase_consumer_login.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:sambharapp/models/consumer_model.dart';
5 | import 'package:sambharapp/models/seller_model.dart';
6 | import 'package:sambharapp/states/LoginStatus.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 |
9 | class FirebaseLogin with ChangeNotifier {
10 | LoginStatus _loginStatus = LoginStatus.NotLoggedIn;
11 | ConsumerModel consumer;
12 | SellerModel seller;
13 | String userType = "";
14 | String userPhone = "";
15 | String userName = "";
16 | LoginStatus get loginStatus => _loginStatus;
17 |
18 | FirebaseLogin() {
19 | FirebaseAuth.instance.currentUser().then((user) async {
20 | if (user != null) {
21 | SharedPreferences preferences = await SharedPreferences.getInstance();
22 | _loginStatus = LoginStatus.LoggedIn;
23 | userType = preferences.getString("type");
24 | await userLoginData(user.phoneNumber, userType);
25 | notifyListeners();
26 | }
27 | });
28 | }
29 |
30 | Future signOut() async {
31 | FirebaseAuth.instance.signOut().then((value) {
32 | _loginStatus = LoginStatus.NotLoggedIn;
33 | notifyListeners();
34 | });
35 | }
36 |
37 | Future userLoginData(String phone, String collection) async {
38 | String temp = phone.substring(3, phone.length);
39 | var fireBaseQuery = Firestore.instance
40 | .collection(collection)
41 | .where("phone", isEqualTo: temp);
42 |
43 | QuerySnapshot eventsQuery = await fireBaseQuery.getDocuments();
44 | print(collection);
45 | if (collection == "Consumer") {
46 | consumer = ConsumerModel.fromJson(eventsQuery.documents[0].data);
47 | userName = consumer.name;
48 | userPhone = consumer.phone;
49 | } else {
50 | seller = SellerModel.fromJson(eventsQuery.documents[0].data);
51 | userName = seller.name;
52 | userPhone = seller.phone;
53 | }
54 |
55 | if (eventsQuery.documents.isNotEmpty) {
56 | return true;
57 | } else {
58 | return false;
59 | }
60 | }
61 |
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sambhar
2 |
3 | 
4 |
5 | P2P marketplace for groceries during the Corona lockdown.
6 |
7 |
8 | ## Context
9 |
10 | Corona Virus Lockdown was announced in India on 24th March for 21 days. This has put the entire nation isolated in their homes. They find it hard to get outside of their houses to pick up their daily groceries.
11 |
12 | ## Solution
13 |
14 | Sambhar is designed as a platform to meet the demand and supply between consumers and sellers by bringing them to a common platform.
15 |
16 | 
17 |
18 |
19 | The app does this by creating an easy to use dashboard where users can order items from the vendors around them.
20 |
21 | The app shows all the essentials available from their nearby vendors and lets them choose the amount required.
22 |
23 | Once the items are added to the cart, the consumer gets an alert on the number of orders placed on his dashboard.
24 |
25 | Consumers dashboard also shows the amount of inventory left, so that he can keep in check that he is not running too much out of the essentials.
26 |
27 | At this first phase, we haven't implemented the delivery service and has built the app with the consideration that the delivery will be managed by the seller as Government approval is needed for commuting under Corona lockdown circumstances. But it would be the straightforward next step to implement a delivery service inside this application to do the delivery management.
28 |
29 | # Design
30 |
31 | Here is the [Figma document](https://www.figma.com/file/FkwYAYqNheFt1P2tv3PvSK/Sambhar-Design?node-id=0%3A1) where we conducted all of our designs.
32 |
33 | ## Visual language
34 |
35 | ## Palette
36 |
37 | ## Typography
38 |
39 | ## Icons
40 |
41 | ## UI Flow
42 |
43 | # Development
44 |
45 | App is developed using Flutter on the frontend as it allows for compiling down to iOS, Android, and Web in one go and Firebase for the backend operations. This helps considerably in broadening the reach and allows for fast iteration times.
46 |
47 | ## Getting Started
48 |
49 | If you are interested in contributing to this application. We will add the DFD, database schema, and architectural decisions about the app here soon.
50 |
51 | ## DFD
52 |
53 | ## Data Schema
54 |
55 | ## Architecture
56 |
--------------------------------------------------------------------------------
/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 | apply plugin: 'com.google.gms.google-services'
28 |
29 | android {
30 | compileSdkVersion 28
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.sambharapp"
43 | minSdkVersion 16
44 | targetSdkVersion 28
45 | versionCode flutterVersionCode.toInteger()
46 | versionName flutterVersionName
47 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
48 | multiDexEnabled true
49 | }
50 |
51 | buildTypes {
52 | release {
53 | // TODO: Add your own signing config for the release build.
54 | // Signing with the debug keys for now, so `flutter run --release` works.
55 | signingConfig signingConfigs.debug
56 | }
57 | }
58 | }
59 |
60 | flutter {
61 | source '../..'
62 | }
63 |
64 | dependencies {
65 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
66 | testImplementation 'junit:junit:4.12'
67 | androidTestImplementation 'androidx.test:runner:1.1.1'
68 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
69 | }
70 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/screens/sellers/sellers_dashboard.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:provider/provider.dart';
6 | import 'package:sambharapp/provider/firebase_consumer_login.dart';
7 | import 'package:sambharapp/widgets/dashboard_app_bar.dart';
8 | import 'package:sambharapp/widgets/items_grid_card_veiws.dart';
9 | import 'package:sambharapp/widgets/list_vewi_product.dart';
10 |
11 | class SellerDashboard extends StatefulWidget {
12 | static const routeName = './sellers_dashboard.dart';
13 |
14 | @override
15 | _SellerDashboardState createState() => _SellerDashboardState();
16 | }
17 |
18 | class _SellerDashboardState extends State {
19 | String _mobNumber;
20 | String _docId;
21 | bool _isLoading = true;
22 | Future dataCollection() async {
23 | _mobNumber = Provider.of(context).seller.phone;
24 | print(_mobNumber);
25 | var fireBaseQuery = Firestore.instance
26 | .collection('Seller')
27 | .where("phone", isEqualTo: _mobNumber);
28 |
29 | QuerySnapshot eventsQuery = await fireBaseQuery.getDocuments();
30 |
31 | _docId = eventsQuery.documents[0].documentID;
32 |
33 | setState(() {
34 | _isLoading = false;
35 | });
36 | }
37 |
38 | @override
39 | void didChangeDependencies() {
40 | dataCollection();
41 | super.didChangeDependencies();
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | final screenheight = MediaQuery.of(context).size.height;
47 | final screnWidth = MediaQuery.of(context).size.width;
48 | return Scaffold(
49 | appBar: dashboardAppBar('Inventory Review'),
50 | body: SingleChildScrollView(
51 | child: _isLoading
52 | ? Center(
53 | child: CircularProgressIndicator(),
54 | )
55 | : Center(
56 | child: Container(
57 | width: screnWidth * 0.85,
58 | child: Column(
59 | crossAxisAlignment: CrossAxisAlignment.center,
60 | children: [
61 | SizedBox(
62 | height: 20,
63 | ),
64 | ListViewBuilderProducts(
65 | stremData: Firestore.instance
66 | .collection('Seller')
67 | .document(_docId)
68 | .collection('products').
69 | where('availability' ,isEqualTo: true)
70 | .snapshots(),
71 | docId: _docId
72 | ),
73 | SizedBox(
74 | height: 50,
75 | ),
76 | ItemsGridViewCard(
77 | titleName: 'Add Items',
78 | ),
79 | ],
80 | ),
81 | ),
82 | ),
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner.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 |
--------------------------------------------------------------------------------
/lib/core/firebase_Mob_Auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:sambharapp/widgets/inputs.dart';
4 |
5 | class FirebaseMobAuth {
6 | final _codeController = TextEditingController();
7 | // firbase mobile auth Functions
8 | Future loginUser(
9 | String phone, BuildContext context, Function submitProcess) async {
10 | FirebaseAuth _auth = FirebaseAuth.instance;
11 |
12 | _auth.verifyPhoneNumber(
13 | phoneNumber: phone,
14 | timeout: Duration(seconds: 120),
15 | verificationCompleted: (AuthCredential credential) async {
16 | AuthResult result = await _auth.signInWithCredential(credential);
17 | FirebaseUser user = result.user;
18 |
19 | if (user != null) {
20 | debugPrint('verification is done automatically and sucess');
21 | submitProcess(true, true);
22 | } else {
23 | debugPrint('error');
24 | submitProcess(false, true);
25 | }
26 | },
27 | verificationFailed: (AuthException exception) {
28 | debugPrint(exception.message);
29 | submitProcess(false, true);
30 | },
31 | codeSent: (String verificationId, [int forceResendingToken]) {
32 | // this is where the sms are check manually
33 | showDialog(
34 | context: context,
35 | barrierDismissible: false,
36 | builder: (context) {
37 | return AlertDialog(
38 | title: Text('Enter your Code'),
39 | content: Column(
40 | mainAxisSize: MainAxisSize.min,
41 | children: [
42 | TextField(
43 | decoration:
44 | innerInputFieldDecoration(context, 'SMS CODE', ''),
45 | keyboardType: TextInputType.number,
46 | controller: _codeController,
47 | )
48 | ],
49 | ),
50 | actions: [
51 | FlatButton(
52 | onPressed: () async {
53 | final code = _codeController.text.trim();
54 | AuthResult result;
55 | try {
56 | AuthCredential credential =
57 | PhoneAuthProvider.getCredential(
58 | verificationId: verificationId,
59 | smsCode: code);
60 |
61 | result = await _auth.signInWithCredential(credential);
62 | } catch (e) {
63 | // debugPrint('catch error');
64 | submitProcess(false, false);
65 | // debugPrint(e);
66 | return;
67 | }
68 |
69 | FirebaseUser user = result.user;
70 | if (user != null) {
71 | debugPrint(
72 | 'verification is done automatically and sucess');
73 | submitProcess(true, false);
74 | } else {
75 | debugPrint('error');
76 | submitProcess(false, false);
77 | }
78 | },
79 | child: Text('Confirm'),
80 | )
81 | ],
82 | );
83 | });
84 | },
85 | codeAutoRetrievalTimeout: null);
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: sambharapp
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.7.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 | firebase_core: ^0.4.0+9
23 | firebase_analytics: ^5.0.2
24 | firebase_auth: ^0.14.0+5
25 | cloud_firestore: ^0.12.9+5
26 | provider: ^4.0.4
27 | shared_preferences:
28 |
29 |
30 |
31 | # The following adds the Cupertino Icons font to your application.
32 | # Use with the CupertinoIcons class for iOS style icons.
33 | cupertino_icons: ^0.1.2
34 |
35 | dev_dependencies:
36 | flutter_test:
37 | sdk: flutter
38 | flutter_launcher_icons: 0.7.4
39 |
40 | flutter_icons:
41 | android: "launcher_icon"
42 | ios: true
43 | image_path: "assets/images/app-logo.png"
44 |
45 |
46 | # For information on the generic Dart part of this file, see the
47 | # following page: https://dart.dev/tools/pub/pubspec
48 |
49 | # The following section is specific to Flutter.
50 | flutter:
51 |
52 | # The following line ensures that the Material Icons font is
53 | # included with your application, so that you can use the icons in
54 | # the material Icons class.
55 | uses-material-design: true
56 |
57 | # To add assets to your application, add an assets section, like this:
58 | assets:
59 | - assets/images/icons.png
60 | - assets/images/sambhar-bg.png
61 | - assets/images/shop.png
62 | - assets/images/appbar.png
63 | - assets/images/app-bg-notext.png
64 | - assets/images/grains.png
65 | - assets/images/egg.png
66 | - assets/images/fruits.png
67 | - assets/images/veggies.png
68 | - assets/images/bread.png
69 | - assets/images/dairy.png
70 | - assets/images/shopicon.png
71 |
72 |
73 | # - images/a_dot_ham.jpeg
74 |
75 | # An image asset can refer to one or more resolution-specific "variants", see
76 | # https://flutter.dev/assets-and-images/#resolution-aware.
77 |
78 | # For details regarding adding assets from package dependencies, see
79 | # https://flutter.dev/assets-and-images/#from-packages
80 |
81 | # To add custom fonts to your application, add a fonts section here,
82 | # in this "flutter" section. Each entry in this list should have a
83 | # "family" key with the font family name, and a "fonts" key with a
84 | # list giving the asset and other descriptors for the font. For
85 | # example:
86 | fonts:
87 | - family: Inter
88 | fonts:
89 | - asset: fonts/Inter-Light.ttf
90 | weight: 300
91 | - asset: fonts/Inter-Regular.ttf
92 | weight: 400
93 | - asset: fonts/Inter-Medium.ttf
94 | weight: 500
95 | - asset: fonts/Inter-SemiBold.ttf
96 | weight: 600
97 | - asset: fonts/Inter-Bold.ttf
98 | weight: 700
99 | - asset: fonts/Inter-ExtraBold.ttf
100 | weight: 800
101 | # For details regarding fonts from package dependencies,
102 | # see https://flutter.dev/custom-fonts/#from-packages
103 |
--------------------------------------------------------------------------------
/lib/widgets/list_vewi_product.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:sambharapp/screens/sellers/edit_items.dart';
4 | import 'package:sambharapp/widgets/sub_txt_widgets.dart';
5 |
6 | class ListViewBuilderProducts extends StatelessWidget {
7 | final Stream stremData;
8 | final String docId;
9 | ListViewBuilderProducts({
10 | @required this.stremData,
11 | @required this.docId,
12 | });
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Container(
17 | child: StreamBuilder(
18 | stream: stremData,
19 | builder:
20 | (BuildContext context, AsyncSnapshot snapshot) {
21 | if (snapshot.hasError) return new Text('Error: ${snapshot.error}');
22 | switch (snapshot.connectionState) {
23 | case ConnectionState.waiting:
24 | return Center(
25 | child: CircularProgressIndicator(),
26 | );
27 | break;
28 | default:
29 | return Column(
30 | crossAxisAlignment: CrossAxisAlignment.start,
31 | children: [
32 | textCard(
33 | '${snapshot.data.documents.length.toString()} Items'),
34 | SizedBox(
35 | height: 10,
36 | ),
37 | ListView(
38 | physics: NeverScrollableScrollPhysics(),
39 | shrinkWrap: true,
40 | children: snapshot.data.documents
41 | .map((DocumentSnapshot document) {
42 | return innerListVeiw(document, context);
43 | }).toList(),
44 | ),
45 | ],
46 | );
47 | }
48 | }),
49 | );
50 | }
51 |
52 | GestureDetector innerListVeiw(
53 | DocumentSnapshot document, BuildContext context) {
54 | return GestureDetector(
55 | onTap: () {
56 | List _tempData = [document, docId];
57 | Navigator.of(context)
58 | .pushNamed(EditIteams.routeName, arguments: _tempData);
59 | },
60 | child: Container(
61 | padding: EdgeInsets.all(10),
62 | decoration: BoxDecoration(
63 | color: Colors.white,
64 | borderRadius: BorderRadius.all(
65 | Radius.circular(5.0),
66 | ),
67 | boxShadow: [
68 | BoxShadow(
69 | color: Color.fromRGBO(0, 0, 0, 0.25),
70 | blurRadius: 24,
71 | offset: Offset(0, 2.1))
72 | ]),
73 | child: Row(
74 | children: [
75 | iconReplacment(document.data['imageUrl']),
76 | dataInsideListVeiw(document)
77 | ],
78 | ),
79 | ),
80 | );
81 | }
82 |
83 | Column dataInsideListVeiw(DocumentSnapshot document) {
84 | return Column(
85 | crossAxisAlignment: CrossAxisAlignment.start,
86 | children: [
87 | textCard(document.data['name']),
88 | SizedBox(
89 | height: 5,
90 | ),
91 | textCard('Rs. ${document.data['price']}'),
92 | SizedBox(
93 | height: 5,
94 | ),
95 | textCard('${document.data['stock']} Remaining'),
96 | ],
97 | );
98 | }
99 |
100 | Container iconReplacment(String imgUrl) {
101 | return Container(
102 | margin: EdgeInsets.only(right: 30),
103 | height: 60,
104 | width: 60,
105 | child: Image.network(
106 | imgUrl,
107 | fit: BoxFit.fill,
108 | ));
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/lib/screens/consumer_cart/edit_cart_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:sambharapp/widgets/dashboard_app_bar.dart';
3 | import 'package:sambharapp/widgets/inputs.dart';
4 | import 'package:sambharapp/widgets/sub_txt_widgets.dart';
5 |
6 | class EditCartItems extends StatelessWidget {
7 | static const String routeName = './EditIteams';
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final screenheight = MediaQuery.of(context).size.height;
12 | final screenWidth = MediaQuery.of(context).size.width;
13 | return Scaffold(
14 | appBar: dashboardAppBar('Edit Review'),
15 | body: SingleChildScrollView(
16 | child: Center(
17 | child: Container(
18 | width: screenWidth * 0.8,
19 | child: Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | SizedBox(
23 | height: screenheight * 0.1,
24 | ),
25 | Row(
26 | children: [
27 | Container(
28 | width: 60,
29 | height: 60,
30 | decoration: BoxDecoration(
31 | color: Colors.redAccent,
32 | borderRadius:
33 | BorderRadius.all(Radius.circular(10.0))),
34 | child: Padding(
35 | padding: const EdgeInsets.all(8.0),
36 | )),
37 | SizedBox(
38 | width: 20,
39 | ),
40 | textCard('Items name'),
41 | ],
42 | ),
43 | SizedBox(
44 | height: 20,
45 | ),
46 | inputStyles(context, 'Price'),
47 | SizedBox(
48 | height: 20,
49 | ),
50 | inputStyles(context, 'Stock'),
51 | SizedBox(
52 | height: 20,
53 | ),
54 | SizedBox(
55 | width: screenWidth * 0.8,
56 | child: Padding(
57 | padding: const EdgeInsets.symmetric(vertical: 10.0),
58 | child: FlatButton(
59 | shape: RoundedRectangleBorder(
60 | borderRadius: BorderRadius.circular(10.0)),
61 | onPressed: () {},
62 | color: Color.fromRGBO(94, 191, 70, 1),
63 | child: Container(
64 | padding: EdgeInsets.all(15.0),
65 | child: Text(
66 | 'Edit item',
67 | style: TextStyle(
68 | color: Colors.white,
69 | fontWeight: FontWeight.w500,
70 | fontSize: 20.0,
71 | ),
72 | ),
73 | ),
74 | ),
75 | ),
76 | ),
77 | SizedBox(
78 | width: screenWidth * 0.8,
79 | child: Padding(
80 | padding: const EdgeInsets.symmetric(vertical: 10.0),
81 | child: FlatButton(
82 | shape: RoundedRectangleBorder(
83 | borderRadius: BorderRadius.circular(10.0)),
84 | onPressed: () {},
85 | color: Color.fromRGBO(236, 242, 247, 1),
86 | child: Container(
87 | padding: EdgeInsets.all(15.0),
88 | child: Text(
89 | 'Delete items',
90 | style: TextStyle(
91 | color: Color.fromRGBO(94, 191, 70, 1),
92 | fontWeight: FontWeight.w500,
93 | fontSize: 20.0,
94 | ),
95 | ),
96 | ),
97 | ),
98 | ),
99 | )
100 | ],
101 | ),
102 | ),
103 | ),
104 | ),
105 | );
106 | }
107 |
108 | Container inputStyles(BuildContext context, hintText) {
109 | return Container(
110 | margin: EdgeInsets.symmetric(vertical: 10),
111 | padding: EdgeInsets.all(5),
112 | decoration: textFieldDecoration,
113 | child: TextField(
114 | cursorColor: Theme.of(context).accentColor,
115 | decoration: InputDecoration(
116 | hintText: hintText,
117 | hintStyle: TextStyle(color: Color.fromRGBO(94, 191, 70, 1)),
118 | contentPadding: EdgeInsets.only(left: 5),
119 | border: InputBorder.none,
120 | ),
121 | ),
122 | );
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/lib/screens/seller_signin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:sambharapp/provider/firebase_consumer_login.dart';
4 | import 'package:sambharapp/screens/consumer_dashboard.dart';
5 | import 'package:sambharapp/widgets/signup.dart';
6 | import 'package:sambharapp/widgets/inputs.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 | import '../core/firebase_Mob_Auth.dart';
9 |
10 | class SellerLoginScreens extends StatefulWidget {
11 | @override
12 | _SellerLoginScreensState createState() => _SellerLoginScreensState();
13 | }
14 |
15 | class _SellerLoginScreensState extends State
16 | with FirebaseMobAuth {
17 | // FirebaseMobAuth is an inherite class to do firebase auth
18 | final _formKey = GlobalKey();
19 |
20 | final GlobalKey _scaffoldKey = new GlobalKey();
21 | String _mobNumber;
22 |
23 | final TextStyle headingTxt = TextStyle(
24 | color: const Color.fromRGBO(94, 191, 70, 1),
25 | fontSize: 30,
26 | fontWeight: FontWeight.w700);
27 |
28 | bool _isLoading = false;
29 |
30 | final _phoneNumberFeild = TextEditingController();
31 |
32 | String _validate;
33 |
34 | Future submitProcess(bool val, bool auto) async {
35 | if (!auto) {
36 | Navigator.of(context).pop();
37 | }
38 | if (!val) {
39 | _scaffoldKey.currentState.showSnackBar(SnackBar(
40 | content: Text('Sigin failed'),
41 | duration: Duration(seconds: 3),
42 | ));
43 | }
44 |
45 | // enter the validation for account checking through database and more in here
46 |
47 | bool userInDataBase =
48 | await Provider.of(context, listen: false)
49 | .userLoginData(_mobNumber, 'Seller');
50 |
51 | if (userInDataBase) {
52 | debugPrint('in');
53 | SharedPreferences preferences = await SharedPreferences.getInstance();
54 | preferences.setString("type", "Seller");
55 | Navigator.of(context).pushReplacementNamed(ConsumerDashboard.routeName);
56 | } else {
57 | debugPrint('out');
58 | _scaffoldKey.currentState.showSnackBar(SnackBar(
59 | content: Text('Your are not a member Please Sigin'),
60 | duration: Duration(seconds: 3),
61 | ));
62 | }
63 |
64 | setState(() {
65 | _isLoading = false;
66 | });
67 | }
68 |
69 | @override
70 | Widget build(BuildContext context) {
71 | final screenWidth = MediaQuery.of(context).size.width;
72 | final screenHeight = MediaQuery.of(context).size.height;
73 |
74 | return Scaffold(
75 | key: _scaffoldKey,
76 | body: SingleChildScrollView(
77 | child: Column(
78 | children: [
79 | SizedBox(
80 | height: screenHeight * 0.15,
81 | ),
82 | // this is the top text in the login screen last 2 para means the 1st text and 2nd text
83 | siginPageTopWidgets(screenWidth, headingTxt, 'Seller', 'Login'),
84 | const SizedBox(
85 | height: 100,
86 | ),
87 |
88 | SizedBox(
89 | height: 20,
90 | ),
91 | Form(
92 | key: _formKey,
93 | child: Container(
94 | width: screenWidth * 0.7,
95 | child: Column(
96 | children: [
97 | infoText(context),
98 | phoneNoTextField(context),
99 | SizedBox(
100 | height: 20,
101 | ),
102 | _isLoading
103 | ? Center(
104 | child: CircularProgressIndicator(),
105 | )
106 | : signupRaisedButton(screenWidth, context)
107 | ],
108 | ),
109 | )),
110 | ],
111 | ),
112 | ),
113 | );
114 | }
115 |
116 | Text infoText(BuildContext context) {
117 | return Text(
118 | "Please enter your details to Login",
119 | style: TextStyle(
120 | color: Theme.of(context).accentColor,
121 | fontWeight: FontWeight.w500,
122 | fontSize: 17),
123 | );
124 | }
125 |
126 | Container phoneNoTextField(BuildContext context) {
127 | return Container(
128 | margin: EdgeInsets.symmetric(vertical: 10),
129 | padding: EdgeInsets.all(5),
130 | height: 60,
131 | decoration: textFieldDecoration,
132 | child: TextField(
133 | controller: _phoneNumberFeild,
134 | cursorColor: Theme.of(context).accentColor,
135 | decoration:
136 | innerInputFieldDecoration(context, 'Phone Number', _validate),
137 | ),
138 | );
139 | }
140 |
141 | Padding signupRaisedButton(double screenWidth, BuildContext context) {
142 | return Padding(
143 | padding: EdgeInsets.only(bottom: 15),
144 | child: SizedBox(
145 | width: double.infinity,
146 | child: RaisedButton(
147 | color: Theme.of(context).accentColor,
148 | elevation: 5,
149 | shape: RoundedRectangleBorder(
150 | borderRadius: BorderRadius.all(Radius.circular(4))),
151 | onPressed: () {
152 | _mobNumber = _phoneNumberFeild.text.trim();
153 | if (_phoneNumberFeild.text.trim() != null &&
154 | _phoneNumberFeild.text.trim().length == 10) {
155 | _mobNumber = '+91$_mobNumber';
156 | setState(() {
157 | _isLoading = true;
158 | _validate = '';
159 | });
160 | //function get from inherited class
161 | loginUser(_mobNumber, context, submitProcess);
162 | } else {
163 | setState(() {
164 | _validate = 'Please enter Valid Number';
165 | });
166 | }
167 | },
168 | padding: EdgeInsets.only(top: 10, bottom: 10),
169 | child: Text(
170 | 'Sign in',
171 | textAlign: TextAlign.center,
172 | style: TextStyle(
173 | color: Colors.white, fontSize: 25, fontWeight: FontWeight.w500),
174 | ),
175 | ),
176 | ),
177 | );
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/lib/screens/customer_login_screens.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:sambharapp/provider/firebase_consumer_login.dart';
4 | import 'package:sambharapp/screens/consumer_dashboard.dart';
5 | import 'package:sambharapp/widgets/signup.dart';
6 | import 'package:shared_preferences/shared_preferences.dart';
7 | import '../widgets/inputs.dart';
8 | import '../core/firebase_Mob_Auth.dart';
9 |
10 | class CustomerLoginScreens extends StatefulWidget {
11 | @override
12 | _CustomerLoginScreensState createState() => _CustomerLoginScreensState();
13 | }
14 |
15 | class _CustomerLoginScreensState extends State
16 | with FirebaseMobAuth {
17 | // FirebaseMobAuth is an inherite class to do firebase auth
18 | final _formKey = GlobalKey();
19 |
20 | final GlobalKey _scaffoldKey = new GlobalKey();
21 | String _mobNumber;
22 |
23 | final TextStyle headingTxt = TextStyle(
24 | color: const Color.fromRGBO(94, 191, 70, 1),
25 | fontSize: 26,
26 | fontWeight: FontWeight.w700);
27 |
28 | bool _isLoading = false;
29 |
30 | final _phoneNumberFeild = TextEditingController();
31 |
32 | String _validate;
33 |
34 | Future submitProcess(bool val, bool auto) async {
35 | if (!auto) {
36 | Navigator.of(context).pop();
37 | }
38 | if (!val) {
39 | _scaffoldKey.currentState.showSnackBar(SnackBar(
40 | content: Text('Sigin failed'),
41 | duration: Duration(seconds: 3),
42 | ));
43 | setState(() {
44 | _isLoading = false;
45 | });
46 | return;
47 | }
48 |
49 | // enter the validation for account checking through database and more in here
50 |
51 | bool userInDataBase =
52 | await Provider.of(context, listen: false)
53 | .userLoginData(_mobNumber, 'Consumer');
54 |
55 | if (userInDataBase) {
56 | debugPrint('in');
57 | SharedPreferences preferences = await SharedPreferences.getInstance();
58 | preferences.setString("type", "Consumer");
59 | Navigator.of(context).pushReplacementNamed(ConsumerDashboard.routeName);
60 | } else {
61 | debugPrint('out');
62 | _scaffoldKey.currentState.showSnackBar(SnackBar(
63 | content: Text('Your are not a member Please Sigin'),
64 | duration: Duration(seconds: 3),
65 | ));
66 | }
67 |
68 | setState(() {
69 | _isLoading = false;
70 | });
71 | }
72 |
73 | @override
74 | Widget build(BuildContext context) {
75 | final screenWidth = MediaQuery.of(context).size.width;
76 | final screenHeight = MediaQuery.of(context).size.height;
77 |
78 | return Scaffold(
79 | key: _scaffoldKey,
80 | body: SingleChildScrollView(
81 | child: Column(
82 | children: [
83 | SizedBox(
84 | height: screenHeight * 0.15,
85 | ),
86 | // this is the top text in the login screen last 2 para means the 1st text and 2nd text
87 | siginPageTopWidgets(screenWidth, headingTxt, 'Consumer', 'Login'),
88 | const SizedBox(
89 | height: 100,
90 | ),
91 |
92 | SizedBox(
93 | height: 20,
94 | ),
95 | Form(
96 | key: _formKey,
97 | child: Container(
98 | width: screenWidth * 0.7,
99 | child: Column(
100 | children: [
101 | infoText(context),
102 | phoneNoTextField(context),
103 | SizedBox(
104 | height: 20,
105 | ),
106 | _isLoading
107 | ? Center(
108 | child: CircularProgressIndicator(),
109 | )
110 | : signupRaisedButton(screenWidth, context),
111 | ],
112 | ),
113 | ),
114 | ),
115 | ],
116 | ),
117 | ),
118 | );
119 | }
120 |
121 | Text infoText(BuildContext context) {
122 | return Text(
123 | "Please enter your details to Login",
124 | style: TextStyle(
125 | color: Theme.of(context).accentColor,
126 | fontWeight: FontWeight.w500,
127 | fontSize: 17),
128 | );
129 | }
130 |
131 | Container phoneNoTextField(BuildContext context) {
132 | return Container(
133 | margin: EdgeInsets.symmetric(vertical: 10),
134 | padding: EdgeInsets.all(5),
135 | height: 60,
136 | decoration: textFieldDecoration,
137 | child: TextField(
138 | controller: _phoneNumberFeild,
139 | cursorColor: Theme.of(context).accentColor,
140 | decoration:
141 | innerInputFieldDecoration(context, 'Phone Number', _validate),
142 | ),
143 | );
144 | }
145 |
146 | Padding signupRaisedButton(double screenWidth, BuildContext context) {
147 | return Padding(
148 | padding: EdgeInsets.only(bottom: 15),
149 | child: SizedBox(
150 | width: double.infinity,
151 | child: RaisedButton(
152 | color: Theme.of(context).accentColor,
153 | elevation: 5,
154 | shape: RoundedRectangleBorder(
155 | borderRadius: BorderRadius.all(Radius.circular(4))),
156 | onPressed: () {
157 | _mobNumber = _phoneNumberFeild.text.trim();
158 | if (_phoneNumberFeild.text.trim() != null &&
159 | _phoneNumberFeild.text.trim().length == 10) {
160 | _mobNumber = '+91$_mobNumber';
161 | setState(() {
162 | _isLoading = true;
163 | _validate = '';
164 | });
165 | //function get from inherited class
166 | loginUser(_mobNumber, context, submitProcess);
167 | } else {
168 | setState(() {
169 | _validate = 'Please enter Valid Number';
170 | });
171 | }
172 | },
173 | padding: EdgeInsets.only(top: 10, bottom: 10),
174 | child: Text(
175 | 'Sign in',
176 | textAlign: TextAlign.center,
177 | style: TextStyle(
178 | color: Colors.white, fontSize: 25, fontWeight: FontWeight.w500),
179 | ),
180 | ),
181 | ),
182 | );
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/lib/screens/sellers/edit_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:provider/provider.dart';
4 | import 'package:sambharapp/provider/firebase_data_queries.dart';
5 | import 'package:sambharapp/widgets/dashboard_app_bar.dart';
6 | import 'package:sambharapp/widgets/inputs.dart';
7 | import 'package:sambharapp/widgets/sub_txt_widgets.dart';
8 |
9 | class EditIteams extends StatefulWidget {
10 | static const String routeName = './EditIteams';
11 |
12 | @override
13 | _EditIteamsState createState() => _EditIteamsState();
14 | }
15 |
16 | class _EditIteamsState extends State {
17 | DocumentSnapshot documnet;
18 | List documnetsPassed;
19 | String _sellersDoc;
20 | String _priceVal;
21 | String _stockVal;
22 | bool _isLoading = false;
23 | Future updateQerryHandler() async {
24 | setState(() {
25 | _isLoading = true;
26 | });
27 |
28 | await Provider.of(context, listen: false)
29 | .quieriesHandlerUpadte(_sellersDoc, documnet.documentID, {
30 | 'price': double.parse(_priceVal),
31 | 'stock': double.parse(_stockVal),
32 | });
33 |
34 | setState(() {
35 | _isLoading = false;
36 | });
37 |
38 | Navigator.of(context).pop();
39 | }
40 |
41 | Future deleteQuerryHandler() async {
42 | setState(() {
43 | _isLoading = true;
44 | });
45 |
46 | await Provider.of(context, listen: false)
47 | .quieriesHandlerUpadte(_sellersDoc, documnet.documentID, {
48 | 'availability': false,
49 | });
50 |
51 | setState(() {
52 | _isLoading = false;
53 | });
54 |
55 | Navigator.of(context).pop();
56 | }
57 |
58 | @override
59 | void didChangeDependencies() {
60 |
61 | documnetsPassed = ModalRoute.of(context).settings.arguments as List;
62 | documnet = documnetsPassed[0];
63 | _sellersDoc = documnetsPassed[1];
64 | _priceVal = documnet.data['price'].toString();
65 | _stockVal = documnet.data['stock'].toString();
66 |
67 | super.didChangeDependencies();
68 | }
69 |
70 | @override
71 | Widget build(BuildContext context) {
72 | final screenheight = MediaQuery.of(context).size.height;
73 | final screenWidth = MediaQuery.of(context).size.width;
74 | return Scaffold(
75 | appBar: dashboardAppBar('Edit Review'),
76 | body: SingleChildScrollView(
77 | child: Center(
78 | child: Container(
79 | width: screenWidth * 0.8,
80 | child: Column(
81 | crossAxisAlignment: CrossAxisAlignment.start,
82 | children: [
83 | SizedBox(
84 | height: screenheight * 0.1,
85 | ),
86 | Row(
87 | children: [
88 | Container(
89 | width: 60,
90 | height: 60,
91 | child: Image.network(documnet.data['imageUrl'])),
92 | SizedBox(
93 | width: 20,
94 | ),
95 | textCard(documnet.data['name']),
96 | ],
97 | ),
98 | SizedBox(
99 | height: 20,
100 | ),
101 | inputStyles(context, documnet.data['price'].toString(), 'Rs.',
102 | (val) {
103 | _priceVal = val;
104 | }),
105 | SizedBox(
106 | height: 20,
107 | ),
108 | inputStyles(context, documnet.data['stock'].toString(), 'Stock',
109 | (val) {
110 | _stockVal = val;
111 | }),
112 | SizedBox(
113 | height: 20,
114 | ),
115 | _isLoading
116 | ? Center(
117 | child: CircularProgressIndicator(),
118 | )
119 | : okButn(screenWidth),
120 | dltBtn(screenWidth)
121 | ],
122 | ),
123 | ),
124 | ),
125 | ),
126 | );
127 | }
128 |
129 | SizedBox dltBtn(double screenWidth) {
130 | return SizedBox(
131 | width: screenWidth * 0.8,
132 | child: Padding(
133 | padding: const EdgeInsets.symmetric(vertical: 10.0),
134 | child: FlatButton(
135 | shape:
136 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
137 | onPressed: deleteQuerryHandler,
138 | color: Color.fromRGBO(236, 242, 247, 1),
139 | child: Container(
140 | padding: EdgeInsets.all(15.0),
141 | child: Text(
142 | 'Delete items',
143 | style: TextStyle(
144 | color: Color.fromRGBO(94, 191, 70, 1),
145 | fontWeight: FontWeight.w500,
146 | fontSize: 20.0,
147 | ),
148 | ),
149 | ),
150 | ),
151 | ),
152 | );
153 | }
154 |
155 | SizedBox okButn(double screenWidth) {
156 | return SizedBox(
157 | width: screenWidth * 0.8,
158 | child: Padding(
159 | padding: const EdgeInsets.symmetric(vertical: 10.0),
160 | child: FlatButton(
161 | shape:
162 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
163 | onPressed: updateQerryHandler,
164 | color: Color.fromRGBO(94, 191, 70, 1),
165 | child: Container(
166 | padding: EdgeInsets.all(15.0),
167 | child: Text(
168 | 'Edit item',
169 | style: TextStyle(
170 | color: Colors.white,
171 | fontWeight: FontWeight.w500,
172 | fontSize: 20.0,
173 | ),
174 | ),
175 | ),
176 | ),
177 | ),
178 | );
179 | }
180 |
181 | Container inputStyles(
182 | BuildContext context, hintText, preffix, Function controllers) {
183 | return Container(
184 | margin: EdgeInsets.symmetric(vertical: 10),
185 | padding: EdgeInsets.all(5),
186 | decoration: textFieldDecoration,
187 | child: Row(
188 | mainAxisSize: MainAxisSize.max,
189 | children: [
190 | Text(
191 | preffix,
192 | style: TextStyle(color: Color.fromRGBO(94, 191, 70, 1)),
193 | ),
194 | Expanded(
195 | child: TextField(
196 | onChanged: controllers,
197 | cursorColor: Theme.of(context).accentColor,
198 | decoration: InputDecoration(
199 | hintText: hintText,
200 | hintStyle: TextStyle(color: Color.fromRGBO(94, 191, 70, 1)),
201 | contentPadding: EdgeInsets.only(left: 5),
202 | border: InputBorder.none,
203 | ),
204 | ),
205 | ),
206 | ],
207 | ),
208 | );
209 | }
210 | }
211 |
--------------------------------------------------------------------------------
/lib/screens/login_selector.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:sambharapp/screens/consumer_signup.dart';
5 | import 'package:sambharapp/screens/customer_login_screens.dart';
6 | import 'package:sambharapp/screens/seller_signin.dart';
7 | import 'package:sambharapp/screens/seller_signup.dart';
8 |
9 | class LoginSelector extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | double mqh = MediaQuery.of(context).size.height;
13 | return WillPopScope(
14 | onWillPop: () async {
15 | return (_backButtonFunction(context)) ?? false;
16 | },
17 | child: SafeArea(
18 | child: DefaultTabController(
19 | length: 2,
20 | child: Scaffold(
21 | appBar: PreferredSize(
22 | child: AppBar(
23 | leading: SizedBox(),
24 | backgroundColor: Colors.red,
25 | elevation: 0,
26 | flexibleSpace: Image(
27 | image: AssetImage('assets/images/sambhar-bg.png'),
28 | fit: BoxFit.cover,
29 | height: double.infinity,
30 | ),
31 | bottom: TabBar(
32 | labelStyle: TextStyle(fontWeight: FontWeight.w700),
33 | tabs: [tab("Sign In"), tab("Sign Up")],
34 | ),
35 | ),
36 | preferredSize: Size.fromHeight(mqh * 0.3)),
37 | body: TabBarView(
38 | children: [
39 | signInTab(mqh, context),
40 | signUpTab(mqh, context),
41 | ],
42 | )),
43 | ),
44 | ),
45 | );
46 | }
47 |
48 | Future _backButtonFunction(context) async {
49 | return await showDialog(
50 | context: context,
51 | builder: (context) {
52 | return AlertDialog(
53 | backgroundColor: Colors.white,
54 | title: Text(
55 | "Are you sure?",
56 | style: TextStyle(color: Color(0xFF5EBF46)),
57 | ),
58 | content: Text(
59 | "Do you want to exit?",
60 | style: TextStyle(color: Color(0xFF5EBF46)),
61 | ),
62 | actions: [
63 | FlatButton(
64 | onPressed: () => exit(0),
65 | child: Text(
66 | "Yes",
67 | style: TextStyle(color: Color(0xFF5EBF46)),
68 | ),
69 | ),
70 | FlatButton(
71 | onPressed: () => Navigator.pop(context),
72 | child: Text(
73 | "No",
74 | style: TextStyle(color: Color(0xFF5EBF46)),
75 | ),
76 | ),
77 | ],
78 | );
79 | });
80 | }
81 |
82 | Tab tab(lbl) => Tab(
83 | text: lbl,
84 | );
85 | Center signInTab(double mqh, BuildContext context) {
86 | return Center(
87 | child: Column(
88 | mainAxisAlignment: MainAxisAlignment.start,
89 | children: [
90 | SizedBox(height: mqh * 0.15),
91 | Padding(
92 | padding: const EdgeInsets.all(15.0),
93 | child: SizedBox(
94 | width: 350,
95 | height: 65,
96 | child: RaisedButton(
97 | shape: RoundedRectangleBorder(
98 | borderRadius: BorderRadius.all(Radius.circular(6))),
99 | onPressed: () {
100 | Navigator.push(
101 | context,
102 | MaterialPageRoute(
103 | builder: (_) => CustomerLoginScreens()));
104 | },
105 | child: Text(
106 | "Sign in as a Consumer",
107 | style: TextStyle(
108 | fontSize: 20,
109 | fontWeight: FontWeight.w800,
110 | color: Theme.of(context).accentColor),
111 | ),
112 | elevation: 3,
113 | color: Colors.white,
114 | ),
115 | ),
116 | ),
117 | Padding(
118 | padding: const EdgeInsets.all(15.0),
119 | child: SizedBox(
120 | width: 350,
121 | height: 60,
122 | child: RaisedButton(
123 | shape: RoundedRectangleBorder(
124 | borderRadius: BorderRadius.all(Radius.circular(6))),
125 | padding: EdgeInsets.only(left: 10, right: 10),
126 | onPressed: () {
127 | Navigator.push(
128 | context,
129 | MaterialPageRoute(
130 | builder: (_) => SellerLoginScreens()));
131 | },
132 | elevation: 3,
133 | color: Colors.white,
134 | child: Text(
135 | "Sign in as a Seller",
136 | style: TextStyle(
137 | fontSize: 20,
138 | fontWeight: FontWeight.w800,
139 | color: Theme.of(context).accentColor),
140 | )),
141 | ),
142 | ),
143 | ],
144 | ),
145 | );
146 | }
147 |
148 | Center signUpTab(double mqh, BuildContext context) {
149 | return Center(
150 | child: Column(
151 | mainAxisAlignment: MainAxisAlignment.start,
152 | children: [
153 | SizedBox(height: mqh * 0.15),
154 | Padding(
155 | padding: const EdgeInsets.all(15.0),
156 | child: SizedBox(
157 | width: 350,
158 | height: 65,
159 | child: RaisedButton(
160 | shape: RoundedRectangleBorder(
161 | borderRadius: BorderRadius.all(Radius.circular(6))),
162 | onPressed: () {
163 | Navigator.push(context,
164 | MaterialPageRoute(builder: (_) => ConsumerSignUp()));
165 | },
166 | child: Text(
167 | "Sign up as a Consumer",
168 | style: TextStyle(
169 | fontSize: 20,
170 | fontWeight: FontWeight.w800,
171 | color: Theme.of(context).accentColor),
172 | ),
173 | elevation: 3,
174 | color: Colors.white,
175 | ),
176 | ),
177 | ),
178 | Padding(
179 | padding: const EdgeInsets.all(15.0),
180 | child: SizedBox(
181 | width: 350,
182 | height: 60,
183 | child: RaisedButton(
184 | shape: RoundedRectangleBorder(
185 | borderRadius: BorderRadius.all(Radius.circular(6))),
186 | padding: EdgeInsets.only(left: 10, right: 10),
187 | onPressed: () {
188 | Navigator.push(context,
189 | MaterialPageRoute(builder: (_) => SellerSignUp()));
190 | },
191 | elevation: 3,
192 | color: Colors.white,
193 | child: Text(
194 | "Sign up as a Seller",
195 | style: TextStyle(
196 | fontSize: 20,
197 | fontWeight: FontWeight.w800,
198 | color: Theme.of(context).accentColor),
199 | )),
200 | ),
201 | ),
202 | ],
203 | ),
204 | );
205 | }
206 | }
207 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.11"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.5.2"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.5"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.2"
39 | cloud_firestore:
40 | dependency: "direct main"
41 | description:
42 | name: cloud_firestore
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "0.12.11"
46 | collection:
47 | dependency: transitive
48 | description:
49 | name: collection
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.14.11"
53 | convert:
54 | dependency: transitive
55 | description:
56 | name: convert
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.1.1"
60 | crypto:
61 | dependency: transitive
62 | description:
63 | name: crypto
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.1.3"
67 | cupertino_icons:
68 | dependency: "direct main"
69 | description:
70 | name: cupertino_icons
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "0.1.3"
74 | firebase:
75 | dependency: transitive
76 | description:
77 | name: firebase
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "7.2.1"
81 | firebase_analytics:
82 | dependency: "direct main"
83 | description:
84 | name: firebase_analytics
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "5.0.11"
88 | firebase_auth:
89 | dependency: "direct main"
90 | description:
91 | name: firebase_auth
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "0.14.0+9"
95 | firebase_core:
96 | dependency: "direct main"
97 | description:
98 | name: firebase_core
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "0.4.4+3"
102 | firebase_core_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: firebase_core_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.0.4"
109 | firebase_core_web:
110 | dependency: transitive
111 | description:
112 | name: firebase_core_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "0.1.1+2"
116 | flutter:
117 | dependency: "direct main"
118 | description: flutter
119 | source: sdk
120 | version: "0.0.0"
121 | flutter_launcher_icons:
122 | dependency: "direct dev"
123 | description:
124 | name: flutter_launcher_icons
125 | url: "https://pub.dartlang.org"
126 | source: hosted
127 | version: "0.7.4"
128 | flutter_test:
129 | dependency: "direct dev"
130 | description: flutter
131 | source: sdk
132 | version: "0.0.0"
133 | flutter_web_plugins:
134 | dependency: transitive
135 | description: flutter
136 | source: sdk
137 | version: "0.0.0"
138 | http:
139 | dependency: transitive
140 | description:
141 | name: http
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "0.12.0+4"
145 | http_parser:
146 | dependency: transitive
147 | description:
148 | name: http_parser
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "3.1.4"
152 | image:
153 | dependency: transitive
154 | description:
155 | name: image
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "2.1.4"
159 | js:
160 | dependency: transitive
161 | description:
162 | name: js
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "0.6.1+1"
166 | matcher:
167 | dependency: transitive
168 | description:
169 | name: matcher
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "0.12.6"
173 | meta:
174 | dependency: transitive
175 | description:
176 | name: meta
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.1.8"
180 | nested:
181 | dependency: transitive
182 | description:
183 | name: nested
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.0.4"
187 | path:
188 | dependency: transitive
189 | description:
190 | name: path
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.6.4"
194 | pedantic:
195 | dependency: transitive
196 | description:
197 | name: pedantic
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "1.8.0+1"
201 | petitparser:
202 | dependency: transitive
203 | description:
204 | name: petitparser
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.4.0"
208 | plugin_platform_interface:
209 | dependency: transitive
210 | description:
211 | name: plugin_platform_interface
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.0.2"
215 | provider:
216 | dependency: "direct main"
217 | description:
218 | name: provider
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "4.0.4"
222 | quiver:
223 | dependency: transitive
224 | description:
225 | name: quiver
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "2.0.5"
229 | shared_preferences:
230 | dependency: "direct main"
231 | description:
232 | name: shared_preferences
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "0.5.6+3"
236 | shared_preferences_macos:
237 | dependency: transitive
238 | description:
239 | name: shared_preferences_macos
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "0.0.1+6"
243 | shared_preferences_platform_interface:
244 | dependency: transitive
245 | description:
246 | name: shared_preferences_platform_interface
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "1.0.3"
250 | shared_preferences_web:
251 | dependency: transitive
252 | description:
253 | name: shared_preferences_web
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "0.1.2+4"
257 | sky_engine:
258 | dependency: transitive
259 | description: flutter
260 | source: sdk
261 | version: "0.0.99"
262 | source_span:
263 | dependency: transitive
264 | description:
265 | name: source_span
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "1.5.5"
269 | stack_trace:
270 | dependency: transitive
271 | description:
272 | name: stack_trace
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "1.9.3"
276 | stream_channel:
277 | dependency: transitive
278 | description:
279 | name: stream_channel
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "2.0.0"
283 | string_scanner:
284 | dependency: transitive
285 | description:
286 | name: string_scanner
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "1.0.5"
290 | term_glyph:
291 | dependency: transitive
292 | description:
293 | name: term_glyph
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "1.1.0"
297 | test_api:
298 | dependency: transitive
299 | description:
300 | name: test_api
301 | url: "https://pub.dartlang.org"
302 | source: hosted
303 | version: "0.2.11"
304 | typed_data:
305 | dependency: transitive
306 | description:
307 | name: typed_data
308 | url: "https://pub.dartlang.org"
309 | source: hosted
310 | version: "1.1.6"
311 | vector_math:
312 | dependency: transitive
313 | description:
314 | name: vector_math
315 | url: "https://pub.dartlang.org"
316 | source: hosted
317 | version: "2.0.8"
318 | xml:
319 | dependency: transitive
320 | description:
321 | name: xml
322 | url: "https://pub.dartlang.org"
323 | source: hosted
324 | version: "3.5.0"
325 | yaml:
326 | dependency: transitive
327 | description:
328 | name: yaml
329 | url: "https://pub.dartlang.org"
330 | source: hosted
331 | version: "2.2.0"
332 | sdks:
333 | dart: ">=2.7.0-dev <3.0.0"
334 | flutter: ">=1.12.13+hotfix.4 <2.0.0"
335 |
--------------------------------------------------------------------------------
/lib/screens/consumer_dashboard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:sambharapp/provider/firebase_consumer_login.dart';
4 | import 'package:sambharapp/screens/consumer_cart/consumer_cart.dart';
5 |
6 | class ConsumerDashboard extends StatelessWidget {
7 | static const routeName = '/ConsumerDashboard';
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final _firebaseProvider = Provider.of(context);
12 | final _scaffoldKey = GlobalKey();
13 |
14 | var headertextStyle = TextStyle(
15 | color: Theme.of(context).accentColor,
16 | fontWeight: FontWeight.w600,
17 | fontSize: 20);
18 | return WillPopScope(
19 | onWillPop: () async => false,
20 | child: Scaffold(
21 | key: _scaffoldKey,
22 | drawer: DashBoardDrawer(),
23 | body: CustomScrollView(
24 | slivers: [
25 | buildSliverAppBar(_scaffoldKey, context, _firebaseProvider),
26 | new SliverList(
27 | delegate: SliverChildListDelegate([
28 | Container(
29 | padding: EdgeInsets.all(10),
30 | child: Column(
31 | mainAxisSize: MainAxisSize.max,
32 | crossAxisAlignment: CrossAxisAlignment.center,
33 | children: [
34 | SizedBox(height: 40),
35 | Text(
36 | "Products",
37 | style: headertextStyle,
38 | ),
39 | GridView.count(
40 | crossAxisCount: 3,
41 | childAspectRatio: .85,
42 | padding: const EdgeInsets.all(20.0),
43 | mainAxisSpacing: 20.0,
44 | crossAxisSpacing: 10.0,
45 | physics: NeverScrollableScrollPhysics(),
46 | shrinkWrap: true,
47 | children: [
48 | catGrid(Color(0xff5EBF46), "assets/images/veggies.png",
49 | "Vegetables", context),
50 | catGrid(Color(0xffE0D03D), "assets/images/egg.png",
51 | "Poultry", context),
52 | catGrid(Color(0xffB1523D), "assets/images/grains.png",
53 | "Grains & Pulses", context),
54 | catGrid(Color(0xff8D4EBD), "assets/images/fruits.png",
55 | "Fruits", context),
56 | catGrid(Color(0xff46BFB0), "assets/images/dairy.png",
57 | "Dairy", context),
58 | catGrid(Color(0xff4693BF), "assets/images/bread.png",
59 | "Breads", context),
60 | ],
61 | ),
62 | SizedBox(
63 | height: 30,
64 | ),
65 | Text(
66 | "Shops Nearby",
67 | style: headertextStyle,
68 | ),
69 | Padding(
70 | padding: const EdgeInsets.all(8.0),
71 | child: ListView(
72 | physics: NeverScrollableScrollPhysics(),
73 | shrinkWrap: true,
74 | children: [
75 | Card(
76 | child: ListTile(
77 | contentPadding: EdgeInsets.all(15),
78 | title: Text("Damu Chettans Kada"),
79 | subtitle: Text("1 Kms Away"),
80 | leading:
81 | Image.asset("assets/images/shopicon.png"),
82 | ),
83 | ),
84 | Card(
85 | child: ListTile(
86 | contentPadding: EdgeInsets.all(15),
87 | title: Text("Big Market Stores"),
88 | subtitle: Text("4.5 Kms Away"),
89 | leading:
90 | Image.asset("assets/images/shopicon.png"),
91 | ),
92 | )
93 | ],
94 | ),
95 | )
96 | ],
97 | ),
98 | )
99 | ])),
100 | ],
101 | ),
102 | ),
103 | );
104 | }
105 |
106 | Container catGrid(Color cardColor, String icon, String info, context) {
107 | return Container(
108 | color: Colors.transparent,
109 | child: Column(
110 | mainAxisSize: MainAxisSize.max,
111 | children: [
112 | Card(
113 | color: cardColor,
114 | shape: RoundedRectangleBorder(
115 | borderRadius: BorderRadius.all(Radius.circular(10))),
116 | elevation: 10,
117 | child: Center(
118 | child: IconButton(
119 | icon: Image.asset(
120 | icon,
121 | fit: BoxFit.contain,
122 | height: 60,
123 | width: 60,
124 | ),
125 | iconSize: 80,
126 | onPressed: null)),
127 | ),
128 | Padding(
129 | padding: const EdgeInsets.only(top: 5),
130 | child: Text(
131 | info,
132 | style: TextStyle(
133 | color: Theme.of(context).accentColor,
134 | fontWeight: FontWeight.w800),
135 | ))
136 | ],
137 | ));
138 | }
139 |
140 | String getGreeting() {
141 | var hour = DateTime.now().hour;
142 | if (hour < 12) {
143 | return 'Good Morning';
144 | }
145 | if (hour < 17) {
146 | return 'Good Afternoon';
147 | }
148 | return 'Good Evening';
149 | }
150 |
151 | SliverAppBar buildSliverAppBar(GlobalKey _scaffoldKey,
152 | BuildContext context, FirebaseLogin _firebaseProvider) {
153 | return SliverAppBar(
154 | leading: IconButton(
155 | icon: Icon(Icons.menu),
156 | onPressed: () {
157 | _scaffoldKey.currentState.openDrawer();
158 | }),
159 | actions: [
160 | IconButton(
161 | icon: Icon(
162 | Icons.shopping_cart,
163 | color: Colors.white,
164 | ),
165 | onPressed: () {
166 | Navigator.push(
167 | context, MaterialPageRoute(builder: (_) => ConsumerCart()));
168 | })
169 | ],
170 | expandedHeight: 150.0,
171 | floating: true,
172 | pinned: true,
173 | snap: true,
174 | elevation: 0,
175 | backgroundColor: Theme.of(context).accentColor,
176 | flexibleSpace: FlexibleSpaceBar(
177 | centerTitle: true,
178 | titlePadding: EdgeInsets.only(bottom: 50, left: 50, top: 50),
179 | title: Row(
180 | children: [
181 | Text("${getGreeting()}, ${_firebaseProvider.userName}",
182 | style: TextStyle(
183 | color: Colors.white,
184 | fontSize: 16.0,
185 | fontWeight: FontWeight.w500)),
186 | SizedBox(width: 10),
187 | CircleAvatar(
188 | backgroundImage: NetworkImage(
189 | "https://www.bluemaumau.org/sites/default/files/default_images/default.png",
190 | ),
191 | )
192 | ],
193 | ),
194 | background: Image.asset(
195 | "assets/images/app-bg-notext.png",
196 | fit: BoxFit.cover,
197 | )),
198 | );
199 | }
200 | }
201 |
202 | class DashBoardDrawer extends StatelessWidget {
203 | @override
204 | Widget build(BuildContext context) {
205 | final _firebaseProvider = Provider.of(context);
206 | return Drawer(
207 | child: Column(
208 | children: [
209 | Expanded(
210 | child: ListView(
211 | children: [
212 | UserAccountsDrawerHeader(
213 | decoration: BoxDecoration(
214 | image: DecorationImage(
215 | image: ExactAssetImage(
216 | "assets/images/app-bg-notext.png"))),
217 | accountEmail: Text(_firebaseProvider.userPhone),
218 | accountName: Text(_firebaseProvider.userName),
219 | ),
220 | ],
221 | ),
222 | ),
223 | Container(
224 | child: Align(
225 | alignment: FractionalOffset.bottomCenter,
226 | child: Container(
227 | child: Column(
228 | children: [
229 | Divider(),
230 | ListTile(
231 | leading: Icon(Icons.settings), title: Text('Settings')),
232 | ListTile(
233 | onTap: () {
234 | _firebaseProvider.signOut();
235 | },
236 | leading: Icon(Icons.exit_to_app),
237 | title: Text('Logout'))
238 | ],
239 | ))))
240 | ],
241 | ));
242 | }
243 | }
244 |
--------------------------------------------------------------------------------
/lib/screens/add_shop.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:sambharapp/models/seller_model.dart';
5 | import 'package:sambharapp/screens/login_selector.dart';
6 | import 'package:sambharapp/widgets/signup.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 |
9 | class AddShop extends StatefulWidget {
10 | final SellerModel sellerModel;
11 |
12 | AddShop({this.sellerModel});
13 |
14 | @override
15 | _AddShopState createState() => _AddShopState();
16 | }
17 |
18 | class _AddShopState extends State {
19 | TextStyle headingTxt = TextStyle(
20 | color: const Color.fromRGBO(94, 191, 70, 1),
21 | fontSize: 25,
22 | fontWeight: FontWeight.w700);
23 |
24 | double screenWidth;
25 |
26 | Firestore _reference;
27 |
28 | BoxDecoration textfieldDecoration = BoxDecoration(
29 | color: const Color.fromRGBO(232, 238, 243, 1),
30 | borderRadius: new BorderRadius.all(
31 | const Radius.circular(10.0),
32 | ),
33 | boxShadow: [
34 | BoxShadow(
35 | color: const Color.fromRGBO(12, 7, 90, 0.1),
36 | offset: const Offset(0.0, 0.0),
37 | ),
38 | BoxShadow(
39 | color: const Color.fromRGBO(12, 7, 90, 0.1),
40 | offset: const Offset(0.0, 1.17),
41 | spreadRadius: -8.0,
42 | blurRadius: 8.0,
43 | ),
44 | ],
45 | );
46 |
47 | GlobalKey _formKey = GlobalKey();
48 | GlobalKey _scaffoldKey = GlobalKey();
49 | TextEditingController _shopnameController,
50 | _shopLocController,
51 | _pincodeController,
52 | _gstidController;
53 |
54 | @override
55 | void initState() {
56 | super.initState();
57 | _reference = Firestore.instance;
58 | _shopnameController = TextEditingController();
59 | _shopLocController = TextEditingController();
60 | _pincodeController = TextEditingController();
61 | _gstidController = TextEditingController();
62 | }
63 |
64 | _shopnameTextField() {
65 | return Container(
66 | width: screenWidth * 0.8,
67 | margin: EdgeInsets.symmetric(vertical: 10),
68 | padding: EdgeInsets.symmetric(
69 | horizontal: 15.0,
70 | vertical: 5.0,
71 | ),
72 | decoration: textfieldDecoration,
73 | child: TextFormField(
74 | controller: _shopnameController,
75 | validator: (value) {
76 | if (value.isEmpty || value.trim().isEmpty)
77 | return 'Enter a valid shop name';
78 | else
79 | return null;
80 | },
81 | cursorColor: Theme.of(context).accentColor,
82 | onSaved: (value) => widget.sellerModel.shopname = value,
83 | decoration: InputDecoration(
84 | border: InputBorder.none,
85 | hintText: 'Shop Name',
86 | hintStyle: TextStyle(
87 | fontSize: 20.0,
88 | color: Theme.of(context).accentColor,
89 | ),
90 | ),
91 | ),
92 | );
93 | }
94 |
95 | _shopLocTextField() {
96 | return Container(
97 | width: screenWidth * 0.8,
98 | margin: EdgeInsets.symmetric(vertical: 10),
99 | padding: EdgeInsets.symmetric(
100 | horizontal: 15.0,
101 | vertical: 5.0,
102 | ),
103 | decoration: textfieldDecoration,
104 | child: TextFormField(
105 | cursorColor: Theme.of(context).accentColor,
106 | controller: _shopLocController,
107 | validator: (value) {
108 | if (value.isEmpty || value.trim().isEmpty)
109 | return 'Enter a valid shop location';
110 | else
111 | return null;
112 | },
113 | onSaved: (value) => widget.sellerModel.shoploc = value,
114 | keyboardType: TextInputType.phone,
115 | decoration: InputDecoration(
116 | border: InputBorder.none,
117 | hintText: 'Shop Location',
118 | hintStyle: TextStyle(
119 | fontSize: 20.0,
120 | color: Theme.of(context).accentColor,
121 | ),
122 | ),
123 | ),
124 | );
125 | }
126 |
127 | _pinCodeTextField() {
128 | return Container(
129 | width: screenWidth * 0.8,
130 | margin: EdgeInsets.symmetric(vertical: 10),
131 | padding: EdgeInsets.symmetric(
132 | horizontal: 15.0,
133 | vertical: 5.0,
134 | ),
135 | decoration: textfieldDecoration,
136 | child: TextFormField(
137 | controller: _pincodeController,
138 | validator: (value) {
139 | if (value.isEmpty || value.trim().isEmpty)
140 | return 'Enter a valid shop pin code';
141 | else
142 | return null;
143 | },
144 | onSaved: (value) => widget.sellerModel.shopPincode = value,
145 | keyboardType: TextInputType.number,
146 | cursorColor: Theme.of(context).accentColor,
147 | decoration: InputDecoration(
148 | border: InputBorder.none,
149 | hintText: 'Pin code',
150 | hintStyle: TextStyle(
151 | fontSize: 20.0,
152 | color: Theme.of(context).accentColor,
153 | ),
154 | ),
155 | ),
156 | );
157 | }
158 |
159 | _gstidTextField() {
160 | return Container(
161 | width: screenWidth * 0.8,
162 | margin: EdgeInsets.symmetric(vertical: 10),
163 | padding: EdgeInsets.symmetric(
164 | horizontal: 15.0,
165 | vertical: 5.0,
166 | ),
167 | decoration: textfieldDecoration,
168 | child: TextFormField(
169 | cursorColor: Theme.of(context).accentColor,
170 | controller: _gstidController,
171 | validator: (value) {
172 | if (value.isEmpty)
173 | return 'Enter a valid GSTID';
174 | else
175 | return null;
176 | },
177 | onSaved: (value) => widget.sellerModel.gstid = value,
178 | decoration: InputDecoration(
179 | border: InputBorder.none,
180 | hintText: 'GST ID (Optional)',
181 | hintStyle: TextStyle(
182 | fontSize: 20.0,
183 | color: Theme.of(context).accentColor,
184 | ),
185 | ),
186 | keyboardType: TextInputType.multiline,
187 | maxLines: null,
188 | ),
189 | );
190 | }
191 |
192 | _signUpButton() {
193 | return SizedBox(
194 | width: screenWidth * 0.8,
195 | child: Padding(
196 | padding: const EdgeInsets.symmetric(vertical: 10.0),
197 | child: FlatButton(
198 | shape:
199 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
200 | onPressed: () => _signUp(),
201 | color: Theme.of(context).accentColor,
202 | child: Container(
203 | padding: EdgeInsets.all(15.0),
204 | child: Text(
205 | 'Sign Up',
206 | style: TextStyle(
207 | color: Colors.white,
208 | fontWeight: FontWeight.w500,
209 | fontSize: 20.0,
210 | ),
211 | ),
212 | ),
213 | ),
214 | ),
215 | );
216 | }
217 |
218 | _signUp() async {
219 | if (_formKey.currentState.validate()) {
220 | _formKey.currentState.save();
221 | _scaffoldKey.currentState.showSnackBar(SnackBar(
222 | duration: Duration(minutes: 5),
223 | content: Text("Registering .. Please wait"),
224 | ));
225 |
226 |
227 | // await _reference.collection('Seller').document().setData(model.toJson());
228 | SharedPreferences preferences = await SharedPreferences.getInstance();
229 | preferences.setString("type", "Seller");
230 | await _reference
231 | .collection('Seller')
232 | .document(widget.sellerModel.shopPincode)
233 | .collection("Sellers")
234 | .document()
235 | .setData(widget.sellerModel.toJson())
236 | .then(
237 | (value) {
238 | _scaffoldKey.currentState.hideCurrentSnackBar();
239 | Navigator.push(
240 | context,
241 | MaterialPageRoute(builder: (context) => LoginSelector()),
242 | );
243 | },
244 | );
245 | } else
246 | debugPrint("Not success");
247 | }
248 |
249 | void scheduleRebuild() {
250 | setState(() {});
251 | }
252 |
253 | Padding infoText(BuildContext context) {
254 | return Padding(
255 | padding: const EdgeInsets.all(15),
256 | child: Text(
257 | "Add your shop details",
258 | style: TextStyle(color: Theme.of(context).indicatorColor, fontSize: 15),
259 | ),
260 | );
261 | }
262 |
263 | @override
264 | Widget build(BuildContext context) {
265 | screenWidth = MediaQuery.of(context).size.width;
266 | return Scaffold(
267 | key: _scaffoldKey,
268 | body: SingleChildScrollView(
269 | physics: ScrollPhysics(),
270 | child: Padding(
271 | padding: MediaQuery.of(context).padding,
272 | child: Container(
273 | padding: EdgeInsets.only(
274 | left: 50.0,
275 | right: 50.0,
276 | top: 30.0,
277 | ),
278 | child: Column(
279 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
280 | children: [
281 | siginPageTopWidgets(screenWidth, headingTxt, "Add", "Shop"),
282 | Form(
283 | key: _formKey,
284 | child: Stack(
285 | alignment: Alignment.center,
286 | children: [
287 | Column(
288 | children: [
289 | infoText(context),
290 | _shopnameTextField(),
291 | _shopLocTextField(),
292 | _pinCodeTextField(),
293 | _gstidTextField(),
294 | _signUpButton(),
295 | ],
296 | ),
297 | ],
298 | ),
299 | ),
300 | ],
301 | ),
302 | ),
303 | ),
304 | ),
305 | );
306 | }
307 | }
308 |
--------------------------------------------------------------------------------
/lib/screens/seller_signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:sambharapp/models/seller_model.dart';
4 | import 'package:sambharapp/screens/add_shop.dart';
5 | import 'package:sambharapp/widgets/signup.dart';
6 |
7 | class SellerSignUp extends StatefulWidget {
8 | @override
9 | _SellerSignUpState createState() => _SellerSignUpState();
10 | }
11 |
12 | class _SellerSignUpState extends State {
13 | TextStyle headingTxt = TextStyle(
14 | color: const Color.fromRGBO(94, 191, 70, 1),
15 | fontSize: 25,
16 | fontWeight: FontWeight.w700);
17 |
18 | SellerModel model;
19 | double screenWidth;
20 |
21 | BoxDecoration textfieldDecoration = BoxDecoration(
22 | color: const Color.fromRGBO(232, 238, 243, 1),
23 | borderRadius: new BorderRadius.all(
24 | const Radius.circular(10.0),
25 | ),
26 | boxShadow: [
27 | BoxShadow(
28 | color: const Color.fromRGBO(12, 7, 90, 0.1),
29 | offset: const Offset(0.0, 0.0),
30 | ),
31 | BoxShadow(
32 | color: const Color.fromRGBO(12, 7, 90, 0.1),
33 | offset: const Offset(0.0, 1.17),
34 | spreadRadius: -8.0,
35 | blurRadius: 8.0,
36 | ),
37 | ],
38 | );
39 |
40 | DateTime _dateTime;
41 | String _dateValue;
42 | GlobalKey _formKey = GlobalKey();
43 | String _gender;
44 | List _genderList;
45 | TextStyle _labelStyle = TextStyle(
46 | color: Colors.green,
47 | fontSize: 20.0,
48 | );
49 |
50 | TextEditingController _nameController,
51 | _phoneController,
52 | _pincodeController,
53 | _addressController;
54 |
55 | @override
56 | void initState() {
57 | super.initState();
58 | model = SellerModel();
59 | _nameController = TextEditingController();
60 | _phoneController = TextEditingController();
61 | _pincodeController = TextEditingController();
62 | _addressController = TextEditingController();
63 | _dateValue = "DOB";
64 | _gender = 'Choose Gender';
65 | _genderList = ['Choose Gender', 'Male', 'Female', 'Other'];
66 | }
67 |
68 | _nameTextField() {
69 | return Container(
70 | width: screenWidth * 0.8,
71 | margin: EdgeInsets.symmetric(vertical: 10),
72 | padding: EdgeInsets.symmetric(
73 | horizontal: 15.0,
74 | vertical: 5.0,
75 | ),
76 | decoration: textfieldDecoration,
77 | child: TextFormField(
78 | controller: _nameController,
79 | validator: (value) {
80 | if (value.isEmpty || value.trim().isEmpty)
81 | return 'Enter a valid name';
82 | else
83 | return null;
84 | },
85 | cursorColor: Theme.of(context).accentColor,
86 | onSaved: (value) => model.name = value,
87 | decoration: InputDecoration(
88 | border: InputBorder.none,
89 | hintText: 'Name',
90 | hintStyle: TextStyle(
91 | fontSize: 20.0,
92 | color: Color.fromRGBO(94, 191, 70, 1),
93 | ),
94 | ),
95 | ),
96 | );
97 | }
98 |
99 | Padding infoText(BuildContext context) {
100 | return Padding(
101 | padding: const EdgeInsets.all(15),
102 | child: Text(
103 | "Enter your details to signup",
104 | style: TextStyle(color: Theme.of(context).indicatorColor, fontSize: 15),
105 | ),
106 | );
107 | }
108 |
109 | _phoneTextField() {
110 | return Container(
111 | width: screenWidth * 0.8,
112 | margin: EdgeInsets.symmetric(vertical: 10),
113 | padding: EdgeInsets.symmetric(
114 | horizontal: 15.0,
115 | vertical: 5.0,
116 | ),
117 | decoration: textfieldDecoration,
118 | child: TextFormField(
119 | cursorColor: Theme.of(context).accentColor,
120 | controller: _phoneController,
121 | validator: (value) {
122 | if (value.isEmpty || value.trim().isEmpty)
123 | return 'Enter a valid Phone number';
124 | else
125 | return null;
126 | },
127 | onSaved: (value) => model.phone = value,
128 | keyboardType: TextInputType.phone,
129 | decoration: InputDecoration(
130 | border: InputBorder.none,
131 | hintText: 'Phone',
132 | hintStyle: TextStyle(
133 | fontSize: 20.0,
134 | color: Color.fromRGBO(94, 191, 70, 1),
135 | ),
136 | ),
137 | ),
138 | );
139 | }
140 |
141 | _dob() {
142 | return GestureDetector(
143 | onTap: () {
144 | _getDate();
145 | },
146 | child: Container(
147 | width: screenWidth * 0.8,
148 | margin: EdgeInsets.symmetric(vertical: 10),
149 | padding: EdgeInsets.symmetric(
150 | horizontal: 15.0,
151 | vertical: 20.0,
152 | ),
153 | decoration: textfieldDecoration,
154 | child: Text(
155 | _dateValue,
156 | style: TextStyle(
157 | color: Color.fromRGBO(94, 191, 70, 1),
158 | fontSize: 20.0,
159 | ),
160 | ),
161 | ),
162 | );
163 | }
164 |
165 | _getDate() async {
166 | _dateTime = await showDatePicker(
167 | context: context,
168 | initialDate: DateTime.now(),
169 | firstDate: DateTime(1920),
170 | lastDate: DateTime.now(),
171 | );
172 | if (_dateTime != null) {
173 | _dateValue = _dateTime.year.toString() +
174 | '/' +
175 | _dateTime.month.toString() +
176 | '/' +
177 | _dateTime.day.toString();
178 | model.dob = _dateTime;
179 | }
180 | scheduleRebuild();
181 | }
182 |
183 | _genderDropDown() {
184 | return Container(
185 | width: screenWidth * 0.8,
186 | margin: EdgeInsets.symmetric(vertical: 10),
187 | padding: EdgeInsets.symmetric(
188 | horizontal: 15.0,
189 | // vertical: 20.0,
190 | ),
191 | decoration: textfieldDecoration,
192 | child: DropdownButtonFormField(
193 | validator: (value) {
194 | if (value.isEmpty || value == 'Choose Gender')
195 | return 'Enter a valid Gender';
196 | else
197 | return null;
198 | },
199 | onSaved: (value) => model.gender = value,
200 | decoration: InputDecoration(
201 | border: InputBorder.none,
202 | hintStyle: TextStyle(
203 | fontSize: 20.0,
204 | color: Color.fromRGBO(94, 191, 70, 1),
205 | ),
206 | ),
207 | // isExpanded: true,
208 | style: _labelStyle,
209 | value: _gender,
210 | items: _genderList
211 | .map((item) => DropdownMenuItem(
212 | child: Text(
213 | '$item',
214 | style: _labelStyle,
215 | ),
216 | value: item,
217 | ))
218 | .toList(),
219 | onChanged: (value) {
220 | setState(() {
221 | _gender = value;
222 | });
223 | },
224 | ),
225 | );
226 | }
227 |
228 | _pinCodeTextField() {
229 | return Container(
230 | width: screenWidth * 0.8,
231 | margin: EdgeInsets.symmetric(vertical: 10),
232 | padding: EdgeInsets.symmetric(
233 | horizontal: 15.0,
234 | vertical: 5.0,
235 | ),
236 | decoration: textfieldDecoration,
237 | child: TextFormField(
238 | controller: _pincodeController,
239 | validator: (value) {
240 | if (value.isEmpty || value.trim().isEmpty)
241 | return 'Enter a valid pin code';
242 | else
243 | return null;
244 | },
245 | onSaved: (value) => model.homePincode = value,
246 | keyboardType: TextInputType.number,
247 | cursorColor: Theme.of(context).accentColor,
248 | decoration: InputDecoration(
249 | border: InputBorder.none,
250 | hintText: 'Pin code',
251 | hintStyle: TextStyle(
252 | fontSize: 20.0,
253 | color: Color.fromRGBO(94, 191, 70, 1),
254 | ),
255 | ),
256 | ),
257 | );
258 | }
259 |
260 | _addressTextField() {
261 | return Container(
262 | width: screenWidth * 0.8,
263 | margin: EdgeInsets.symmetric(vertical: 10),
264 | padding: EdgeInsets.symmetric(
265 | horizontal: 15.0,
266 | vertical: 5.0,
267 | ),
268 | decoration: textfieldDecoration,
269 | child: TextFormField(
270 | cursorColor: Theme.of(context).accentColor,
271 | controller: _addressController,
272 | validator: (value) {
273 | if (value.isEmpty)
274 | return 'Enter a valid Address';
275 | else
276 | return null;
277 | },
278 | onSaved: (value) => model.address = value,
279 | decoration: InputDecoration(
280 | border: InputBorder.none,
281 | hintText: 'Address',
282 | hintStyle: TextStyle(
283 | fontSize: 20.0,
284 | color: Color.fromRGBO(94, 191, 70, 1),
285 | ),
286 | ),
287 | keyboardType: TextInputType.multiline,
288 | maxLines: null,
289 | ),
290 | );
291 | }
292 |
293 | _signUpButton() {
294 | return SizedBox(
295 | width: screenWidth * 0.8,
296 | child: Padding(
297 | padding: const EdgeInsets.symmetric(vertical: 10.0),
298 | child: FlatButton(
299 | shape:
300 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
301 | onPressed: () => _navToAddShop(),
302 | color: Color.fromRGBO(94, 191, 70, 1),
303 | child: Container(
304 | padding: EdgeInsets.all(15.0),
305 | child: Text(
306 | 'Next',
307 | style: TextStyle(
308 | color: Colors.white,
309 | fontWeight: FontWeight.w500,
310 | fontSize: 20.0,
311 | ),
312 | ),
313 | ),
314 | ),
315 | ),
316 | );
317 | }
318 |
319 | _navToAddShop() {
320 | if (_formKey.currentState.validate()) {
321 | _formKey.currentState.save();
322 | debugPrint(model.dob.toString());
323 | Navigator.push(
324 | context,
325 | MaterialPageRoute(builder: (_) => AddShop(sellerModel: model)),
326 | );
327 | }
328 | }
329 |
330 | void scheduleRebuild() {
331 | setState(() {});
332 | }
333 |
334 | @override
335 | Widget build(BuildContext context) {
336 | screenWidth = MediaQuery.of(context).size.width;
337 | return Scaffold(
338 | body: SingleChildScrollView(
339 | physics: BouncingScrollPhysics(),
340 | child: Padding(
341 | padding: MediaQuery.of(context).padding,
342 | child: Container(
343 | padding: EdgeInsets.only(
344 | left: 50.0,
345 | right: 50.0,
346 | top: 30.0,
347 | ),
348 | child: Column(
349 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
350 | children: [
351 | siginPageTopWidgets(
352 | screenWidth, headingTxt, "Seller", "Signup"),
353 | Form(
354 | key: _formKey,
355 | child: Column(
356 | children: [
357 | infoText(context),
358 | _nameTextField(),
359 | _phoneTextField(),
360 | _dob(),
361 | _genderDropDown(),
362 | _pinCodeTextField(),
363 | _addressTextField(),
364 | _signUpButton(),
365 | ],
366 | ),
367 | ),
368 | ],
369 | ),
370 | ),
371 | ),
372 | ),
373 | );
374 | }
375 | }
376 |
--------------------------------------------------------------------------------
/lib/screens/consumer_signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:sambharapp/models/consumer_model.dart';
5 | import 'package:sambharapp/screens/consumer_dashboard.dart';
6 | import 'package:sambharapp/widgets/signup.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 |
9 | class ConsumerSignUp extends StatefulWidget {
10 | @override
11 | _ConsumerSignUpState createState() => _ConsumerSignUpState();
12 | }
13 |
14 | class _ConsumerSignUpState extends State {
15 | TextStyle headingTxt = TextStyle(
16 | color: const Color.fromRGBO(94, 191, 70, 1),
17 | fontSize: 25,
18 | fontWeight: FontWeight.w700);
19 |
20 | ConsumerModel model;
21 | double screenWidth;
22 | BoxDecoration textfieldDecoration = BoxDecoration(
23 | color: const Color.fromRGBO(232, 238, 243, 1),
24 | borderRadius: new BorderRadius.all(
25 | const Radius.circular(10.0),
26 | ),
27 | boxShadow: [
28 | BoxShadow(
29 | color: const Color.fromRGBO(12, 7, 90, 0.1),
30 | offset: const Offset(0.0, 0.0),
31 | ),
32 | BoxShadow(
33 | color: const Color.fromRGBO(12, 7, 90, 0.1),
34 | offset: const Offset(0.0, 1.17),
35 | spreadRadius: -8.0,
36 | blurRadius: 8.0,
37 | ),
38 | ],
39 | );
40 |
41 | DateTime _dateTime;
42 | String _dateValue;
43 | GlobalKey _formKey = GlobalKey();
44 | String _gender;
45 | List _genderList;
46 | TextStyle _labelStyle = TextStyle(
47 | color: Colors.green,
48 | fontSize: 20.0,
49 | );
50 |
51 | TextEditingController _nameController,
52 | _phoneController,
53 | _pincodeController,
54 | _addressController;
55 |
56 | @override
57 | void initState() {
58 | super.initState();
59 | model = ConsumerModel();
60 | _nameController = TextEditingController();
61 | _phoneController = TextEditingController();
62 | _pincodeController = TextEditingController();
63 | _addressController = TextEditingController();
64 | _dateValue = "DOB";
65 | _gender = 'Choose Gender';
66 | _genderList = ['Choose Gender', 'Male', 'Female', 'Other'];
67 | }
68 |
69 | _nameTextField() {
70 | return Container(
71 | width: screenWidth * 0.8,
72 | margin: EdgeInsets.symmetric(vertical: 10),
73 | padding: EdgeInsets.symmetric(
74 | horizontal: 15.0,
75 | vertical: 5.0,
76 | ),
77 | decoration: textfieldDecoration,
78 | child: TextFormField(
79 | controller: _nameController,
80 | validator: (value) {
81 | if (value.isEmpty || value.trim().isEmpty)
82 | return 'Enter a valid name';
83 | else
84 | return null;
85 | },
86 | cursorColor: Theme.of(context).accentColor,
87 | onSaved: (value) => model.name = value.trim(),
88 | decoration: InputDecoration(
89 | border: InputBorder.none,
90 | hintText: 'Name',
91 | hintStyle: TextStyle(
92 | fontSize: 20.0,
93 | color: Color.fromRGBO(94, 191, 70, 1),
94 | ),
95 | ),
96 | ),
97 | );
98 | }
99 |
100 | _phoneTextField() {
101 | return Container(
102 | width: screenWidth * 0.8,
103 | margin: EdgeInsets.symmetric(vertical: 10),
104 | padding: EdgeInsets.symmetric(
105 | horizontal: 15.0,
106 | vertical: 5.0,
107 | ),
108 | decoration: textfieldDecoration,
109 | child: TextFormField(
110 | cursorColor: Theme.of(context).accentColor,
111 | controller: _phoneController,
112 | validator: (value) {
113 | if (value.isEmpty || value.trim().isEmpty)
114 | return 'Enter a valid Phone number';
115 | else
116 | return null;
117 | },
118 | onSaved: (value) => model.phone = value.trim(),
119 | keyboardType: TextInputType.phone,
120 | decoration: InputDecoration(
121 | border: InputBorder.none,
122 | hintText: 'Phone',
123 | hintStyle: TextStyle(
124 | fontSize: 20.0,
125 | color: Color.fromRGBO(94, 191, 70, 1),
126 | ),
127 | ),
128 | ),
129 | );
130 | }
131 |
132 | _dob() {
133 | return GestureDetector(
134 | onTap: () {
135 | _getDate();
136 | },
137 | child: Container(
138 | width: screenWidth * 0.8,
139 | margin: EdgeInsets.symmetric(vertical: 10),
140 | padding: EdgeInsets.symmetric(
141 | horizontal: 15.0,
142 | vertical: 20.0,
143 | ),
144 | decoration: textfieldDecoration,
145 | child: Text(
146 | _dateValue,
147 | style: TextStyle(
148 | color: Color.fromRGBO(94, 191, 70, 1),
149 | fontSize: 20.0,
150 | ),
151 | ),
152 | ),
153 | );
154 | }
155 |
156 | _getDate() async {
157 | _dateTime = await showDatePicker(
158 | context: context,
159 | initialDate: DateTime.now(),
160 | firstDate: DateTime(1920),
161 | lastDate: DateTime.now(),
162 | );
163 | if (_dateTime != null) {
164 | _dateValue = _dateTime.year.toString() +
165 | '/' +
166 | _dateTime.month.toString() +
167 | '/' +
168 | _dateTime.day.toString();
169 | model.dob = _dateTime;
170 | }
171 | scheduleRebuild();
172 | }
173 |
174 | _genderDropDown() {
175 | return Container(
176 | width: screenWidth * 0.8,
177 | margin: EdgeInsets.symmetric(vertical: 10),
178 | padding: EdgeInsets.symmetric(
179 | horizontal: 15.0,
180 | // vertical: 20.0,
181 | ),
182 | decoration: textfieldDecoration,
183 | child: DropdownButtonFormField(
184 | validator: (value) {
185 | if (value.isEmpty || value == 'Choose Gender')
186 | return 'Enter a valid Gender';
187 | else
188 | return null;
189 | },
190 | onSaved: (value) => model.gender = value,
191 | decoration: InputDecoration(
192 | border: InputBorder.none,
193 | hintStyle: TextStyle(
194 | fontSize: 20.0,
195 | color: Color.fromRGBO(94, 191, 70, 1),
196 | ),
197 | ),
198 | // isExpanded: true,
199 | style: _labelStyle,
200 | value: _gender,
201 | items: _genderList
202 | .map((item) => DropdownMenuItem(
203 | child: Text(
204 | '$item',
205 | style: _labelStyle,
206 | ),
207 | value: item,
208 | ))
209 | .toList(),
210 | onChanged: (value) {
211 | setState(() {
212 | _gender = value;
213 | });
214 | },
215 | ),
216 | );
217 | }
218 |
219 | _pinCodeTextField() {
220 | return Container(
221 | width: screenWidth * 0.8,
222 | margin: EdgeInsets.symmetric(vertical: 10),
223 | padding: EdgeInsets.symmetric(
224 | horizontal: 15.0,
225 | vertical: 5.0,
226 | ),
227 | decoration: textfieldDecoration,
228 | child: TextFormField(
229 | controller: _pincodeController,
230 | validator: (value) {
231 | if (value.isEmpty || value.trim().isEmpty)
232 | return 'Enter a valid pin code';
233 | else
234 | return null;
235 | },
236 | onSaved: (value) => model.pincode = value.trim(),
237 | keyboardType: TextInputType.number,
238 | cursorColor: Theme.of(context).accentColor,
239 | decoration: InputDecoration(
240 | border: InputBorder.none,
241 | hintText: 'Pin code',
242 | hintStyle: TextStyle(
243 | fontSize: 20.0,
244 | color: Color.fromRGBO(94, 191, 70, 1),
245 | ),
246 | ),
247 | ),
248 | );
249 | }
250 |
251 | _addressTextField() {
252 | return Container(
253 | width: screenWidth * 0.8,
254 | margin: EdgeInsets.symmetric(vertical: 10),
255 | padding: EdgeInsets.symmetric(
256 | horizontal: 15.0,
257 | vertical: 5.0,
258 | ),
259 | decoration: textfieldDecoration,
260 | child: TextFormField(
261 | cursorColor: Theme.of(context).accentColor,
262 | controller: _addressController,
263 | validator: (value) {
264 | if (value.isEmpty)
265 | return 'Enter a valid Address';
266 | else
267 | return null;
268 | },
269 | onSaved: (value) => model.address = value.trim(),
270 | decoration: InputDecoration(
271 | border: InputBorder.none,
272 | hintText: 'Address',
273 | hintStyle: TextStyle(
274 | fontSize: 20.0,
275 | color: Color.fromRGBO(94, 191, 70, 1),
276 | ),
277 | ),
278 | keyboardType: TextInputType.multiline,
279 | maxLines: null,
280 | ),
281 | );
282 | }
283 |
284 | _signUpButton() {
285 | return SizedBox(
286 | width: screenWidth * 0.8,
287 | child: Padding(
288 | padding: const EdgeInsets.symmetric(vertical: 10.0),
289 | child: FlatButton(
290 | shape:
291 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
292 | onPressed: () => _signUp(),
293 | color: Color.fromRGBO(94, 191, 70, 1),
294 | child: Container(
295 | padding: EdgeInsets.all(15.0),
296 | child: Text(
297 | 'Sign up as a Consumer',
298 | style: TextStyle(
299 | color: Colors.white,
300 | fontWeight: FontWeight.w500,
301 | fontSize: 20.0,
302 | ),
303 | ),
304 | ),
305 | ),
306 | ),
307 | );
308 | }
309 |
310 | _signUp() async {
311 | if (_formKey.currentState.validate()) {
312 | _formKey.currentState.save();
313 | Firestore.instance
314 | .collection('Consumer')
315 | .document()
316 | .setData(model.toJson())
317 | .then((snapshot) {
318 | _nameController.clear();
319 | _phoneController.clear();
320 | _pincodeController.clear();
321 | _addressController.clear();
322 | });
323 | SharedPreferences preferences = await SharedPreferences.getInstance();
324 | preferences.setString("type", "Consumer");
325 | Navigator.of(context).pushReplacementNamed(ConsumerDashboard.routeName);
326 | } else
327 | debugPrint("Not success");
328 | scheduleRebuild();
329 | }
330 |
331 | void scheduleRebuild() {
332 | setState(() {});
333 | }
334 |
335 | @override
336 | Widget build(BuildContext context) {
337 | screenWidth = MediaQuery.of(context).size.width;
338 | return Scaffold(
339 | body: SingleChildScrollView(
340 | physics: BouncingScrollPhysics(),
341 | child: Padding(
342 | padding: MediaQuery.of(context).padding,
343 | child: Container(
344 | padding: EdgeInsets.only(
345 | left: 50.0,
346 | right: 50.0,
347 | top: 30.0,
348 | ),
349 | child: Column(
350 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
351 | children: [
352 | siginPageTopWidgets(
353 | screenWidth, headingTxt, "Consumer", "Signup"),
354 | Form(
355 | key: _formKey,
356 | child: Column(
357 | children: [
358 | _nameTextField(),
359 | _phoneTextField(),
360 | _dob(),
361 | _genderDropDown(),
362 | _pinCodeTextField(),
363 | _addressTextField(),
364 | _signUpButton(),
365 | ],
366 | ),
367 | ),
368 | ],
369 | ),
370 | ),
371 | ),
372 | ),
373 | );
374 | }
375 | }
376 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.sambharapp;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.sambharapp;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.sambharapp;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------