├── assets
├── image
│ ├── Color.txt
│ ├── icon.png
│ ├── map_pin.png
│ ├── welcome.png
│ ├── icon_color.png
│ ├── splash_logo.png
│ └── header_image.png
└── fonts
│ ├── Gilroy-Bold.ttf
│ ├── Gilroy-Heavy.ttf
│ ├── Gilroy-Light.ttf
│ ├── Gilroy-Medium.ttf
│ └── Gilroy-Regular.ttf
├── ios
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── .gitignore
├── Podfile
└── Podfile.lock
├── appImage
├── 1.png
├── 10.png
├── 11.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
├── 6.png
├── 7.png
├── 8.png
└── 9.png
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ └── splash.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ └── splash.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ └── splash.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ └── splash.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ └── splash.png
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ └── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── OnlineGroceryStore
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── .metadata
├── lib
├── screen
│ ├── orderSuccess
│ │ ├── orderSuccessScreenUi.dart
│ │ └── orderSuccessScreen.dart
│ ├── profileScreen
│ │ ├── profileScreen.dart
│ │ └── profileScreenUi.dart
│ ├── auth
│ │ ├── phoneNumber
│ │ │ ├── getStarted.dart
│ │ │ ├── socialMediaButton.dart
│ │ │ └── getStartedScreenUI.dart
│ │ ├── numberAuth
│ │ │ ├── enterNumber
│ │ │ │ ├── enterNumberScreen.dart
│ │ │ │ └── enterNumberUI.dart
│ │ │ └── otpScreen
│ │ │ │ ├── otpScreen.dart
│ │ │ │ └── otpScreenUI.dart
│ │ ├── login
│ │ │ ├── loginScreen.dart
│ │ │ └── loginUI.dart
│ │ ├── signUp
│ │ │ └── signUpScreen.dart
│ │ └── selectLocation
│ │ │ ├── selectLocationScreen.dart
│ │ │ └── selectlocationUI.dart
│ ├── productDetail
│ │ ├── widget
│ │ │ ├── productSelaction.dart
│ │ │ └── productImage.dart
│ │ ├── productViewImages.dart
│ │ └── productDetail.dart
│ ├── cartScreen
│ │ └── cartScreen.dart
│ ├── productByCategory
│ │ ├── productByCategoryScreen.dart
│ │ ├── filtterView
│ │ │ └── filtterView.dart
│ │ └── productByCategoryUI.dart
│ ├── home
│ │ ├── homeHeder.dart
│ │ ├── homeMain.dart
│ │ └── home.dart
│ ├── findProductScreen
│ │ ├── findProductScreen.dart
│ │ └── findProductUI.dart
│ └── welcomeScreen
│ │ └── welcomeScreen.dart
├── widget
│ ├── appIcon.dart
│ ├── dismissKeyBoardView.dart
│ ├── blurHeaderImage.dart
│ ├── appIndicator.dart
│ ├── appDialogs.dart
│ ├── searchBox.dart
│ ├── seeAllTitle.dart
│ ├── appNetworkImage.dart
│ ├── appInputText.dart
│ ├── userProfilePic.dart
│ ├── productAction.dart
│ ├── buttons.dart
│ ├── orderPlacedDialog.dart
│ ├── appText.dart
│ ├── bannersItems.dart
│ └── listItems.dart
├── main.dart
└── helper
│ ├── theme.dart
│ └── helper.dart
├── .gitignore
├── test
└── widget_test.dart
├── README.md
└── pubspec.yaml
/assets/image/Color.txt:
--------------------------------------------------------------------------------
1 | 53B175
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/appImage/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/1.png
--------------------------------------------------------------------------------
/appImage/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/10.png
--------------------------------------------------------------------------------
/appImage/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/11.png
--------------------------------------------------------------------------------
/appImage/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/2.png
--------------------------------------------------------------------------------
/appImage/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/3.png
--------------------------------------------------------------------------------
/appImage/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/4.png
--------------------------------------------------------------------------------
/appImage/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/5.png
--------------------------------------------------------------------------------
/appImage/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/6.png
--------------------------------------------------------------------------------
/appImage/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/7.png
--------------------------------------------------------------------------------
/appImage/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/8.png
--------------------------------------------------------------------------------
/appImage/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/appImage/9.png
--------------------------------------------------------------------------------
/assets/image/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/icon.png
--------------------------------------------------------------------------------
/assets/image/map_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/map_pin.png
--------------------------------------------------------------------------------
/assets/image/welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/welcome.png
--------------------------------------------------------------------------------
/assets/fonts/Gilroy-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/fonts/Gilroy-Bold.ttf
--------------------------------------------------------------------------------
/assets/image/icon_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/icon_color.png
--------------------------------------------------------------------------------
/assets/image/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/splash_logo.png
--------------------------------------------------------------------------------
/assets/fonts/Gilroy-Heavy.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/fonts/Gilroy-Heavy.ttf
--------------------------------------------------------------------------------
/assets/fonts/Gilroy-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/fonts/Gilroy-Light.ttf
--------------------------------------------------------------------------------
/assets/fonts/Gilroy-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/fonts/Gilroy-Medium.ttf
--------------------------------------------------------------------------------
/assets/fonts/Gilroy-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/fonts/Gilroy-Regular.ttf
--------------------------------------------------------------------------------
/assets/image/header_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/assets/image/header_image.png
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #53b175
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/drawable-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/drawable-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/drawable-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/drawable-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/drawable-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/girish54321/Flutter-Online-Grocery-Store/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/girish54321/Flutter-Online-Grocery-Store/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/OnlineGroceryStore/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.OnlineGroceryStore
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | import android.os.Build
6 | import android.view.ViewTreeObserver
7 | import android.view.WindowManager
8 | class MainActivity: FlutterActivity() {
9 | }
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.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: 78910062997c3a836feee883712c241a5fd22983
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/screen/orderSuccess/orderSuccessScreenUi.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/orderPlacedDialog.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class OrderSuccessScreenUi extends StatelessWidget {
5 | const OrderSuccessScreenUi({Key key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Container(
10 | child: OrderPlacedDialog(),
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/widget/appIcon.dart:
--------------------------------------------------------------------------------
1 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class RightIcon extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | return Icon(EvaIcons.checkmark, color: Theme.of(context).accentColor);
8 | }
9 | }
10 |
11 | class WorngIcon extends StatelessWidget {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Icon(EvaIcons.close, color: Colors.red);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/lib/screen/profileScreen/profileScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/screen/profileScreen/profileScreenUi.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ProfileScreen extends StatefulWidget {
5 | ProfileScreen({Key key}) : super(key: key);
6 |
7 | @override
8 | _ProfileScreenState createState() => _ProfileScreenState();
9 | }
10 |
11 | class _ProfileScreenState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return ProfileScreenUi();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/widget/dismissKeyBoardView.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/helper/helper.dart';
3 |
4 | class DismissKeyBoardView extends StatelessWidget {
5 | final Widget child;
6 | const DismissKeyBoardView({Key key, @required this.child}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return GestureDetector(
11 | onTap: () {
12 | Helper().dismissKeyBoard(context);
13 | },
14 | child: child,
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/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 | var flutter_native_splash = 1
11 | UIApplication.shared.isStatusBarHidden = false
12 |
13 | GeneratedPluginRegistrant.register(with: self)
14 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
15 | }
16 | }
--------------------------------------------------------------------------------
/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/screen/orderSuccess/orderSuccessScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/screen/orderSuccess/orderSuccessScreenUi.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class OrderSuccessScreen extends StatefulWidget {
5 | OrderSuccessScreen({Key key}) : super(key: key);
6 |
7 | @override
8 | _OrderSuccessScreenState createState() => _OrderSuccessScreenState();
9 | }
10 |
11 | class _OrderSuccessScreenState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return OrderSuccessScreenUi();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/widget/blurHeaderImage.dart:
--------------------------------------------------------------------------------
1 | import 'package:blur/blur.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class BlurHeaderImage extends StatelessWidget {
5 | const BlurHeaderImage({Key key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Blur(
10 | blur: 14,
11 | blurColor: Colors.white,
12 | child: Container(
13 | width: double.infinity,
14 | child: Image.asset(
15 | "assets/image/header_image.png",
16 | fit: BoxFit.fitWidth,
17 | )),
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 | -
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/.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 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
--------------------------------------------------------------------------------
/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/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/theme.dart';
2 | import 'package:OnlineGroceryStore/screen/welcomeScreen/welcomeScreen.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:provider/provider.dart';
5 | import 'screen/welcomeScreen/welcomeScreen.dart';
6 |
7 | void main() {
8 | runApp(MyApp());
9 | }
10 |
11 | class MyApp extends StatelessWidget {
12 | @override
13 | Widget build(BuildContext context) {
14 | return MultiProvider(
15 | providers: [
16 | ChangeNotifierProvider(
17 | create: (context) => ThemeNotifier()),
18 | ],
19 | child: Consumer(
20 | builder: (context, ThemeNotifier notifier, child) {
21 | return MaterialApp(
22 | theme: light,
23 | title: 'Online Grocery Store',
24 | home: WelcomeScreen());
25 | },
26 | ),
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/screen/auth/phoneNumber/getStarted.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/phoneNumber/getStartedScreenUI.dart';
3 | import 'package:OnlineGroceryStore/screen/auth/login/loginScreen.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
6 |
7 | class GetStartedScreen extends StatefulWidget {
8 | GetStartedScreen({Key key}) : super(key: key);
9 |
10 | @override
11 | _PhoneNumberScreenState createState() => _PhoneNumberScreenState();
12 | }
13 |
14 | class _PhoneNumberScreenState extends State {
15 | void goToLoginScreen() {
16 | Helper().goToPage(context, LoginScreen());
17 | }
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return DismissKeyBoardView(
22 | child: GetStartedScreenUI(goToLoginScreen: goToLoginScreen),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/widget/appIndicator.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:dots_indicator/dots_indicator.dart' as DotsIndicator;
3 |
4 | class AppIndicator extends StatelessWidget {
5 | final int conut;
6 | final int index;
7 |
8 | const AppIndicator({Key key, @required this.conut, @required this.index})
9 | : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return DotsIndicator.DotsIndicator(
14 | dotsCount: conut,
15 | position: index.toDouble(),
16 | decorator: DotsIndicator.DotsDecorator(
17 | size: const Size.square(6.0),
18 | spacing: EdgeInsets.only(right: 5),
19 | color: Colors.grey,
20 | activeSize: const Size(19.0, 6.0),
21 | activeColor: Theme.of(context).accentColor,
22 | activeShape:
23 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
24 | ),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/screen/productDetail/widget/productSelaction.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/widget/productAction.dart';
3 |
4 | class ProductSelction extends StatefulWidget {
5 | const ProductSelction({
6 | Key key,
7 | }) : super(key: key);
8 | @override
9 | _ProductSelctionState createState() => _ProductSelctionState();
10 | }
11 |
12 | class _ProductSelctionState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Column(
16 | mainAxisAlignment: MainAxisAlignment.start,
17 | crossAxisAlignment: CrossAxisAlignment.start,
18 | children: [
19 | SizedBox(
20 | height: 4,
21 | ),
22 | ProductAction(
23 | addFunction: () {},
24 | removeFunction: () {},
25 | ),
26 | SizedBox(
27 | height: 8,
28 | ),
29 | Divider(),
30 | ],
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
20 |
--------------------------------------------------------------------------------
/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:OnlineGroceryStore/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/screen/cartScreen/cartScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/widget/listItems.dart';
3 |
4 | class CartScreen extends StatefulWidget {
5 | CartScreen({Key key}) : super(key: key);
6 |
7 | @override
8 | _CartScreenState createState() => _CartScreenState();
9 | }
10 |
11 | class _CartScreenState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | body: CustomScrollView(
16 | physics: const BouncingScrollPhysics(),
17 | slivers: [
18 | SliverAppBar(
19 | centerTitle: true,
20 | floating: false,
21 | pinned: true,
22 | title: Text("My Cart"),
23 | ),
24 | SliverList(
25 | delegate:
26 | SliverChildBuilderDelegate((BuildContext context, int index) {
27 | return CartListItem();
28 | }, childCount: 12),
29 | ),
30 | SliverToBoxAdapter(
31 | child: SizedBox(
32 | height: 78,
33 | ),
34 | )
35 | ]),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/screen/productByCategory/productByCategoryScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/screen/productByCategory/productByCategoryUI.dart';
3 |
4 | class ProductByCategoryScreen extends StatefulWidget {
5 | final bool search;
6 | final String serachText;
7 | ProductByCategoryScreen(
8 | {Key key, @required this.search, @required this.serachText})
9 | : super(key: key);
10 |
11 | @override
12 | _ProductByCategoryScreenState createState() =>
13 | _ProductByCategoryScreenState();
14 | }
15 |
16 | class _ProductByCategoryScreenState extends State {
17 | TextEditingController searchTextController = TextEditingController();
18 |
19 | @override
20 | void initState() {
21 | if (widget.search == true) {
22 | String text = widget.serachText;
23 | print(widget.serachText);
24 | searchTextController.text = text;
25 | }
26 | super.initState();
27 | }
28 |
29 | @override
30 | void dispose() {
31 | searchTextController.dispose();
32 | super.dispose();
33 | }
34 |
35 | @override
36 | Widget build(BuildContext context) {
37 | return ProductByCategoryUI(
38 | searchTextController: searchTextController,
39 | search: widget.search,
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/widget/appDialogs.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | enum DialogAction { yes, abort }
4 |
5 | class AppDialogs {
6 | static Future yesAbortDialog(
7 | BuildContext context,
8 | String heading,
9 | String title,
10 | String message,
11 | bool error,
12 | ) async {
13 | final action = await showDialog(
14 | context: context,
15 | barrierDismissible: false,
16 | builder: (BuildContext context) {
17 | return AlertDialog(
18 | title: Text(heading,
19 | style: TextStyle(color: error ? Colors.orange : null)),
20 | content: SingleChildScrollView(
21 | child: ListBody(
22 | children: [
23 | Text(
24 | title,
25 | ),
26 | SizedBox(
27 | height: 4,
28 | ),
29 | Text(message),
30 | ],
31 | ),
32 | ),
33 | actions: [
34 | TextButton(
35 | child: Text('OK'),
36 | onPressed: () {
37 | Navigator.of(context).pop();
38 | },
39 | ),
40 | ],
41 | );
42 | },
43 | );
44 | return (action != null) ? action : DialogAction.abort;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/screen/home/homeHeder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
3 | import 'package:OnlineGroceryStore/widget/appText.dart';
4 |
5 | class HomeHeaderImage extends StatelessWidget {
6 | const HomeHeaderImage({Key key}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Center(
11 | child: Container(
12 | height: 44,
13 | margin: EdgeInsets.only(top: 12, bottom: 8),
14 | decoration: BoxDecoration(
15 | image: DecorationImage(
16 | image: AssetImage('assets/image/icon_color.png'),
17 | fit: BoxFit.fitHeight)),
18 | ),
19 | );
20 | }
21 | }
22 |
23 | class UserAddressView extends StatelessWidget {
24 | final String address;
25 | const UserAddressView({Key key, this.address}) : super(key: key);
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Row(
30 | mainAxisAlignment: MainAxisAlignment.center,
31 | children: [
32 | Icon(
33 | EvaIcons.pin,
34 | color: Colors.grey,
35 | size: 28,
36 | ),
37 | AppTextP1(
38 | textAlign: TextAlign.center,
39 | text: address,
40 | fontWeight: FontWeight.normal,
41 | ),
42 | ],
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/widget/searchBox.dart:
--------------------------------------------------------------------------------
1 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class SearchBox extends StatelessWidget {
5 | final double height;
6 | final double radius;
7 | final TextEditingController textEditingController;
8 | final Function function;
9 | const SearchBox(
10 | {Key key,
11 | this.height,
12 | this.radius,
13 | @required this.function,
14 | this.textEditingController})
15 | : super(key: key);
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Container(
20 | height: height == null ? 37 : height,
21 | padding: EdgeInsets.only(left: 18),
22 | decoration: BoxDecoration(
23 | color: Color(0xFFefefef),
24 | borderRadius:
25 | BorderRadius.circular(radius != null ? radius : 24.7)),
26 | child: Center(
27 | child: TextFormField(
28 | controller: textEditingController,
29 | onFieldSubmitted: (string) {
30 | function(string);
31 | },
32 | decoration: InputDecoration(
33 | icon: Icon(EvaIcons.search, color: Colors.black),
34 | border: InputBorder.none,
35 | hintText: 'Search Store',
36 | hintStyle: TextStyle(color: Colors.grey)),
37 | ),
38 | ));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/lib/screen/auth/phoneNumber/socialMediaButton.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/buttons.dart';
2 | import 'package:animate_do/animate_do.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class SocialMediaButton extends StatelessWidget {
6 | final String text;
7 | final Widget icon;
8 | final Color color;
9 | final Function function;
10 | const SocialMediaButton(
11 | {Key key,
12 | @required this.text,
13 | @required this.icon,
14 | @required this.color,
15 | @required this.function})
16 | : super(key: key);
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return FadeInUp(
21 | duration: Duration(seconds: 1),
22 | child: AppButton(
23 | color: color,
24 | function: function,
25 | child: Stack(
26 | children: [
27 | Center(
28 | child: Text(
29 | text,
30 | style: TextStyle(
31 | fontSize: 16,
32 | color: Colors.white,
33 | fontWeight: FontWeight.bold),
34 | ),
35 | ),
36 | Row(
37 | children: [
38 | SizedBox(
39 | width: 14,
40 | ),
41 | Center(
42 | child: icon,
43 | ),
44 | ],
45 | ),
46 | ],
47 | ),
48 | ),
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/screen/findProductScreen/findProductScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/screen/findProductScreen/findProductUI.dart';
3 | import 'package:OnlineGroceryStore/screen/productByCategory/productByCategoryScreen.dart';
4 | import 'package:OnlineGroceryStore/helper/helper.dart';
5 |
6 | class FindProductScreen extends StatefulWidget {
7 | FindProductScreen({Key key}) : super(key: key);
8 |
9 | @override
10 | _FindProductScreenState createState() => _FindProductScreenState();
11 | }
12 |
13 | class _FindProductScreenState extends State {
14 | TextEditingController searchTextController = TextEditingController();
15 | void goToProductList(bool search) {
16 | Helper().goToPage(
17 | context,
18 | ProductByCategoryScreen(
19 | serachText: null,
20 | search: search,
21 | ));
22 | }
23 |
24 | void onSearch(
25 | String searchText,
26 | ) {
27 | Helper().goToPage(
28 | context,
29 | ProductByCategoryScreen(
30 | serachText: searchText,
31 | search: true,
32 | ));
33 | }
34 |
35 | @override
36 | void dispose() {
37 | searchTextController.dispose();
38 | super.dispose();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return FindProductUI(
44 | goToProductList: goToProductList,
45 | onSearch: onSearch,
46 | searchTextController: searchTextController);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/widget/seeAllTitle.dart:
--------------------------------------------------------------------------------
1 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class SeeAppTitle extends StatelessWidget {
5 | final String title;
6 | final Function function;
7 | const SeeAppTitle({Key key, @required this.title, @required this.function})
8 | : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | margin: EdgeInsets.only(top: 26, left: 16, right: 16, bottom: 26),
14 | child: Row(
15 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
16 | children: [
17 | Text(
18 | title,
19 | style: TextStyle(
20 | fontWeight: FontWeight.w500,
21 | fontSize: 24,
22 | ),
23 | ),
24 | InkWell(
25 | onTap: function,
26 | child: Row(
27 | children: [
28 | Padding(
29 | padding: const EdgeInsets.all(8.0),
30 | child: Text(
31 | "See all",
32 | textAlign: TextAlign.right,
33 | style: TextStyle(
34 | fontSize: 17, color: Theme.of(context).accentColor),
35 | ),
36 | ),
37 | Icon(EvaIcons.arrowIosForward,
38 | color: Theme.of(context).accentColor),
39 | ],
40 | ),
41 | ),
42 | ],
43 | ),
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/screen/auth/numberAuth/enterNumber/enterNumberScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/numberAuth/otpScreen/otpScreen.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:OnlineGroceryStore/screen/auth/numberAuth/enterNumber/enterNumberUI.dart';
5 |
6 | class EnterPhoneNumber extends StatefulWidget {
7 | EnterPhoneNumber({Key key}) : super(key: key);
8 |
9 | @override
10 | _EnterPhoneNumberState createState() => _EnterPhoneNumberState();
11 | }
12 |
13 | class _EnterPhoneNumberState extends State {
14 | TextEditingController numberTextEditingController;
15 | final _formKey = GlobalKey();
16 | FocusNode mobileNumFocusNode;
17 |
18 | void goToOtpScreen() {
19 | Helper().goToPage(context, OtpScreen());
20 | }
21 |
22 | void sendOtp() {
23 | if (_formKey.currentState.validate()) {
24 | Helper().dismissKeyBoard(context);
25 | goToOtpScreen();
26 | } else {
27 | Helper().vibratPhone();
28 | }
29 | }
30 |
31 | @override
32 | void initState() {
33 | mobileNumFocusNode = FocusNode();
34 | mobileNumFocusNode.requestFocus();
35 | super.initState();
36 | }
37 |
38 | @override
39 | void dispose() {
40 | numberTextEditingController.dispose();
41 | mobileNumFocusNode.dispose();
42 | super.dispose();
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return EnterNumberUI(
48 | formKey: _formKey,
49 | numberTextEditingController: numberTextEditingController,
50 | sendOtp: sendOtp,
51 | mobileNumFocusNode: mobileNumFocusNode,
52 | );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/widget/appNetworkImage.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class AppNetWorkIamge extends StatelessWidget {
5 | final String imageUrl;
6 | final double radius;
7 | final BoxFit boxFit;
8 | const AppNetWorkIamge({Key key, this.imageUrl, this.radius, this.boxFit})
9 | : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return CachedNetworkImage(
14 | imageUrl: imageUrl != null
15 | ? imageUrl
16 | : "https://target.scene7.com/is/image/Target//GUEST_6bdfe36e-d26d-4cee-918e-39cb9c377d44",
17 | imageBuilder: (context, imageProvider) => Container(
18 | decoration: BoxDecoration(
19 | borderRadius: BorderRadius.circular(radius != null ? radius : 4),
20 | image: DecorationImage(
21 | image: imageProvider,
22 | fit: boxFit != null ? boxFit : BoxFit.cover,
23 | ),
24 | ),
25 | ),
26 | placeholder: (context, url) => AppPlaceholder(),
27 | errorWidget: (context, url, error) => Icon(Icons.error),
28 | );
29 | // return AppPlaceholder();
30 | }
31 | }
32 |
33 | class AppPlaceholder extends StatelessWidget {
34 | @override
35 | Widget build(BuildContext context) {
36 | return Container(
37 | width: double.infinity,
38 | height: double.infinity,
39 | child: Center(
40 | child: Container(
41 | height: 50,
42 | decoration: BoxDecoration(
43 | image: DecorationImage(
44 | image: AssetImage('assets/image/icon_color.png'),
45 | fit: BoxFit.fitHeight)),
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/widget/appInputText.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class InputText extends StatefulWidget {
4 | final String hint;
5 | final Widget rightIcon;
6 | final Widget leftIcon;
7 | final TextEditingController textEditingController;
8 | final bool password;
9 | final Function changeFous;
10 | final FocusNode focusNode;
11 | final TextInputType textInputType;
12 | final String errorText;
13 | final Function onChnaged;
14 | final FormFieldValidator validator;
15 |
16 | const InputText(
17 | {Key key,
18 | this.hint,
19 | this.rightIcon,
20 | this.leftIcon,
21 | this.textEditingController,
22 | this.password,
23 | this.changeFous,
24 | this.focusNode,
25 | this.textInputType,
26 | this.errorText,
27 | this.onChnaged,
28 | this.validator});
29 |
30 | @override
31 | _InputTextState createState() => _InputTextState();
32 | }
33 |
34 | class _InputTextState extends State {
35 | @override
36 | Widget build(BuildContext context) {
37 | return Container(
38 | padding: EdgeInsets.only(bottom: 18, top: 9),
39 | decoration: BoxDecoration(),
40 | child: TextFormField(
41 | keyboardType: widget.textInputType,
42 | focusNode: widget.focusNode,
43 | onChanged: widget.onChnaged,
44 | onFieldSubmitted: widget.changeFous,
45 | obscureText: widget.password,
46 | controller: widget.textEditingController,
47 | validator: widget.validator,
48 | decoration: InputDecoration(
49 | labelText: widget.hint,
50 | errorText: widget.errorText,
51 | prefixIcon: widget.leftIcon,
52 | suffixIcon: widget.rightIcon,
53 | hintText: widget.hint,
54 | hintStyle: TextStyle(color: Colors.grey[400])),
55 | ),
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/screen/profileScreen/profileScreenUi.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluentui_system_icons/fluentui_system_icons.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ProfileScreenUi extends StatelessWidget {
5 | const ProfileScreenUi({Key key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Scaffold(
10 | body: SafeArea(
11 | child: CustomScrollView(
12 | slivers: [
13 | SliverToBoxAdapter(
14 | child: ListTile(
15 | leading: CircleAvatar(
16 | backgroundColor: Colors.grey,
17 | radius: 36,
18 | ),
19 | title: Text("User Name"),
20 | subtitle: Text("user@gmail.com"),
21 | ),
22 | ),
23 | SliverList(
24 | delegate:
25 | SliverChildBuilderDelegate((BuildContext context, int index) {
26 | return Column(
27 | children: [
28 | ListTile(
29 | onLongPress: () {},
30 | leading: Container(
31 | width: 60,
32 | alignment: Alignment.center,
33 | child: Icon(
34 | FluentIcons.building_shop_24_regular,
35 | color: Colors.black,
36 | )),
37 | trailing: IconButton(
38 | icon: Icon(
39 | Icons.arrow_right,
40 | color: Colors.black,
41 | ),
42 | onPressed: () {},
43 | ),
44 | title: Text("User Name"),
45 | subtitle: Text("user@gmail.com"),
46 | ),
47 | Divider(height: 1)
48 | ],
49 | );
50 | }, childCount: 8),
51 | )
52 | ],
53 | )),
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/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 | OnlineGroceryStore
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 | NSLocationWhenInUseUsageDescription
45 | This app needs access to location when open.
46 | NSLocationAlwaysUsageDescription
47 | This app needs access to location when in the background.
48 | UIStatusBarHidden
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 29
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.OnlineGroceryStore"
42 | minSdkVersion 16
43 | targetSdkVersion 29
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/lib/screen/productDetail/widget/productImage.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/appNetworkImage.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:carousel_pro/carousel_pro.dart';
4 | import 'package:OnlineGroceryStore/widget/appIndicator.dart';
5 |
6 | class ProductImage extends StatefulWidget {
7 | final List images;
8 | final Function goToImageView;
9 | final double size;
10 |
11 | const ProductImage({Key key, this.images, this.goToImageView, this.size})
12 | : super(key: key);
13 |
14 | @override
15 | _ProductImageState createState() => _ProductImageState();
16 | }
17 |
18 | class _ProductImageState extends State {
19 | int bannerIndex = 0;
20 | @override
21 | Widget build(BuildContext context) {
22 | return Stack(
23 | children: [
24 | Container(
25 | height: double.infinity,
26 | width: double.infinity,
27 | child: Carousel(
28 | animationCurve: Curves.linear,
29 | autoplay: false,
30 | showIndicator: false,
31 | onImageChange: (int _currentImageIndex, int currentPage) {
32 | setState(() {
33 | bannerIndex = currentPage;
34 | });
35 | },
36 | images: [
37 | ...widget.images.asMap().entries.map((MapEntry map) {
38 | return InkWell(
39 | onTap: () {
40 | widget.goToImageView(widget.images);
41 | },
42 | child: Container(
43 | height: widget.size,
44 | color: Theme.of(context).scaffoldBackgroundColor,
45 | child: AppNetWorkIamge(
46 | imageUrl: widget.images[map.key],
47 | boxFit: BoxFit.contain),
48 | ),
49 | );
50 | }).toList(),
51 | ],
52 | )),
53 | Positioned(
54 | right: 12,
55 | bottom: 22,
56 | child: AppIndicator(
57 | index: bannerIndex,
58 | conut: 3,
59 | ),
60 | ),
61 | ],
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/widget/userProfilePic.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/appNetworkImage.dart';
2 | import 'package:cached_network_image/cached_network_image.dart';
3 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class UserProfilePic extends StatelessWidget {
7 | final bool isCheckOut;
8 |
9 | const UserProfilePic({Key key, this.isCheckOut}) : super(key: key);
10 | @override
11 | Widget build(BuildContext context) {
12 | return Stack(
13 | children: [
14 | CachedNetworkImage(
15 | fadeInCurve: Curves.elasticIn,
16 | imageUrl:
17 | "https://pbs.twimg.com/profile_images/563676176472743936/um4-Vko8.png",
18 | imageBuilder: (context, imageProvider) => Container(
19 | height: 130,
20 | width: 130,
21 | decoration: BoxDecoration(
22 | boxShadow: [
23 | BoxShadow(
24 | color: Colors.grey,
25 | blurRadius: 6.0,
26 | ),
27 | ],
28 | shape: BoxShape.circle,
29 | image: DecorationImage(
30 | image: imageProvider,
31 | fit: BoxFit.cover,
32 | ),
33 | ),
34 | ),
35 | placeholder: (context, url) => Container(
36 | height: 130,
37 | width: 130,
38 | child: AppPlaceholder(),
39 | decoration: BoxDecoration(
40 | color: Theme.of(context).accentColor,
41 | boxShadow: [
42 | BoxShadow(
43 | color: Colors.grey,
44 | blurRadius: 6.0,
45 | ),
46 | ],
47 | shape: BoxShape.circle,
48 | ),
49 | ),
50 | errorWidget: (context, url, error) => Icon(Icons.error),
51 | ),
52 | Positioned(
53 | bottom: 8,
54 | right: 1,
55 | child: Container(
56 | height: 31,
57 | width: 31,
58 | decoration:
59 | BoxDecoration(color: Colors.green, shape: BoxShape.circle),
60 | child: Center(
61 | child:
62 | Icon(EvaIcons.checkmark, size: 32, color: Colors.white))),
63 | )
64 | ],
65 | );
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/lib/screen/auth/login/loginScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:OnlineGroceryStore/screen/auth/login/loginUI.dart';
4 | import 'package:OnlineGroceryStore/screen/auth/signUp/signUpScreen.dart';
5 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
6 |
7 | class LoginScreen extends StatefulWidget {
8 | LoginScreen({Key key}) : super(key: key);
9 |
10 | @override
11 | _LoginScreenState createState() => _LoginScreenState();
12 | }
13 |
14 | class _LoginScreenState extends State {
15 | final _formKey = GlobalKey();
16 |
17 | final emailController = TextEditingController();
18 | final passwordController = TextEditingController();
19 |
20 | bool validEmail = false, validPassword = false, remamberme = true;
21 |
22 | void goBack(context) {
23 | Helper().goBack(context);
24 | }
25 |
26 | void changeVaildEmail(bool value) {
27 | setState(() {
28 | validEmail = value;
29 | });
30 | }
31 |
32 | void changevalidPassword(bool value) {
33 | setState(() {
34 | validPassword = value;
35 | });
36 | }
37 |
38 | void changeRemamberme(bool value) {
39 | setState(() {
40 | remamberme = value;
41 | });
42 | }
43 |
44 | void loginUser() {
45 | if (_formKey.currentState.validate()) {
46 | Helper().dismissKeyBoard(context);
47 | } else {
48 | Helper().vibratPhone();
49 | }
50 | }
51 |
52 | void createAccount() {
53 | Helper().dismissKeyBoard(context);
54 | Helper().goToPage(context, SignUpScreen());
55 | }
56 |
57 | @override
58 | void dispose() {
59 | emailController.dispose();
60 | passwordController.dispose();
61 | super.dispose();
62 | }
63 |
64 | @override
65 | Widget build(BuildContext context) {
66 | return DismissKeyBoardView(
67 | child: LoginScreenUI(
68 | emailController: emailController,
69 | passwordController: passwordController,
70 | validEmail: validEmail,
71 | validPassword: validPassword,
72 | changeVaildEmail: changeVaildEmail,
73 | changevalidPassword: changevalidPassword,
74 | changeRemamberme: changeRemamberme,
75 | remamberme: remamberme,
76 | formKey: _formKey,
77 | createAccount: createAccount,
78 | loginUser: loginUser),
79 | );
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/screen/auth/signUp/signUpScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/numberAuth/enterNumber/enterNumberScreen.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:OnlineGroceryStore/screen/auth/signUp/signUpUI.dart';
5 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
6 |
7 | class SignUpScreen extends StatefulWidget {
8 | SignUpScreen({Key key}) : super(key: key);
9 |
10 | @override
11 | _LoginScreenState createState() => _LoginScreenState();
12 | }
13 |
14 | class _LoginScreenState extends State {
15 | final _formKey = GlobalKey();
16 | final useraNameController = TextEditingController();
17 | final emailController = TextEditingController();
18 | final passwordController = TextEditingController();
19 |
20 | bool validEmail = false, validPassword = false, validUserName = false;
21 |
22 | void goBack(context) {
23 | Helper().goBack(context);
24 | }
25 |
26 | void changeVaildEmail(bool value) {
27 | setState(() {
28 | validEmail = value;
29 | });
30 | }
31 |
32 | void changevalidPassword(bool value) {
33 | setState(() {
34 | validPassword = value;
35 | });
36 | }
37 |
38 | void changevalidUserName(bool value) {
39 | setState(() {
40 | validUserName = value;
41 | });
42 | }
43 |
44 | void signUp() {
45 | goToNumberScreen();
46 | if (_formKey.currentState.validate()) {
47 | goToNumberScreen();
48 | } else {
49 | Helper().vibratPhone();
50 | }
51 | }
52 |
53 | void goToNumberScreen() {
54 | Helper().goToPage(context, EnterPhoneNumber());
55 | }
56 |
57 | @override
58 | void dispose() {
59 | emailController.dispose();
60 | passwordController.dispose();
61 | useraNameController.clear();
62 | super.dispose();
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 | return DismissKeyBoardView(
68 | child: SignUpUI(
69 | emailController: emailController,
70 | passwordController: passwordController,
71 | validEmail: validEmail,
72 | validPassword: validPassword,
73 | changeVaildEmail: changeVaildEmail,
74 | changevalidPassword: changevalidPassword,
75 | formKey: _formKey,
76 | goToNumberScreen: goToNumberScreen,
77 | signUp: signUp,
78 | changevalidUserName: changevalidUserName,
79 | useraNameController: useraNameController,
80 | validUserName: validUserName,
81 | ),
82 | );
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/lib/widget/productAction.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:floating_action_row/floating_action_row.dart';
3 |
4 | class ProductAction extends StatelessWidget {
5 | final Function addFunction;
6 | final Function removeFunction;
7 | const ProductAction(
8 | {Key key, @required this.addFunction, @required this.removeFunction})
9 | : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Row(
14 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
15 | crossAxisAlignment: CrossAxisAlignment.start,
16 | children: [
17 | Container(
18 | child: FloatingActionRow(
19 | elevation: 0,
20 | height: 46,
21 | borderRadius: BorderRadius.all(Radius.circular(12)),
22 | color: Theme.of(context).scaffoldBackgroundColor,
23 | children: [
24 | FloatingActionRowButton(
25 | size: 55,
26 | icon: Icon(
27 | Icons.remove,
28 | color: Colors.black,
29 | ),
30 | onTap: removeFunction,
31 | ),
32 | Container(
33 | width: 46,
34 | padding: EdgeInsets.only(top: 4, bottom: 4),
35 | decoration: BoxDecoration(
36 | borderRadius: BorderRadius.all(Radius.circular(14.0)),
37 | border: Border.all(
38 | color: Theme.of(context).accentColor,
39 | width: 1.0,
40 | ),
41 | ),
42 | child: Center(
43 | child: Text(
44 | "1",
45 | textAlign: TextAlign.center,
46 | style: TextStyle(
47 | fontSize: 18,
48 | ),
49 | ),
50 | ),
51 | ),
52 | FloatingActionRowButton(
53 | size: 55,
54 | icon: Icon(
55 | Icons.add,
56 | color: Theme.of(context).accentColor,
57 | ),
58 | onTap: addFunction,
59 | ),
60 | ],
61 | ),
62 | ),
63 | Padding(
64 | padding: const EdgeInsets.only(right: 16),
65 | child: Text(
66 | "49.99",
67 | style: TextStyle(
68 | fontWeight: FontWeight.w700,
69 | fontSize: 26,
70 | ),
71 | ),
72 | ),
73 | ],
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/widget/buttons.dart:
--------------------------------------------------------------------------------
1 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class AppButton extends StatelessWidget {
5 | final Widget child;
6 | final Color color;
7 | final Function function;
8 |
9 | const AppButton({Key key, this.color, this.child, @required this.function})
10 | : super(key: key);
11 | @override
12 | Widget build(BuildContext context) {
13 | return RaisedButton(
14 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
15 | onPressed: function,
16 | color: color,
17 | textColor: Colors.black,
18 | child: Container(
19 | height: 55,
20 | child: child,
21 | ),
22 | );
23 | }
24 | }
25 |
26 | class BlackButton extends StatelessWidget {
27 | final String buttonText;
28 | final Function function;
29 |
30 | const BlackButton(
31 | {Key key, @required this.buttonText, @required this.function})
32 | : super(key: key);
33 | @override
34 | Widget build(BuildContext context) {
35 | return RaisedButton(
36 | shape: RoundedRectangleBorder(
37 | borderRadius: BorderRadius.circular(10.0),
38 | ),
39 | onPressed: function,
40 | color: Theme.of(context).accentColor,
41 | textColor: Colors.white,
42 | child: Container(
43 | height: 55,
44 | child: Center(
45 | child: Text(
46 | buttonText,
47 | style: TextStyle(
48 | fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold),
49 | ),
50 | ),
51 | ),
52 | );
53 | }
54 | }
55 |
56 | class GoBackButton extends StatelessWidget {
57 | final Color color;
58 | final Function function;
59 | final double marginTop;
60 |
61 | const GoBackButton(
62 | {Key key, this.color, @required this.function, this.marginTop})
63 | : super(key: key);
64 | @override
65 | Widget build(BuildContext context) {
66 | return Container(
67 | margin:
68 | EdgeInsets.only(right: 10, top: marginTop != null ? marginTop : 42),
69 | height: 33,
70 | width: 106,
71 | child: FlatButton(
72 | onPressed: function,
73 | color: Colors.transparent,
74 | child: Row(
75 | children: [
76 | Icon(EvaIcons.arrowIosBack, color: color),
77 | Container(
78 | margin: EdgeInsets.only(top: 4),
79 | child: Text(
80 | "BACK",
81 | style: TextStyle(fontSize: 18, color: color),
82 | ),
83 | ),
84 | ],
85 | ),
86 | ),
87 | );
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/lib/helper/theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shared_preferences/shared_preferences.dart';
3 | import 'dart:math';
4 |
5 | MaterialColor generateMaterialColor(Color color) {
6 | return MaterialColor(color.value, {
7 | 50: tintColor(color, 0.9),
8 | 100: tintColor(color, 0.8),
9 | 200: tintColor(color, 0.6),
10 | 300: tintColor(color, 0.4),
11 | 400: tintColor(color, 0.2),
12 | 500: color,
13 | 600: shadeColor(color, 0.1),
14 | 700: shadeColor(color, 0.2),
15 | 800: shadeColor(color, 0.3),
16 | 900: shadeColor(color, 0.4),
17 | });
18 | }
19 |
20 | int tintValue(int value, double factor) =>
21 | max(0, min((value + ((255 - value) * factor)).round(), 255));
22 |
23 | Color tintColor(Color color, double factor) => Color.fromRGBO(
24 | tintValue(color.red, factor),
25 | tintValue(color.green, factor),
26 | tintValue(color.blue, factor),
27 | 1);
28 |
29 | int shadeValue(int value, double factor) =>
30 | max(0, min(value - (value * factor).round(), 255));
31 |
32 | Color shadeColor(Color color, double factor) => Color.fromRGBO(
33 | shadeValue(color.red, factor),
34 | shadeValue(color.green, factor),
35 | shadeValue(color.blue, factor),
36 | 1);
37 |
38 | class Palette {
39 | static const Color primary = Color(0xFF53b175);
40 | }
41 |
42 | class Palette2 {
43 | static const Color primary = Color(0xFFFF2D55);
44 | }
45 |
46 | ThemeData light = ThemeData(
47 | brightness: Brightness.light,
48 | appBarTheme: AppBarTheme(color: Colors.white),
49 | primarySwatch: generateMaterialColor(Palette.primary),
50 | scaffoldBackgroundColor: Colors.white,
51 | fontFamily: 'Gilroy');
52 |
53 | ThemeData dark = ThemeData(
54 | brightness: Brightness.dark,
55 | appBarTheme: AppBarTheme(color: Colors.white),
56 | primaryColor: Colors.green,
57 | accentColor: Colors.green,
58 | // primarySwatch: generateMaterialColor(Palette.primary),
59 | fontFamily: 'Gilroy');
60 |
61 | class ThemeNotifier extends ChangeNotifier {
62 | final String key = "theme";
63 | SharedPreferences _prefs;
64 | bool _darkTheme;
65 |
66 | bool get darkTheme => _darkTheme;
67 |
68 | ThemeNotifier() {
69 | _darkTheme = false;
70 | _loadFromPrefs();
71 | }
72 |
73 | toggleTheme() {
74 | _darkTheme = !_darkTheme;
75 | _saveToPrefs();
76 | notifyListeners();
77 | }
78 |
79 | _initPrefs() async {
80 | if (_prefs == null) _prefs = await SharedPreferences.getInstance();
81 | }
82 |
83 | _loadFromPrefs() async {
84 | await _initPrefs();
85 | _darkTheme = _prefs.getBool(key) ?? false;
86 | notifyListeners();
87 | }
88 |
89 | _saveToPrefs() async {
90 | await _initPrefs();
91 | _prefs.setBool(key, _darkTheme);
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - fluttertoast (0.0.2):
4 | - Flutter
5 | - Toast
6 | - FMDB (2.7.5):
7 | - FMDB/standard (= 2.7.5)
8 | - FMDB/standard (2.7.5)
9 | - geocoding (1.0.5):
10 | - Flutter
11 | - geolocator (6.2.0):
12 | - Flutter
13 | - libphonenumber (0.0.1):
14 | - Flutter
15 | - libPhoneNumber-iOS
16 | - libPhoneNumber-iOS (0.9.15)
17 | - path_provider (0.0.1):
18 | - Flutter
19 | - shared_preferences (0.0.1):
20 | - Flutter
21 | - sqflite (0.0.2):
22 | - Flutter
23 | - FMDB (>= 2.7.5)
24 | - Toast (4.0.0)
25 | - url_launcher (0.0.1):
26 | - Flutter
27 | - vibration (1.7.3):
28 | - Flutter
29 |
30 | DEPENDENCIES:
31 | - Flutter (from `Flutter`)
32 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
33 | - geocoding (from `.symlinks/plugins/geocoding/ios`)
34 | - geolocator (from `.symlinks/plugins/geolocator/ios`)
35 | - libphonenumber (from `.symlinks/plugins/libphonenumber/ios`)
36 | - path_provider (from `.symlinks/plugins/path_provider/ios`)
37 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
38 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
39 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
40 | - vibration (from `.symlinks/plugins/vibration/ios`)
41 |
42 | SPEC REPOS:
43 | trunk:
44 | - FMDB
45 | - libPhoneNumber-iOS
46 | - Toast
47 |
48 | EXTERNAL SOURCES:
49 | Flutter:
50 | :path: Flutter
51 | fluttertoast:
52 | :path: ".symlinks/plugins/fluttertoast/ios"
53 | geocoding:
54 | :path: ".symlinks/plugins/geocoding/ios"
55 | geolocator:
56 | :path: ".symlinks/plugins/geolocator/ios"
57 | libphonenumber:
58 | :path: ".symlinks/plugins/libphonenumber/ios"
59 | path_provider:
60 | :path: ".symlinks/plugins/path_provider/ios"
61 | shared_preferences:
62 | :path: ".symlinks/plugins/shared_preferences/ios"
63 | sqflite:
64 | :path: ".symlinks/plugins/sqflite/ios"
65 | url_launcher:
66 | :path: ".symlinks/plugins/url_launcher/ios"
67 | vibration:
68 | :path: ".symlinks/plugins/vibration/ios"
69 |
70 | SPEC CHECKSUMS:
71 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
72 | fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58
73 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
74 | geocoding: 32cfcdb16d38d907caaba65e2e42ad10d38bee58
75 | geolocator: f5e3de65e241caba7ce3e8a618803387bda73384
76 | libphonenumber: bd14d5abfc5939ab0b0767234e2d8e2593af258e
77 | libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
78 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
79 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
80 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
81 | Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
82 | url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
83 | vibration: b5a33e764c3f609a975b9dca73dce20fdde627dc
84 |
85 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
86 |
87 | COCOAPODS: 1.10.1
88 |
--------------------------------------------------------------------------------
/lib/screen/findProductScreen/findProductUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:animate_do/animate_do.dart';
3 | import 'package:OnlineGroceryStore/widget/searchBox.dart';
4 | import 'package:OnlineGroceryStore/widget/listItems.dart';
5 |
6 | class FindProductUI extends StatelessWidget {
7 | final Function goToProductList;
8 | final Function onSearch;
9 | final TextEditingController searchTextController;
10 |
11 | const FindProductUI({
12 | Key key,
13 | this.goToProductList,
14 | this.onSearch,
15 | @required this.searchTextController,
16 | }) : super(key: key);
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | var size = MediaQuery.of(context).size;
21 | final double itemWidth = size.width / 2;
22 | return Scaffold(
23 | appBar: AppBar(
24 | elevation: 0,
25 | centerTitle: true,
26 | backgroundColor: Theme.of(context).scaffoldBackgroundColor,
27 | title: Text("Find Products"),
28 | ),
29 | body: Padding(
30 | padding: const EdgeInsets.symmetric(horizontal: 16.0),
31 | child: CustomScrollView(
32 | physics: const BouncingScrollPhysics(),
33 | slivers: [
34 | SliverToBoxAdapter(
35 | child: FadeInUp(
36 | duration: Duration(seconds: 1),
37 | child: Container(
38 | child: SearchBox(
39 | textEditingController: searchTextController,
40 | function: onSearch,
41 | radius: 8,
42 | height: 45.0,
43 | ),
44 | ),
45 | )),
46 | SliverGrid(
47 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
48 | crossAxisCount: 2,
49 | crossAxisSpacing: 18,
50 | childAspectRatio: (itemWidth / 200),
51 | ),
52 | delegate: SliverChildBuilderDelegate(
53 | (BuildContext context, int index) {
54 | return SlideInRight(
55 | duration: Duration(milliseconds: 500),
56 | child: Container(
57 | margin: EdgeInsets.only(
58 | top: 14,
59 | ),
60 | child: ProductCategorItem(
61 | name: "Name",
62 | imageUrl:
63 | "https://png.pngtree.com/png-clipart/20190516/original/pngtree-healthy-food-png-image_3776802.jpg",
64 | function: () {
65 | goToProductList(false);
66 | },
67 | ),
68 | ),
69 | );
70 | },
71 | childCount: 9,
72 | ),
73 | )
74 | ],
75 | ),
76 | ),
77 | );
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/lib/widget/orderPlacedDialog.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:lottie/lottie.dart';
4 | import '../helper/helper.dart';
5 | import 'appText.dart';
6 | import 'buttons.dart';
7 |
8 | class OrderPlacedDialog extends StatelessWidget {
9 | const OrderPlacedDialog({Key key}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | body: Column(
15 | mainAxisAlignment: MainAxisAlignment.spaceAround,
16 | children: [
17 | Container(
18 | height: 300,
19 | child: Lottie.asset(
20 | 'assets/lottie/check.json',
21 | repeat: false,
22 | ),
23 | ),
24 | Column(
25 | children: [
26 | AppTextH2(
27 | text: "Your Order has been\naccepted",
28 | fontWeight: FontWeight.w400,
29 | textAlign: TextAlign.center,
30 | ),
31 | SizedBox(
32 | height: 18,
33 | ),
34 | AppTextP1(
35 | text: "1 product has been added to cart",
36 | textAlign: TextAlign.center,
37 | fontWeight: FontWeight.normal,
38 | color: Colors.grey),
39 | ],
40 | ),
41 | Padding(
42 | padding: const EdgeInsets.symmetric(horizontal: 33),
43 | child: FadeInUp(
44 | duration: Duration(microseconds: 400),
45 | child: Column(
46 | children: [
47 | AppButton(
48 | color: Theme.of(context).accentColor,
49 | function: () {
50 | // loginUser();
51 | },
52 | child: Center(
53 | child: Text(
54 | "Track Order",
55 | style: TextStyle(
56 | fontSize: 18,
57 | color: Colors.white,
58 | ),
59 | ),
60 | )),
61 | SizedBox(
62 | height: 18,
63 | ),
64 | AppButton(
65 | color: Colors.white,
66 | function: () {
67 | Helper().goBack(context);
68 | },
69 | child: Center(
70 | child: Text(
71 | "Back to home",
72 | style: TextStyle(
73 | fontSize: 18,
74 | color: Colors.black,
75 | ),
76 | ),
77 | )),
78 | ],
79 | ),
80 | ),
81 | ),
82 | ],
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OnlineGroceryStore Adding More Screen Soon..
2 |
3 | Flutter Online Grocery Store UI is a beautiful and modern user interface design for a grocery store app, built entirely with Flutter. This UI kit includes various screens such as home, category, product detail, cart, checkout, and more. It is fully customizable and easy to integrate into any existing Flutter project. With this UI kit, you can create a stunning grocery store app in no time.
4 |
5 | | | | |
6 | |:-------------------------:|:-------------------------:|:-------------------------:|
7 | |
Spalash Screen |
Welcome Screen |
GetStarted Screen |
8 | |
Sign In Screen |
Sing Up Screen|
Mobile Number Screen|
9 | |
OTP Screen |
Location Screen |
Home Screen |
10 | |
Product Screen |
Product Reviews Screen |
Coming Soonn |
11 | |
Coming Soon |
Coming Soon |
Coming Soon|
12 | |
Coming Soon|
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/lib/screen/auth/numberAuth/otpScreen/otpScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/numberAuth/otpScreen/otpScreenUI.dart';
3 | import 'package:OnlineGroceryStore/screen/auth/selectLocation/selectLocationScreen.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:pinput/pin_put/pin_put.dart';
6 |
7 | class OtpScreen extends StatefulWidget {
8 | OtpScreen({Key key}) : super(key: key);
9 |
10 | @override
11 | _OtpScreenState createState() => _OtpScreenState();
12 | }
13 |
14 | class _OtpScreenState extends State {
15 | final TextEditingController _pinPutController = TextEditingController();
16 | final FocusNode otpFocusNode = FocusNode();
17 | final _formKey = GlobalKey();
18 |
19 | void goToLocationScreen() {
20 | if (_formKey.currentState.validate()) {
21 | Helper().dismissKeyBoard(context);
22 | Helper().goToPage(context, SelectLocation());
23 | } else {
24 | Helper().vibratPhone();
25 | }
26 | }
27 |
28 | Widget onlySelectedBorderPinPut() {
29 | final BoxDecoration pinPutDecoration = BoxDecoration(
30 | color: Colors.white,
31 | borderRadius: BorderRadius.circular(5.0),
32 | );
33 | return Form(
34 | key: _formKey,
35 | child: GestureDetector(
36 | onLongPress: () {},
37 | child: PinPut(
38 | validator: (s) {
39 | if (s.contains('12345')) {
40 | return null;
41 | } else {
42 | return 'Invalid OTP Code';
43 | }
44 | },
45 | autovalidateMode: AutovalidateMode.onUserInteraction,
46 | withCursor: true,
47 | fieldsCount: 5,
48 | fieldsAlignment: MainAxisAlignment.spaceAround,
49 | textStyle: const TextStyle(fontSize: 25.0, color: Colors.black),
50 | eachFieldMargin: EdgeInsets.all(0),
51 | eachFieldWidth: 51.0,
52 | eachFieldHeight: 51.0,
53 | // onSubmit: (String pin) => _showSnackBar(pin),
54 | focusNode: otpFocusNode,
55 | controller: _pinPutController,
56 | submittedFieldDecoration: pinPutDecoration,
57 | selectedFieldDecoration: pinPutDecoration.copyWith(
58 | border: Border.all(
59 | width: 1,
60 | color: Colors.white,
61 | ),
62 | ),
63 | followingFieldDecoration: pinPutDecoration,
64 | pinAnimationType: PinAnimationType.scale,
65 | ),
66 | ),
67 | );
68 | }
69 |
70 | @override
71 | void initState() {
72 | otpFocusNode.requestFocus();
73 | super.initState();
74 | }
75 |
76 | @override
77 | void dispose() {
78 | otpFocusNode.dispose();
79 | super.dispose();
80 | }
81 |
82 | @override
83 | Widget build(BuildContext context) {
84 | return OtpScreeUI(
85 | goToLocationScreen: goToLocationScreen,
86 | onlySelectedBorderPinPut: onlySelectedBorderPinPut(),
87 | );
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 |
11 |
12 |
16 |
23 |
27 |
31 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
47 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/lib/widget/appText.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AppTextH1 extends StatelessWidget {
4 | final String text;
5 | final Color color;
6 | final TextAlign textAlign;
7 |
8 | const AppTextH1({Key key, @required this.text, this.color, this.textAlign})
9 | : super(key: key);
10 | @override
11 | Widget build(BuildContext context) {
12 | return Text(
13 | text,
14 | textAlign: textAlign == null ? TextAlign.start : textAlign,
15 | style: TextStyle(
16 | height: 1.3, fontSize: 40, color: color, fontWeight: FontWeight.bold),
17 | );
18 | }
19 | }
20 |
21 | class AppTextH2 extends StatelessWidget {
22 | final String text;
23 | final Color color;
24 | final TextAlign textAlign;
25 | final FontWeight fontWeight;
26 |
27 | const AppTextH2(
28 | {Key key,
29 | @required this.text,
30 | this.color,
31 | this.textAlign,
32 | @required this.fontWeight})
33 | : super(key: key);
34 | @override
35 | Widget build(BuildContext context) {
36 | return Text(
37 | text,
38 | textAlign: textAlign == null ? TextAlign.start : textAlign,
39 | style: TextStyle(
40 | height: 1.6, fontSize: 28, color: color, fontWeight: fontWeight),
41 | );
42 | }
43 | }
44 |
45 | class AppTextP1 extends StatelessWidget {
46 | final String text;
47 | final FontWeight fontWeight;
48 | final int numberOfLine;
49 | final TextAlign textAlign;
50 | final Color color;
51 | const AppTextP1({
52 | Key key,
53 | @required this.text,
54 | this.fontWeight,
55 | this.numberOfLine,
56 | @required this.textAlign,
57 | this.color,
58 | }) : super(key: key);
59 | @override
60 | Widget build(BuildContext context) {
61 | return Text(
62 | text,
63 | textAlign: textAlign != null ? textAlign : TextAlign.start,
64 | maxLines: numberOfLine != null ? numberOfLine : 2,
65 | overflow: TextOverflow.ellipsis,
66 | style: TextStyle(
67 | fontSize: 19,
68 | height: 1.3,
69 | fontWeight: fontWeight != null ? fontWeight : FontWeight.normal,
70 | color: color != null ? color : null),
71 | );
72 | }
73 | }
74 |
75 | class SmallText extends StatelessWidget {
76 | final String text;
77 | final TextAlign textAlign;
78 | final FontWeight fontWeight;
79 | final Color colors;
80 |
81 | const SmallText(
82 | {Key key,
83 | @required this.text,
84 | this.textAlign,
85 | this.fontWeight,
86 | this.colors})
87 | : super(key: key);
88 |
89 | @override
90 | Widget build(BuildContext context) {
91 | return Text(
92 | text,
93 | textAlign: textAlign == null ? TextAlign.start : textAlign,
94 | // overflow: TextOverflow.ellipsis,
95 | style: TextStyle(
96 | color: colors,
97 | fontSize: 16,
98 | height: 1.6,
99 | fontWeight: fontWeight != null ? fontWeight : FontWeight.normal,
100 | ),
101 | );
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/lib/screen/productByCategory/filtterView/filtterView.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/appText.dart';
2 | import 'package:OnlineGroceryStore/widget/buttons.dart';
3 | import 'package:animate_do/animate_do.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class FiltterView extends StatelessWidget {
7 | final Function closeBackDrop;
8 | const FiltterView({Key key, @required this.closeBackDrop}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return ListView(
13 | shrinkWrap: true,
14 | children: [
15 | Center(
16 | child: Container(
17 | margin: EdgeInsets.only(top: 14),
18 | child: AppTextP1(
19 | textAlign: TextAlign.start,
20 | text: "Filtters",
21 | ),
22 | ),
23 | ),
24 | Divider(),
25 | Padding(
26 | padding: EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 6),
27 | child: AppTextP1(
28 | textAlign: TextAlign.start,
29 | text: "Categories",
30 | ),
31 | ),
32 | CheckBoxView(
33 | title: "Eggs",
34 | ),
35 | CheckBoxView(
36 | title: "Noodles & Pasta",
37 | ),
38 | CheckBoxView(
39 | title: "Chips & Crisps",
40 | ),
41 | CheckBoxView(
42 | title: "Fast Food",
43 | ),
44 | Padding(
45 | padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 6),
46 | child: AppTextP1(
47 | textAlign: TextAlign.start,
48 | text: "Brand",
49 | ),
50 | ),
51 | CheckBoxView(
52 | title: "Individual Collection",
53 | ),
54 | CheckBoxView(
55 | title: "Cocola",
56 | ),
57 | CheckBoxView(
58 | title: "Ifad",
59 | ),
60 | CheckBoxView(
61 | title: "Kazi Farmas",
62 | ),
63 | Container(
64 | margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
65 | child: ElasticIn(
66 | child: AppButton(
67 | color: Theme.of(context).accentColor,
68 | function: closeBackDrop,
69 | child: Center(
70 | child: Text(
71 | "Apple Filter",
72 | style: TextStyle(
73 | fontSize: 18,
74 | color: Colors.white,
75 | fontWeight: FontWeight.bold),
76 | ),
77 | )),
78 | ),
79 | ),
80 | ],
81 | );
82 | }
83 | }
84 |
85 | class CheckBoxView extends StatelessWidget {
86 | final String title;
87 |
88 | const CheckBoxView({Key key, @required this.title}) : super(key: key);
89 |
90 | @override
91 | Widget build(BuildContext context) {
92 | return Row(
93 | children: [
94 | Checkbox(
95 | value: true,
96 | onChanged: (bool value) {},
97 | ),
98 | Text(title),
99 | ],
100 | );
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/helper/helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flushbar/flushbar.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:fluttertoast/fluttertoast.dart';
6 | import 'package:page_transition/page_transition.dart';
7 | import 'package:progress_dialog/progress_dialog.dart';
8 | import 'package:vibration/vibration.dart';
9 |
10 | class Helper {
11 | showToastMessage(message) {
12 | Fluttertoast.showToast(
13 | msg: message,
14 | toastLength: Toast.LENGTH_SHORT,
15 | gravity: ToastGravity.BOTTOM,
16 | backgroundColor: Colors.orange,
17 | textColor: Colors.white,
18 | fontSize: 16.0);
19 | }
20 |
21 | goToPage(
22 | BuildContext context,
23 | Widget child,
24 | ) {
25 | if (Platform.isIOS) {
26 | Navigator.push(
27 | context,
28 | MaterialPageRoute(
29 | builder: (context) => child,
30 | ),
31 | );
32 | } else {
33 | Navigator.push(
34 | context,
35 | PageTransition(
36 | type: PageTransitionType.rightToLeft,
37 | child: child,
38 | ));
39 | }
40 | }
41 |
42 | dismissKeyBoard(BuildContext context) {
43 | FocusScope.of(context).requestFocus(new FocusNode());
44 | }
45 |
46 | goBack(
47 | BuildContext context,
48 | ) {
49 | Navigator.pop(context);
50 | }
51 |
52 | showSnackBar(message, title, context, bool error) {
53 | return Flushbar(
54 | title: title,
55 | message: message,
56 | backgroundColor: error ? Colors.orange : Theme.of(context).accentColor,
57 | reverseAnimationCurve: Curves.easeIn,
58 | forwardAnimationCurve: Curves.easeInOut,
59 | duration: Duration(seconds: 5),
60 | margin: EdgeInsets.all(8),
61 | borderRadius: 8,
62 | )..show(context);
63 | }
64 |
65 | showLoadingDilog(context) {
66 | ProgressDialog pr = ProgressDialog(context);
67 | pr = ProgressDialog(context,
68 | type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
69 | pr.style(
70 | message: 'Loading..',
71 | padding: EdgeInsets.all(16.0),
72 | borderRadius: 10.0,
73 | backgroundColor: Colors.white,
74 | progressWidget: Container(
75 | padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()),
76 | elevation: 6.0,
77 | insetAnimCurve: Curves.easeInOut,
78 | progressTextStyle: TextStyle(
79 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400),
80 | messageTextStyle: TextStyle(
81 | color: Colors.black,
82 | fontSize: 19.0,
83 | fontWeight: FontWeight.w600,
84 | ));
85 | return pr;
86 | }
87 |
88 | // ignore: missing_return
89 | String moneyFormat(String price) {
90 | if (price.length > 2) {
91 | var value = price;
92 | value = value.replaceAll(RegExp(r'\D'), '');
93 | value = value.replaceAll(RegExp(r'\B(?=(\d{3})+(?!\d))'), ',');
94 | return "₹ " + value;
95 | }
96 | }
97 |
98 | vibratPhone() {
99 | Vibration.vibrate(duration: 200);
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/lib/screen/home/homeMain.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/screen/profileScreen/profileScreen.dart';
2 | import 'package:OnlineGroceryStore/screen/profileScreen/profileScreenUi.dart';
3 | import 'package:custom_navigation_bar/custom_navigation_bar.dart';
4 | import 'package:fluentui_system_icons/fluentui_system_icons.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:OnlineGroceryStore/screen/home/home.dart';
7 | import 'package:OnlineGroceryStore/screen/findProductScreen/findProductScreen.dart';
8 | import 'package:OnlineGroceryStore/screen/cartScreen/cartScreen.dart';
9 |
10 | class HomeMain extends StatefulWidget {
11 | HomeMain({Key key}) : super(key: key);
12 |
13 | @override
14 | _HomeMainState createState() => _HomeMainState();
15 | }
16 |
17 | class _HomeMainState extends State {
18 | PageController pageController;
19 | int pageIndex = 0;
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 | pageController = PageController();
25 | }
26 |
27 | @override
28 | void dispose() {
29 | pageController.dispose();
30 | super.dispose();
31 | }
32 |
33 | onPageChanged(int pageIndex) {
34 | setState(() {
35 | this.pageIndex = pageIndex;
36 | });
37 | }
38 |
39 | onTap(int pageIndex) {
40 | pageController.animateToPage(
41 | pageIndex,
42 | duration: Duration(milliseconds: 300),
43 | curve: Curves.easeInOut,
44 | );
45 | }
46 |
47 | @override
48 | Widget build(BuildContext context) {
49 | return Scaffold(
50 | body: PageView(
51 | children: [
52 | Home(),
53 | FindProductScreen(),
54 | CartScreen(),
55 | MyPage(),
56 | ProfileScreenUi(),
57 | ],
58 | controller: pageController,
59 | onPageChanged: onPageChanged,
60 | physics: NeverScrollableScrollPhysics(),
61 | ),
62 | bottomNavigationBar: CustomNavigationBar(
63 | iconSize: 28.0,
64 | selectedColor: Theme.of(context).accentColor,
65 | strokeColor: Theme.of(context).accentColor,
66 | unSelectedColor: Color(0xffacacac),
67 | backgroundColor: Theme.of(context).scaffoldBackgroundColor,
68 | items: [
69 | CustomNavigationBarItem(
70 | icon: Icon(FluentIcons.building_shop_24_regular),
71 | title: Text("Home")),
72 | CustomNavigationBarItem(
73 | icon: Icon(FluentIcons.clipboard_search_24_regular),
74 | title: Text("Search")),
75 | CustomNavigationBarItem(
76 | icon: Icon(FluentIcons.cart_24_regular), title: Text("Cart")),
77 | CustomNavigationBarItem(
78 | icon: Icon(FluentIcons.heart_24_regular), title: Text("Heart")),
79 | CustomNavigationBarItem(
80 | icon: Icon(FluentIcons.person_24_regular), title: Text("Person")),
81 | ],
82 | currentIndex: pageIndex,
83 | onTap: onTap,
84 | ),
85 | );
86 | }
87 | }
88 |
89 | class MyPage extends StatelessWidget {
90 | const MyPage({Key key}) : super(key: key);
91 |
92 | @override
93 | Widget build(BuildContext context) {
94 | return Container(
95 | child: Center(child: Text("Hi")),
96 | );
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/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/screen/productByCategory/productByCategoryUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/screen/productByCategory/filtterView/filtterView.dart';
2 | import 'package:OnlineGroceryStore/widget/listItems.dart';
3 | import 'package:OnlineGroceryStore/widget/searchBox.dart';
4 | import 'package:animate_do/animate_do.dart';
5 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
6 | import 'package:OnlineGroceryStore/helper/helper.dart';
7 | import 'package:backdrop_modal_route/backdrop_modal_route.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:fluentui_system_icons/fluentui_system_icons.dart';
10 |
11 | class ProductByCategoryUI extends StatelessWidget {
12 | final bool search;
13 | final TextEditingController searchTextController;
14 |
15 | const ProductByCategoryUI(
16 | {Key key, @required this.search, @required this.searchTextController})
17 | : super(key: key);
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | var size = MediaQuery.of(context).size;
22 | final double itemWidth = size.width / 2;
23 | return Scaffold(
24 | appBar: AppBar(
25 | // elevation: 0,
26 | centerTitle: true,
27 | backgroundColor: Theme.of(context).scaffoldBackgroundColor,
28 | title: search
29 | ? Container(
30 | child: SearchBox(
31 | textEditingController: searchTextController,
32 | function: () {},
33 | radius: 8,
34 | height: 45.0,
35 | ),
36 | )
37 | : Text("Products"),
38 | leading: IconButton(
39 | icon: Icon(EvaIcons.arrowIosBack),
40 | onPressed: () {
41 | Helper().goBack(context);
42 | },
43 | ),
44 | actions: [
45 | IconButton(
46 | icon: Icon(FluentIcons.filter_24_regular),
47 | onPressed: () async {
48 | await Navigator.push(
49 | context,
50 | BackdropModalRoute(
51 | overlayContentBuilder: (context) {
52 | return Container(
53 | padding: const EdgeInsets.symmetric(horizontal: 16.0),
54 | child: FiltterView(
55 | closeBackDrop: () {
56 | Navigator.pop(context);
57 | },
58 | ),
59 | );
60 | },
61 | ),
62 | );
63 | },
64 | )
65 | ],
66 | ),
67 | body: Padding(
68 | padding: const EdgeInsets.symmetric(horizontal: 16.0),
69 | child: CustomScrollView(
70 | physics: const BouncingScrollPhysics(),
71 | slivers: [
72 | SliverGrid(
73 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
74 | crossAxisCount: 2,
75 | crossAxisSpacing: 18,
76 | childAspectRatio: (itemWidth / 280),
77 | ),
78 | delegate: SliverChildBuilderDelegate(
79 | (BuildContext context, int index) {
80 | return SlideInRight(
81 | duration: Duration(milliseconds: 500),
82 | child: Container(
83 | margin: EdgeInsets.only(
84 | top: 16,
85 | ),
86 | child: ProductItem(
87 | name: "Name",
88 | imageUrl:
89 | "https://5.imimg.com/data5/IN/DK/GP/SELLER-88087163/pepsi-2-liter-bottle-500x500.jpg",
90 | function: () {
91 | // goToProductList();
92 | },
93 | price: "null",
94 | ),
95 | ),
96 | );
97 | },
98 | childCount: 9,
99 | ),
100 | )
101 | ],
102 | ),
103 | ),
104 | );
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/lib/widget/bannersItems.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/appNetworkImage.dart';
2 | import 'package:carousel_slider/carousel_slider.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:OnlineGroceryStore/widget/appIndicator.dart';
5 |
6 | class BannersItem extends StatelessWidget {
7 | final String imageUrl;
8 | final String text;
9 |
10 | const BannersItem({Key key, @required this.imageUrl, @required this.text})
11 | : super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Container(
16 | margin: EdgeInsets.symmetric(horizontal: 16.0),
17 | child: AppNetWorkIamge(
18 | imageUrl: imageUrl,
19 | radius: 8,
20 | ),
21 | );
22 | }
23 | }
24 |
25 | class AppBanner extends StatefulWidget {
26 | final bool bigBanner;
27 |
28 | const AppBanner({
29 | Key key,
30 | @required this.bigBanner,
31 | }) : super(key: key);
32 |
33 | @override
34 | _AppBannerState createState() => _AppBannerState();
35 | }
36 |
37 | class _AppBannerState extends State {
38 | int bannerIndex = 0;
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | final List imgList = [
43 | 'https://images.unsplash.com/photo-1557844352-761f2565b576?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80"',
44 | 'https://images.unsplash.com/photo-1425543103986-22abb7d7e8d2?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80',
45 | 'https://images.unsplash.com/photo-1540857998731-452f223b4413?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1189&q=80',
46 | ];
47 | return Stack(
48 | children: [
49 | Container(
50 | height: widget.bigBanner ? 300 : 180,
51 | width: double.infinity,
52 | // child: Carousel(
53 | // autoplayDuration: Duration(seconds: 10),
54 | // animationCurve: Curves.easeIn,
55 | // onImageChange: (int _currentImageIndex, int currentPage) {
56 | // setState(() {
57 | // bannerIndex = currentPage;
58 | // });
59 | // },
60 | // images: [
61 | // BannersItem(
62 | // imageUrl:
63 | // "https://images.unsplash.com/photo-1557844352-761f2565b576?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80",
64 | // text: "",
65 | // ),
66 | // BannersItem(
67 | // imageUrl:
68 | // "https://images.unsplash.com/photo-1425543103986-22abb7d7e8d2?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80",
69 | // text: "",
70 | // ),
71 | // BannersItem(
72 | // imageUrl:
73 | // "https://images.unsplash.com/photo-1540857998731-452f223b4413?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1189&q=80",
74 | // text: "",
75 | // ),
76 | // ],
77 | // showIndicator: false,
78 | // ),
79 | child: CarouselSlider(
80 | options: CarouselOptions(
81 | onPageChanged: (int index, CarouselPageChangedReason reason) {
82 | setState(() {
83 | bannerIndex = index;
84 | });
85 | },
86 | autoPlay: true,
87 | viewportFraction: 1.0,
88 | autoPlayCurve: Curves.fastOutSlowIn,
89 | ),
90 | items: imgList.map(
91 | (url) {
92 | return BannersItem(
93 | imageUrl: url,
94 | text: "",
95 | );
96 | },
97 | ).toList(),
98 | ),
99 | ),
100 | Positioned(
101 | left: 1,
102 | right: 1,
103 | bottom: 10,
104 | child: AppIndicator(
105 | index: bannerIndex,
106 | conut: 3,
107 | ),
108 | ),
109 | ],
110 | );
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/lib/screen/auth/selectLocation/selectLocationScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/selectLocation/selectlocationUI.dart';
3 | import 'package:OnlineGroceryStore/screen/home/homeMain.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:geocoding/geocoding.dart';
6 | import 'package:geolocator/geolocator.dart';
7 | import 'package:OnlineGroceryStore/widget/appDialogs.dart';
8 |
9 | class SelectLocation extends StatefulWidget {
10 | SelectLocation({Key key}) : super(key: key);
11 |
12 | @override
13 | _SelectLocationState createState() => _SelectLocationState();
14 | }
15 |
16 | class _SelectLocationState extends State {
17 | final addressLine1Controller = TextEditingController();
18 | final addressLine2Controller = TextEditingController();
19 | final landMarkController = TextEditingController();
20 | final _formKey = GlobalKey();
21 | Placemark placemark;
22 |
23 | void getTheUserLocation() async {
24 | try {
25 | bool serviceEnabled;
26 | LocationPermission permission;
27 | serviceEnabled = await Geolocator.isLocationServiceEnabled();
28 | if (!serviceEnabled) {
29 | await AppDialogs.yesAbortDialog(context, 'Location Error!',
30 | "Location Disabled", "Location services are disabled.", true);
31 | return Future.error('Location services are disabled.');
32 | }
33 |
34 | permission = await Geolocator.checkPermission();
35 | if (permission == LocationPermission.deniedForever) {
36 | await AppDialogs.yesAbortDialog(
37 | context,
38 | 'Location Error!',
39 | "Permission Denied",
40 | 'Location permissions are permantly denied, we cannot request permissions.',
41 | true);
42 | return Future.error(
43 | 'Location permissions are permantly denied, we cannot request permissions.');
44 | }
45 |
46 | if (permission == LocationPermission.denied) {
47 | permission = await Geolocator.requestPermission();
48 | if (permission != LocationPermission.whileInUse &&
49 | permission != LocationPermission.always) {
50 | await AppDialogs.yesAbortDialog(
51 | context,
52 | 'Location Error!',
53 | 'Permission Denied',
54 | 'Location permissions are denied (actual value:$permission).',
55 | true);
56 | return Future.error(
57 | 'Location permissions are denied (actual value: $permission).');
58 | }
59 | }
60 |
61 | Position position = await Geolocator.getCurrentPosition();
62 | List placemarks =
63 | await placemarkFromCoordinates(position.latitude, position.longitude);
64 | setState(() {
65 | placemark = placemarks[0];
66 | });
67 | String completeAddress =
68 | '${placemark.subThoroughfare} ${placemark.thoroughfare}, ${placemark.subLocality} ${placemark.locality}, ${placemark.subAdministrativeArea}, ${placemark.administrativeArea} ${placemark.postalCode}, ${placemark.country}';
69 | print(completeAddress);
70 | print(placemark.country);
71 | addressLine2Controller.text = completeAddress;
72 | } catch (e) {
73 | Helper().showSnackBar(e.toString(), "ERROR", context, true);
74 | print(e.toString());
75 | }
76 | }
77 |
78 | void saveAddress() {
79 | if (_formKey.currentState.validate()) {
80 | Helper().dismissKeyBoard(context);
81 | Helper().goToPage(context, HomeMain());
82 | } else {
83 | Helper().vibratPhone();
84 | }
85 | }
86 |
87 | @override
88 | void initState() {
89 | getTheUserLocation();
90 | super.initState();
91 | }
92 |
93 | @override
94 | void dispose() {
95 | addressLine1Controller.dispose();
96 | addressLine2Controller.dispose();
97 | landMarkController.dispose();
98 | super.dispose();
99 | }
100 |
101 | @override
102 | Widget build(BuildContext context) {
103 | return SelectLocastion(
104 | getTheUserLocation: getTheUserLocation,
105 | addressLine1Controller: addressLine1Controller,
106 | addressLine2Controller: addressLine2Controller,
107 | placemark: placemark,
108 | landMarkController: landMarkController,
109 | formKey: _formKey,
110 | saveAddress: saveAddress,
111 | );
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: OnlineGroceryStore
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 |
27 | # The following adds the Cupertino Icons font to your application.
28 | # Use with the CupertinoIcons class for iOS style icons.
29 | cupertino_icons: ^1.0.0
30 | shared_preferences: ^0.5.12+4
31 | vibration: ^1.7.3
32 | page_transition: ^1.1.7+6
33 | flushbar: ^1.10.4
34 | fluttertoast: ^7.1.6
35 | progress_dialog: ^1.2.4
36 | animate_do: ^1.7.5
37 | eva_icons_flutter: ^2.0.1
38 | cached_network_image: ^2.3.3
39 | blur: ^1.0.1
40 | provider: ^4.3.2+2
41 | intl_phone_field: ^1.4.2
42 | international_phone_input: ^1.0.4
43 | rules: ^1.2.0+1
44 | pinput: ^0.2.0
45 | geolocator: ^6.1.13
46 | geocoding: ^1.0.5
47 | custom_navigation_bar: ^0.7.0
48 | flutter_icons:
49 | ant_icons: ^1.0.0
50 | fluentui_system_icons: ^1.1.91
51 | carousel_pro: ^1.0.0
52 | dots_indicator: ^1.2.0
53 | floating_action_row: ^0.1.0
54 | backdrop: ^0.4.7
55 | backdrop_modal_route: ^1.1.0
56 | carousel_slider: ^2.3.2
57 | lottie:
58 |
59 | dev_dependencies:
60 | flutter_test:
61 | sdk: flutter
62 |
63 | flutter_launcher_icons: ^0.8.1
64 | flutter_native_splash: ^0.1.9
65 |
66 | flutter_native_splash:
67 | image: assets/image/splash_logo.png
68 | color: "53b175"
69 |
70 | # For information on the generic Dart part of this file, see the
71 | # following page: https://dart.dev/tools/pub/pubspec
72 |
73 | # The following section is specific to Flutter.
74 | flutter:
75 | # The following line ensures that the Material Icons font is
76 | # included with your application, so that you can use the icons in
77 | # the material Icons class.
78 | uses-material-design: true
79 |
80 | # To add assets to your application, add an assets section, like this:
81 | assets:
82 | - assets/image/header_image.png
83 | - assets/image/icon_color.png
84 | - assets/image/icon.png
85 | - assets/image/map_pin.png
86 | - assets/image/splash_logo.png
87 | - assets/image/welcome.png
88 | - assets/lottie/check.json
89 |
90 | # An image asset can refer to one or more resolution-specific "variants", see
91 | # https://flutter.dev/assets-and-images/#resolution-aware.
92 |
93 | # For details regarding adding assets from package dependencies, see
94 | # https://flutter.dev/assets-and-images/#from-packages
95 |
96 | # To add custom fonts to your application, add a fonts section here,
97 | # in this "flutter" section. Each entry in this list should have a
98 | # "family" key with the font family name, and a "fonts" key with a
99 | # list giving the asset and other descriptors for the font. For
100 | # example:
101 | fonts:
102 | - family: Gilroy
103 | fonts:
104 | - asset: assets/fonts/Gilroy-Bold.ttf
105 | - asset: assets/fonts/Gilroy-Heavy.ttf
106 | - asset: assets/fonts/Gilroy-Light.ttf
107 | - asset: assets/fonts/Gilroy-Medium.ttf
108 | - asset: assets/fonts/Gilroy-Regular.ttf
109 |
110 | # style: italic
111 | # - family: Trajan Pro
112 | # fonts:
113 | # - asset: fonts/TrajanPro.ttf
114 | # - asset: fonts/TrajanPro_Bold.ttf
115 | # weight: 700
116 | #
117 | # For details regarding fonts from package dependencies,
118 | # see https://flutter.dev/custom-fonts/#from-packages
119 |
--------------------------------------------------------------------------------
/lib/screen/welcomeScreen/welcomeScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/screen/auth/phoneNumber/getStarted.dart';
3 | import 'package:OnlineGroceryStore/widget/appText.dart';
4 | import 'package:OnlineGroceryStore/widget/buttons.dart';
5 | import 'package:animate_do/animate_do.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class WelcomeScreen extends StatefulWidget {
9 | @override
10 | _WelcomeScreenState createState() => _WelcomeScreenState();
11 | }
12 |
13 | class _WelcomeScreenState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | body: Container(
18 | width: double.infinity,
19 | height: double.infinity,
20 | decoration: BoxDecoration(
21 | image: DecorationImage(
22 | image: AssetImage('assets/image/welcome.png'),
23 | fit: BoxFit.cover)),
24 | child: SafeArea(
25 | child: Stack(
26 | children: [
27 | Positioned(
28 | bottom: 1,
29 | right: 1,
30 | left: 1,
31 | child: Padding(
32 | padding: EdgeInsets.all(18),
33 | child: Column(
34 | children: [
35 | Container(
36 | margin: EdgeInsets.symmetric(horizontal: 22),
37 | child: Column(children: [
38 | FadeInUp(
39 | duration: Duration(seconds: 1),
40 | child: Container(
41 | height: 55,
42 | decoration: BoxDecoration(
43 | image: DecorationImage(
44 | image:
45 | AssetImage('assets/image/icon.png'),
46 | fit: BoxFit.fitHeight)),
47 | ),
48 | ),
49 | SizedBox(
50 | height: 18,
51 | ),
52 | FadeInUp(
53 | duration: Duration(seconds: 1),
54 | child: AppTextH1(
55 | textAlign: TextAlign.center,
56 | text: "Welcome\nto our Store",
57 | color: Colors.white,
58 | )),
59 | SizedBox(
60 | height: 14,
61 | ),
62 | FadeInUp(
63 | duration: Duration(seconds: 1),
64 | child: SmallText(
65 | text:
66 | "Get Your groceries in as fast as one hour",
67 | colors: Colors.grey),
68 | ),
69 | SizedBox(
70 | height: 14,
71 | ),
72 | FadeInUp(
73 | duration: Duration(seconds: 1),
74 | child: AppButton(
75 | color: Theme.of(context).accentColor,
76 | function: () {
77 | Helper()
78 | .goToPage(context, GetStartedScreen());
79 | },
80 | child: Center(
81 | child: Text(
82 | "Get Stated",
83 | style: TextStyle(
84 | fontSize: 18,
85 | color: Colors.white,
86 | fontWeight: FontWeight.bold),
87 | ),
88 | )),
89 | ),
90 | SizedBox(
91 | height: 34,
92 | ),
93 | ]))
94 | ],
95 | ),
96 | ),
97 | ),
98 | ],
99 | ),
100 | ),
101 | ),
102 | );
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/lib/screen/auth/numberAuth/otpScreen/otpScreenUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/blurHeaderImage.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import 'package:OnlineGroceryStore/helper/helper.dart';
5 | import 'package:animate_do/animate_do.dart';
6 | import 'package:OnlineGroceryStore/widget/buttons.dart';
7 | import 'package:OnlineGroceryStore/widget/appText.dart';
8 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
9 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
10 |
11 | class OtpScreeUI extends StatelessWidget {
12 | final Widget onlySelectedBorderPinPut;
13 | final Function goToLocationScreen;
14 |
15 | const OtpScreeUI(
16 | {Key key,
17 | @required this.onlySelectedBorderPinPut,
18 | @required this.goToLocationScreen})
19 | : super(key: key);
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Scaffold(
24 | body: LayoutBuilder(
25 | builder: (BuildContext context, BoxConstraints viewportConstraints) {
26 | return SingleChildScrollView(
27 | child: ConstrainedBox(
28 | constraints: BoxConstraints(
29 | minHeight: viewportConstraints.maxHeight,
30 | ),
31 | child: DismissKeyBoardView(
32 | child: Stack(
33 | children: [
34 | BlurHeaderImage(),
35 | Column(
36 | crossAxisAlignment: CrossAxisAlignment.start,
37 | // mainAxisAlignment: MainAxisAlignment.center,
38 | children: [
39 | SlideInLeft(
40 | duration: Duration(milliseconds: 600),
41 | child: GoBackButton(
42 | function: () {
43 | Helper().goBack(context);
44 | },
45 | ),
46 | ),
47 | Container(
48 | margin: EdgeInsets.symmetric(
49 | horizontal: 22.0, vertical: 14),
50 | height: 300.00,
51 | width: double.infinity,
52 | child: Column(
53 | crossAxisAlignment: CrossAxisAlignment.start,
54 | children: [
55 | FadeInUp(
56 | duration: Duration(milliseconds: 600),
57 | child: AppTextH1(
58 | textAlign: TextAlign.start,
59 | text: "Enter your OTP",
60 | )),
61 | FadeInUp(
62 | duration: Duration(milliseconds: 600),
63 | child: SmallText(
64 | text: "Mobile Number",
65 | ),
66 | ),
67 | SizedBox(
68 | height: 14,
69 | ),
70 | FadeInUp(
71 | duration: Duration(milliseconds: 600),
72 | child: Container(
73 | child: onlySelectedBorderPinPut,
74 | ),
75 | ),
76 | ],
77 | ),
78 | ),
79 | ],
80 | ),
81 | ],
82 | ),
83 | ),
84 | ),
85 | );
86 | },
87 | ),
88 | floatingActionButton: ElasticIn(
89 | duration: Duration(seconds: 1),
90 | child: Row(
91 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
92 | children: [
93 | Container(
94 | margin: EdgeInsets.symmetric(
95 | horizontal: 34.0,
96 | ),
97 | child: FlatButton(
98 | onPressed: () {},
99 | child: Text(
100 | 'ReSend OTP',
101 | style: TextStyle(
102 | fontSize: 16.0,
103 | color: Theme.of(context).accentColor,
104 | fontWeight: FontWeight.bold),
105 | ),
106 | ),
107 | ),
108 | FloatingActionButton(
109 | onPressed: () {
110 | goToLocationScreen();
111 | },
112 | child: Icon(EvaIcons.arrowIosForward, color: Colors.white),
113 | ),
114 | ],
115 | ),
116 | ),
117 | );
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/lib/screen/productDetail/productViewImages.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class ProductImageView extends StatefulWidget {
6 | final List images;
7 | ProductImageView({Key key, this.images}) : super(key: key);
8 |
9 | @override
10 | _ProductImageViewState createState() => _ProductImageViewState();
11 | }
12 |
13 | class _ProductImageViewState extends State {
14 | PageController pageController;
15 | int selectedIndex = 0;
16 | bool open = true;
17 |
18 | changeIndex(index) {
19 | pageController.animateToPage(
20 | index,
21 | duration: Duration(milliseconds: 300),
22 | curve: Curves.easeInOut,
23 | );
24 | setState(() {
25 | selectedIndex = index;
26 | });
27 | }
28 |
29 | @override
30 | void initState() {
31 | super.initState();
32 | pageController = PageController();
33 | }
34 |
35 | @override
36 | void dispose() {
37 | pageController.dispose();
38 | super.dispose();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return Scaffold(
44 | body: SafeArea(
45 | child: Stack(
46 | children: [
47 | PageView(
48 | onPageChanged: (index) {
49 | setState(() {
50 | selectedIndex = index;
51 | });
52 | },
53 | physics: NeverScrollableScrollPhysics(),
54 | controller: pageController,
55 | children: [
56 | ...widget.images.asMap().entries.map((MapEntry map) {
57 | return InteractiveViewer(
58 | child: InkWell(
59 | onTap: () {
60 | setState(() {
61 | open = !open;
62 | });
63 | },
64 | child: CachedNetworkImage(
65 | imageUrl: widget.images[map.key],
66 | imageBuilder: (context, imageProvider) => Container(
67 | height: double.infinity,
68 | decoration: BoxDecoration(
69 | color: Colors.white,
70 | image: DecorationImage(
71 | fit: BoxFit.contain,
72 | image: imageProvider,
73 | ),
74 | ),
75 | ),
76 | errorWidget: (context, url, error) => Icon(Icons.error),
77 | ),
78 | ),
79 | );
80 | }).toList(),
81 | ],
82 | ),
83 | IconButton(
84 | icon: Icon(
85 | EvaIcons.arrowIosBack,
86 | color: Colors.black,
87 | ),
88 | onPressed: () {
89 | Navigator.pop(context);
90 | },
91 | )
92 | ],
93 | )),
94 | bottomSheet: AnimatedContainer(
95 | duration: new Duration(seconds: 2),
96 | height: open ? 90 : 1,
97 | width: double.infinity,
98 | color: open ? Colors.transparent : Colors.black,
99 | child: ListView.builder(
100 | physics: const BouncingScrollPhysics(),
101 | scrollDirection: Axis.horizontal,
102 | itemCount: widget.images.length,
103 | itemBuilder: (BuildContext context, int index) {
104 | return InkWell(
105 | onTap: () {
106 | changeIndex(index);
107 | },
108 | child: Container(
109 | margin: EdgeInsets.only(left: 14, bottom: 8),
110 | decoration: BoxDecoration(
111 | border: Border.all(
112 | color: selectedIndex == index
113 | ? Theme.of(context).accentColor
114 | : Colors.transparent),
115 | borderRadius: BorderRadius.circular(4.00),
116 | ),
117 | child: CachedNetworkImage(
118 | imageUrl: widget.images[index],
119 | imageBuilder: (context, imageProvider) => Container(
120 | height: 90,
121 | width: 90,
122 | decoration: BoxDecoration(
123 | image: DecorationImage(
124 | image: imageProvider,
125 | fit: BoxFit.contain,
126 | ),
127 | borderRadius: BorderRadius.circular(4.00),
128 | ),
129 | ),
130 | errorWidget: (context, url, error) => Icon(Icons.error),
131 | ),
132 | ),
133 | );
134 | },
135 | ),
136 | ),
137 | );
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/lib/screen/auth/numberAuth/enterNumber/enterNumberUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/widget/appText.dart';
3 | import 'package:OnlineGroceryStore/widget/blurHeaderImage.dart';
4 | import 'package:OnlineGroceryStore/widget/buttons.dart';
5 | import 'package:animate_do/animate_do.dart';
6 |
7 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:intl_phone_field/intl_phone_field.dart';
10 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
11 | import 'package:rules/rules.dart';
12 |
13 | class EnterNumberUI extends StatelessWidget {
14 | final GlobalKey formKey;
15 | final TextEditingController numberTextEditingController;
16 | final Function sendOtp;
17 | final FocusNode mobileNumFocusNode;
18 |
19 | const EnterNumberUI(
20 | {Key key,
21 | @required this.formKey,
22 | @required this.sendOtp,
23 | @required this.numberTextEditingController,
24 | @required this.mobileNumFocusNode})
25 | : super(key: key);
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | body: DismissKeyBoardView(
31 | child: Container(
32 | child: Stack(
33 | children: [
34 | BlurHeaderImage(),
35 | Column(
36 | crossAxisAlignment: CrossAxisAlignment.start,
37 | children: [
38 | SlideInLeft(
39 | duration: Duration(milliseconds: 600),
40 | child: GoBackButton(
41 | function: () {
42 | Helper().goBack(context);
43 | },
44 | ),
45 | ),
46 | Container(
47 | margin:
48 | EdgeInsets.symmetric(horizontal: 22, vertical: 14),
49 | child: FadeInUp(
50 | duration: Duration(milliseconds: 600),
51 | child: AppTextH1(
52 | textAlign: TextAlign.start,
53 | text: "Enter your mobile number",
54 | )),
55 | ),
56 | FadeInUp(
57 | duration: Duration(milliseconds: 600),
58 | child: Container(
59 | margin: EdgeInsets.symmetric(horizontal: 22),
60 | child: SmallText(
61 | text: "Mobile Number",
62 | ),
63 | ),
64 | ),
65 | SizedBox(
66 | height: 8,
67 | ),
68 | FadeInUp(
69 | duration: Duration(milliseconds: 600),
70 | child: Form(
71 | key: formKey,
72 | child: Container(
73 | margin: EdgeInsets.symmetric(horizontal: 22),
74 | child: IntlPhoneField(
75 | focusNode: mobileNumFocusNode,
76 | controller: numberTextEditingController,
77 | decoration: InputDecoration(
78 | fillColor: Colors.white,
79 | labelText: 'Mobile Number',
80 | ),
81 | initialCountryCode: 'IN',
82 | onChanged: (phone) {
83 | print(phone.completeNumber);
84 | },
85 | validator: (number) {
86 | final passWordRule = Rule(
87 | number,
88 | name: 'Mobile Number',
89 | isRequired: true,
90 | isNumeric: true,
91 | isPhone: true,
92 | );
93 | if (passWordRule.hasError) {
94 | return passWordRule.error;
95 | } else {
96 | return null;
97 | }
98 | }),
99 | ),
100 | ),
101 | ),
102 | ],
103 | ),
104 | ],
105 | ),
106 | ),
107 | ),
108 | floatingActionButton: ElasticIn(
109 | duration: Duration(seconds: 1),
110 | child: FloatingActionButton(
111 | onPressed: () {
112 | sendOtp();
113 | },
114 | child: Icon(EvaIcons.arrowIosForward, color: Colors.white),
115 | ),
116 | ));
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/lib/screen/auth/phoneNumber/getStartedScreenUI.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:OnlineGroceryStore/screen/auth/phoneNumber/socialMediaButton.dart';
4 | import 'package:OnlineGroceryStore/widget/appText.dart';
5 | import 'package:OnlineGroceryStore/widget/buttons.dart';
6 | import 'package:animate_do/animate_do.dart';
7 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
8 | import 'package:flutter/material.dart';
9 |
10 | class GetStartedScreenUI extends StatelessWidget {
11 | final Function goToLoginScreen;
12 |
13 | const GetStartedScreenUI({Key key, this.goToLoginScreen}) : super(key: key);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | body: Container(
19 | width: double.infinity,
20 | height: double.infinity,
21 | child: Stack(
22 | children: [
23 | Container(
24 | width: double.infinity,
25 | child: Image.asset(
26 | "assets/image/header_image.png",
27 | fit: BoxFit.fitWidth,
28 | )),
29 | Positioned(
30 | bottom: 1,
31 | right: 1,
32 | left: 1,
33 | child: SafeArea(
34 | child: Padding(
35 | padding: EdgeInsets.all(18),
36 | child: Column(
37 | children: [
38 | Container(
39 | margin: EdgeInsets.symmetric(horizontal: 22),
40 | child: Column(children: [
41 | SizedBox(
42 | height: 18,
43 | ),
44 | FadeInUp(
45 | duration: Duration(seconds: 1),
46 | child: AppTextH2(
47 | textAlign: TextAlign.start,
48 | text: "Get your groceries with nectar",
49 | fontWeight: FontWeight.w500,
50 | )),
51 | SizedBox(
52 | height: 14,
53 | ),
54 | // InternationalPhoneInput(
55 | // decoration: InputDecoration.collapsed(
56 | // hintText: '(416) 123-4567'),
57 | // // onPhoneNumberChange: onPhoneNumberChange,
58 | // // initialPhoneNumber: phoneNumber,
59 | // // initialSelection: phoneIsoCode,
60 | // enabledCountries: ['+233', '+1'],
61 | // showCountryCodes: false),
62 | // FadeInUp(
63 | // duration: Duration(seconds: 1),
64 | // child: Container(
65 | // color: Colors.white,
66 | // child: IntlPhoneField(
67 | // controller: phoneTextEditingController,
68 | // decoration: InputDecoration(
69 | // fillColor: Colors.white,
70 | // labelText: 'Phone Number',
71 | // border: OutlineInputBorder(
72 | // borderSide: BorderSide(),
73 | // ),
74 | // ),
75 | // initialCountryCode: 'IN',
76 | // onChanged: (phone) {
77 | // print(phone.completeNumber);
78 | // },
79 | // ),
80 | // ),
81 | // ),
82 | FadeInUp(
83 | duration: Duration(seconds: 1),
84 | child: AppButton(
85 | color: Theme.of(context).accentColor,
86 | function: () {
87 | goToLoginScreen();
88 | },
89 | child: Center(
90 | child: Text(
91 | "Log In",
92 | style: TextStyle(
93 | fontSize: 18,
94 | color: Colors.white,
95 | fontWeight: FontWeight.bold),
96 | ),
97 | )),
98 | ),
99 | Container(
100 | margin: EdgeInsets.symmetric(vertical: 18.0),
101 | child: FadeInUp(
102 | duration: Duration(seconds: 1),
103 | child: SmallText(
104 | text: "Or connect Social Media",
105 | ),
106 | ),
107 | ),
108 |
109 | SocialMediaButton(
110 | function: () {
111 | goToLoginScreen();
112 | },
113 | text: "Continue With Google",
114 | icon:
115 | Icon(EvaIcons.google, color: Colors.white),
116 | color: Color(0xFF5383ec)),
117 | SizedBox(
118 | height: 20,
119 | ),
120 | SocialMediaButton(
121 | function: () {
122 | goToLoginScreen();
123 | },
124 | text: "Continue With Facebook",
125 | icon: Icon(EvaIcons.facebook,
126 | color: Colors.white),
127 | color: Color(0xFF4a66ac)),
128 | SizedBox(
129 | height: 34,
130 | ),
131 | ]))
132 | ],
133 | ),
134 | ),
135 | ),
136 | ),
137 | ],
138 | ),
139 | ),
140 | );
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/lib/screen/productDetail/productDetail.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/screen/orderSuccess/orderSuccessScreen.dart';
2 | import 'package:OnlineGroceryStore/screen/productDetail/widget/productImage.dart';
3 | import 'package:OnlineGroceryStore/screen/productDetail/widget/productSelaction.dart';
4 | import 'package:OnlineGroceryStore/widget/seeAllTitle.dart';
5 | import 'package:cached_network_image/cached_network_image.dart';
6 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:OnlineGroceryStore/widget/buttons.dart';
9 | import 'package:animate_do/animate_do.dart';
10 | import 'package:page_transition/page_transition.dart';
11 | import 'package:OnlineGroceryStore/screen/productDetail/productViewImages.dart';
12 |
13 | import '../../helper/helper.dart';
14 |
15 | class ProductDetail extends StatefulWidget {
16 | // final Product product;
17 |
18 | const ProductDetail({
19 | Key key,
20 | }) : super(key: key);
21 | @override
22 | _ProductDetiasState createState() => _ProductDetiasState();
23 | }
24 |
25 | class _ProductDetiasState extends State {
26 | int selectedSize = 0;
27 | List images = [
28 | "https://images.unsplash.com/photo-1593359797688-c51a69ecc2d5?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NDN8fGFwcGxlfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=60",
29 | "https://images.unsplash.com/photo-1580062760649-1250019c0623?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MzZ8fGFwcGxlfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=60",
30 | "https://images.unsplash.com/photo-1567445517997-20a969632aad?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NDh8fGFwcGxlfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=60"
31 | ];
32 |
33 | goToImageView(List images) {
34 | Navigator.push(
35 | context,
36 | PageTransition(
37 | type: PageTransitionType.rightToLeft,
38 | child: ProductImageView(
39 | images: images,
40 | )));
41 | }
42 |
43 | changeSelectedSize(index) {
44 | setState(() {
45 | selectedSize = index;
46 | });
47 | }
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | var size = MediaQuery.of(context).size;
52 | return Scaffold(
53 | body: CustomScrollView(
54 | physics: const BouncingScrollPhysics(),
55 | slivers: [
56 | SliverAppBar(
57 | title: Text("Product Name"),
58 | expandedHeight: size.height * 0.4,
59 | floating: false,
60 | pinned: true,
61 | leading: IconButton(
62 | icon: Icon(
63 | EvaIcons.arrowIosBack,
64 | color: Colors.black,
65 | ),
66 | onPressed: () {
67 | Navigator.pop(context);
68 | },
69 | ),
70 | flexibleSpace: FlexibleSpaceBar(
71 | background: Stack(
72 | children: [
73 | ProductImage(
74 | size: size.height * 0.4,
75 | images: images,
76 | goToImageView: goToImageView),
77 | ],
78 | )),
79 | ),
80 | SliverToBoxAdapter(
81 | child: FadeInUp(
82 | child: Container(
83 | margin:
84 | EdgeInsets.only(top: 16, left: 16, right: 16, bottom: 8),
85 | child: Column(
86 | crossAxisAlignment: CrossAxisAlignment.start,
87 | children: [
88 | Text(
89 | "Product Name",
90 | style: TextStyle(
91 | fontWeight: FontWeight.w700,
92 | fontSize: 26,
93 | ),
94 | ),
95 | SizedBox(
96 | height: 6,
97 | ),
98 | Text(
99 | "1Kg",
100 | style: TextStyle(
101 | fontWeight: FontWeight.w700, color: Colors.grey),
102 | )
103 | ],
104 | ),
105 | ),
106 | ),
107 | ),
108 | SliverToBoxAdapter(
109 | child: FadeInUp(child: ProductSelction()),
110 | ),
111 | SliverToBoxAdapter(
112 | child: FadeInUp(
113 | child: SeeAppTitle(
114 | title: "Details",
115 | function: () {},
116 | ),
117 | )),
118 | SliverToBoxAdapter(
119 | child: FadeInUp(
120 | child: Container(
121 | margin: EdgeInsets.symmetric(
122 | horizontal: 16,
123 | ),
124 | child: Text(
125 | "widget.product.description",
126 | style: TextStyle(
127 | height: 1.8,
128 | fontSize: 18,
129 | ),
130 | ),
131 | ),
132 | )),
133 | SliverToBoxAdapter(
134 | child: Container(
135 | margin: EdgeInsets.symmetric(horizontal: 16, vertical: 14),
136 | child: Text(
137 | "Read More",
138 | style: TextStyle(
139 | height: 1.8,
140 | fontSize: 18,
141 | color: Color(0xff00c569),
142 | ),
143 | ),
144 | )),
145 | SliverToBoxAdapter(
146 | child: FadeInUp(
147 | child: SeeAppTitle(
148 | title: "Reviews",
149 | function: () {},
150 | ),
151 | )),
152 | SliverList(
153 | delegate: SliverChildBuilderDelegate(
154 | (BuildContext context, int index) {
155 | return Container(
156 | margin: EdgeInsets.only(bottom: 12),
157 | child: FadeInUp(
158 | child: ListTile(
159 | leading: CachedNetworkImage(
160 | imageUrl:
161 | "https://static.nike.com/a/images/t_PDP_1280_v1/f_auto/5e4787fc-a474-4842-9f67-489d28a9cb1e/sportswear-t-shirt-CLFcd1.jpg",
162 | imageBuilder: (context, imageProvider) =>
163 | CircleAvatar(
164 | radius: 27, backgroundImage: imageProvider),
165 | ),
166 | title: Text(
167 | "Samuel Smith",
168 | style: TextStyle(
169 | height: 1.8,
170 | fontWeight: FontWeight.w700,
171 | color: Color(0xff000000),
172 | ),
173 | ),
174 | subtitle: Text(
175 | "Wonderful jean, perfect gift for my girl for our anniversary!",
176 | style: TextStyle(
177 | height: 1.7,
178 | color: Color(0xff000000),
179 | ),
180 | )),
181 | ),
182 | );
183 | },
184 | childCount: 4,
185 | ),
186 | ),
187 | SliverToBoxAdapter(
188 | child: SizedBox(
189 | height: 77.00,
190 | )),
191 | ],
192 | ),
193 | floatingActionButton: Container(
194 | margin: EdgeInsets.only(left: 32, right: 4),
195 | child: FadeInUp(
196 | duration: Duration(seconds: 1),
197 | child: AppButton(
198 | color: Theme.of(context).accentColor,
199 | function: () {
200 | Navigator.push(
201 | context,
202 | PageTransition(
203 | duration: Duration(milliseconds: 200),
204 | type: PageTransitionType.bottomToTop,
205 | child: OrderSuccessScreen(),
206 | ));
207 | },
208 | child: Center(
209 | child: Text(
210 | "Add To Basket",
211 | style: TextStyle(
212 | fontSize: 18,
213 | color: Colors.white,
214 | fontWeight: FontWeight.bold),
215 | ),
216 | )),
217 | ),
218 | ),
219 | );
220 | }
221 | }
222 |
--------------------------------------------------------------------------------
/lib/screen/auth/selectLocation/selectlocationUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/helper/helper.dart';
2 | import 'package:OnlineGroceryStore/widget/appText.dart';
3 | import 'package:OnlineGroceryStore/widget/blurHeaderImage.dart';
4 | import 'package:OnlineGroceryStore/widget/buttons.dart';
5 | import 'package:animate_do/animate_do.dart';
6 |
7 | import 'package:geocoding/geocoding.dart';
8 | import 'package:rules/rules.dart';
9 | import 'package:flutter/material.dart';
10 | import 'package:OnlineGroceryStore/widget/appInputText.dart';
11 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
12 |
13 | class SelectLocastion extends StatelessWidget {
14 | final Function getTheUserLocation;
15 | final TextEditingController addressLine1Controller;
16 | final TextEditingController addressLine2Controller;
17 | final TextEditingController landMarkController;
18 | final Placemark placemark;
19 | final GlobalKey formKey;
20 | final Function saveAddress;
21 | const SelectLocastion(
22 | {Key key,
23 | @required this.getTheUserLocation,
24 | @required this.addressLine1Controller,
25 | @required this.addressLine2Controller,
26 | @required this.placemark,
27 | @required this.landMarkController,
28 | @required this.formKey,
29 | @required this.saveAddress})
30 | : super(key: key);
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | body: DismissKeyBoardView(
36 | child: Stack(
37 | children: [
38 | BlurHeaderImage(),
39 | ListView(
40 | children: [
41 | Stack(
42 | children: [
43 | SlideInLeft(
44 | duration: Duration(milliseconds: 600),
45 | child: GoBackButton(
46 | marginTop: 12,
47 | function: () {
48 | Helper().goBack(context);
49 | },
50 | ),
51 | ),
52 | Column(
53 | children: [
54 | FadeInUp(
55 | duration: Duration(seconds: 1),
56 | child: Container(
57 | height: 160,
58 | margin: EdgeInsets.only(top: 98, bottom: 24),
59 | decoration: BoxDecoration(
60 | image: DecorationImage(
61 | image:
62 | AssetImage('assets/image/map_pin.png'),
63 | fit: BoxFit.fitHeight)),
64 | ),
65 | ),
66 | FadeInUp(
67 | duration: Duration(seconds: 1),
68 | child: Padding(
69 | padding: const EdgeInsets.symmetric(horizontal: 46),
70 | child: Form(
71 | key: formKey,
72 | child: Column(
73 | crossAxisAlignment: CrossAxisAlignment.center,
74 | children: [
75 | AppTextH2(
76 | fontWeight: FontWeight.bold,
77 | text: "Select Your Location",
78 | textAlign: TextAlign.start,
79 | ),
80 | SizedBox(
81 | height: 4,
82 | ),
83 | SmallText(
84 | textAlign: TextAlign.center,
85 | colors: Colors.grey,
86 | text:
87 | "Switch on your location to stay in tune with \nwhat's happening in your area",
88 | ),
89 | SizedBox(
90 | height: 14,
91 | ),
92 | placemark != null
93 | ? InputText(
94 | textEditingController:
95 | addressLine1Controller,
96 | password: false,
97 | hint: "Room Number / Apartment",
98 | onChnaged: (text) {
99 | final addressLine1Rule = Rule(
100 | text,
101 | name: 'Room Number / Apartment',
102 | isRequired: true,
103 | );
104 | if (addressLine1Rule.hasError) {
105 | print("ERROR");
106 | // changeVaildEmail(false);
107 | } else {
108 | print("NO ERROR");
109 | // changeVaildEmail(true);
110 | }
111 | },
112 | validator: (text) {
113 | final addressLine1Rule = Rule(
114 | text,
115 | name: 'Room Number / Apartment',
116 | isRequired: true,
117 | );
118 | if (addressLine1Rule.hasError) {
119 | return addressLine1Rule.error;
120 | } else {
121 | return null;
122 | }
123 | })
124 | : Text(""),
125 | placemark != null
126 | ? InputText(
127 | textEditingController:
128 | addressLine2Controller,
129 | password: false,
130 | hint: "Address Line 2",
131 | onChnaged: (text) {
132 | final addressLine2Rule = Rule(
133 | text,
134 | name: 'Address Line 2',
135 | isRequired: true,
136 | );
137 | if (addressLine2Rule.hasError) {
138 | // changevalidPassword(false);
139 | } else {
140 | // changevalidPassword(true);
141 | }
142 | },
143 | validator: (password) {
144 | final addressLine2Rule = Rule(
145 | password,
146 | name: 'Address Line 2',
147 | isRequired: true,
148 | );
149 | if (addressLine2Rule.hasError) {
150 | return addressLine2Rule.error;
151 | } else {
152 | return null;
153 | }
154 | })
155 | : Text(""),
156 | placemark != null
157 | ? InputText(
158 | textEditingController:
159 | landMarkController,
160 | password: false,
161 | hint: "landMark (optional)",
162 | )
163 | : Text(""),
164 | SizedBox(
165 | height: 14,
166 | ),
167 | FadeInUp(
168 | duration: Duration(seconds: 1),
169 | child: AppButton(
170 | color: Theme.of(context).accentColor,
171 | function: () {
172 | if (placemark != null) {
173 | saveAddress();
174 | }
175 | getTheUserLocation();
176 | },
177 | child: Center(
178 | child: Text(
179 | placemark != null
180 | ? "Save And Continue"
181 | : "Share Your Location",
182 | style: TextStyle(
183 | fontSize: 18,
184 | color: Colors.white,
185 | fontWeight: FontWeight.bold),
186 | ),
187 | )),
188 | ),
189 | SizedBox(
190 | height: 34,
191 | ),
192 | ],
193 | ),
194 | ),
195 | ),
196 | ),
197 | ],
198 | ),
199 | ],
200 | ),
201 | ],
202 | ),
203 | ],
204 | ),
205 | ),
206 | );
207 | }
208 | }
209 |
--------------------------------------------------------------------------------
/lib/screen/home/home.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/bannersItems.dart';
2 | import 'package:OnlineGroceryStore/widget/dismissKeyBoardView.dart';
3 | import 'package:OnlineGroceryStore/widget/searchBox.dart';
4 | import 'package:OnlineGroceryStore/widget/seeAllTitle.dart';
5 | import 'package:OnlineGroceryStore/widget/listItems.dart';
6 | import 'package:animate_do/animate_do.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:OnlineGroceryStore/screen/home/homeHeder.dart';
9 | import 'package:geocoding/geocoding.dart';
10 | import 'package:OnlineGroceryStore/helper/helper.dart';
11 | import 'package:geolocator/geolocator.dart';
12 | import 'package:OnlineGroceryStore/widget/appDialogs.dart';
13 | import 'package:OnlineGroceryStore/screen/productDetail/productDetail.dart';
14 |
15 | class Home extends StatefulWidget {
16 | Home({Key key}) : super(key: key);
17 |
18 | @override
19 | _HomeState createState() => _HomeState();
20 | }
21 |
22 | class _HomeState extends State {
23 | String displayAddress = "";
24 |
25 | void getTheUserLocation() async {
26 | try {
27 | bool serviceEnabled;
28 | LocationPermission permission;
29 | serviceEnabled = await Geolocator.isLocationServiceEnabled();
30 | if (!serviceEnabled) {
31 | await AppDialogs.yesAbortDialog(context, 'Location Error!',
32 | "Location Disabled", "Location services are disabled.", true);
33 | return Future.error('Location services are disabled.');
34 | }
35 |
36 | permission = await Geolocator.checkPermission();
37 | if (permission == LocationPermission.deniedForever) {
38 | await AppDialogs.yesAbortDialog(
39 | context,
40 | 'Location Error!',
41 | "Permission Denied",
42 | 'Location permissions are permantly denied, we cannot request permissions.',
43 | true);
44 | return Future.error(
45 | 'Location permissions are permantly denied, we cannot request permissions.');
46 | }
47 |
48 | if (permission == LocationPermission.denied) {
49 | permission = await Geolocator.requestPermission();
50 | if (permission != LocationPermission.whileInUse &&
51 | permission != LocationPermission.always) {
52 | await AppDialogs.yesAbortDialog(
53 | context,
54 | 'Location Error!',
55 | 'Permission Denied',
56 | 'Location permissions are denied (actual value:$permission).',
57 | true);
58 | return Future.error(
59 | 'Location permissions are denied (actual value: $permission).');
60 | }
61 | }
62 | Position position = await Geolocator.getCurrentPosition();
63 | List placemarks =
64 | await placemarkFromCoordinates(position.latitude, position.longitude);
65 | Placemark placemark = placemarks[0];
66 | String completeAddress =
67 | '${placemark.subThoroughfare} ${placemark.thoroughfare}, ${placemark.subLocality}';
68 | setState(() {
69 | displayAddress = completeAddress;
70 | });
71 | } catch (e) {
72 | setState(() {
73 | displayAddress = "Not Found";
74 | });
75 | Helper().showSnackBar(e.toString(), "ERROR", context, true);
76 | print(e.toString());
77 | }
78 | }
79 |
80 | _onStartScroll(ScrollMetrics metrics) {
81 | Helper().dismissKeyBoard(context);
82 | }
83 |
84 | @override
85 | void initState() {
86 | getTheUserLocation();
87 | super.initState();
88 | }
89 |
90 | @override
91 | Widget build(BuildContext context) {
92 | return Scaffold(
93 | body: DismissKeyBoardView(
94 | child: CustomScrollView(
95 | physics: const BouncingScrollPhysics(),
96 | slivers: [
97 | SliverToBoxAdapter(
98 | child: SafeArea(
99 | child: FadeInUp(
100 | duration: Duration(seconds: 1),
101 | child: HomeHeaderImage(),
102 | ),
103 | ),
104 | ),
105 | SliverToBoxAdapter(
106 | child: FadeInUp(
107 | duration: Duration(seconds: 1),
108 | child: UserAddressView(
109 | address: displayAddress,
110 | ),
111 | ),
112 | ),
113 | SliverToBoxAdapter(
114 | child: FadeInUp(
115 | duration: Duration(seconds: 1),
116 | child: Container(
117 | margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
118 | child: SearchBox(
119 | radius: 8,
120 | function: null,
121 | height: 45.0,
122 | ),
123 | ),
124 | )),
125 | SliverToBoxAdapter(
126 | child: FadeInUp(
127 | duration: Duration(seconds: 1),
128 | child: AppBanner(
129 | bigBanner: false,
130 | ),
131 | ),
132 | ),
133 | SliverToBoxAdapter(
134 | child: FadeInUp(
135 | duration: Duration(seconds: 1),
136 | child: SeeAppTitle(
137 | title: "Exclusive Offer",
138 | function: () {},
139 | ),
140 | ),
141 | ),
142 | SliverToBoxAdapter(
143 | child: FadeInUp(
144 | duration: Duration(seconds: 1),
145 | child: Container(
146 | height: 234,
147 | child: ListView.builder(
148 | physics: const BouncingScrollPhysics(),
149 | scrollDirection: Axis.horizontal,
150 | itemCount: 5,
151 | itemBuilder: (BuildContext context, int index) {
152 | return SlideInRight(
153 | duration: Duration(milliseconds: 500),
154 | child: Container(
155 | margin: EdgeInsets.only(
156 | left: 14,
157 | ),
158 | child: ProductItem(
159 | name: "Name",
160 | imageUrl:
161 | "https://study.com/cimages/multimages/16/adobestock_34617669.jpeg",
162 | price: "55.0",
163 | function: () {
164 | Helper().goToPage(context, ProductDetail());
165 | },
166 | ),
167 | ),
168 | );
169 | },
170 | ),
171 | ),
172 | ),
173 | ),
174 | SliverToBoxAdapter(
175 | child: SeeAppTitle(
176 | title: "Best Selling",
177 | function: () {},
178 | ),
179 | ),
180 | SliverToBoxAdapter(
181 | child: FadeInUp(
182 | duration: Duration(seconds: 1),
183 | child: Container(
184 | height: 234,
185 | child: ListView.builder(
186 | physics: const BouncingScrollPhysics(),
187 | scrollDirection: Axis.horizontal,
188 | itemCount: 5,
189 | itemBuilder: (BuildContext context, int index) {
190 | return SlideInRight(
191 | duration: Duration(milliseconds: 500),
192 | child: Container(
193 | margin: EdgeInsets.only(
194 | left: 14,
195 | ),
196 | child: ProductItem(
197 | name: "Name",
198 | imageUrl:
199 | "https://study.com/cimages/multimages/16/adobestock_34617669.jpeg",
200 | price: "55.0",
201 | function: () {},
202 | ),
203 | ),
204 | );
205 | },
206 | ),
207 | ),
208 | ),
209 | ),
210 | SliverToBoxAdapter(
211 | child: FadeInUp(
212 | duration: Duration(seconds: 1),
213 | child: SeeAppTitle(
214 | title: "Groceries",
215 | function: () {},
216 | ),
217 | ),
218 | ),
219 | SliverToBoxAdapter(
220 | child: FadeInUp(
221 | duration: Duration(seconds: 1),
222 | child: Container(
223 | height: 80.00,
224 | child: ListView.builder(
225 | physics: const BouncingScrollPhysics(),
226 | scrollDirection: Axis.horizontal,
227 | itemCount: 5,
228 | itemBuilder: (BuildContext context, int index) {
229 | return SlideInRight(
230 | duration: Duration(milliseconds: 500),
231 | child: GroceriesItem());
232 | },
233 | ),
234 | ),
235 | ),
236 | ),
237 | SliverToBoxAdapter(
238 | child: FadeInUp(
239 | duration: Duration(seconds: 1),
240 | child: SeeAppTitle(
241 | title: "For You",
242 | function: () {},
243 | ),
244 | ),
245 | ),
246 | SliverToBoxAdapter(
247 | child: FadeInUp(
248 | duration: Duration(seconds: 1),
249 | child: Container(
250 | height: 234,
251 | child: ListView.builder(
252 | physics: const BouncingScrollPhysics(),
253 | scrollDirection: Axis.horizontal,
254 | itemCount: 5,
255 | itemBuilder: (BuildContext context, int index) {
256 | return SlideInRight(
257 | duration: Duration(milliseconds: 500),
258 | child: Container(
259 | margin: EdgeInsets.only(
260 | left: 14,
261 | ),
262 | child: ProductItem(
263 | name: "Name",
264 | imageUrl:
265 | "https://study.com/cimages/multimages/16/adobestock_34617669.jpeg",
266 | price: "55.0",
267 | function: () {},
268 | ),
269 | ),
270 | );
271 | },
272 | ),
273 | ),
274 | ),
275 | ),
276 | SliverToBoxAdapter(
277 | child: SizedBox(
278 | height: 16,
279 | ),
280 | )
281 | ],
282 | ),
283 | ),
284 | );
285 | }
286 | }
287 |
--------------------------------------------------------------------------------
/lib/widget/listItems.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:OnlineGroceryStore/widget/appNetworkImage.dart';
3 | import 'package:OnlineGroceryStore/widget/appText.dart';
4 | import 'package:eva_icons_flutter/eva_icons_flutter.dart';
5 | import 'package:floating_action_row/floating_action_row.dart';
6 |
7 | class ProductItem extends StatelessWidget {
8 | final String name;
9 | final String price;
10 | final String imageUrl;
11 | final Function function;
12 |
13 | const ProductItem(
14 | {Key key,
15 | @required this.function,
16 | @required this.name,
17 | @required this.price,
18 | @required this.imageUrl})
19 | : super(key: key);
20 | @override
21 | Widget build(BuildContext context) {
22 | return InkWell(
23 | onTap: function,
24 | child: Container(
25 | height: 220,
26 | width: 160,
27 | decoration: BoxDecoration(
28 | borderRadius: BorderRadius.circular(18),
29 | border: Border.all(color: Colors.grey)),
30 | padding: EdgeInsets.all(
31 | 14,
32 | ),
33 | child: Column(
34 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
35 | crossAxisAlignment: CrossAxisAlignment.start,
36 | children: [
37 | Column(
38 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
39 | crossAxisAlignment: CrossAxisAlignment.start,
40 | children: [
41 | Container(
42 | height: 110,
43 | child: AppNetWorkIamge(
44 | radius: 18.0,
45 | imageUrl: imageUrl,
46 | boxFit: BoxFit.contain,
47 | ),
48 | ),
49 | SizedBox(
50 | height: 4,
51 | ),
52 | AppTextP1(
53 | textAlign: TextAlign.start,
54 | text: "Name",
55 | ),
56 | Text(
57 | "Name",
58 | style: TextStyle(color: Colors.grey),
59 | ),
60 | ],
61 | ),
62 | Row(
63 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
64 | children: [
65 | AppTextP1(
66 | textAlign: TextAlign.start,
67 | text: "Name",
68 | ),
69 | Container(
70 | height: 46,
71 | width: 46,
72 | decoration: BoxDecoration(
73 | color: Theme.of(context).accentColor,
74 | borderRadius: BorderRadius.circular(16),
75 | border: Border.all(color: Colors.grey)),
76 | child: Center(
77 | child: Icon(EvaIcons.plus, color: Colors.white),
78 | ),
79 | ),
80 | ],
81 | )
82 | ],
83 | ),
84 | ),
85 | );
86 | }
87 | }
88 |
89 | class ProductCategorItem extends StatelessWidget {
90 | final String name;
91 | final String imageUrl;
92 | final Function function;
93 | const ProductCategorItem(
94 | {Key key,
95 | @required this.name,
96 | @required this.imageUrl,
97 | @required this.function})
98 | : super(key: key);
99 |
100 | @override
101 | Widget build(BuildContext context) {
102 | return Container(
103 | decoration: BoxDecoration(
104 | borderRadius: BorderRadius.circular(18),
105 | border: Border.all(color: Colors.grey)),
106 | child: InkWell(
107 | onTap: function,
108 | child: Column(
109 | mainAxisAlignment: MainAxisAlignment.center,
110 | crossAxisAlignment: CrossAxisAlignment.center,
111 | children: [
112 | Container(
113 | height: 100,
114 | width: 100,
115 | child: AppNetWorkIamge(
116 | radius: 8,
117 | boxFit: BoxFit.contain,
118 | imageUrl: imageUrl,
119 | ),
120 | ),
121 | SizedBox(
122 | height: 8,
123 | ),
124 | Container(
125 | padding: EdgeInsets.symmetric(horizontal: 6),
126 | alignment: Alignment.center,
127 | child: AppTextP1(
128 | textAlign: TextAlign.center,
129 | text: "Name ",
130 | ),
131 | ),
132 | ],
133 | ),
134 | ),
135 | );
136 | }
137 | }
138 |
139 | class GroceriesItem extends StatelessWidget {
140 | final Function function;
141 | const GroceriesItem({Key key, this.function}) : super(key: key);
142 |
143 | @override
144 | Widget build(BuildContext context) {
145 | return InkWell(
146 | onTap: function,
147 | child: Container(
148 | // height: 100,
149 | width: 220,
150 | decoration: BoxDecoration(
151 | borderRadius: BorderRadius.circular(18),
152 | border: Border.all(color: Colors.grey)),
153 | margin: EdgeInsets.only(
154 | left: 16,
155 | ),
156 | padding: EdgeInsets.all(
157 | 16,
158 | ),
159 | child: Row(
160 | children: [
161 | Container(
162 | height: 110,
163 | width: 60,
164 | child: AppNetWorkIamge(
165 | boxFit: BoxFit.contain,
166 | radius: 18.0,
167 | imageUrl:
168 | "https://5.imimg.com/data5/YY/EN/MY-8155364/fresh-apple-500x500.jpg",
169 | ),
170 | ),
171 | SizedBox(
172 | width: 12,
173 | ),
174 | AppTextP1(
175 | textAlign: TextAlign.start,
176 | text: "Name",
177 | ),
178 | ],
179 | ),
180 | ),
181 | );
182 | }
183 | }
184 |
185 | class CartListItem extends StatelessWidget {
186 | const CartListItem({Key key}) : super(key: key);
187 |
188 | @override
189 | Widget build(BuildContext context) {
190 | return Column(
191 | children: [
192 | Divider(),
193 | Container(
194 | margin: const EdgeInsets.only(top: 8, left: 14),
195 | child: Column(
196 | mainAxisAlignment: MainAxisAlignment.start,
197 | crossAxisAlignment: CrossAxisAlignment.start,
198 | children: [
199 | Row(
200 | crossAxisAlignment: CrossAxisAlignment.start,
201 | children: [
202 | Container(
203 | margin: EdgeInsets.only(right: 14),
204 | height: 90,
205 | width: 90,
206 | child: AppNetWorkIamge(
207 | radius: 8,
208 | imageUrl:
209 | "https://cdn-prod.medicalnewstoday.com/content/images/articles/273/273031/tomatoes-close-up.jpg",
210 | ),
211 | ),
212 | Expanded(
213 | child: Column(
214 | crossAxisAlignment: CrossAxisAlignment.start,
215 | children: [
216 | Row(
217 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
218 | children: [
219 | Column(
220 | crossAxisAlignment: CrossAxisAlignment.start,
221 | children: [
222 | SmallText(
223 | text: "Some Name",
224 | ),
225 | SizedBox(
226 | height: 4,
227 | ),
228 | Text(
229 | "1Kg",
230 | style: TextStyle(color: Colors.grey),
231 | ),
232 | ],
233 | ),
234 | IconButton(
235 | icon: Icon(
236 | EvaIcons.close,
237 | color: Colors.grey,
238 | ),
239 | onPressed: () {},
240 | )
241 | ],
242 | ),
243 | Row(
244 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
245 | children: [
246 | FloatingActionRow(
247 | elevation: 0,
248 | height: 46,
249 | borderRadius:
250 | BorderRadius.all(Radius.circular(12)),
251 | color: Theme.of(context).scaffoldBackgroundColor,
252 | children: [
253 | Container(
254 | width: 40,
255 | height: 40,
256 | decoration: BoxDecoration(
257 | borderRadius:
258 | BorderRadius.all(Radius.circular(14.0)),
259 | border: Border.all(
260 | color: Colors.grey,
261 | width: 1.0,
262 | ),
263 | ),
264 | child: FloatingActionRowButton(
265 | icon: Icon(
266 | Icons.remove,
267 | color: Colors.grey,
268 | ),
269 | onTap: () {},
270 | ),
271 | ),
272 | Container(
273 | width: 46,
274 | padding: EdgeInsets.only(top: 4, bottom: 4),
275 | child: Center(
276 | child: Text(
277 | "1",
278 | textAlign: TextAlign.center,
279 | style: TextStyle(
280 | fontSize: 18,
281 | ),
282 | ),
283 | ),
284 | ),
285 | Container(
286 | width: 40,
287 | height: 40,
288 | padding: EdgeInsets.only(top: 4, bottom: 4),
289 | decoration: BoxDecoration(
290 | borderRadius:
291 | BorderRadius.all(Radius.circular(14.0)),
292 | border: Border.all(
293 | color: Colors.grey,
294 | width: 1.0,
295 | ),
296 | ),
297 | child: FloatingActionRowButton(
298 | icon: Icon(
299 | Icons.add,
300 | color: Theme.of(context).accentColor,
301 | ),
302 | onTap: () {},
303 | ),
304 | ),
305 | ],
306 | ),
307 | Container(
308 | margin: EdgeInsets.only(right: 14),
309 | child: Text(
310 | "49.99",
311 | style: TextStyle(
312 | fontWeight: FontWeight.w500,
313 | fontSize: 19,
314 | ),
315 | ),
316 | )
317 | ],
318 | )
319 | ],
320 | ),
321 | )
322 | ],
323 | ),
324 | ],
325 | ),
326 | ),
327 | ],
328 | );
329 | }
330 | }
331 |
--------------------------------------------------------------------------------
/lib/screen/auth/login/loginUI.dart:
--------------------------------------------------------------------------------
1 | import 'package:OnlineGroceryStore/widget/appIcon.dart';
2 | import 'package:OnlineGroceryStore/widget/appInputText.dart';
3 | import 'package:OnlineGroceryStore/widget/appText.dart';
4 | import 'package:OnlineGroceryStore/widget/blurHeaderImage.dart';
5 | import 'package:OnlineGroceryStore/widget/buttons.dart';
6 | import 'package:OnlineGroceryStore/helper/helper.dart';
7 | import 'package:animate_do/animate_do.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:rules/rules.dart';
10 |
11 | class LoginScreenUI extends StatelessWidget {
12 | final bool validEmail;
13 | final bool validPassword;
14 | final TextEditingController emailController;
15 | final TextEditingController passwordController;
16 | final Function changeVaildEmail;
17 | final Function changevalidPassword;
18 | final Function changeRemamberme;
19 | final bool remamberme;
20 | final GlobalKey formKey;
21 | final Function loginUser;
22 | final Function createAccount;
23 |
24 | const LoginScreenUI(
25 | {Key key,
26 | @required this.emailController,
27 | @required this.passwordController,
28 | @required this.validEmail,
29 | @required this.validPassword,
30 | @required this.changeVaildEmail,
31 | @required this.changevalidPassword,
32 | @required this.changeRemamberme,
33 | @required this.remamberme,
34 | @required this.formKey,
35 | @required this.loginUser,
36 | @required this.createAccount})
37 | : super(key: key);
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Scaffold(
42 | body: LayoutBuilder(
43 | builder: (BuildContext context, BoxConstraints viewportConstraints) {
44 | return SingleChildScrollView(
45 | child: ConstrainedBox(
46 | constraints: BoxConstraints(
47 | minHeight: viewportConstraints.maxHeight,
48 | ),
49 | child: Form(
50 | key: formKey,
51 | child: Stack(
52 | children: [
53 | BlurHeaderImage(),
54 | SlideInLeft(
55 | duration: Duration(milliseconds: 600),
56 | child: GoBackButton(
57 | function: () {
58 | Helper().goBack(context);
59 | },
60 | ),
61 | ),
62 | Column(
63 | children: [
64 | FadeInUp(
65 | duration: Duration(seconds: 1),
66 | child: Container(
67 | height: 55,
68 | margin: EdgeInsets.only(top: 64, bottom: 64),
69 | decoration: BoxDecoration(
70 | image: DecorationImage(
71 | image: AssetImage(
72 | 'assets/image/icon_color.png'),
73 | fit: BoxFit.fitHeight)),
74 | ),
75 | ),
76 | FadeInUp(
77 | duration: Duration(seconds: 1),
78 | child: Padding(
79 | padding:
80 | const EdgeInsets.symmetric(horizontal: 46),
81 | child: Column(
82 | crossAxisAlignment: CrossAxisAlignment.start,
83 | children: [
84 | AppTextH2(
85 | fontWeight: FontWeight.bold,
86 | text: "LogIn",
87 | textAlign: TextAlign.start,
88 | ),
89 | SizedBox(
90 | height: 4,
91 | ),
92 | SmallText(
93 | text: "Enter your email and password",
94 | ),
95 | InputText(
96 | textInputType: TextInputType.emailAddress,
97 | textEditingController: emailController,
98 | password: false,
99 | hint: "Email",
100 | onChnaged: (text) {
101 | final emailRule = Rule(text,
102 | name: 'Email',
103 | isRequired: true,
104 | isEmail: true);
105 | if (emailRule.hasError) {
106 | changeVaildEmail(false);
107 | } else {
108 | changeVaildEmail(true);
109 | }
110 | },
111 | rightIcon: validEmail
112 | ? RightIcon()
113 | : WorngIcon(),
114 | validator: (password) {
115 | final passWordRule = Rule(password,
116 | name: 'Email',
117 | isRequired: true,
118 | isEmail: true);
119 | if (passWordRule.hasError) {
120 | return passWordRule.error;
121 | } else {
122 | return null;
123 | }
124 | }),
125 | InputText(
126 | textEditingController: passwordController,
127 | password: true,
128 | hint: "Password",
129 | onChnaged: (text) {
130 | final emailRule = Rule(text,
131 | name: 'Password',
132 | isRequired: true,
133 | minLength: 6);
134 | if (emailRule.hasError) {
135 | changevalidPassword(false);
136 | } else {
137 | changevalidPassword(true);
138 | }
139 | },
140 | rightIcon: validPassword
141 | ? RightIcon()
142 | : WorngIcon(),
143 | validator: (password) {
144 | final passWordRule = Rule(password,
145 | name: 'Password',
146 | isRequired: true,
147 | minLength: 6);
148 | if (passWordRule.hasError) {
149 | return passWordRule.error;
150 | } else {
151 | return null;
152 | }
153 | }),
154 | SizedBox(
155 | height: 8,
156 | ),
157 | Row(
158 | mainAxisAlignment:
159 | MainAxisAlignment.spaceBetween,
160 | children: [
161 | Row(
162 | children: [
163 | SizedBox(
164 | height: 24.0,
165 | width: 24.0,
166 | child: Checkbox(
167 | value: remamberme,
168 | onChanged: (bool value) {
169 | changeRemamberme(value);
170 | },
171 | )),
172 | SizedBox(
173 | width: 8,
174 | ),
175 | Text(
176 | 'Remamber me',
177 | style: TextStyle(fontSize: 16.0),
178 | ),
179 | ],
180 | ),
181 | GestureDetector(
182 | onTap: () {
183 | // Helper().goToPage(
184 | // context, ForgotPasswordScreen());
185 | },
186 | child: Text(
187 | 'Forgot Password',
188 | style: TextStyle(fontSize: 16.0),
189 | )),
190 | ],
191 | ),
192 | SizedBox(
193 | height: 34,
194 | ),
195 | FadeInUp(
196 | duration: Duration(seconds: 1),
197 | child: AppButton(
198 | color: Theme.of(context).accentColor,
199 | function: () {
200 | loginUser();
201 | },
202 | child: Center(
203 | child: Text(
204 | "Log In",
205 | style: TextStyle(
206 | fontSize: 18,
207 | color: Colors.white,
208 | fontWeight: FontWeight.bold),
209 | ),
210 | )),
211 | ),
212 | SizedBox(
213 | height: 34,
214 | ),
215 | FadeInUp(
216 | duration: Duration(seconds: 1),
217 | child: GestureDetector(
218 | onTap: () {
219 | createAccount();
220 | },
221 | child: Row(
222 | mainAxisAlignment:
223 | MainAxisAlignment.center,
224 | crossAxisAlignment:
225 | CrossAxisAlignment.center,
226 | children: [
227 | Text(
228 | 'Dont have an account? ',
229 | style: TextStyle(fontSize: 16.0),
230 | ),
231 | Text(
232 | 'Singup',
233 | style: TextStyle(
234 | fontSize: 16.0,
235 | color: Theme.of(context)
236 | .accentColor,
237 | fontWeight: FontWeight.bold),
238 | ),
239 | ],
240 | ),
241 | ),
242 | ),
243 | SizedBox(
244 | height: 34,
245 | ),
246 | ],
247 | ),
248 | ),
249 | ),
250 | ],
251 | ),
252 | ],
253 | ),
254 | )),
255 | );
256 | },
257 | ),
258 | );
259 | }
260 | }
261 |
--------------------------------------------------------------------------------