├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Podfile.lock ├── .gitignore └── Podfile ├── screenshots ├── cart.png ├── home.png ├── login.png ├── signup.png └── details.png ├── assets ├── images │ ├── bag_1.png │ ├── bag_2.png │ ├── bag_3.png │ ├── bag_4.png │ ├── bag_5.png │ ├── bag_6.png │ ├── crown.png │ ├── airplane.png │ ├── christmas.png │ ├── gamepad.png │ ├── telephone.png │ └── gamepad.jpeg.sb-53bad7a7-702lx2 └── icons │ ├── search.svg │ ├── back.svg │ ├── heart.svg │ ├── cart.svg │ └── add_to_cart.svg ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── smakos │ │ │ │ │ └── online_shopping │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── lib ├── constants.dart ├── providers │ └── bottom_bar_provider.dart ├── pages │ ├── account │ │ └── account.dart │ ├── details │ │ ├── components │ │ │ ├── description.dart │ │ │ ├── counter_with_fav_btn.dart │ │ │ ├── cart_counter.dart │ │ │ ├── product_title_with_image.dart │ │ │ ├── add_to_cart.dart │ │ │ ├── body.dart │ │ │ └── color_and_size.dart │ │ └── details_screen.dart │ ├── cart │ │ ├── cart.dart │ │ └── components │ │ │ ├── checkout_card.dart │ │ │ └── cart_card.dart │ ├── home │ │ ├── components │ │ │ ├── special_card.dart │ │ │ ├── categorries.dart │ │ │ ├── body.dart │ │ │ └── item_card.dart │ │ └── home_screen.dart │ ├── mainscreen.dart │ ├── categories │ │ ├── categories_screen.dart │ │ └── components │ │ │ └── categories_drawer.dart │ ├── login.dart │ └── signup.dart ├── reusable_card.dart ├── main.dart ├── size_config.dart ├── widgets │ ├── bottom_bar.dart │ ├── reusable_button.dart │ ├── custom_text_feld.dart │ └── custom_button.dart └── models │ ├── Product.dart │ └── specials.dart ├── .metadata ├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /screenshots/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/screenshots/cart.png -------------------------------------------------------------------------------- /screenshots/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/screenshots/home.png -------------------------------------------------------------------------------- /screenshots/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/screenshots/login.png -------------------------------------------------------------------------------- /screenshots/signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/screenshots/signup.png -------------------------------------------------------------------------------- /assets/images/bag_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_1.png -------------------------------------------------------------------------------- /assets/images/bag_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_2.png -------------------------------------------------------------------------------- /assets/images/bag_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_3.png -------------------------------------------------------------------------------- /assets/images/bag_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_4.png -------------------------------------------------------------------------------- /assets/images/bag_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_5.png -------------------------------------------------------------------------------- /assets/images/bag_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/bag_6.png -------------------------------------------------------------------------------- /assets/images/crown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/crown.png -------------------------------------------------------------------------------- /screenshots/details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/screenshots/details.png -------------------------------------------------------------------------------- /assets/images/airplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/airplane.png -------------------------------------------------------------------------------- /assets/images/christmas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/christmas.png -------------------------------------------------------------------------------- /assets/images/gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/gamepad.png -------------------------------------------------------------------------------- /assets/images/telephone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/telephone.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 | -------------------------------------------------------------------------------- /assets/images/gamepad.jpeg.sb-53bad7a7-702lx2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/assets/images/gamepad.jpeg.sb-53bad7a7-702lx2 -------------------------------------------------------------------------------- /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/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/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/MikkyBoy357/smakos/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MikkyBoy357/smakos/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/MikkyBoy357/smakos/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const kTextColor = Color(0xFF535353); 4 | const kTextLightColor = Color(0xFFACACAC); 5 | 6 | const kDefaultPaddin = 20.0; 7 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/smakos/online_shopping/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.smakos.online_shopping 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip 7 | -------------------------------------------------------------------------------- /lib/providers/bottom_bar_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | class BottomBarProvider with ChangeNotifier { 4 | int selectedItem = 0; 5 | 6 | void changeSelectedItem(int newValue) { 7 | selectedItem = newValue; 8 | notifyListeners(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /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: 1aafb3a8b9b0c36241c5f5b34ee914770f015818 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /lib/pages/account/account.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AccountScreen extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Scaffold( 7 | appBar: AppBar( 8 | automaticallyImplyLeading: false, 9 | backgroundColor: Colors.red, 10 | title: Text('Account'), 11 | ), 12 | body: Center( 13 | child: Text('Account'), 14 | ), 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 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_secure_storage (3.3.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | flutter_secure_storage: 14 | :path: ".symlinks/plugins/flutter_secure_storage/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c 18 | flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec 19 | 20 | PODFILE CHECKSUM: e210b41cd9a931c958788ba53fb9c1a43ba5b587 21 | 22 | COCOAPODS: 1.10.1 23 | -------------------------------------------------------------------------------- /lib/pages/details/components/description.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/Product.dart'; 3 | 4 | import '../../../constants.dart'; 5 | 6 | class Description extends StatelessWidget { 7 | const Description({ 8 | Key key, 9 | @required this.product, 10 | }) : super(key: key); 11 | 12 | final Product product; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin), 18 | child: Text( 19 | product.description, 20 | style: TextStyle(height: 1.5), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/reusable_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ReusableCard extends StatelessWidget { 4 | ReusableCard({@required this.colour, this.cardChild, this.onPress}); 5 | 6 | final Color colour; 7 | final Widget cardChild; 8 | final Function onPress; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return GestureDetector( 13 | onTap: onPress, 14 | child: Container( 15 | child: cardChild, 16 | margin: EdgeInsets.all(15.0), 17 | decoration: BoxDecoration( 18 | color: colour, 19 | borderRadius: BorderRadius.circular(10.0), 20 | ), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: mikkyboy357 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/pages/signup.dart'; 3 | import 'package:online_shopping/providers/bottom_bar_provider.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | void main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return MultiProvider( 12 | providers: [ 13 | ChangeNotifierProvider(create: (_) => BottomBarProvider()), 14 | ], 15 | child: MaterialApp( 16 | debugShowCheckedModeBanner: false, 17 | home: SignupPage(), 18 | theme: ThemeData( 19 | appBarTheme: AppBarTheme( 20 | color: Colors.red, 21 | )), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # online_shopping 2 | 3 | Shop online and save some money. 4 | 5 | ## ✨ Requirements 6 | * Any Operating System (ie. MacOS X, Linux, Windows) 7 | * Any IDE with Flutter SDK installed (ie. IntelliJ, Android Studio, VSCode etc) 8 | * A little knowledge of Dart and Flutter 9 | * A brain to think 🤓🤓 10 | 11 | 12 | 13 | ## 📸 ScreenShots 14 | 15 | 16 | 17 | 18 | 19 | 20 | ## 🤓 Author(s) 21 | **Michael Olusegun** 22 | 23 | 24 | Buy Me A Coffee 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/pages/details/components/counter_with_fav_btn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | import 'cart_counter.dart'; 5 | 6 | class CounterWithFavBtn extends StatelessWidget { 7 | const CounterWithFavBtn({ 8 | Key key, 9 | }) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 15 | children: [ 16 | CartCounter(), 17 | Container( 18 | padding: EdgeInsets.all(8), 19 | height: 32, 20 | width: 32, 21 | decoration: BoxDecoration( 22 | color: Color(0xFFFF6464), 23 | shape: BoxShape.circle, 24 | ), 25 | child: SvgPicture.asset("assets/icons/heart.svg"), 26 | ) 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/pages/cart/cart.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/pages/cart/components/checkout_card.dart'; 3 | import 'package:online_shopping/size_config.dart'; 4 | 5 | import 'components/cart_card.dart'; 6 | 7 | class CartScreen extends StatefulWidget { 8 | @override 9 | _CartScreenState createState() => _CartScreenState(); 10 | } 11 | 12 | class _CartScreenState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | SizeConfig().init(context); 16 | return Scaffold( 17 | backgroundColor: Colors.grey[100], 18 | appBar: AppBar( 19 | backgroundColor: Colors.red, 20 | centerTitle: true, 21 | title: Text('Cart'), 22 | ), 23 | body: ListView.builder( 24 | itemCount: 6, 25 | itemBuilder: (context, index) { 26 | return CartCard(); 27 | }, 28 | ), 29 | bottomNavigationBar: CheckoutCard(), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/size_config.dart: -------------------------------------------------------------------------------- 1 | //A custom class for handling text size, margin szie and other responsiveness related issues 2 | import 'package:flutter/material.dart'; 3 | 4 | class SizeConfig { 5 | // static keyword included so you can call this method without instantiating an object of it like so : 6 | // SizeConfig.height(context, 2) 7 | 8 | static BuildContext appContext; 9 | static MediaQueryData _mediaQueryData; 10 | 11 | void init(BuildContext context) { 12 | _mediaQueryData = MediaQuery.of(context); 13 | appContext = context; 14 | } 15 | 16 | static double height(double height) { 17 | double screenHeight = _mediaQueryData.size.height / 600; 18 | return height * screenHeight; 19 | } 20 | 21 | static double width(double width) { 22 | double screenWidth = _mediaQueryData.size.width / 400; 23 | return width * screenWidth; 24 | } 25 | 26 | static double textSize(double textSize) { 27 | double screenWidth = _mediaQueryData.size.width / 400; 28 | return textSize * screenWidth; 29 | } 30 | } -------------------------------------------------------------------------------- /lib/widgets/bottom_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../size_config.dart'; 4 | 5 | class BottomBar extends StatelessWidget { 6 | final int currentIndex; 7 | final Function onTap; 8 | const BottomBar({ 9 | Key key, 10 | @required this.currentIndex, 11 | this.onTap, 12 | }) : super(key: key); 13 | @override 14 | Widget build(BuildContext context) { 15 | return BottomNavigationBar( 16 | currentIndex: currentIndex, 17 | onTap: onTap, 18 | backgroundColor: Colors.white, 19 | selectedItemColor: Colors.red, 20 | items: [ 21 | BottomNavigationBarItem( 22 | label: 'Home', 23 | icon: Icon(Icons.home), 24 | ), 25 | BottomNavigationBarItem( 26 | label: 'Categories', 27 | icon: Icon(Icons.list_alt_rounded), 28 | ), 29 | BottomNavigationBarItem( 30 | label: 'Account', 31 | icon: Icon(Icons.account_circle_outlined), 32 | ), 33 | ], 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /assets/icons/cart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /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:online_shopping/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/pages/home/components/special_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/specials.dart'; 3 | import 'package:online_shopping/size_config.dart'; 4 | 5 | import '../../../constants.dart'; 6 | 7 | class SpecialCard extends StatelessWidget { 8 | final Special special; 9 | final Function press; 10 | const SpecialCard({ 11 | Key key, 12 | this.special, 13 | this.press, 14 | }) : super(key: key); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return GestureDetector( 19 | onTap: press, 20 | child: Column( 21 | children: [ 22 | CircleAvatar( 23 | backgroundColor: special.color, 24 | radius: 28, 25 | child: Image.asset( 26 | '${special.image}', 27 | height: 45, 28 | color: Colors.white, 29 | ), 30 | ), 31 | Column( 32 | children: [ 33 | Padding( 34 | padding: const EdgeInsets.symmetric(horizontal: 0), 35 | child: Text( 36 | '${special.title}', 37 | textAlign: TextAlign.center, 38 | style: TextStyle( 39 | fontSize: SizeConfig.textSize(12), 40 | ), 41 | ), 42 | ), 43 | ], 44 | ), 45 | ], 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/pages/home/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/constants.dart'; 3 | import 'package:online_shopping/pages/cart/cart.dart'; 4 | import 'package:online_shopping/pages/home/components/body.dart'; 5 | import 'package:online_shopping/size_config.dart'; 6 | import 'package:online_shopping/widgets/custom_text_feld.dart'; 7 | 8 | class HomeScreen extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | SizeConfig().init(context); 12 | return Scaffold( 13 | // backgroundColor: Colors.white, 14 | appBar: buildAppBar(context), 15 | body: Body(), 16 | ); 17 | } 18 | 19 | AppBar buildAppBar(BuildContext context) { 20 | return AppBar( 21 | backgroundColor: Colors.red, 22 | automaticallyImplyLeading: false, 23 | elevation: 0, 24 | title: SearchBar( 25 | icon: Icon( 26 | Icons.search, 27 | color: Colors.black, 28 | ), 29 | hintText: 'Search on SMAKOS', 30 | ), 31 | actions: [ 32 | IconButton( 33 | icon: Icon( 34 | Icons.shopping_cart_outlined, 35 | size: 35, 36 | ), 37 | onPressed: () { 38 | Navigator.push( 39 | context, 40 | MaterialPageRoute( 41 | builder: (context) { 42 | return CartScreen(); 43 | }, 44 | ), 45 | ); 46 | }, 47 | ), 48 | SizedBox(width: kDefaultPaddin / 2) 49 | ], 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /assets/icons/add_to_cart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | online_shopping 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/pages/details/details_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:online_shopping/constants.dart'; 4 | import 'package:online_shopping/models/Product.dart'; 5 | import 'package:online_shopping/pages/cart/cart.dart'; 6 | import 'package:online_shopping/pages/details/components/body.dart'; 7 | 8 | class DetailsScreen extends StatelessWidget { 9 | final Product product; 10 | final Color itemBackgroundColor; 11 | 12 | const DetailsScreen({ 13 | Key key, 14 | this.product, 15 | @required this.itemBackgroundColor, 16 | }) : super(key: key); 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | // each product have a color 21 | backgroundColor: itemBackgroundColor, 22 | appBar: buildAppBar(context), 23 | body: Body(product: product), 24 | ); 25 | } 26 | 27 | AppBar buildAppBar(BuildContext context) { 28 | return AppBar( 29 | backgroundColor: itemBackgroundColor, 30 | elevation: 0, 31 | title: Text('Details'), 32 | actions: [ 33 | // IconButton( 34 | // icon: Icon( 35 | // Icons.search, 36 | // ), 37 | // onPressed: () {}, 38 | // ), 39 | IconButton( 40 | icon: Icon(Icons.shopping_cart_outlined), 41 | onPressed: () { 42 | Navigator.push( 43 | context, 44 | MaterialPageRoute( 45 | builder: (context) { 46 | return CartScreen(); 47 | }, 48 | ), 49 | ); 50 | }, 51 | ), 52 | SizedBox(width: kDefaultPaddin / 2) 53 | ], 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/pages/details/components/cart_counter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class CartCounter extends StatefulWidget { 6 | @override 7 | _CartCounterState createState() => _CartCounterState(); 8 | } 9 | 10 | class _CartCounterState extends State { 11 | int numOfItems = 1; 12 | @override 13 | Widget build(BuildContext context) { 14 | return Row( 15 | children: [ 16 | buildOutlineButton( 17 | icon: Icons.remove, 18 | press: () { 19 | if (numOfItems > 1) { 20 | setState(() { 21 | numOfItems--; 22 | }); 23 | } 24 | }, 25 | ), 26 | Padding( 27 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin / 2), 28 | child: Text( 29 | // if our item is less then 10 then it shows 01 02 like that 30 | numOfItems.toString().padLeft(2, "0"), 31 | style: Theme.of(context).textTheme.headline6, 32 | ), 33 | ), 34 | buildOutlineButton( 35 | icon: Icons.add, 36 | press: () { 37 | setState(() { 38 | numOfItems++; 39 | }); 40 | }), 41 | ], 42 | ); 43 | } 44 | 45 | SizedBox buildOutlineButton({IconData icon, Function press}) { 46 | return SizedBox( 47 | width: 40, 48 | height: 32, 49 | child: OutlineButton( 50 | padding: EdgeInsets.zero, 51 | shape: RoundedRectangleBorder( 52 | borderRadius: BorderRadius.circular(13), 53 | ), 54 | onPressed: press, 55 | child: Icon(icon), 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/pages/mainscreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/pages/account/account.dart'; 3 | import 'package:online_shopping/pages/categories/categories_screen.dart'; 4 | import 'package:online_shopping/pages/home/home_screen.dart'; 5 | import 'package:online_shopping/providers/bottom_bar_provider.dart'; 6 | import 'package:online_shopping/widgets/bottom_bar.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | class MainScreen extends StatefulWidget { 10 | @override 11 | _MainScreenState createState() => _MainScreenState(); 12 | } 13 | 14 | class _MainScreenState extends State { 15 | PageController _pageController = PageController(); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | body: PageView( 21 | controller: _pageController, 22 | onPageChanged: (index) { 23 | Provider.of(context, listen: false) 24 | .changeSelectedItem(index); 25 | }, 26 | children: [ 27 | HomeScreen(), 28 | CategoriesScreen(), 29 | AccountScreen(), 30 | ], 31 | ), 32 | bottomNavigationBar: Consumer( 33 | builder: (context, bottom, _) { 34 | return BottomBar( 35 | currentIndex: bottom.selectedItem, 36 | onTap: (index) { 37 | Provider.of(context, listen: false) 38 | .changeSelectedItem(index); 39 | 40 | _pageController.animateToPage(bottom.selectedItem, 41 | duration: Duration(milliseconds: 200), curve: Curves.linear); 42 | }, 43 | ); 44 | }, 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /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 | target.build_configurations.each do |config| 41 | if Gem::Version.new('10.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) 42 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' 43 | end 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /lib/models/Product.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Product { 4 | final String image, title, description; 5 | final int price, size, id; 6 | final Color color; 7 | Product({ 8 | this.id, 9 | this.image, 10 | this.title, 11 | this.price, 12 | this.description, 13 | this.size, 14 | this.color = Colors.red, 15 | }); 16 | } 17 | 18 | List products = [ 19 | Product( 20 | id: 1, 21 | title: "Office Code", 22 | price: 234, 23 | size: 12, 24 | description: dummyText, 25 | image: "assets/images/bag_1.png", 26 | // color: Color(0xFF3D82AE), 27 | ), 28 | Product( 29 | id: 2, 30 | title: "Belt Bag", 31 | price: 234, 32 | size: 8, 33 | description: dummyText, 34 | image: "assets/images/bag_2.png", 35 | // color: Color(0xFFD3A984), 36 | ), 37 | Product( 38 | id: 3, 39 | title: "Hang Top", 40 | price: 234, 41 | size: 10, 42 | description: dummyText, 43 | image: "assets/images/bag_3.png", 44 | // color: Color(0xFF989493), 45 | ), 46 | Product( 47 | id: 4, 48 | title: "Old Fashion", 49 | price: 234, 50 | size: 11, 51 | description: dummyText, 52 | image: "assets/images/bag_4.png", 53 | // color: Color(0xFFE6B398), 54 | ), 55 | Product( 56 | id: 5, 57 | title: "Office Code", 58 | price: 234, 59 | size: 12, 60 | description: dummyText, 61 | image: "assets/images/bag_5.png", 62 | // color: Color(0xFFFB7883), 63 | ), 64 | Product( 65 | id: 6, 66 | title: "Cross Shoulder", 67 | price: 234, 68 | size: 12, 69 | description: dummyText, 70 | image: "assets/images/bag_6.png", 71 | // color: Color(0xFFAEAEAE), 72 | ), 73 | ]; 74 | 75 | String dummyText = 76 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. When an unknown printer took a galley."; 77 | -------------------------------------------------------------------------------- /lib/pages/home/components/categorries.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | // We need satefull widget for our categories 6 | 7 | class Categories extends StatefulWidget { 8 | @override 9 | _CategoriesState createState() => _CategoriesState(); 10 | } 11 | 12 | class _CategoriesState extends State { 13 | List categories = ["Hand bag", "Jewellery", "Footwear", "Dresses"]; 14 | // By default our first item will be selected 15 | int selectedIndex = 0; 16 | @override 17 | Widget build(BuildContext context) { 18 | return Padding( 19 | padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin), 20 | child: SizedBox( 21 | height: 25, 22 | child: ListView.builder( 23 | scrollDirection: Axis.horizontal, 24 | itemCount: categories.length, 25 | itemBuilder: (context, index) => buildCategory(index), 26 | ), 27 | ), 28 | ); 29 | } 30 | 31 | Widget buildCategory(int index) { 32 | return GestureDetector( 33 | onTap: () { 34 | setState(() { 35 | selectedIndex = index; 36 | }); 37 | }, 38 | child: Padding( 39 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 40 | child: Column( 41 | crossAxisAlignment: CrossAxisAlignment.start, 42 | children: [ 43 | Text( 44 | categories[index], 45 | style: TextStyle( 46 | fontWeight: FontWeight.bold, 47 | color: selectedIndex == index ? kTextColor : kTextLightColor, 48 | ), 49 | ), 50 | Container( 51 | margin: EdgeInsets.only(top: kDefaultPaddin / 4), //top padding 5 52 | height: 2, 53 | width: 30, 54 | color: selectedIndex == index ? Colors.black : Colors.transparent, 55 | ) 56 | ], 57 | ), 58 | ), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/pages/categories/categories_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/Product.dart'; 3 | import 'package:online_shopping/pages/categories/components/categories_drawer.dart'; 4 | import 'package:online_shopping/pages/details/details_screen.dart'; 5 | import 'package:online_shopping/pages/home/components/item_card.dart'; 6 | 7 | import '../../constants.dart'; 8 | 9 | class CategoriesScreen extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: AppBar( 14 | automaticallyImplyLeading: false, 15 | backgroundColor: Colors.red, 16 | title: Text('Mobile Phones'), 17 | actions: [ 18 | Builder( 19 | builder: (context) => IconButton( 20 | icon: Icon(Icons.sort), 21 | onPressed: () => Scaffold.of(context).openEndDrawer(), 22 | tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip, 23 | ), 24 | ), 25 | ], 26 | ), 27 | endDrawer: CategoriesDrawer(), 28 | body: SingleChildScrollView( 29 | child: Column( 30 | children: [ 31 | Padding( 32 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 33 | child: GridView.builder( 34 | shrinkWrap: true, 35 | physics: NeverScrollableScrollPhysics(), 36 | itemCount: products.length, 37 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 38 | crossAxisCount: 2, 39 | mainAxisSpacing: kDefaultPaddin, 40 | crossAxisSpacing: kDefaultPaddin, 41 | childAspectRatio: 0.75, 42 | ), 43 | itemBuilder: (context, index) => ItemCard( 44 | product: products[index], 45 | ), 46 | ), 47 | ), 48 | ], 49 | ), 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /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.smakos.online_shopping" 42 | minSdkVersion 18 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/pages/categories/components/categories_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | List categories = [ 6 | 'Automobile', 7 | 'Baby Products', 8 | 'Computing', 9 | 'Electronics', 10 | 'Fashion', 11 | 'Gaming', 12 | 'Health Fashion', 13 | 'Home & Beauty', 14 | 'Phones & Tablets', 15 | 'Sports', 16 | 'Supermarket', 17 | 'Toys', 18 | ]; 19 | 20 | List categoryColors = [ 21 | // Color(0xFFA6D6FF), 22 | // Color(0xFFFF98A8), 23 | Color(0xFFF6BB86), 24 | Color(0xFF00C48C), 25 | Color(0xFF22B6F2), 26 | Color(0xFFFFB425), 27 | Color(0xFF949AEE), 28 | Color(0xFF4CA772), 29 | Color(0xFF565656), 30 | ]; 31 | 32 | class CategoriesDrawer extends StatelessWidget { 33 | @override 34 | Widget build(BuildContext context) { 35 | return Drawer( 36 | child: Scaffold( 37 | appBar: AppBar( 38 | automaticallyImplyLeading: false, 39 | backgroundColor: Colors.white, 40 | title: Text( 41 | 'Choose Category', 42 | style: TextStyle(color: Colors.black), 43 | ), 44 | ), 45 | body: ListView.builder( 46 | itemCount: categories.length, 47 | itemBuilder: (context, index) { 48 | return GestureDetector( 49 | onTap: () { 50 | Navigator.pop(context); 51 | }, 52 | child: Card( 53 | child: Container( 54 | height: 58, 55 | decoration: BoxDecoration( 56 | color: index < categoryColors.length 57 | ? categoryColors[index] 58 | : categoryColors[ 59 | Random().nextInt(categoryColors.length)], 60 | borderRadius: BorderRadius.circular(4.0), 61 | ), 62 | child: Center( 63 | child: Text( 64 | '${categories[index]}', 65 | style: TextStyle( 66 | color: Colors.white, 67 | fontSize: 20, 68 | ), 69 | ), 70 | ), 71 | ), 72 | ), 73 | ); 74 | }, 75 | ), 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/pages/details/components/product_title_with_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/Product.dart'; 3 | 4 | import '../../../constants.dart'; 5 | 6 | class ProductTitleWithImage extends StatelessWidget { 7 | const ProductTitleWithImage({ 8 | Key key, 9 | @required this.product, 10 | }) : super(key: key); 11 | 12 | final Product product; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | Text( 22 | "Aristocratic Hand Bag", 23 | style: TextStyle(color: Colors.white), 24 | ), 25 | Text( 26 | product.title, 27 | style: Theme.of(context) 28 | .textTheme 29 | .headline4 30 | .copyWith(color: Colors.white, fontWeight: FontWeight.bold), 31 | ), 32 | SizedBox(height: kDefaultPaddin), 33 | Container( 34 | height: MediaQuery.of(context).size.height / 3, 35 | // color: Colors.blue, 36 | child: Row( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | RichText( 40 | text: TextSpan( 41 | children: [ 42 | TextSpan(text: "Price\n"), 43 | TextSpan( 44 | text: "\$${product.price}", 45 | style: Theme.of(context).textTheme.headline4.copyWith( 46 | color: Colors.white, fontWeight: FontWeight.bold), 47 | ), 48 | ], 49 | ), 50 | ), 51 | SizedBox(width: kDefaultPaddin), 52 | Expanded( 53 | child: Hero( 54 | tag: "${product.id}", 55 | child: Image.asset( 56 | product.image, 57 | fit: BoxFit.fill, 58 | ), 59 | ), 60 | ) 61 | ], 62 | ), 63 | ) 64 | ], 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/pages/details/components/add_to_cart.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import 'package:online_shopping/models/Product.dart'; 4 | import 'package:online_shopping/pages/cart/cart.dart'; 5 | 6 | import '../../../constants.dart'; 7 | 8 | class AddToCart extends StatelessWidget { 9 | const AddToCart({ 10 | Key key, 11 | @required this.product, 12 | }) : super(key: key); 13 | 14 | final Product product; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Padding( 19 | padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin), 20 | child: Row( 21 | children: [ 22 | Container( 23 | margin: EdgeInsets.only(right: kDefaultPaddin), 24 | height: 50, 25 | width: 58, 26 | decoration: BoxDecoration( 27 | borderRadius: BorderRadius.circular(18), 28 | border: Border.all( 29 | color: product.color, 30 | ), 31 | ), 32 | child: IconButton( 33 | icon: Icon( 34 | Icons.add_shopping_cart_outlined, 35 | color: product.color, 36 | ), 37 | onPressed: () { 38 | Navigator.push( 39 | context, 40 | MaterialPageRoute( 41 | builder: (context) { 42 | return CartScreen(); 43 | }, 44 | ), 45 | ); 46 | }, 47 | ), 48 | ), 49 | Expanded( 50 | child: SizedBox( 51 | height: 50, 52 | child: RaisedButton( 53 | shape: RoundedRectangleBorder( 54 | borderRadius: BorderRadius.circular(18), 55 | ), 56 | color: Colors.green[600], 57 | onPressed: () {}, 58 | child: Text( 59 | "Buy Now".toUpperCase(), 60 | style: TextStyle( 61 | fontSize: 17, 62 | fontWeight: FontWeight.bold, 63 | color: Colors.white, 64 | ), 65 | ), 66 | ), 67 | ), 68 | ), 69 | ], 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/models/specials.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Special { 4 | final String image, title, description; 5 | final int price, size, id; 6 | final Color color; 7 | Special({ 8 | this.id, 9 | this.image, 10 | this.title, 11 | this.price, 12 | this.description, 13 | this.size, 14 | this.color, 15 | }); 16 | } 17 | 18 | List specials = [ 19 | Special( 20 | id: 1, 21 | title: "Christmas Sale", 22 | price: 234, 23 | size: 12, 24 | description: dummyText, 25 | image: "assets/images/christmas.png", 26 | color: Colors.red[800], 27 | ), 28 | Special( 29 | id: 2, 30 | title: "Free Delivery", 31 | price: 234, 32 | size: 8, 33 | description: dummyText, 34 | image: "assets/images/crown.png", 35 | color: Colors.orange, 36 | ), 37 | Special( 38 | id: 3, 39 | title: "Official Stores", 40 | price: 234, 41 | size: 10, 42 | description: dummyText, 43 | image: "assets/images/bag_5.png", 44 | color: Colors.red[900], 45 | ), 46 | Special( 47 | id: 4, 48 | title: "Smakos Global", 49 | price: 234, 50 | size: 11, 51 | description: dummyText, 52 | image: "assets/images/airplane.png", 53 | color: Colors.blue[900], 54 | ), 55 | Special( 56 | id: 5, 57 | title: "Smakos Food", 58 | price: 234, 59 | size: 12, 60 | description: dummyText, 61 | image: "assets/images/bag_5.png", 62 | color: Color(0xFFFB7883), 63 | ), 64 | Special( 65 | id: 6, 66 | title: "Shake & Win", 67 | price: 234, 68 | size: 12, 69 | description: dummyText, 70 | image: "assets/images/bag_6.png", 71 | color: Colors.green, 72 | ), 73 | Special( 74 | id: 7, 75 | title: "Games & Videos", 76 | price: 234, 77 | size: 12, 78 | description: dummyText, 79 | image: "assets/images/gamepad.png", 80 | // color: Color(0xFFAEAEAE), 81 | ), 82 | Special( 83 | id: 8, 84 | title: "Call to Order", 85 | price: 234, 86 | size: 12, 87 | description: dummyText, 88 | image: "assets/images/telephone.png", 89 | color: Colors.orange, 90 | ), 91 | ]; 92 | 93 | String dummyText = 94 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. When an unknown printer took a galley."; 95 | -------------------------------------------------------------------------------- /lib/pages/details/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/constants.dart'; 3 | import 'package:online_shopping/models/Product.dart'; 4 | 5 | import 'add_to_cart.dart'; 6 | import 'color_and_size.dart'; 7 | import 'counter_with_fav_btn.dart'; 8 | import 'description.dart'; 9 | import 'product_title_with_image.dart'; 10 | 11 | class Body extends StatelessWidget { 12 | final Product product; 13 | 14 | const Body({Key key, this.product}) : super(key: key); 15 | @override 16 | Widget build(BuildContext context) { 17 | // It provide us total height and width 18 | Size size = MediaQuery.of(context).size; 19 | return SingleChildScrollView( 20 | physics: ClampingScrollPhysics(), 21 | child: Column( 22 | children: [ 23 | SizedBox( 24 | height: size.height, 25 | child: Stack( 26 | children: [ 27 | Container( 28 | margin: EdgeInsets.only(top: size.height * 0.3), 29 | padding: EdgeInsets.only( 30 | top: size.height * 0.12, 31 | left: kDefaultPaddin, 32 | right: kDefaultPaddin, 33 | ), 34 | // height: 500, 35 | decoration: BoxDecoration( 36 | color: Colors.white, 37 | borderRadius: BorderRadius.only( 38 | topLeft: Radius.circular(24), 39 | topRight: Radius.circular(24), 40 | ), 41 | ), 42 | child: Column( 43 | children: [ 44 | Container( 45 | height: 20, 46 | ), 47 | ColorAndSize(product: product), 48 | SizedBox(height: kDefaultPaddin / 2), 49 | Description(product: product), 50 | SizedBox(height: kDefaultPaddin / 2), 51 | CounterWithFavBtn(), 52 | SizedBox(height: kDefaultPaddin / 2), 53 | AddToCart(product: product) 54 | ], 55 | ), 56 | ), 57 | ProductTitleWithImage(product: product) 58 | ], 59 | ), 60 | ) 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/pages/details/components/color_and_size.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/Product.dart'; 3 | 4 | import '../../../constants.dart'; 5 | 6 | class ColorAndSize extends StatelessWidget { 7 | const ColorAndSize({ 8 | Key key, 9 | @required this.product, 10 | }) : super(key: key); 11 | 12 | final Product product; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Row( 17 | children: [ 18 | Expanded( 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Text("Color"), 23 | Row( 24 | children: [ 25 | ColorDot( 26 | color: Color(0xFF356C95), 27 | isSelected: true, 28 | ), 29 | ColorDot(color: Color(0xFFF8C078)), 30 | ColorDot(color: Color(0xFFA29B9B)), 31 | ], 32 | ), 33 | ], 34 | ), 35 | ), 36 | Expanded( 37 | child: RichText( 38 | text: TextSpan( 39 | style: TextStyle(color: kTextColor), 40 | children: [ 41 | TextSpan(text: "Size\n"), 42 | TextSpan( 43 | text: "${product.size} cm", 44 | style: Theme.of(context) 45 | .textTheme 46 | .headline5 47 | .copyWith(fontWeight: FontWeight.bold), 48 | ) 49 | ], 50 | ), 51 | ), 52 | ), 53 | ], 54 | ); 55 | } 56 | } 57 | 58 | class ColorDot extends StatelessWidget { 59 | final Color color; 60 | final bool isSelected; 61 | const ColorDot({ 62 | Key key, 63 | this.color, 64 | // by default isSelected is false 65 | this.isSelected = false, 66 | }) : super(key: key); 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | return Container( 71 | margin: EdgeInsets.only( 72 | top: kDefaultPaddin / 4, 73 | right: kDefaultPaddin / 2, 74 | ), 75 | padding: EdgeInsets.all(2.5), 76 | height: 24, 77 | width: 24, 78 | decoration: BoxDecoration( 79 | shape: BoxShape.circle, 80 | border: Border.all( 81 | color: isSelected ? color : Colors.transparent, 82 | ), 83 | ), 84 | child: DecoratedBox( 85 | decoration: BoxDecoration( 86 | color: color, 87 | shape: BoxShape.circle, 88 | ), 89 | ), 90 | ); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/widgets/reusable_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ReusableButton extends StatelessWidget { 4 | final String text; 5 | final Color backgroundColour; 6 | 7 | const ReusableButton({@required this.text, this.backgroundColour}); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | height: 48, 12 | decoration: BoxDecoration( 13 | borderRadius: BorderRadius.circular(20.0), 14 | border: Border.all(color: Color(0xFF7041EE)), 15 | color: backgroundColour, 16 | ), 17 | child: Padding( 18 | padding: 19 | const EdgeInsets.only(left: 15.0, right: 15.0, top: 12, bottom: 10), 20 | child: Text( 21 | text, 22 | textAlign: TextAlign.right, 23 | style: TextStyle( 24 | color: Color(0xFF7041EE), 25 | fontSize: 20, 26 | ), 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | 33 | class MessageTextField extends StatelessWidget { 34 | final String label; 35 | final Color labelColour; 36 | final Color backgroundColour; 37 | final Color shadowColour; 38 | 39 | const MessageTextField({ 40 | Key key, 41 | @required this.label, 42 | this.labelColour, 43 | this.backgroundColour, 44 | @required this.shadowColour, 45 | }) : super(key: key); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Container( 50 | height: 58.0, 51 | child: Row( 52 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 53 | children: [ 54 | Row( 55 | children: [ 56 | Padding(padding: EdgeInsets.symmetric(horizontal: 18.47)), 57 | Text( 58 | label, 59 | textAlign: TextAlign.center, 60 | style: TextStyle( 61 | color: labelColour, 62 | fontSize: 18.0, 63 | ), 64 | ), 65 | ], 66 | ), 67 | Row( 68 | children: [ 69 | Padding( 70 | padding: 71 | const EdgeInsets.only(top: 5.0, right: 4.0, bottom: 5.0), 72 | child: FloatingActionButton( 73 | backgroundColor: Color(0xFF7041EE), 74 | elevation: 0, 75 | child: Icon(Icons.arrow_upward), 76 | onPressed: () {}, 77 | ), 78 | ), 79 | ], 80 | ) 81 | ], 82 | ), 83 | decoration: BoxDecoration( 84 | color: backgroundColour, 85 | borderRadius: BorderRadius.all(Radius.circular(66)), 86 | border: Border.all(color: Colors.grey[300]), 87 | boxShadow: [ 88 | BoxShadow( 89 | blurRadius: 60.0, 90 | spreadRadius: 0.0, 91 | offset: Offset(0.0, 16.0), 92 | color: shadowColour, 93 | ), 94 | ], 95 | ), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /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/widgets/custom_text_feld.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/size_config.dart'; 3 | 4 | class CustomTextField extends StatelessWidget { 5 | final String hintText; 6 | final Icon icon; 7 | 8 | const CustomTextField({ 9 | Key key, 10 | this.hintText, 11 | this.icon, 12 | }) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | SizeConfig().init(context); 17 | return Card( 18 | margin: EdgeInsets.symmetric(vertical: 10.0), 19 | child: Container( 20 | height: 58, 21 | // width: MediaQuery.of(context).size.width / 1.1, 22 | decoration: BoxDecoration( 23 | color: Colors.white, 24 | borderRadius: BorderRadius.all(Radius.circular(10.0)), 25 | border: Border.all(color: Colors.grey[200]), 26 | boxShadow: [ 27 | BoxShadow( 28 | blurRadius: 60.0, 29 | spreadRadius: 0.0, 30 | offset: Offset(0.0, 16.0), 31 | color: Color(0xff4E4F72).withOpacity(0.08), 32 | ), 33 | ], 34 | ), 35 | child: Padding( 36 | padding: const EdgeInsets.only(left: 25.0, top: 4.0), 37 | child: Center( 38 | child: TextField( 39 | textAlign: TextAlign.left, 40 | decoration: new InputDecoration( 41 | hintStyle: TextStyle( 42 | color: Colors.grey, 43 | fontSize: 20.0, 44 | ), 45 | hintText: hintText, 46 | border: InputBorder.none, 47 | icon: icon, 48 | ), 49 | ), 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | 57 | class SearchBar extends StatelessWidget { 58 | final String hintText; 59 | final Icon icon; 60 | 61 | const SearchBar({ 62 | Key key, 63 | this.hintText, 64 | this.icon, 65 | }) : super(key: key); 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | SizeConfig().init(context); 70 | return Container( 71 | height: SizeConfig.height(34.0), 72 | width: double.infinity, 73 | decoration: BoxDecoration( 74 | color: Colors.white, 75 | borderRadius: BorderRadius.all(Radius.circular(5.0)), 76 | border: Border.all(color: Colors.grey[200]), 77 | boxShadow: [ 78 | BoxShadow( 79 | blurRadius: 60.0, 80 | spreadRadius: 0.0, 81 | offset: Offset(0.0, 16.0), 82 | color: Color(0xff4E4F72).withOpacity(0.08), 83 | ), 84 | ], 85 | ), 86 | child: Padding( 87 | padding: const EdgeInsets.only(left: 15.0), 88 | child: TextField( 89 | textAlign: TextAlign.left, 90 | decoration: new InputDecoration( 91 | hintStyle: TextStyle( 92 | color: Colors.grey, 93 | fontSize: 20.0, 94 | ), 95 | hintText: hintText, 96 | border: InputBorder.none, 97 | icon: icon, 98 | ), 99 | ), 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: online_shopping 2 | description: Shop online and save some money. 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 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.0 31 | flutter_svg: ^0.22.0 32 | http: ^0.12.2 33 | flutter_secure_storage: ^3.3.5 34 | provider: ^5.0.0 35 | palette_generator: ^0.3.0 36 | 37 | dev_dependencies: 38 | flutter_test: 39 | sdk: flutter 40 | 41 | # For information on the generic Dart part of this file, see the 42 | # following page: https://dart.dev/tools/pub/pubspec 43 | 44 | # The following section is specific to Flutter. 45 | flutter: 46 | 47 | # The following line ensures that the Material Icons font is 48 | # included with your application, so that you can use the icons in 49 | # the material Icons class. 50 | uses-material-design: true 51 | 52 | # To add assets to your application, add an assets section, like this: 53 | assets: 54 | - assets/images/ 55 | - assets/icons/ 56 | 57 | # An image asset can refer to one or more resolution-specific "variants", see 58 | # https://flutter.dev/assets-and-images/#resolution-aware. 59 | 60 | # For details regarding adding assets from package dependencies, see 61 | # https://flutter.dev/assets-and-images/#from-packages 62 | 63 | # To add custom fonts to your application, add a fonts section here, 64 | # in this "flutter" section. Each entry in this list should have a 65 | # "family" key with the font family name, and a "fonts" key with a 66 | # list giving the asset and other descriptors for the font. For 67 | # example: 68 | # fonts: 69 | # - family: Schyler 70 | # fonts: 71 | # - asset: fonts/Schyler-Regular.ttf 72 | # - asset: fonts/Schyler-Italic.ttf 73 | # style: italic 74 | # - family: Trajan Pro 75 | # fonts: 76 | # - asset: fonts/TrajanPro.ttf 77 | # - asset: fonts/TrajanPro_Bold.ttf 78 | # weight: 700 79 | # 80 | # For details regarding fonts from package dependencies, 81 | # see https://flutter.dev/custom-fonts/#from-packages 82 | -------------------------------------------------------------------------------- /lib/pages/cart/components/checkout_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/size_config.dart'; 3 | 4 | class CheckoutCard extends StatelessWidget { 5 | const CheckoutCard({ 6 | Key key, 7 | }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | SizeConfig().init(context); 12 | return Container( 13 | height: 120, 14 | padding: EdgeInsets.symmetric( 15 | vertical: SizeConfig.height(2), 16 | horizontal: SizeConfig.width(30), 17 | ), 18 | // height: 174, 19 | decoration: BoxDecoration( 20 | color: Colors.white, 21 | borderRadius: BorderRadius.only( 22 | topLeft: Radius.circular(30), 23 | topRight: Radius.circular(30), 24 | ), 25 | border: Border.all(color: Colors.grey[200]), 26 | boxShadow: [ 27 | BoxShadow( 28 | offset: Offset(0, -15), 29 | blurRadius: 20, 30 | color: Color(0xFFDADADA).withOpacity(0.15), 31 | ) 32 | ], 33 | ), 34 | child: Column( 35 | mainAxisSize: MainAxisSize.min, 36 | crossAxisAlignment: CrossAxisAlignment.start, 37 | children: [ 38 | Row( 39 | children: [ 40 | Container( 41 | padding: EdgeInsets.all(10), 42 | height: SizeConfig.height(30), 43 | width: SizeConfig.width(40), 44 | decoration: BoxDecoration( 45 | color: Color(0xFFF5F6F9), 46 | borderRadius: BorderRadius.circular(10), 47 | ), 48 | child: Icon(Icons.list_alt_rounded), 49 | ), 50 | Spacer(), 51 | Text("Add voucher code"), 52 | const SizedBox(width: 10), 53 | Icon( 54 | Icons.arrow_forward_ios, 55 | size: 12, 56 | color: Colors.grey, 57 | ) 58 | ], 59 | ), 60 | SizedBox(height: SizeConfig.height(10)), 61 | Row( 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | Text.rich( 65 | TextSpan( 66 | text: "Total:\n", 67 | children: [ 68 | TextSpan( 69 | text: "\$1337.15", 70 | style: TextStyle(fontSize: 16, color: Colors.black), 71 | ), 72 | ], 73 | ), 74 | ), 75 | Container( 76 | height: 40, 77 | width: SizeConfig.width(150), 78 | decoration: BoxDecoration( 79 | color: Colors.green, 80 | borderRadius: BorderRadius.circular(5), 81 | ), 82 | child: Center( 83 | child: Text( 84 | "Check Out", 85 | style: TextStyle( 86 | fontSize: 20, 87 | color: Colors.white, 88 | fontWeight: FontWeight.bold, 89 | ), 90 | ), 91 | ), 92 | ), 93 | ], 94 | ), 95 | ], 96 | ), 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/pages/home/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/constants.dart'; 3 | import 'package:online_shopping/models/Product.dart'; 4 | import 'package:online_shopping/models/specials.dart'; 5 | import 'package:online_shopping/pages/details/details_screen.dart'; 6 | import 'package:online_shopping/pages/home/components/special_card.dart'; 7 | import 'package:online_shopping/size_config.dart'; 8 | import 'item_card.dart'; 9 | 10 | class Body extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | SizeConfig().init(context); 14 | return SingleChildScrollView( 15 | child: Column( 16 | children: [ 17 | Column( 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | Container( 21 | height: 10, 22 | ), 23 | Padding( 24 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 25 | child: Card( 26 | elevation: 4.0, 27 | shape: RoundedRectangleBorder( 28 | borderRadius: BorderRadius.circular(16), 29 | ), 30 | child: Container( 31 | decoration: BoxDecoration( 32 | color: Colors.white, 33 | border: Border.all( 34 | color: Colors.grey, 35 | ), 36 | borderRadius: BorderRadius.circular(16), 37 | ), 38 | child: Padding( 39 | padding: const EdgeInsets.only(top: 10.0), 40 | child: GridView.builder( 41 | shrinkWrap: true, 42 | physics: NeverScrollableScrollPhysics(), 43 | itemCount: specials.length, 44 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 45 | crossAxisCount: 4, 46 | mainAxisSpacing: 0, 47 | crossAxisSpacing: 10, 48 | childAspectRatio: 0.75, 49 | ), 50 | itemBuilder: (context, index) => SpecialCard( 51 | special: specials[index], 52 | ), 53 | ), 54 | ), 55 | ), 56 | ), 57 | ), 58 | Container( 59 | height: 10, 60 | ), 61 | Padding( 62 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 63 | child: GridView.builder( 64 | shrinkWrap: true, 65 | physics: NeverScrollableScrollPhysics(), 66 | itemCount: products.length, 67 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 68 | crossAxisCount: 2, 69 | mainAxisSpacing: kDefaultPaddin, 70 | crossAxisSpacing: kDefaultPaddin, 71 | childAspectRatio: 0.75, 72 | ), 73 | itemBuilder: (context, index) => ItemCard( 74 | product: products[index], 75 | ), 76 | ), 77 | ), 78 | ], 79 | ), 80 | ], 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /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/pages/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:online_shopping/pages/home/home_screen.dart'; 4 | import 'package:online_shopping/pages/mainscreen.dart'; 5 | import 'package:online_shopping/widgets/custom_button.dart'; 6 | import 'package:online_shopping/widgets/custom_text_feld.dart'; 7 | 8 | import '../size_config.dart'; 9 | 10 | class Login extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | elevation: 0, 16 | centerTitle: true, 17 | title: Text('Login'), 18 | backgroundColor: Colors.red, 19 | ), 20 | backgroundColor: Color(0xFFFAFBFD), 21 | body: SingleChildScrollView( 22 | child: Padding( 23 | padding: const EdgeInsets.symmetric(horizontal: 20), 24 | child: Column( 25 | children: [ 26 | Padding( 27 | padding: const EdgeInsets.symmetric(vertical: 20.0), 28 | child: Container( 29 | height: SizeConfig.height(100.9), 30 | decoration: BoxDecoration( 31 | color: Colors.red, 32 | borderRadius: BorderRadius.all( 33 | Radius.circular(9.0), 34 | ), 35 | ), 36 | child: Row( 37 | mainAxisAlignment: MainAxisAlignment.center, 38 | children: [ 39 | Text( 40 | 'SMAKOS', 41 | style: TextStyle( 42 | fontSize: 40, 43 | color: Colors.white, 44 | ), 45 | ), 46 | Icon( 47 | Icons.shopping_cart_outlined, 48 | color: Colors.white, 49 | size: 50, 50 | ), 51 | ], 52 | ), 53 | ), 54 | ), 55 | Container( 56 | child: Column( 57 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 58 | children: [ 59 | CustomTextField( 60 | hintText: 'Email', 61 | icon: Icon( 62 | Icons.mail, 63 | color: Colors.red, 64 | ), 65 | ), 66 | CustomTextField( 67 | hintText: 'Password', 68 | icon: Icon( 69 | Icons.vpn_key, 70 | color: Colors.red, 71 | ), 72 | ), 73 | CustomTextField( 74 | hintText: '+229 99 24 97 02', 75 | icon: Icon( 76 | Icons.phone_android, 77 | color: Colors.red, 78 | ), 79 | ), 80 | ], 81 | ), 82 | ), 83 | Padding( 84 | padding: EdgeInsets.only( 85 | top: 30.0, 86 | ), 87 | child: CustomButton( 88 | label: 'Login', 89 | labelColour: Colors.white, 90 | backgroundColour: Colors.red, 91 | shadowColour: Color(0xff866DC9).withOpacity(0.16), 92 | onPressed: () { 93 | Navigator.push( 94 | context, 95 | MaterialPageRoute( 96 | builder: (context) { 97 | return MainScreen(); 98 | }, 99 | ), 100 | ); 101 | }, 102 | ), 103 | ), 104 | Container( 105 | color: Colors.transparent, 106 | child: Column( 107 | children: [ 108 | SizedBox( 109 | height: SizeConfig.height(55.8), 110 | child: Divider(height: 10), 111 | ), 112 | Text( 113 | 'You are completely safe', 114 | style: TextStyle( 115 | fontSize: 15.0, 116 | ), 117 | ), 118 | Text( 119 | 'Read our Terms & Conditions.', 120 | style: TextStyle( 121 | fontSize: 15.0, 122 | color: Colors.red, 123 | fontWeight: FontWeight.bold, 124 | ), 125 | ), 126 | ], 127 | ), 128 | ), 129 | ], 130 | ), 131 | ), 132 | ), 133 | ); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.0" 53 | fake_async: 54 | dependency: transitive 55 | description: 56 | name: fake_async 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.2.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_secure_storage: 66 | dependency: "direct main" 67 | description: 68 | name: flutter_secure_storage 69 | url: "https://pub.dartlang.org" 70 | source: hosted 71 | version: "3.3.5" 72 | flutter_svg: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_svg 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "0.22.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | http: 85 | dependency: "direct main" 86 | description: 87 | name: http 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.12.2" 91 | http_parser: 92 | dependency: transitive 93 | description: 94 | name: http_parser 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "3.1.4" 98 | matcher: 99 | dependency: transitive 100 | description: 101 | name: matcher 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.12.10" 105 | meta: 106 | dependency: transitive 107 | description: 108 | name: meta 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.3.0" 112 | nested: 113 | dependency: transitive 114 | description: 115 | name: nested 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.0.0" 119 | palette_generator: 120 | dependency: "direct main" 121 | description: 122 | name: palette_generator 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.3.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.0" 133 | path_drawing: 134 | dependency: transitive 135 | description: 136 | name: path_drawing 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.5.1" 140 | path_parsing: 141 | dependency: transitive 142 | description: 143 | name: path_parsing 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.2.1" 147 | pedantic: 148 | dependency: transitive 149 | description: 150 | name: pedantic 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "1.9.2" 154 | petitparser: 155 | dependency: transitive 156 | description: 157 | name: petitparser 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "4.1.0" 161 | provider: 162 | dependency: "direct main" 163 | description: 164 | name: provider 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "5.0.0" 168 | sky_engine: 169 | dependency: transitive 170 | description: flutter 171 | source: sdk 172 | version: "0.0.99" 173 | source_span: 174 | dependency: transitive 175 | description: 176 | name: source_span 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.8.0" 180 | stack_trace: 181 | dependency: transitive 182 | description: 183 | name: stack_trace 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.10.0" 187 | stream_channel: 188 | dependency: transitive 189 | description: 190 | name: stream_channel 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.0" 194 | string_scanner: 195 | dependency: transitive 196 | description: 197 | name: string_scanner 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.1.0" 201 | term_glyph: 202 | dependency: transitive 203 | description: 204 | name: term_glyph 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.2.0" 208 | test_api: 209 | dependency: transitive 210 | description: 211 | name: test_api 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.2.19" 215 | typed_data: 216 | dependency: transitive 217 | description: 218 | name: typed_data 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.3.0" 222 | vector_math: 223 | dependency: transitive 224 | description: 225 | name: vector_math 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.1.0" 229 | xml: 230 | dependency: transitive 231 | description: 232 | name: xml 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "5.1.2" 236 | sdks: 237 | dart: ">=2.12.0 <3.0.0" 238 | flutter: ">=1.24.0-7.0" 239 | -------------------------------------------------------------------------------- /lib/pages/signup.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:online_shopping/pages/login.dart'; 4 | import 'package:online_shopping/size_config.dart'; 5 | import 'package:online_shopping/widgets/custom_button.dart'; 6 | import 'package:online_shopping/widgets/custom_text_feld.dart'; 7 | 8 | class SignupPage extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | SizeConfig().init(context); 12 | return Scaffold( 13 | appBar: AppBar( 14 | elevation: 0, 15 | centerTitle: true, 16 | title: Text('Create Account'), 17 | backgroundColor: Colors.red, 18 | ), 19 | backgroundColor: Color(0xFFFAFBFD), 20 | body: SingleChildScrollView( 21 | child: Padding( 22 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 23 | child: Column( 24 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 25 | children: [ 26 | Column( 27 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | children: [ 29 | Container( 30 | width: double.infinity, 31 | // height: SizeConfig.height(53.9), 32 | color: Color(0xFFFAFBFD), 33 | child: Padding( 34 | padding: const EdgeInsets.only(top: 30.0), 35 | child: Row( 36 | mainAxisAlignment: MainAxisAlignment.center, 37 | children: [ 38 | Text( 39 | 'SMAKOS', 40 | style: TextStyle( 41 | fontSize: 40, 42 | color: Colors.red, 43 | ), 44 | ), 45 | Icon( 46 | Icons.shopping_cart_outlined, 47 | color: Colors.red, 48 | size: 50, 49 | ), 50 | ], 51 | ), 52 | ), 53 | ), 54 | Container( 55 | height: 10.0, 56 | ), 57 | Column( 58 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 59 | children: [ 60 | Center( 61 | child: Column( 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | CustomTextField( 65 | hintText: 'First Name', 66 | icon: Icon( 67 | CupertinoIcons.profile_circled, 68 | color: Colors.red, 69 | ), 70 | ), 71 | CustomTextField( 72 | hintText: 'Last Name', 73 | icon: Icon( 74 | CupertinoIcons.profile_circled, 75 | color: Colors.red, 76 | ), 77 | ), 78 | CustomTextField( 79 | hintText: 'Email', 80 | icon: Icon( 81 | Icons.mail, 82 | color: Colors.red, 83 | ), 84 | ), 85 | CustomTextField( 86 | hintText: 'Password', 87 | icon: Icon( 88 | Icons.vpn_key, 89 | color: Colors.red, 90 | ), 91 | ), 92 | CustomTextField( 93 | hintText: '+229 99 24 97 02', 94 | icon: Icon( 95 | Icons.phone_android, 96 | color: Colors.red, 97 | ), 98 | ), 99 | Padding( 100 | padding: EdgeInsets.only( 101 | top: 30.0, 102 | ), 103 | child: CustomButton( 104 | label: 'Register Now', 105 | labelColour: Colors.white, 106 | backgroundColour: Colors.red, 107 | shadowColour: 108 | Color(0xff866DC9).withOpacity(0.16), 109 | onPressed: () { 110 | Navigator.push( 111 | context, 112 | MaterialPageRoute( 113 | builder: (context) { 114 | return Login(); 115 | }, 116 | ), 117 | ); 118 | }, 119 | ), 120 | ), 121 | ], 122 | ), 123 | ), 124 | ], 125 | ), 126 | ], 127 | ), 128 | Container( 129 | child: Column( 130 | children: [ 131 | SizedBox( 132 | height: SizeConfig.height(40.8), 133 | child: Divider(height: 10), 134 | ), 135 | Text( 136 | 'You are completely safe', 137 | style: TextStyle( 138 | fontSize: 15.0, 139 | ), 140 | ), 141 | Text( 142 | 'Read our Terms & Conditions.', 143 | style: TextStyle( 144 | fontSize: 15.0, 145 | color: Colors.red, 146 | fontWeight: FontWeight.bold, 147 | ), 148 | ), 149 | Container( 150 | height: 5.0, 151 | ), 152 | ], 153 | ), 154 | ), 155 | ], 156 | ), 157 | ), 158 | ), 159 | ); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /lib/pages/home/components/item_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:online_shopping/models/Product.dart'; 3 | import 'package:online_shopping/pages/details/details_screen.dart'; 4 | import 'package:palette_generator/palette_generator.dart'; 5 | 6 | import '../../../constants.dart'; 7 | 8 | class ItemCard extends StatelessWidget { 9 | final Product product; 10 | final Function press; 11 | const ItemCard({ 12 | Key key, 13 | this.product, 14 | this.press, 15 | }) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | var paletteGenerator; 20 | var itemBackgroundColor = Color(0xFF23FF23); 21 | 22 | Future _updatePaletteGenerator() async { 23 | paletteGenerator = await PaletteGenerator.fromImageProvider( 24 | Image.asset(product.image).image, 25 | ); 26 | return paletteGenerator; 27 | } 28 | 29 | return FutureBuilder( 30 | future: _updatePaletteGenerator(), // async work 31 | builder: 32 | (BuildContext context, AsyncSnapshot snapshot) { 33 | switch (snapshot.connectionState) { 34 | case ConnectionState.waiting: 35 | return Center(child: CircularProgressIndicator()); 36 | default: 37 | if (snapshot.hasError) 38 | return new Text('Error: ${snapshot.error}'); 39 | else { 40 | // Color color=new Color(snapshot.data.dominantColor.color); 41 | itemBackgroundColor = snapshot.data.dominantColor.color; 42 | return GestureDetector( 43 | onTap: () => Navigator.push( 44 | context, 45 | MaterialPageRoute( 46 | builder: (context) => DetailsScreen( 47 | product: product, 48 | itemBackgroundColor: itemBackgroundColor, 49 | ), 50 | ), 51 | ), 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | children: [ 55 | Expanded( 56 | child: Card( 57 | elevation: 4, 58 | shape: RoundedRectangleBorder( 59 | borderRadius: BorderRadius.circular(16), 60 | ), 61 | child: Container( 62 | padding: EdgeInsets.all(kDefaultPaddin), 63 | decoration: BoxDecoration( 64 | color: itemBackgroundColor, 65 | borderRadius: BorderRadius.circular(16), 66 | border: Border.all( 67 | color: Colors.grey, 68 | ), 69 | ), 70 | child: Hero( 71 | tag: "${product.id}", 72 | child: Image.asset(product.image), 73 | ), 74 | ), 75 | ), 76 | ), 77 | Padding( 78 | padding: const EdgeInsets.symmetric( 79 | vertical: kDefaultPaddin / 4), 80 | child: Text( 81 | // products is out demo list 82 | product.title, 83 | style: TextStyle( 84 | fontSize: 16, 85 | fontWeight: FontWeight.bold, 86 | ), 87 | ), 88 | ), 89 | Row( 90 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 91 | children: [ 92 | Text( 93 | "\$${product.price}", 94 | // style: TextStyle(fontWeight: FontWeight.bold), 95 | ), 96 | Row( 97 | children: [ 98 | Icon(Icons.star, size: 20, color: Colors.red), 99 | Icon(Icons.star, size: 20, color: Colors.red), 100 | Icon(Icons.star, size: 20, color: Colors.red), 101 | Icon(Icons.star_outline, 102 | size: 20, color: Colors.red), 103 | Icon(Icons.star_outline, 104 | size: 20, color: Colors.red), 105 | ], 106 | ), 107 | ], 108 | ) 109 | ], 110 | ), 111 | ); 112 | } 113 | } 114 | }, 115 | ); 116 | // return GestureDetector( 117 | // onTap: press, 118 | // child: Column( 119 | // crossAxisAlignment: CrossAxisAlignment.start, 120 | // children: [ 121 | // Expanded( 122 | // child: Card( 123 | // elevation: 4, 124 | // shape: RoundedRectangleBorder( 125 | // borderRadius: BorderRadius.circular(16), 126 | // ), 127 | // child: Container( 128 | // padding: EdgeInsets.all(kDefaultPaddin), 129 | // decoration: BoxDecoration( 130 | // color: Colors.white, 131 | // borderRadius: BorderRadius.circular(16), 132 | // border: Border.all( 133 | // color: Colors.grey, 134 | // ), 135 | // ), 136 | // child: Hero( 137 | // tag: "${product.id}", 138 | // child: Image.asset(product.image), 139 | // ), 140 | // ), 141 | // ), 142 | // ), 143 | // Padding( 144 | // padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin / 4), 145 | // child: Text( 146 | // // products is out demo list 147 | // product.title, 148 | // style: TextStyle( 149 | // fontSize: 16, 150 | // fontWeight: FontWeight.bold, 151 | // ), 152 | // ), 153 | // ), 154 | // Row( 155 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 156 | // children: [ 157 | // Text( 158 | // "\$${product.price}", 159 | // // style: TextStyle(fontWeight: FontWeight.bold), 160 | // ), 161 | // Row( 162 | // children: [ 163 | // Icon(Icons.star, size: 20, color: Colors.red), 164 | // Icon(Icons.star, size: 20, color: Colors.red), 165 | // Icon(Icons.star, size: 20, color: Colors.red), 166 | // Icon(Icons.star_outline, size: 20, color: Colors.red), 167 | // Icon(Icons.star_outline, size: 20, color: Colors.red), 168 | // ], 169 | // ), 170 | // ], 171 | // ) 172 | // ], 173 | // ), 174 | // ); 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /lib/widgets/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomButton extends StatelessWidget { 4 | final String label; 5 | final Color labelColour; 6 | final Color backgroundColour; 7 | final Color shadowColour; 8 | final Function onPressed; 9 | 10 | const CustomButton({ 11 | Key key, 12 | @required this.label, 13 | this.labelColour, 14 | this.backgroundColour, 15 | this.onPressed, 16 | @required this.shadowColour, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return InkWell( 22 | onTap: onPressed, 23 | child: Container( 24 | height: 58.0, 25 | child: Center( 26 | child: Text( 27 | label, 28 | textAlign: TextAlign.center, 29 | style: TextStyle( 30 | color: labelColour, 31 | fontSize: 20.0, 32 | ), 33 | ), 34 | ), 35 | decoration: BoxDecoration( 36 | color: backgroundColour, 37 | borderRadius: BorderRadius.all( 38 | Radius.circular(30.0), 39 | ), 40 | boxShadow: [ 41 | BoxShadow( 42 | blurRadius: 60.0, 43 | spreadRadius: 0.0, 44 | offset: Offset(0.0, 16.0), 45 | color: shadowColour, 46 | ), 47 | ], 48 | ), 49 | ), 50 | ); 51 | } 52 | } 53 | 54 | class CustomSignInButton extends StatelessWidget { 55 | final String label; 56 | final Color labelColour; 57 | final Image logo; 58 | final Color backgroundColour; 59 | final Color shadowColour; 60 | 61 | const CustomSignInButton({ 62 | Key key, 63 | @required this.label, 64 | this.labelColour, 65 | this.backgroundColour, 66 | @required this.shadowColour, 67 | this.logo, 68 | }) : super(key: key); 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return Container( 73 | height: 58.0, 74 | child: Row( 75 | children: [ 76 | Padding(padding: EdgeInsets.symmetric(horizontal: 18.0)), 77 | logo, 78 | Padding(padding: EdgeInsets.symmetric(horizontal: 18.47)), 79 | Text( 80 | label, 81 | textAlign: TextAlign.center, 82 | style: TextStyle( 83 | color: labelColour, 84 | fontSize: 20.0, 85 | fontWeight: FontWeight.bold, 86 | ), 87 | ), 88 | ], 89 | ), 90 | decoration: BoxDecoration( 91 | color: backgroundColour, 92 | borderRadius: BorderRadius.all(Radius.circular(24.0)), 93 | boxShadow: [ 94 | BoxShadow( 95 | blurRadius: 60.0, 96 | spreadRadius: 0.0, 97 | offset: Offset(0.0, 16.0), 98 | color: shadowColour, 99 | ), 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | 106 | class CustomButton2 extends StatelessWidget { 107 | final Color backgroundColour; 108 | final Color shadowColour; 109 | final Text text; 110 | 111 | const CustomButton2({ 112 | Key key, 113 | this.backgroundColour, 114 | @required this.shadowColour, 115 | this.text, 116 | }) : super(key: key); 117 | 118 | @override 119 | Widget build(BuildContext context) { 120 | return Container( 121 | height: 58.0, 122 | child: Center( 123 | child: Row( 124 | children: [ 125 | Padding( 126 | padding: const EdgeInsets.only( 127 | left: 25.0, 128 | right: 40.0, 129 | ), 130 | child: text, 131 | ), 132 | ], 133 | ), 134 | ), 135 | decoration: BoxDecoration( 136 | color: backgroundColour, 137 | borderRadius: BorderRadius.all(Radius.circular(10.0)), 138 | boxShadow: [ 139 | BoxShadow( 140 | blurRadius: 60.0, 141 | spreadRadius: 0.0, 142 | offset: Offset(0.0, 16.0), 143 | color: shadowColour, 144 | ), 145 | ], 146 | ), 147 | ); 148 | } 149 | } 150 | 151 | class CustomChatBubbleTo extends StatelessWidget { 152 | final Color shadowColour; 153 | final List children; 154 | final double width; 155 | 156 | const CustomChatBubbleTo({ 157 | Key key, 158 | @required this.shadowColour, 159 | this.children, 160 | this.width, 161 | }) : super(key: key); 162 | 163 | @override 164 | Widget build(BuildContext context) { 165 | return Container( 166 | height: 48.0, 167 | width: width, 168 | child: Center( 169 | child: Row(children: children), 170 | ), 171 | decoration: BoxDecoration( 172 | color: Colors.white, 173 | borderRadius: BorderRadius.only( 174 | topRight: Radius.circular(24.0), 175 | bottomLeft: Radius.circular(24.0), 176 | bottomRight: Radius.circular(24.0), 177 | ), 178 | border: Border.all(color: Colors.grey[200]), 179 | boxShadow: [ 180 | BoxShadow( 181 | blurRadius: 60.0, 182 | spreadRadius: 0.0, 183 | offset: Offset(0.0, 16.0), 184 | color: shadowColour, 185 | ), 186 | ], 187 | ), 188 | ); 189 | } 190 | } 191 | 192 | class CustomChatBubbleFrom extends StatelessWidget { 193 | final Color labelColour; 194 | final Color shadowColour; 195 | final List children; 196 | 197 | const CustomChatBubbleFrom({ 198 | Key key, 199 | this.labelColour, 200 | @required this.shadowColour, 201 | this.children, 202 | }) : super(key: key); 203 | 204 | @override 205 | Widget build(BuildContext context) { 206 | return Container( 207 | height: 94.0, 208 | child: Center( 209 | child: Row(children: children), 210 | ), 211 | decoration: BoxDecoration( 212 | color: Color(0xFF7041EE), 213 | borderRadius: BorderRadius.only( 214 | topLeft: Radius.circular(24.0), 215 | bottomLeft: Radius.circular(24.0), 216 | bottomRight: Radius.circular(24.0), 217 | ), 218 | border: Border.all(color: Colors.grey[200]), 219 | boxShadow: [ 220 | BoxShadow( 221 | blurRadius: 60.0, 222 | spreadRadius: 0.0, 223 | offset: Offset(0.0, 16.0), 224 | color: shadowColour, 225 | ), 226 | ], 227 | ), 228 | ); 229 | } 230 | } 231 | 232 | class ScheduleBubble extends StatelessWidget { 233 | final Color shadowColour; 234 | final List children; 235 | final double height; 236 | 237 | const ScheduleBubble({ 238 | Key key, 239 | @required this.shadowColour, 240 | this.children, 241 | this.height, 242 | }) : super(key: key); 243 | 244 | @override 245 | Widget build(BuildContext context) { 246 | return Container( 247 | height: height, 248 | child: Center( 249 | child: Row(children: children), 250 | ), 251 | decoration: BoxDecoration( 252 | color: Colors.white, 253 | borderRadius: BorderRadius.only( 254 | topRight: Radius.circular(24.0), 255 | bottomLeft: Radius.circular(24.0), 256 | bottomRight: Radius.circular(24.0), 257 | ), 258 | border: Border.all(color: Colors.grey[200]), 259 | boxShadow: [ 260 | BoxShadow( 261 | blurRadius: 60.0, 262 | spreadRadius: 0.0, 263 | offset: Offset(0.0, 16.0), 264 | color: shadowColour, 265 | ), 266 | ], 267 | ), 268 | ); 269 | } 270 | } 271 | -------------------------------------------------------------------------------- /lib/pages/cart/components/cart_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:online_shopping/models/Product.dart'; 4 | import 'package:online_shopping/size_config.dart'; 5 | 6 | class CartCard extends StatefulWidget { 7 | final Product product; 8 | final Function press; 9 | const CartCard({ 10 | Key key, 11 | this.product, 12 | this.press, 13 | }) : super(key: key); 14 | 15 | @override 16 | _CartCardState createState() => _CartCardState(); 17 | } 18 | 19 | class _CartCardState extends State { 20 | int num = 1; 21 | IconData heart = CupertinoIcons.heart; 22 | @override 23 | Widget build(BuildContext context) { 24 | return Dismissible( 25 | key: Key('0'), 26 | child: GestureDetector( 27 | onTap: widget.press, 28 | child: Padding( 29 | padding: const EdgeInsets.only(top: 8.0, left: 10.0, right: 10.0), 30 | child: Column( 31 | children: [ 32 | Stack( 33 | children: [ 34 | Card( 35 | shape: RoundedRectangleBorder( 36 | borderRadius: BorderRadius.circular(10), 37 | ), 38 | child: Container( 39 | height: 180, 40 | decoration: BoxDecoration( 41 | color: Colors.white, 42 | borderRadius: BorderRadius.circular(10), 43 | border: Border.all(color: Colors.grey[300]), 44 | ), 45 | child: Column( 46 | children: [ 47 | Row( 48 | children: [ 49 | Padding( 50 | padding: const EdgeInsets.only( 51 | top: 20, left: 10, right: 20), 52 | child: Container( 53 | height: 90, 54 | width: 130, 55 | decoration: BoxDecoration( 56 | borderRadius: BorderRadius.circular(15), 57 | color: Colors.white, 58 | ), 59 | child: Image( 60 | image: 61 | AssetImage('assets/images/bag_1.png'), 62 | ), 63 | ), 64 | ), 65 | Column( 66 | crossAxisAlignment: CrossAxisAlignment.start, 67 | children: [ 68 | Text( 69 | 'Office Code', 70 | style: TextStyle(fontSize: 20), 71 | ), 72 | Padding( 73 | padding: EdgeInsets.symmetric(vertical: 10), 74 | ), 75 | Row( 76 | children: [ 77 | Text( 78 | '\$210.99', 79 | style: TextStyle( 80 | color: Colors.red, 81 | fontWeight: FontWeight.bold, 82 | ), 83 | ), 84 | Padding( 85 | padding: EdgeInsets.symmetric( 86 | horizontal: 20), 87 | ), 88 | Text( 89 | '\$290.99', 90 | style: TextStyle( 91 | color: Colors.grey[600], 92 | fontWeight: FontWeight.bold, 93 | decoration: 94 | TextDecoration.lineThrough, 95 | ), 96 | ), 97 | ], 98 | ), 99 | ], 100 | ), 101 | ], 102 | ), 103 | Divider( 104 | thickness: 1, 105 | indent: 15, 106 | endIndent: 15, 107 | ), 108 | Padding( 109 | padding: 110 | const EdgeInsets.symmetric(horizontal: 20.0), 111 | child: IntrinsicHeight( 112 | child: Row( 113 | mainAxisAlignment: 114 | MainAxisAlignment.spaceBetween, 115 | children: [ 116 | Row( 117 | children: [ 118 | IconButton( 119 | icon: Icon( 120 | heart, 121 | color: Colors.red, 122 | ), 123 | onPressed: () { 124 | if (heart == CupertinoIcons.heart) { 125 | heart = CupertinoIcons.heart_fill; 126 | } else { 127 | heart = CupertinoIcons.heart; 128 | } 129 | setState(() {}); 130 | }, 131 | ), 132 | VerticalDivider( 133 | color: Colors.red, 134 | thickness: 1, 135 | indent: 10, 136 | endIndent: 10, 137 | ), 138 | FlatButton( 139 | // height: 10, 140 | onPressed: () { 141 | // Delete item 142 | }, 143 | child: Row( 144 | children: [ 145 | Icon( 146 | Icons.delete, 147 | color: Colors.redAccent, 148 | size: 25, 149 | ), 150 | Padding( 151 | padding: EdgeInsets.symmetric( 152 | horizontal: 3.0), 153 | ), 154 | Text( 155 | 'DELETE', 156 | style: TextStyle( 157 | fontSize: 158 | SizeConfig.textSize(17), 159 | color: Colors.red, 160 | ), 161 | ), 162 | ], 163 | ), 164 | ), 165 | ], 166 | ), 167 | Row( 168 | children: [ 169 | IconButton( 170 | icon: Icon( 171 | CupertinoIcons.minus_circle_fill, 172 | color: Colors.red, 173 | size: SizeConfig.textSize(25), 174 | ), 175 | onPressed: () { 176 | if (num > 1) { 177 | num = num - 1; 178 | } else { 179 | num = 1; 180 | } 181 | setState(() {}); 182 | }, 183 | ), 184 | Padding( 185 | padding: const EdgeInsets.symmetric( 186 | horizontal: 2.0, 187 | ), 188 | child: Text( 189 | '$num', 190 | style: TextStyle( 191 | fontSize: 23, 192 | ), 193 | ), 194 | ), 195 | IconButton( 196 | icon: Icon( 197 | Icons.add_circle, 198 | color: Colors.red, 199 | size: SizeConfig.textSize(25), 200 | ), 201 | onPressed: () { 202 | num++; 203 | setState(() {}); 204 | }, 205 | ), 206 | ], 207 | ), 208 | ], 209 | ), 210 | ), 211 | ), 212 | ], 213 | ), 214 | ), 215 | ), 216 | Row( 217 | children: [ 218 | Container( 219 | width: MediaQuery.of(context).size.width - 100, 220 | ), 221 | Container( 222 | height: 30, 223 | width: 80, 224 | decoration: BoxDecoration( 225 | color: Colors.red, 226 | borderRadius: BorderRadius.circular(40), 227 | ), 228 | child: Center( 229 | child: Text( 230 | '27% OFF', 231 | style: TextStyle( 232 | color: Colors.white, 233 | fontWeight: FontWeight.bold, 234 | ), 235 | ), 236 | ), 237 | ), 238 | ], 239 | ), 240 | ], 241 | ), 242 | ], 243 | ), 244 | ), 245 | ), 246 | ); 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 68453965A4862690BBC29C3E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81E99D18E2489C97BC7A6336 /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 20C598CC64A85600D01C0EBD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 36 | 37FD54682A8450C6A7935325 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 81E99D18E2489C97BC7A6336 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | F55C0D340ADB414FFF804DAF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 68453965A4862690BBC29C3E /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 915C93CDBB930E5628545BED /* Pods */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 20C598CC64A85600D01C0EBD /* Pods-Runner.debug.xcconfig */, 68 | 37FD54682A8450C6A7935325 /* Pods-Runner.release.xcconfig */, 69 | F55C0D340ADB414FFF804DAF /* Pods-Runner.profile.xcconfig */, 70 | ); 71 | name = Pods; 72 | path = Pods; 73 | sourceTree = ""; 74 | }; 75 | 9740EEB11CF90186004384FC /* Flutter */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 79 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 81 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 82 | ); 83 | name = Flutter; 84 | sourceTree = ""; 85 | }; 86 | 97C146E51CF9000F007C117D = { 87 | isa = PBXGroup; 88 | children = ( 89 | 9740EEB11CF90186004384FC /* Flutter */, 90 | 97C146F01CF9000F007C117D /* Runner */, 91 | 97C146EF1CF9000F007C117D /* Products */, 92 | 915C93CDBB930E5628545BED /* Pods */, 93 | AB3936C698683CD21C435557 /* Frameworks */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 97C146EF1CF9000F007C117D /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 97C146EE1CF9000F007C117D /* Runner.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 97C146F01CF9000F007C117D /* Runner */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 111 | 97C147021CF9000F007C117D /* Info.plist */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 115 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 116 | ); 117 | path = Runner; 118 | sourceTree = ""; 119 | }; 120 | AB3936C698683CD21C435557 /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 81E99D18E2489C97BC7A6336 /* Pods_Runner.framework */, 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 97C146ED1CF9000F007C117D /* Runner */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 134 | buildPhases = ( 135 | 690B118044102BF3D0A47A04 /* [CP] Check Pods Manifest.lock */, 136 | 9740EEB61CF901F6004384FC /* Run Script */, 137 | 97C146EA1CF9000F007C117D /* Sources */, 138 | 97C146EB1CF9000F007C117D /* Frameworks */, 139 | 97C146EC1CF9000F007C117D /* Resources */, 140 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 142 | 0C5022E0644ADC36F1498E40 /* [CP] Embed Pods Frameworks */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 1020; 160 | ORGANIZATIONNAME = ""; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | LastSwiftMigration = 1100; 165 | }; 166 | }; 167 | }; 168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 169 | compatibilityVersion = "Xcode 9.3"; 170 | developmentRegion = en; 171 | hasScannedForEncodings = 0; 172 | knownRegions = ( 173 | en, 174 | Base, 175 | ); 176 | mainGroup = 97C146E51CF9000F007C117D; 177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 97C146ED1CF9000F007C117D /* Runner */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 97C146EC1CF9000F007C117D /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 0C5022E0644ADC36F1498E40 /* [CP] Embed Pods Frameworks */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputFileListPaths = ( 207 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 208 | ); 209 | name = "[CP] Embed Pods Frameworks"; 210 | outputFileListPaths = ( 211 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 216 | showEnvVarsInLog = 0; 217 | }; 218 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 219 | isa = PBXShellScriptBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | inputPaths = ( 224 | ); 225 | name = "Thin Binary"; 226 | outputPaths = ( 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | shellPath = /bin/sh; 230 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 231 | }; 232 | 690B118044102BF3D0A47A04 /* [CP] Check Pods Manifest.lock */ = { 233 | isa = PBXShellScriptBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | inputFileListPaths = ( 238 | ); 239 | inputPaths = ( 240 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 241 | "${PODS_ROOT}/Manifest.lock", 242 | ); 243 | name = "[CP] Check Pods Manifest.lock"; 244 | outputFileListPaths = ( 245 | ); 246 | outputPaths = ( 247 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 252 | showEnvVarsInLog = 0; 253 | }; 254 | 9740EEB61CF901F6004384FC /* Run Script */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | ); 261 | name = "Run Script"; 262 | outputPaths = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 267 | }; 268 | /* End PBXShellScriptBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | 97C146EA1CF9000F007C117D /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXSourcesBuildPhase section */ 281 | 282 | /* Begin PBXVariantGroup section */ 283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | 97C146FB1CF9000F007C117D /* Base */, 287 | ); 288 | name = Main.storyboard; 289 | sourceTree = ""; 290 | }; 291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | 97C147001CF9000F007C117D /* Base */, 295 | ); 296 | name = LaunchScreen.storyboard; 297 | sourceTree = ""; 298 | }; 299 | /* End PBXVariantGroup section */ 300 | 301 | /* Begin XCBuildConfiguration section */ 302 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 333 | ENABLE_NS_ASSERTIONS = NO; 334 | ENABLE_STRICT_OBJC_MSGSEND = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_NO_COMMON_BLOCKS = YES; 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 344 | MTL_ENABLE_DEBUG_INFO = NO; 345 | SDKROOT = iphoneos; 346 | SUPPORTED_PLATFORMS = iphoneos; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Profile; 351 | }; 352 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 353 | isa = XCBuildConfiguration; 354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 355 | buildSettings = { 356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 357 | CLANG_ENABLE_MODULES = YES; 358 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 359 | ENABLE_BITCODE = NO; 360 | FRAMEWORK_SEARCH_PATHS = ( 361 | "$(inherited)", 362 | "$(PROJECT_DIR)/Flutter", 363 | ); 364 | INFOPLIST_FILE = Runner/Info.plist; 365 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 366 | LIBRARY_SEARCH_PATHS = ( 367 | "$(inherited)", 368 | "$(PROJECT_DIR)/Flutter", 369 | ); 370 | PRODUCT_BUNDLE_IDENTIFIER = com.smakos.onlineShopping; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 373 | SWIFT_VERSION = 5.0; 374 | VERSIONING_SYSTEM = "apple-generic"; 375 | }; 376 | name = Profile; 377 | }; 378 | 97C147031CF9000F007C117D /* Debug */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ALWAYS_SEARCH_USER_PATHS = NO; 382 | CLANG_ANALYZER_NONNULL = YES; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 388 | CLANG_WARN_BOOL_CONVERSION = YES; 389 | CLANG_WARN_COMMA = YES; 390 | CLANG_WARN_CONSTANT_CONVERSION = YES; 391 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 393 | CLANG_WARN_EMPTY_BODY = YES; 394 | CLANG_WARN_ENUM_CONVERSION = YES; 395 | CLANG_WARN_INFINITE_RECURSION = YES; 396 | CLANG_WARN_INT_CONVERSION = YES; 397 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 399 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 400 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 401 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 402 | CLANG_WARN_STRICT_PROTOTYPES = YES; 403 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 404 | CLANG_WARN_UNREACHABLE_CODE = YES; 405 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 406 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 407 | COPY_PHASE_STRIP = NO; 408 | DEBUG_INFORMATION_FORMAT = dwarf; 409 | ENABLE_STRICT_OBJC_MSGSEND = YES; 410 | ENABLE_TESTABILITY = YES; 411 | GCC_C_LANGUAGE_STANDARD = gnu99; 412 | GCC_DYNAMIC_NO_PIC = NO; 413 | GCC_NO_COMMON_BLOCKS = YES; 414 | GCC_OPTIMIZATION_LEVEL = 0; 415 | GCC_PREPROCESSOR_DEFINITIONS = ( 416 | "DEBUG=1", 417 | "$(inherited)", 418 | ); 419 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 420 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 421 | GCC_WARN_UNDECLARED_SELECTOR = YES; 422 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 423 | GCC_WARN_UNUSED_FUNCTION = YES; 424 | GCC_WARN_UNUSED_VARIABLE = YES; 425 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 426 | MTL_ENABLE_DEBUG_INFO = YES; 427 | ONLY_ACTIVE_ARCH = YES; 428 | SDKROOT = iphoneos; 429 | TARGETED_DEVICE_FAMILY = "1,2"; 430 | }; 431 | name = Debug; 432 | }; 433 | 97C147041CF9000F007C117D /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ALWAYS_SEARCH_USER_PATHS = NO; 437 | CLANG_ANALYZER_NONNULL = YES; 438 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 439 | CLANG_CXX_LIBRARY = "libc++"; 440 | CLANG_ENABLE_MODULES = YES; 441 | CLANG_ENABLE_OBJC_ARC = YES; 442 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 443 | CLANG_WARN_BOOL_CONVERSION = YES; 444 | CLANG_WARN_COMMA = YES; 445 | CLANG_WARN_CONSTANT_CONVERSION = YES; 446 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 447 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 448 | CLANG_WARN_EMPTY_BODY = YES; 449 | CLANG_WARN_ENUM_CONVERSION = YES; 450 | CLANG_WARN_INFINITE_RECURSION = YES; 451 | CLANG_WARN_INT_CONVERSION = YES; 452 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 453 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 454 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 456 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 457 | CLANG_WARN_STRICT_PROTOTYPES = YES; 458 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 459 | CLANG_WARN_UNREACHABLE_CODE = YES; 460 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 461 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 462 | COPY_PHASE_STRIP = NO; 463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 464 | ENABLE_NS_ASSERTIONS = NO; 465 | ENABLE_STRICT_OBJC_MSGSEND = YES; 466 | GCC_C_LANGUAGE_STANDARD = gnu99; 467 | GCC_NO_COMMON_BLOCKS = YES; 468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 470 | GCC_WARN_UNDECLARED_SELECTOR = YES; 471 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 472 | GCC_WARN_UNUSED_FUNCTION = YES; 473 | GCC_WARN_UNUSED_VARIABLE = YES; 474 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 475 | MTL_ENABLE_DEBUG_INFO = NO; 476 | SDKROOT = iphoneos; 477 | SUPPORTED_PLATFORMS = iphoneos; 478 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | VALIDATE_PRODUCT = YES; 481 | }; 482 | name = Release; 483 | }; 484 | 97C147061CF9000F007C117D /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 487 | buildSettings = { 488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 489 | CLANG_ENABLE_MODULES = YES; 490 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 491 | ENABLE_BITCODE = NO; 492 | FRAMEWORK_SEARCH_PATHS = ( 493 | "$(inherited)", 494 | "$(PROJECT_DIR)/Flutter", 495 | ); 496 | INFOPLIST_FILE = Runner/Info.plist; 497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 498 | LIBRARY_SEARCH_PATHS = ( 499 | "$(inherited)", 500 | "$(PROJECT_DIR)/Flutter", 501 | ); 502 | PRODUCT_BUNDLE_IDENTIFIER = com.smakos.onlineShopping; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 505 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 506 | SWIFT_VERSION = 5.0; 507 | VERSIONING_SYSTEM = "apple-generic"; 508 | }; 509 | name = Debug; 510 | }; 511 | 97C147071CF9000F007C117D /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 514 | buildSettings = { 515 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 516 | CLANG_ENABLE_MODULES = YES; 517 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 518 | ENABLE_BITCODE = NO; 519 | FRAMEWORK_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | INFOPLIST_FILE = Runner/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 525 | LIBRARY_SEARCH_PATHS = ( 526 | "$(inherited)", 527 | "$(PROJECT_DIR)/Flutter", 528 | ); 529 | PRODUCT_BUNDLE_IDENTIFIER = com.smakos.onlineShopping; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 532 | SWIFT_VERSION = 5.0; 533 | VERSIONING_SYSTEM = "apple-generic"; 534 | }; 535 | name = Release; 536 | }; 537 | /* End XCBuildConfiguration section */ 538 | 539 | /* Begin XCConfigurationList section */ 540 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | 97C147031CF9000F007C117D /* Debug */, 544 | 97C147041CF9000F007C117D /* Release */, 545 | 249021D3217E4FDB00AE95B9 /* Profile */, 546 | ); 547 | defaultConfigurationIsVisible = 0; 548 | defaultConfigurationName = Release; 549 | }; 550 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 551 | isa = XCConfigurationList; 552 | buildConfigurations = ( 553 | 97C147061CF9000F007C117D /* Debug */, 554 | 97C147071CF9000F007C117D /* Release */, 555 | 249021D4217E4FDB00AE95B9 /* Profile */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | /* End XCConfigurationList section */ 561 | }; 562 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 563 | } 564 | --------------------------------------------------------------------------------