├── lib ├── config │ └── size_config.dart ├── src │ └── screens │ │ ├── map │ │ ├── components │ │ │ ├── body.dart │ │ │ ├── header.dart │ │ │ └── card.dart │ │ └── map.dart │ │ ├── entercode │ │ └── entercode.dart │ │ ├── editprofile │ │ ├── editprofile.dart │ │ └── components │ │ │ ├── upload.dart │ │ │ └── body.dart │ │ ├── complete │ │ ├── complete_profile.dart │ │ └── components │ │ │ ├── passord_details.dart │ │ │ ├── user_details.dart │ │ │ └── body.dart │ │ ├── scan │ │ ├── scan.dart │ │ └── components │ │ │ └── body.dart │ │ ├── success │ │ └── success.dart │ │ ├── welcome │ │ ├── components │ │ │ └── welcome_splash.dart │ │ └── welcome.dart │ │ ├── store │ │ ├── components │ │ │ ├── cartItem.dart │ │ │ ├── banner.dart │ │ │ └── categoryItem.dart │ │ └── store.dart │ │ ├── home │ │ ├── components │ │ │ ├── card.dart │ │ │ ├── body.dart │ │ │ └── progress.dart │ │ └── home.dart │ │ ├── coins │ │ └── components │ │ │ └── bottom_card.dart │ │ ├── sign_up │ │ ├── sign_up.dart │ │ └── components │ │ │ └── otp.dart │ │ ├── permission │ │ └── permission.dart │ │ ├── choice │ │ └── choice.dart │ │ ├── sign_in │ │ └── components │ │ │ └── bunny.dart │ │ ├── settings │ │ ├── settings.dart │ │ └── components │ │ │ └── bottomContainer.dart │ │ └── profile │ │ └── profile.dart ├── enum │ └── enum.dart ├── controller │ ├── test_controller.dart │ ├── settings_controller.dart │ ├── complete_controller.dart │ ├── store_controller.dart │ ├── home_controller.dart │ ├── profile_controller.dart │ ├── permission_controller.dart │ ├── scan_controller.dart │ ├── welcome_controller.dart │ ├── sign_in_controller.dart │ └── editprofile_controller.dart ├── model │ ├── welcome_model.dart │ └── user_model.dart ├── service │ └── navigation.dart ├── components │ ├── app_bar.dart │ ├── address_field.dart │ ├── name_field.dart │ ├── email_field.dart │ ├── code_field.dart │ ├── phone_field.dart │ ├── custom_button.dart │ ├── password_field.dart │ ├── bottom_nav_bar.dart │ └── app_drawer.dart ├── main.dart ├── routes │ └── navigation_route.dart └── constant │ └── constant.dart ├── _config.yml ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-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 │ │ ├── LaunchBackground.imageset │ │ │ ├── background.png │ │ │ └── Contents.json │ │ └── BrandingImage.imageset │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── preview ├── logo.png ├── Screenshot_1.gif ├── Screenshot_10.jpg ├── Screenshot_11.jpg ├── Screenshot_12.jpg ├── Screenshot_13.jpg ├── Screenshot_14.jpg ├── Screenshot_15.jpg ├── Screenshot_16.jpg ├── Screenshot_17.jpg ├── Screenshot_18.jpg ├── Screenshot_19.jpg ├── Screenshot_2.jpg ├── Screenshot_20.jpg ├── Screenshot_21.jpg ├── Screenshot_22.jpg ├── Screenshot_23.jpg ├── Screenshot_3.jpg ├── Screenshot_4.jpg ├── Screenshot_5.jpg ├── Screenshot_6.jpg ├── Screenshot_7.jpg ├── Screenshot_8.jpg └── Screenshot_9.jpg ├── assets ├── images │ ├── Oval.png │ ├── logo.png │ ├── map.jpg │ ├── stats.png │ ├── user.png │ ├── cart_item1.png │ ├── cart_item2.png │ ├── cart_item3.png │ ├── sort_coin.png │ ├── cart_banner.png │ ├── splash │ │ ├── 1 (1).png │ │ ├── 1 (2).png │ │ ├── 1 (3).png │ │ ├── 1 (4).png │ │ ├── 1 (5).png │ │ └── 1 (6).png │ ├── splash_1024.png │ └── yellow_card.png ├── fonts │ ├── ABeeZee-Italic.ttf │ └── ABeeZee-Regular.ttf └── icons │ ├── bolt-slash.svg │ └── qr_code.svg ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-v21 │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── freeguy │ │ │ │ │ └── sort_it │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── .github ├── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md ├── workflows │ └── flutter-ci.yml └── pull_request_template.md ├── .metadata ├── .gitignore ├── LICENSE.md ├── test └── widget_test.dart ├── analysis_options.yaml ├── pubspec.yaml ├── README.md └── Contributing.md /lib/config/size_config.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /lib/src/screens/map/components/body.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /preview/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/logo.png -------------------------------------------------------------------------------- /assets/images/Oval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/Oval.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/map.jpg -------------------------------------------------------------------------------- /assets/images/stats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/stats.png -------------------------------------------------------------------------------- /assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/user.png -------------------------------------------------------------------------------- /preview/Screenshot_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_1.gif -------------------------------------------------------------------------------- /preview/Screenshot_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_10.jpg -------------------------------------------------------------------------------- /preview/Screenshot_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_11.jpg -------------------------------------------------------------------------------- /preview/Screenshot_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_12.jpg -------------------------------------------------------------------------------- /preview/Screenshot_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_13.jpg -------------------------------------------------------------------------------- /preview/Screenshot_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_14.jpg -------------------------------------------------------------------------------- /preview/Screenshot_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_15.jpg -------------------------------------------------------------------------------- /preview/Screenshot_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_16.jpg -------------------------------------------------------------------------------- /preview/Screenshot_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_17.jpg -------------------------------------------------------------------------------- /preview/Screenshot_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_18.jpg -------------------------------------------------------------------------------- /preview/Screenshot_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_19.jpg -------------------------------------------------------------------------------- /preview/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_2.jpg -------------------------------------------------------------------------------- /preview/Screenshot_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_20.jpg -------------------------------------------------------------------------------- /preview/Screenshot_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_21.jpg -------------------------------------------------------------------------------- /preview/Screenshot_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_22.jpg -------------------------------------------------------------------------------- /preview/Screenshot_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_23.jpg -------------------------------------------------------------------------------- /preview/Screenshot_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_3.jpg -------------------------------------------------------------------------------- /preview/Screenshot_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_4.jpg -------------------------------------------------------------------------------- /preview/Screenshot_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_5.jpg -------------------------------------------------------------------------------- /preview/Screenshot_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_6.jpg -------------------------------------------------------------------------------- /preview/Screenshot_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_7.jpg -------------------------------------------------------------------------------- /preview/Screenshot_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_8.jpg -------------------------------------------------------------------------------- /preview/Screenshot_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/preview/Screenshot_9.jpg -------------------------------------------------------------------------------- /assets/images/cart_item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/cart_item1.png -------------------------------------------------------------------------------- /assets/images/cart_item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/cart_item2.png -------------------------------------------------------------------------------- /assets/images/cart_item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/cart_item3.png -------------------------------------------------------------------------------- /assets/images/sort_coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/sort_coin.png -------------------------------------------------------------------------------- /assets/images/cart_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/cart_banner.png -------------------------------------------------------------------------------- /assets/images/splash/1 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (1).png -------------------------------------------------------------------------------- /assets/images/splash/1 (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (2).png -------------------------------------------------------------------------------- /assets/images/splash/1 (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (3).png -------------------------------------------------------------------------------- /assets/images/splash/1 (4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (4).png -------------------------------------------------------------------------------- /assets/images/splash/1 (5).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (5).png -------------------------------------------------------------------------------- /assets/images/splash/1 (6).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash/1 (6).png -------------------------------------------------------------------------------- /assets/images/splash_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/splash_1024.png -------------------------------------------------------------------------------- /assets/images/yellow_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/images/yellow_card.png -------------------------------------------------------------------------------- /lib/enum/enum.dart: -------------------------------------------------------------------------------- 1 | enum MobileVerificationState { 2 | SHOW_MOBILE_FORM_STATE, 3 | SHOW_OTP_FORM_STATE, 4 | } 5 | -------------------------------------------------------------------------------- /assets/fonts/ABeeZee-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/fonts/ABeeZee-Italic.ttf -------------------------------------------------------------------------------- /assets/fonts/ABeeZee-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/assets/fonts/ABeeZee-Regular.ttf -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lakhankumawat/sort_it/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/Lakhankumawat/sort_it/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/freeguy/sort_it/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.freeguy.sort_it 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/controller/test_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class TestController extends GetxController { 4 | RxString newvar = '+91'.obs; 5 | 6 | void updateVal(String newval) { 7 | newvar.value = newval; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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.9-all.zip 7 | -------------------------------------------------------------------------------- /lib/model/welcome_model.dart: -------------------------------------------------------------------------------- 1 | class WelcomePoster { 2 | String image; 3 | String heading; 4 | String caption; 5 | int index; 6 | 7 | WelcomePoster( 8 | {required this.image, 9 | required this.heading, 10 | required this.caption, 11 | required this.index}); 12 | } 13 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/src/screens/entercode/entercode.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class EnterCode extends StatelessWidget { 4 | static String routeName = '/enter-code'; 5 | const EnterCode({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.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: 77d935af4db863f6abd0b9c31c7e6df2a13de57b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /lib/controller/settings_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class SettingsController extends GetxController { 4 | RxBool darkMode = true.obs; 5 | RxBool playInBg = false.obs; 6 | void changeMode() { 7 | darkMode.value = !darkMode.value; 8 | } 9 | 10 | void changeBgMode() { 11 | playInBg.value = !playInBg.value; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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/src/screens/editprofile/editprofile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'components/body.dart'; 3 | 4 | class EditProfile extends StatelessWidget { 5 | static String routeName = '/edit-profile'; 6 | EditProfile({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | resizeToAvoidBottomInset: false, 12 | body: Body(), 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/screens/complete/complete_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'components/body.dart'; 3 | 4 | class CompleteProfile extends StatelessWidget { 5 | static String routeName = '/complete-profile'; 6 | CompleteProfile({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | resizeToAvoidBottomInset: false, 12 | body: Body(), 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/screens/scan/scan.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'components/body.dart'; 3 | 4 | class Scan extends StatelessWidget { 5 | static String routeName = '/scan'; 6 | const Scan({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | backgroundColor: Color.fromRGBO(31, 46, 53, 1), 12 | resizeToAvoidBottomInset: false, 13 | body: Body(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/controller/complete_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class CompleteProfileController extends GetxController { 5 | RxBool passwordState = false.obs; 6 | final TextEditingController nameController = TextEditingController(); 7 | final TextEditingController emailController = TextEditingController(); 8 | final TextEditingController passController = TextEditingController(); 9 | 10 | void goToPassword({required bool newval}) { 11 | passwordState.value = true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "BrandingImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "BrandingImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "BrandingImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/controller/store_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:sort_it/src/screens/store/components/categoryItem.dart'; 4 | 5 | class StoreController extends GetxController { 6 | final List categories = [ 7 | CategoryItem(subtitle: 'Hot', icon: '🔥', isselected: true), 8 | CategoryItem(subtitle: 'Woman', icon: '👚', isselected: false), 9 | CategoryItem(subtitle: 'Man', icon: '👕', isselected: false), 10 | CategoryItem(subtitle: 'Shoes', icon: '👟', isselected: false), 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /lib/service/navigation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigationService { 4 | final GlobalKey navigatorKey = GlobalKey(); 5 | 6 | Future navigateTo(String routeName, 7 | {Object? arguments, bool withreplacement = false}) { 8 | if (withreplacement) { 9 | return navigatorKey.currentState!.pushNamedAndRemoveUntil( 10 | routeName, (route) => false, 11 | arguments: arguments); 12 | } else { 13 | return navigatorKey.currentState! 14 | .pushNamed(routeName, arguments: arguments); 15 | } 16 | } 17 | 18 | bool pop({required String routeName, Object? argument}) { 19 | navigatorKey.currentState!.pop(); 20 | 21 | return true; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/screens/map/components/header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class Header extends StatelessWidget { 5 | const Header({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Row( 10 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 11 | children: [ 12 | IconButton( 13 | onPressed: () {}, 14 | icon: Icon( 15 | FontAwesomeIcons.bars, 16 | color: Colors.white, 17 | ), 18 | ), 19 | IconButton( 20 | onPressed: () {}, 21 | icon: Icon( 22 | FontAwesomeIcons.cog, 23 | color: Colors.white, 24 | ), 25 | ), 26 | ], 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/controller/home_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class HomeController extends GetxController { 5 | //-------------------VARIABLES-----------------------------// 6 | ///Purpose of this global key is nothing other than opening drawer 7 | final GlobalKey scaffoldKey = new GlobalKey(); 8 | RxInt selectedIndex = 0.obs; 9 | final PageController pageController = PageController(); 10 | 11 | void onTappedBar(int value) { 12 | selectedIndex.value = value; 13 | pageController.animateToPage(selectedIndex.value, 14 | duration: Duration(milliseconds: 500), curve: Curves.easeInOut); 15 | } 16 | 17 | RxBool isOpened = false.obs; 18 | 19 | void changeOpenState({required bool newval}) { 20 | isOpened.value = newval; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.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 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ///Changed from ext.kotlin_version = '1.3.50' to ext.kotlin_version = '1.5.10' 3 | // for more see qr_scanner plugin documentation 4 | ext.kotlin_version = '1.5.10' 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:4.2.0' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | classpath 'com.google.gms:google-services:4.3.10' 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | task clean(type: Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /lib/controller/profile_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | import 'package:dio/dio.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:pretty_dio_logger/pretty_dio_logger.dart'; 6 | 7 | class ProfileController extends GetxController { 8 | //-----------VARIABLES----------// 9 | final FirebaseFirestore db = FirebaseFirestore.instance; 10 | 11 | @override 12 | void onInit() { 13 | getData(); 14 | super.onInit(); 15 | } 16 | 17 | void getData() async { 18 | Dio dio = Dio(); 19 | dio.interceptors.add(PrettyDioLogger( 20 | requestHeader: true, 21 | requestBody: true, 22 | responseBody: true, 23 | responseHeader: false, 24 | compact: false, 25 | )); 26 | try { 27 | // QueryDocumentSnapshot> data = 28 | // (await db.collection('users').get()).docs.first; 29 | // print(jsonEncode(data.data())); 30 | } catch (e) { 31 | print(e); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 FlutterDevs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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:sort_it/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/controller/permission_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttertoast/fluttertoast.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:permission_handler/permission_handler.dart'; 5 | import 'package:sort_it/src/screens/complete/complete_profile.dart'; 6 | import 'package:sort_it/src/screens/home/home.dart'; 7 | 8 | class PermissionController extends GetxController { 9 | Future getPermission(BuildContext context) async { 10 | Map statuses = await [ 11 | Permission.location, 12 | // Permission.phone, 13 | // Permission.sms, 14 | Permission.camera, 15 | ].request(); 16 | if (await Permission.location.request().isGranted) { 17 | print('location granted'); 18 | Fluttertoast.showToast(msg: "Permission Granted!"); 19 | 20 | ///Push Named and remove Until Home Screen 21 | // Navigator.pushNamedAndRemoveUntil( 22 | // context, Home.routeName, (route) => false); 23 | Navigator.of(context).pushNamed(CompleteProfile.routeName); 24 | } else { 25 | Fluttertoast.showToast(msg: "Permission Not Granted!"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/screens/success/success.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | import 'package:sort_it/src/screens/home/home.dart'; 4 | 5 | class Success extends StatelessWidget { 6 | static String routeName = '/success'; 7 | const Success({Key? key}) : super(key: key); 8 | 9 | void doSomeOperationPush(BuildContext context) { 10 | Future.delayed(Duration(seconds: 2), () { 11 | Navigator.of(context).pushNamed(Home.routeName); 12 | }); 13 | } 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | doSomeOperationPush(context); 18 | return Scaffold( 19 | resizeToAvoidBottomInset: false, 20 | body: Container( 21 | width: double.infinity, 22 | height: double.infinity, 23 | decoration: BoxDecoration( 24 | gradient: LinearGradient( 25 | begin: Alignment(0.6, 0.7), 26 | end: Alignment(-0.7, 0.6), 27 | colors: [ 28 | Color.fromRGBO(34, 52, 60, 1), 29 | Color.fromRGBO(31, 46, 53, 1) 30 | ]), 31 | ), 32 | child: Center(child: Lottie.asset('assets/lottie/success.json')), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/src/screens/complete/components/passord_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:sort_it/components/custom_button.dart'; 4 | import 'package:sort_it/components/email_field.dart'; 5 | import 'package:sort_it/components/password_field.dart'; 6 | 7 | class PasswordDetails extends StatelessWidget { 8 | const PasswordDetails({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Column( 13 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 14 | crossAxisAlignment: CrossAxisAlignment.start, 15 | children: [ 16 | Text( 17 | 'Hello', 18 | style: Theme.of(context).textTheme.headline1, 19 | ), 20 | SizedBox( 21 | height: 10.h, 22 | ), 23 | Text( 24 | 'User Name', 25 | style: Theme.of(context).textTheme.headline2, 26 | ), 27 | SizedBox( 28 | height: 20.h, 29 | ), 30 | PasswordField(hinttext: 'Create password'), 31 | SizedBox( 32 | height: 10.h, 33 | ), 34 | PasswordField(hinttext: 'Retype your password'), 35 | ], 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/src/screens/map/map.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:sort_it/src/screens/map/components/card.dart'; 4 | 5 | import 'components/header.dart'; 6 | 7 | class MapPreview extends StatelessWidget { 8 | static String routeName = '/map'; 9 | const MapPreview({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | resizeToAvoidBottomInset: false, 15 | body: Container( 16 | width: double.infinity, 17 | height: double.infinity, 18 | decoration: BoxDecoration( 19 | image: DecorationImage( 20 | image: AssetImage('assets/images/map.jpg'), fit: BoxFit.fill), 21 | ), 22 | child: Padding( 23 | padding: EdgeInsets.symmetric( 24 | horizontal: 35.w, 25 | vertical: 30.h, 26 | ), 27 | child: Column( 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | crossAxisAlignment: CrossAxisAlignment.start, 30 | children: [ 31 | Header(), 32 | CustomCard(), 33 | ], 34 | ), 35 | ), 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/components/app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:sort_it/controller/home_controller.dart'; 5 | 6 | class CustomHeader extends StatelessWidget { 7 | final HomeController hc; 8 | const CustomHeader({Key? key, required this.hc}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Padding( 13 | padding: EdgeInsets.symmetric( 14 | horizontal: 0.1.sw, 15 | //vertical: 0.05.sh, 16 | ), 17 | child: Row( 18 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 19 | children: [ 20 | IconButton( 21 | onPressed: () { 22 | hc.scaffoldKey.currentState!.openDrawer(); 23 | }, 24 | icon: Icon( 25 | FontAwesomeIcons.bars, 26 | color: Colors.white, 27 | ), 28 | ), 29 | IconButton( 30 | onPressed: () {}, 31 | icon: Icon( 32 | FontAwesomeIcons.shoppingCart, 33 | color: Colors.white, 34 | ), 35 | ), 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/src/screens/welcome/components/welcome_splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:sort_it/model/welcome_model.dart'; 4 | 5 | class WelcomeSplash extends StatelessWidget { 6 | WelcomeSplash({Key? key, required this.welcomePoster}) : super(key: key); 7 | 8 | WelcomePoster welcomePoster; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Column( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | crossAxisAlignment: CrossAxisAlignment.center, 15 | children: [ 16 | Expanded( 17 | child: Image.asset( 18 | welcomePoster.image, 19 | fit: BoxFit.contain, 20 | ), 21 | ), 22 | Text( 23 | welcomePoster.heading, 24 | style: Theme.of(context).textTheme.headline1!.copyWith( 25 | fontSize: 32.w, 26 | color: Color(0xffBCDDB4), 27 | ), 28 | ), 29 | const SizedBox(height: 10), 30 | Text( 31 | welcomePoster.caption, 32 | style: Theme.of(context).textTheme.headline2, 33 | textAlign: TextAlign.center, 34 | ), 35 | const SizedBox(height: 30), 36 | ], 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/src/screens/store/components/cartItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CartItem extends StatelessWidget { 4 | final String image; 5 | final String tagline; 6 | final String price; 7 | const CartItem( 8 | {Key? key, 9 | required this.image, 10 | required this.tagline, 11 | required this.price}) 12 | : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | 19 | /// mainAxisAlignment: MainAxisAlignment.spaceAround, 20 | children: [ 21 | Image.asset( 22 | image, 23 | fit: BoxFit.contain, 24 | ), 25 | Padding( 26 | padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 8), 27 | child: Column( 28 | mainAxisAlignment: MainAxisAlignment.spaceAround, 29 | children: [ 30 | Text( 31 | tagline, 32 | style: Theme.of(context).textTheme.headline4, 33 | ), 34 | Text( 35 | price, 36 | style: Theme.of(context).textTheme.headline4, 37 | ), 38 | ], 39 | ), 40 | ), 41 | ], 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /assets/icons/bolt-slash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/src/screens/editprofile/components/upload.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:sort_it/controller/editprofile_controller.dart'; 6 | import 'dart:io'; 7 | 8 | class Upload extends StatelessWidget { 9 | Upload({Key? key}) : super(key: key); 10 | 11 | final EditProfileController ep = Get.find(); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return GestureDetector( 16 | onTap: () { 17 | ep.showPicker(context); 18 | }, 19 | child: ep.pickedImage == null 20 | ? Container( 21 | decoration: BoxDecoration( 22 | color: Color(0xFF30444E), 23 | borderRadius: BorderRadius.all(Radius.elliptical(80, 80)), 24 | ), 25 | width: 55.h, 26 | height: 55.h, 27 | child: Icon( 28 | Icons.camera_alt, 29 | size: 20.h, 30 | color: Color.fromRGBO(150, 167, 175, 1), 31 | ), 32 | ) 33 | : CircleAvatar( 34 | radius: 50, 35 | backgroundColor: Color(0xFF30444E), 36 | backgroundImage: FileImage(ep.pickedImage as File), 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/src/screens/complete/components/user_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:sort_it/components/custom_button.dart'; 6 | import 'package:sort_it/components/email_field.dart'; 7 | import 'package:sort_it/components/name_field.dart'; 8 | import 'package:sort_it/controller/complete_controller.dart'; 9 | 10 | class UserDetails extends StatelessWidget { 11 | UserDetails({Key? key}) : super(key: key); 12 | 13 | final CompleteProfileController cp = Get.find(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Column( 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | Text( 21 | 'Hello', 22 | style: Theme.of(context).textTheme.headline1, 23 | ), 24 | SizedBox( 25 | height: 10.h, 26 | ), 27 | Text( 28 | 'lets introduce', 29 | style: Theme.of(context).textTheme.headline2, 30 | ), 31 | SizedBox( 32 | height: 20.h, 33 | ), 34 | NameField( 35 | hint: 'Your name', 36 | tec: cp.nameController, 37 | ), 38 | SizedBox( 39 | height: 10.h, 40 | ), 41 | EmailField( 42 | hint: 'Your email', 43 | controller: cp.emailController, 44 | ), 45 | ], 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /lib/src/screens/home/components/card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class CustomCard extends StatelessWidget { 6 | const CustomCard({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | height: 0.25.sh, 12 | width: double.infinity, 13 | padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(10), 16 | image: DecorationImage( 17 | image: AssetImage( 18 | 'assets/images/yellow_card.png', 19 | ), 20 | fit: BoxFit.cover, 21 | ), 22 | ), 23 | child: Column( 24 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 25 | children: [ 26 | Icon( 27 | FontAwesomeIcons.gift, 28 | color: Colors.white, 29 | ), 30 | Text( 31 | 'Weekly progress', 32 | style: 33 | Theme.of(context).textTheme.headline1!.copyWith(fontSize: 26.w), 34 | ), 35 | Text( 36 | 'It looks like you are on track. Please continue to follow your daily plan', 37 | textAlign: TextAlign.center, 38 | style: 39 | Theme.of(context).textTheme.headline1!.copyWith(fontSize: 25.w), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/src/screens/home/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:sort_it/components/app_bar.dart'; 4 | import 'package:sort_it/src/screens/home/components/progress.dart'; 5 | import 'card.dart'; 6 | 7 | class Body extends StatelessWidget { 8 | const Body({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Padding( 13 | padding: EdgeInsets.symmetric( 14 | horizontal: 0.1.sw, 15 | vertical: 0.05.sh, 16 | ), 17 | child: SingleChildScrollView( 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | CustomCard(), 22 | SizedBox( 23 | height: 10.h, 24 | ), 25 | Container( 26 | height: 0.25.sh, 27 | width: double.infinity, 28 | padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h), 29 | decoration: BoxDecoration( 30 | borderRadius: BorderRadius.circular(10), 31 | image: DecorationImage( 32 | image: AssetImage( 33 | 'assets/images/sort_coin.png', 34 | ), 35 | fit: BoxFit.cover, 36 | ), 37 | ), 38 | ), 39 | SizedBox( 40 | height: 10.h, 41 | ), 42 | ProgressCard(), 43 | ], 44 | ), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: sort_it 2 | description: A waste management application built using flutter. 3 | publish_to: 'none' 4 | version: 1.0.0+1 5 | environment: 6 | sdk: ">=2.15.1 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | cupertino_icons: ^1.0.2 12 | cloud_firestore: ^3.1.7 13 | country_code_picker: ^2.0.2 14 | dio: ^4.0.4 15 | flutter_svg: ^1.0.3 16 | fluttertoast: ^8.0.8 17 | flutter_screenutil: ^5.1.1 18 | font_awesome_flutter: ^9.2.0 19 | firebase_auth: ^3.3.6 20 | firebase_core: ^1.12.0 21 | firebase_messaging: ^11.2.6 22 | firebase_storage: ^10.2.6 23 | get: ^4.6.1 24 | image_picker: ^0.8.4+9 25 | lottie: ^1.2.1 26 | permission_handler: ^8.3.0 27 | pretty_dio_logger: ^1.1.1 28 | qr_code_scanner: ^0.6.1 29 | qr_flutter: ^4.0.0 30 | sms_autofill: ^2.2.0 31 | 32 | 33 | 34 | dev_dependencies: 35 | flutter_test: 36 | sdk: flutter 37 | 38 | flutter_native_splash: ^1.3.3 39 | flutter_native_splash: 40 | color: "#22343C" 41 | image: assets/images/splash_1024.png 42 | android: true 43 | ios: true 44 | 45 | #flutter_lints: ^1.0.0 46 | 47 | flutter: 48 | uses-material-design: true 49 | assets: 50 | - assets/images/ 51 | - assets/images/splash/ 52 | - assets/lottie/ 53 | - assets/icons/ 54 | 55 | fonts: 56 | - family: "abzi" #ABeeZee-Italic 57 | fonts: 58 | - asset: "assets/fonts/ABeeZee-Italic.ttf" 59 | style: "normal" 60 | weight: 400 61 | - family: "abzr" #ABeeZee-Regular 62 | fonts: 63 | - asset: "assets/fonts/ABeeZee-Regular.ttf" 64 | style: "normal" 65 | weight: 400 66 | 67 | -------------------------------------------------------------------------------- /.github/workflows/flutter-ci.yml: -------------------------------------------------------------------------------- 1 | name: Flutter CI 2 | # This workflow is triggered on pushes to the repository. 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - master 8 | push: 9 | branches: 10 | - main 11 | - master 12 | - develop 13 | # on: push # Default will running for every branch. 14 | jobs: 15 | build: 16 | # This job will run on ubuntu virtual machine 17 | runs-on: ubuntu-latest 18 | steps: 19 | 20 | # Setup Java environment in order to build the Android app. 21 | - uses: actions/checkout@v1 22 | - uses: actions/setup-java@v1 23 | with: 24 | java-version: '12.x' 25 | 26 | # Setup the flutter environment. 27 | - uses: subosito/flutter-action@v1 28 | with: 29 | channel: 'beta' # 'dev', 'alpha', default to: 'stable' 30 | # flutter-version: '1.12.x' # you can also specify exact version of flutter 31 | 32 | # Get flutter dependencies. 33 | - run: flutter pub get 34 | 35 | # Check for any formatting issues in the code. 36 | #- run: flutter format --set-exit-if-changed . Formatting failed--disabled 37 | 38 | # Statically analyze the Dart code for any errors. 39 | - run: flutter analyze . 40 | 41 | # Run widget tests for our flutter project. 42 | - run: flutter test 43 | 44 | # Build apk. 45 | - run: flutter build apk --release --target-platform=android-arm64 46 | 47 | # Upload generated apk to the artifacts. 48 | - uses: actions/upload-artifact@v1 49 | with: 50 | name: release-apk 51 | path: build/app/outputs/apk/release/app-release.apk 52 | -------------------------------------------------------------------------------- /lib/src/screens/store/components/banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | 6 | class StoreBanner extends StatelessWidget { 7 | const StoreBanner({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | height: 0.25.sh, 13 | width: double.infinity, 14 | padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h), 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(10), 17 | image: DecorationImage( 18 | image: AssetImage( 19 | 'assets/images/cart_banner.png', 20 | ), 21 | fit: BoxFit.fill, 22 | ), 23 | ), 24 | child: Column( 25 | crossAxisAlignment: CrossAxisAlignment.start, 26 | mainAxisAlignment: MainAxisAlignment.center, 27 | children: [ 28 | Text( 29 | 'Belt suit blazer', 30 | style: Theme.of(context).textTheme.headline4!.copyWith( 31 | fontSize: 24.w, 32 | ), 33 | ), 34 | SizedBox( 35 | height: 10.h, 36 | ), 37 | Text( 38 | '🪙 120/-', 39 | textAlign: TextAlign.center, 40 | style: Theme.of(context) 41 | .textTheme 42 | .headline1! 43 | .copyWith(fontSize: 25.w, color: Colors.black), 44 | ), 45 | ], 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/components/address_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class AddressField extends StatelessWidget { 5 | final TextEditingController tec; 6 | final String hint; 7 | const AddressField({Key? key, required this.hint, required this.tec}) 8 | : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | padding: EdgeInsets.all(8.0), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(12), 16 | color: Color(0xFF30444E), 17 | ), 18 | height: 60.0, 19 | child: TextFormField( 20 | controller: tec, 21 | style: Theme.of(context).textTheme.headline2, 22 | decoration: InputDecoration( 23 | fillColor: Color(0xFF30444E), 24 | contentPadding: new EdgeInsets.symmetric(vertical: 12), 25 | border: InputBorder.none, 26 | prefixIcon: Prefix(), 27 | hintText: hint, 28 | hintStyle: Theme.of(context).textTheme.headline2), 29 | ), 30 | ); 31 | } 32 | } 33 | 34 | Widget Prefix() { 35 | return Padding( 36 | padding: const EdgeInsets.only(right: 8.0), 37 | child: Container( 38 | width: 25, 39 | height: 50, 40 | decoration: BoxDecoration( 41 | borderRadius: BorderRadius.circular(12), 42 | color: Color(0xffafd0cb), 43 | ), 44 | child: Padding( 45 | padding: const EdgeInsets.symmetric(vertical: 8.0), 46 | child: Icon( 47 | Icons.location_on, 48 | color: Color(0xff4f867e), 49 | ), 50 | ), 51 | ), 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/components/name_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class NameField extends StatelessWidget { 5 | final TextEditingController tec; 6 | final String hint; 7 | const NameField({Key? key, required this.hint, required this.tec}) 8 | : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | padding: EdgeInsets.all(8.0), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(12), 16 | color: Color(0xFF30444E), 17 | ), 18 | height: 60.0, 19 | child: TextFormField( 20 | controller: tec, 21 | style: Theme.of(context).textTheme.headline2, 22 | decoration: InputDecoration( 23 | fillColor: Color(0xFF30444E), 24 | contentPadding: new EdgeInsets.symmetric(vertical: 12), 25 | border: InputBorder.none, 26 | prefixIcon: Prefix(), 27 | hintText: hint, 28 | hintStyle: Theme.of(context).textTheme.headline2), 29 | ), 30 | ); 31 | } 32 | } 33 | 34 | Widget Prefix() { 35 | return Padding( 36 | padding: const EdgeInsets.only(right: 8.0), 37 | child: Container( 38 | width: 25, 39 | height: 50, 40 | decoration: BoxDecoration( 41 | borderRadius: BorderRadius.circular(12), 42 | color: Color.fromRGBO(98, 91, 57, 1), 43 | ), 44 | child: Padding( 45 | padding: const EdgeInsets.symmetric(vertical: 8.0), 46 | child: Icon( 47 | FontAwesomeIcons.solidUser, 48 | color: Color(0xFFFFC542), 49 | ), 50 | ), 51 | ), 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /lib/components/email_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class EmailField extends StatelessWidget { 5 | final String hint; 6 | final TextEditingController controller; 7 | const EmailField({Key? key, required this.hint, required this.controller}) 8 | : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | padding: EdgeInsets.all(8.0), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(12), 16 | color: Color(0xFF30444E), 17 | ), 18 | height: 60.0, 19 | child: TextFormField( 20 | controller: controller, 21 | style: Theme.of(context).textTheme.headline2, 22 | decoration: InputDecoration( 23 | fillColor: Color(0xFF30444E), 24 | contentPadding: new EdgeInsets.symmetric(vertical: 12), 25 | border: InputBorder.none, 26 | prefixIcon: Prefix(), 27 | hintText: hint, 28 | hintStyle: Theme.of(context).textTheme.headline2), 29 | ), 30 | ); 31 | } 32 | } 33 | 34 | Widget Prefix() { 35 | return Padding( 36 | padding: const EdgeInsets.only(right: 8.0), 37 | child: Container( 38 | width: 25, 39 | height: 50, 40 | decoration: BoxDecoration( 41 | borderRadius: BorderRadius.circular(12), 42 | color: Color.fromRGBO(98, 91, 57, 1), 43 | ), 44 | child: Padding( 45 | padding: const EdgeInsets.symmetric(vertical: 8.0), 46 | child: Icon( 47 | FontAwesomeIcons.envelope, 48 | color: Color(0xFFFFC542), 49 | ), 50 | ), 51 | ), 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /lib/components/code_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class CodeField extends StatelessWidget { 6 | final TextEditingController tec; 7 | final String hint; 8 | const CodeField({Key? key, required this.hint, required this.tec}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | padding: EdgeInsets.all(8.0), 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(12), 17 | color: Color(0xFF30444E), 18 | ), 19 | height: 60.0, 20 | child: TextFormField( 21 | controller: tec, 22 | style: Theme.of(context).textTheme.headline2, 23 | decoration: InputDecoration( 24 | fillColor: Color(0xFF30444E), 25 | contentPadding: new EdgeInsets.symmetric(vertical: 12), 26 | border: InputBorder.none, 27 | prefixIcon: Prefix(), 28 | hintText: hint, 29 | hintStyle: Theme.of(context).textTheme.headline2), 30 | ), 31 | ); 32 | } 33 | } 34 | 35 | Widget Prefix() { 36 | return Padding( 37 | padding: const EdgeInsets.only(right: 8.0), 38 | child: Container( 39 | width: 25, 40 | height: 50, 41 | decoration: BoxDecoration( 42 | borderRadius: BorderRadius.circular(12), 43 | color: Color(0xffafd0cb), 44 | ), 45 | child: Padding( 46 | padding: const EdgeInsets.symmetric(vertical: 8.0), 47 | child: SvgPicture.asset( 48 | 'assets/icons/qr_code.svg', 49 | color: Color(0xff3DD598), 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_navigation/src/root/get_material_app.dart'; 5 | import 'package:sort_it/routes/navigation_route.dart'; 6 | import 'package:sort_it/src/screens/home/home.dart'; 7 | import 'package:sort_it/src/screens/sign_in/sign_in.dart'; 8 | import 'package:sort_it/src/screens/sign_up/sign_up.dart'; 9 | import 'package:sort_it/src/screens/welcome/welcome.dart'; 10 | import 'constant/constant.dart' as constant; 11 | 12 | void main() async { 13 | WidgetsFlutterBinding.ensureInitialized(); 14 | await Firebase.initializeApp(); 15 | runApp(MyApp()); 16 | } 17 | 18 | class MyApp extends StatelessWidget { 19 | @override 20 | Widget build(BuildContext context) { 21 | return MediaQuery( 22 | data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window), 23 | child: ScreenUtilInit( 24 | designSize: Size(500, 500), 25 | minTextAdapt: true, 26 | 27 | splitScreenMode: true, 28 | builder: () => GetMaterialApp( 29 | debugShowCheckedModeBanner: false, 30 | title: 'Sort It', 31 | theme: ThemeData( 32 | primarySwatch: Colors.blue, 33 | textTheme: TextTheme( 34 | button: TextStyle(fontSize: 45.sp), 35 | headline1: constant.headline1, 36 | headline2: constant.headline2, 37 | headline3: constant.headline3, 38 | headline4: constant.headline4, 39 | headline5: constant.headline5, 40 | ), 41 | ), 42 | routes: routes, 43 | initialRoute: Home.routeName, 44 | ), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "239407209167", 4 | "project_id": "fir-general-6fa32", 5 | "storage_bucket": "fir-general-6fa32.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:239407209167:android:b5fa2d9d2f68ee251f35ba", 11 | "android_client_info": { 12 | "package_name": "com.freeguy.sort_it" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "239407209167-6idtevr72g4p9p7ur5go8b1f4d29vsr1.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.freeguy.sort_it", 21 | "certificate_hash": "a54352bb98332cc467f2f06b023e53d82ed7f990" 22 | } 23 | }, 24 | { 25 | "client_id": "239407209167-hc9t6dh3c5panmsol15f1lodsj7cerpg.apps.googleusercontent.com", 26 | "client_type": 1, 27 | "android_info": { 28 | "package_name": "com.freeguy.sort_it", 29 | "certificate_hash": "13e191186aa1cdfcdea04395f650aaeedca85d68" 30 | } 31 | }, 32 | { 33 | "client_id": "239407209167-rgr5e95mqvgfb29b3i2339su0f5vgvkf.apps.googleusercontent.com", 34 | "client_type": 3 35 | } 36 | ], 37 | "api_key": [ 38 | { 39 | "current_key": "AIzaSyCkbBuF4OYdvo8MVzZn5nwJuBHEGzKL5Uk" 40 | } 41 | ], 42 | "services": { 43 | "appinvite_service": { 44 | "other_platform_oauth_client": [ 45 | { 46 | "client_id": "239407209167-rgr5e95mqvgfb29b3i2339su0f5vgvkf.apps.googleusercontent.com", 47 | "client_type": 3 48 | } 49 | ] 50 | } 51 | } 52 | } 53 | ], 54 | "configuration_version": "1" 55 | } -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Sort It 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | sort_it 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | UIStatusBarHidden 47 | 48 | 49 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | ## Related Issue 3 | - Mention issue for which this pull request is a part of (please mention issue number # ) 4 | 5 | ## Proposed Changes 6 | - Change 1 7 | - Chnage 2 8 | 9 | ## Additional Info 10 | - Any additional information or context 11 | 12 | ## Checklist 13 | 14 | 15 | 16 | - [ ] ✅ My code follows the code style of this project. 17 | - [ ] 📝 My change requires a change to the documentation. 18 | - [ ] 🎀 I have updated the documentation accordingly. 19 | - [ ] 👀 I have read the [**CONTRIBUTING**](https://github.com/Lakhankumawat/sort_it/blob/master/Contributing.md) document. 20 | - [ ] ✨ I have added tests to cover my changes. 21 | - [ ] 🚩 All new and existing tests passed. 22 | - [ ] 🌟 ed the repo 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | - [ ] Bug fix (non-breaking change which fixes an issue) 40 | - [ ] New feature (non-breaking change which adds functionality) 41 | - [ ] Breaking change (fix or feature that would cause existing functionality to change) 42 | 43 | ## Output Screenshots 44 | | Screenshot #1 | Screenshot #2 | 45 | | ----------- | ----------- | 46 | | Title goes here | Title goes here | 47 | | Image goes here | Image goes here | 48 | -------------------------------------------------------------------------------- /lib/src/screens/home/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:sort_it/components/app_bar.dart'; 7 | import 'package:sort_it/components/bottom_nav_bar.dart'; 8 | import 'package:sort_it/controller/home_controller.dart'; 9 | import 'package:sort_it/src/screens/coins/coins.dart'; 10 | import 'package:sort_it/src/screens/map/map.dart'; 11 | import 'package:sort_it/src/screens/profile/profile.dart'; 12 | import 'package:sort_it/src/screens/scan/scan.dart'; 13 | import 'package:sort_it/src/screens/settings/settings.dart'; 14 | import 'package:sort_it/src/screens/store/store.dart'; 15 | import 'package:sort_it/src/screens/test/test.dart'; 16 | import '../../../components/app_drawer.dart'; 17 | import 'components/body.dart'; 18 | 19 | class Home extends StatelessWidget { 20 | static String routeName = '/home'; 21 | Home({Key? key}) : super(key: key); 22 | 23 | final HomeController controller = Get.put(HomeController()); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | // key: controller.scaffoldKey, 29 | drawer: AppDrawer(), 30 | backgroundColor: Color.fromRGBO(31, 46, 53, 1), 31 | body: Column( 32 | children: [ 33 | SizedBox( 34 | height: 15.h, 35 | ), 36 | CustomHeader(hc: controller), 37 | Expanded( 38 | child: PageView( 39 | controller: controller.pageController, 40 | children: [ 41 | Body(), 42 | Store(), 43 | Test(), 44 | Profile(), 45 | Settings(), 46 | Coins(), 47 | ], 48 | ), 49 | ), 50 | ], 51 | ), 52 | bottomNavigationBar: CustomBottomNavbar(context, controller), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/routes/navigation_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:sort_it/src/screens/choice/choice.dart'; 3 | import 'package:sort_it/src/screens/complete/complete_profile.dart'; 4 | import 'package:sort_it/src/screens/editprofile/editprofile.dart'; 5 | import 'package:sort_it/src/screens/home/home.dart'; 6 | import 'package:sort_it/src/screens/map/map.dart'; 7 | import 'package:sort_it/src/screens/permission/permission.dart'; 8 | import 'package:sort_it/src/screens/profile/profile.dart'; 9 | import 'package:sort_it/src/screens/scan/scan.dart'; 10 | import 'package:sort_it/src/screens/settings/settings.dart'; 11 | import 'package:sort_it/src/screens/sign_in/sign_in.dart'; 12 | import 'package:sort_it/src/screens/sign_up/components/otp.dart'; 13 | import 'package:sort_it/src/screens/sign_up/sign_up.dart'; 14 | import 'package:sort_it/src/screens/welcome/welcome.dart'; 15 | import 'package:sort_it/src/screens/success/success.dart'; 16 | import 'package:sort_it/src/screens/test/test.dart'; 17 | 18 | final Map routes = { 19 | ///------------------App Flow With Routes -------------------/// 20 | /// | Start - Screen Welcome | 21 | /// ---------OTP Screen------- 22 | /// -Subsequent as shown below- 23 | /// --------------|----------- 24 | /// | End Screen Test Screen | 25 | Welcome.routeName: (context) => Welcome(), 26 | SignIn.routeName: (context) => SignIn(), 27 | SignUp.routeName: (context) => SignUp(), 28 | Otp.routeName: (context) => Otp(), 29 | PermissionsPage.routeName: (context) => PermissionsPage(), 30 | Choice.routeName: (context) => Choice(), 31 | CompleteProfile.routeName: (context) => CompleteProfile(), 32 | Success.routeName: (context) => Success(), 33 | Home.routeName: (context) => Home(), 34 | Settings.routeName: (context) => Settings(), 35 | Scan.routeName: (context) => Scan(), 36 | MapPreview.routeName: (context) => MapPreview(), 37 | Profile.routeName: (context) => Profile(), 38 | EditProfile.routeName: (context) => EditProfile(), 39 | Test.routeName: (context) => Test(), 40 | }; 41 | -------------------------------------------------------------------------------- /lib/constant/constant.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | final String appDesc = 5 | 'Nothing is waste, but it becomes one when it is in the wrong place ,' 6 | 'but who has the time to sort it and put it at its right place?' 7 | 'That\'s what •Sort lt- app does! puts your waste in the right place.' 8 | 'Not every waste is landfill , take a step towards greener earth.'; 9 | 10 | final TextStyle headline1 = TextStyle( 11 | color: Color.fromRGBO(255, 255, 255, 1), 12 | fontFamily: 'abzi', 13 | fontSize: 42.w, 14 | letterSpacing: 0, 15 | fontWeight: FontWeight.normal, 16 | height: 1); 17 | 18 | final TextStyle headline2 = TextStyle( 19 | color: Color.fromRGBO(150, 167, 175, 1), 20 | fontFamily: 'abzr', 21 | fontSize: 24.w, 22 | letterSpacing: 0, 23 | fontWeight: FontWeight.normal, 24 | height: 1); 25 | 26 | final TextStyle headline3 = TextStyle( 27 | color: Color.fromRGBO(150, 167, 175, 1), 28 | fontFamily: 'abzi', 29 | fontSize: 14.w, 30 | letterSpacing: 0, 31 | fontWeight: FontWeight.normal, 32 | height: 1.7); 33 | 34 | final TextStyle headline4 = TextStyle( 35 | color: Color.fromRGBO(150, 167, 175, 1), 36 | fontFamily: 'abzr', 37 | fontSize: 18.w, 38 | letterSpacing: 0, 39 | fontWeight: FontWeight.normal, 40 | height: 1); 41 | 42 | final TextStyle headline5 = TextStyle( 43 | color: Color.fromRGBO(255, 255, 255, 1), 44 | fontFamily: 'abzr', 45 | fontSize: 18.w, 46 | letterSpacing: 0, 47 | fontWeight: FontWeight.normal, 48 | height: 1.4); 49 | 50 | final List colorShadeGreen = [ 51 | Color(0xffe4efee), 52 | Color(0xffafd0cb), 53 | Color(0xff79b0a8), 54 | Color(0xff4f867e), 55 | Color(0xff2f504b), 56 | Color(0xff101b19), 57 | ]; 58 | 59 | final List colorShadeRed = [ 60 | Color(0xffffaaae), 61 | Color(0xffFF575F), 62 | Color(0xff550004), 63 | ]; 64 | 65 | final List colorShadeYellow = [ 66 | Color(0xffffe5aa), 67 | Color(0xffffb100), 68 | Color(0xff553b00), 69 | ]; 70 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sort It 2 | 3 | ![](./preview/logo.png) 4 | 5 | This project is an exercise project for individuals to learn Flutter. 6 | 7 | Realize specific design effects by setting, modifying, combining self-contained widgets and customizing to meet the needs of daily development. 8 | 9 | See the design catalog for the design drawings of this project. 10 | 11 | ## Preview 22+ Screens 📱 12 | 13 | The effect of some pages is as follows: 14 | | ![](./preview/Screenshot_1.gif) | ![](./preview/Screenshot_2.jpg) | ![](./preview/Screenshot_3.jpg) | ![](./preview/Screenshot_4.jpg) | 15 | | :--------------------------------: | :---------------------------------: | :-------------------------------: | :-------------------------------: | 16 | | ![](./preview/Screenshot_5.jpg) | ![](./preview/Screenshot_6.jpg) | ![](./preview/Screenshot_7.jpg) | ![](./preview/Screenshot_8.jpg) | 17 | | ![](./preview/Screenshot_9.jpg) | ![](./preview/Screenshot_10.jpg) | ![](./preview/Screenshot_11.jpg) | ![](./preview/Screenshot_12.jpg) | 18 | | ![](./preview/Screenshot_13.jpg) | ![](./preview/Screenshot_14.jpg) | ![](./preview/Screenshot_15.jpg) | ![](./preview/Screenshot_17.jpg) | 19 | | ![](./preview/Screenshot_18.jpg) | ![](./preview/Screenshot_19.jpg) | ![](./preview/Screenshot_20.jpg) | ![](./preview/Screenshot_21.jpg) | 20 | | ![](./preview/Screenshot_22.jpg) | ![](./preview/Screenshot_23.jpg) | ![](./preview/Screenshot_24.jpg) | ![](./preview/Screenshot_25.jpg) | 21 | 22 | 23 | ## Content 24 | 25 | * mvvm architechture 26 | * Use `getx for state management 27 | * Network request encapsulation based on `dio` (version 4.x) 28 | * Driver testing, accessibility testing. 29 | * Pull down to refresh + pull up to load more 30 | * Scan code(qr_code_scanner plugin) 31 | * Customised Lottie Animations 32 | * Password input keyboard 33 | * Verification code input 34 | * Modular routing management 35 | * More optimization 36 | 37 | 38 | ![upload](https://user-images.githubusercontent.com/55774240/153236634-44567e2f-15e5-441f-80b0-56184798a04c.jpg) 39 | 40 | --- 41 |

Made with ❤️ in 🇮🇳

42 | -------------------------------------------------------------------------------- /lib/src/screens/coins/components/bottom_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class BottomCard extends StatelessWidget { 5 | final String Heading; 6 | final String text; 7 | const BottomCard({Key? key, required this.Heading, required this.text}) 8 | : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | height: 0.18.sh, 14 | width: 0.18.sh, 15 | decoration: BoxDecoration( 16 | color: Colors.white, 17 | borderRadius: BorderRadius.circular(10), 18 | ), 19 | child: Column( 20 | children: [ 21 | Flexible( 22 | flex: 2, 23 | child: Container( 24 | decoration: BoxDecoration( 25 | color: Colors.white, 26 | borderRadius: BorderRadius.circular(10), 27 | ), 28 | child: Center( 29 | child: Text( 30 | Heading, 31 | style: Theme.of(context).textTheme.headline1!.copyWith( 32 | fontWeight: FontWeight.bold, 33 | fontSize: 40.w, 34 | color: Color.fromRGBO(31, 46, 53, 1), 35 | ), 36 | ), 37 | ), 38 | ), 39 | ), 40 | Flexible( 41 | flex: 1, 42 | child: Container( 43 | decoration: BoxDecoration( 44 | color: Color(0xff19fdfe), 45 | borderRadius: BorderRadius.circular(10), 46 | ), 47 | child: Center( 48 | child: Text( 49 | text, 50 | style: Theme.of(context).textTheme.headline1!.copyWith( 51 | fontWeight: FontWeight.bold, 52 | fontSize: 20.w, 53 | color: Color.fromRGBO(31, 46, 53, 1), 54 | ), 55 | ), 56 | ), 57 | ), 58 | ), 59 | ], 60 | ), 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/controller/scan_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:qr_code_scanner/qr_code_scanner.dart'; 5 | 6 | class ScanController extends GetxController { 7 | late Rx result; 8 | late Rx controller; 9 | final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); 10 | RxBool campause = false.obs; 11 | RxBool showCodeState = false.obs; 12 | final TextEditingController codeController = TextEditingController(); 13 | 14 | // @override 15 | // void onInit() { 16 | // onQRViewCreated; 17 | // super.onInit(); 18 | // } 19 | 20 | void enterCode({required bool newval}) { 21 | showCodeState.value = newval; 22 | } 23 | 24 | void onQRViewCreated(QRViewController newval) { 25 | controller.value = newval; 26 | 27 | controller.value!.scannedDataStream.listen((scanData) { 28 | result.value = scanData; 29 | }); 30 | 31 | // print( 32 | // 'Barcode Type: ${describeEnum(result!.format)} Data: ${result!.code}'); 33 | } 34 | 35 | void onPermissionSet(BuildContext context, QRViewController ctrl, bool p) { 36 | log('${DateTime.now().toIso8601String()}_onPermissionSet $p'); 37 | if (!p) { 38 | ScaffoldMessenger.of(context).showSnackBar( 39 | const SnackBar(content: Text('no Permission')), 40 | ); 41 | } 42 | } 43 | 44 | ///-------------Toggle Flash------------/// 45 | void toggleFlash({required QRViewController? controller}) async { 46 | await controller?.toggleFlash(); 47 | } 48 | 49 | ///--------------Toggle Camera----------/// 50 | void toggleCamera({required QRViewController? controller}) async { 51 | await controller?.flipCamera(); 52 | } 53 | 54 | ///--------------Pause Camera----------/// 55 | void pauseCamera({required QRViewController? controller}) async { 56 | await controller?.pauseCamera(); 57 | campause.value = true; 58 | } 59 | 60 | ///--------------Resume Camera----------/// 61 | void resumeCamera({required QRViewController? controller}) async { 62 | await controller?.resumeCamera(); 63 | campause.value = false; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 24 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/src/screens/store/components/categoryItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class CategoryItem extends StatelessWidget { 5 | final String subtitle; 6 | final String icon; 7 | final bool isselected; 8 | const CategoryItem( 9 | {Key? key, 10 | required this.subtitle, 11 | required this.icon, 12 | required this.isselected}) 13 | : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Padding( 18 | padding: const EdgeInsets.all(8.0), 19 | child: Container( 20 | width: 81, 21 | height: 146, 22 | padding: EdgeInsets.symmetric(vertical: 5.h), 23 | decoration: BoxDecoration( 24 | borderRadius: BorderRadius.circular(40.5), 25 | boxShadow: [ 26 | BoxShadow( 27 | color: Color.fromRGBO(25, 40, 47, 1), 28 | offset: Offset(0, 1), 29 | blurRadius: 14) 30 | ], 31 | color: 32 | isselected ? Color.fromRGBO(255, 86, 94, 1) : Color(0xFF30444E), 33 | ), 34 | child: Column( 35 | children: [ 36 | Container( 37 | width: 66, 38 | height: 66, 39 | decoration: BoxDecoration( 40 | color: isselected 41 | ? Color.fromRGBO(255, 86, 94, 1) 42 | : Color(0xFF30444E), 43 | borderRadius: BorderRadius.circular(50), 44 | border: Border.all( 45 | color: isselected 46 | ? Color.fromRGBO(255, 255, 255, 1) 47 | : Color(0xFF475E69), 48 | ), 49 | ), 50 | child: Center( 51 | child: Text( 52 | icon, 53 | style: Theme.of(context).textTheme.headline1, 54 | )), 55 | ), 56 | SizedBox( 57 | height: 10.h, 58 | ), 59 | Text( 60 | subtitle, 61 | style: isselected 62 | ? Theme.of(context).textTheme.headline5 63 | : Theme.of(context).textTheme.headline4, 64 | ), 65 | ], 66 | )), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/components/phone_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:country_code_picker/country_code_picker.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | class PhoneField extends StatelessWidget { 6 | final String hint; 7 | final TextEditingController controller; 8 | const PhoneField({Key? key, required this.hint, required this.controller}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | padding: EdgeInsets.all(8.0), 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(12), 17 | color: Color(0xFF30444E), 18 | ), 19 | height: 37.h, 20 | child: TextFormField( 21 | controller: controller, 22 | style: Theme.of(context).textTheme.headline2, 23 | keyboardType: TextInputType.number, 24 | decoration: InputDecoration( 25 | fillColor: Color(0xFF30444E), 26 | contentPadding: new EdgeInsets.only(top: 9.h), 27 | border: InputBorder.none, 28 | prefixIcon: Prefix(), 29 | hintText: hint, 30 | hintStyle: Theme.of(context).textTheme.headline2), 31 | ), 32 | ); 33 | } 34 | } 35 | 36 | class Prefix extends StatelessWidget { 37 | const Prefix({Key? key}) : super(key: key); 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return CountryCodePicker( 42 | onChanged: print, 43 | // Initial selection and favorite can be one of code ('IT') OR dial_code('+39') 44 | initialSelection: 'IN', 45 | favorite: ['+91', 'IN'], 46 | // optional. Shows only country name and flag 47 | showCountryOnly: false, 48 | // optional. Shows only country name and flag when popup is closed. 49 | showOnlyCountryWhenClosed: false, 50 | // optional. aligns the flag and the Text left 51 | alignLeft: false, 52 | // Text Style Custom 53 | textStyle: Theme.of(context).textTheme.headline2, 54 | boxDecoration: BoxDecoration( 55 | borderRadius: BorderRadius.circular(12), 56 | color: Color(0xFF30444E), 57 | ), 58 | searchDecoration: InputDecoration( 59 | fillColor: Color(0xFF30444E), 60 | //contentPadding: new EdgeInsets.symmetric(vertical: 12), 61 | border: InputBorder.none, 62 | hintStyle: Theme.of(context).textTheme.headline4), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /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: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion 31 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.freeguy.sort_it" 48 | minSdkVersion 20 49 | targetSdkVersion flutter.targetSdkVersion 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | multiDexEnabled true 53 | } 54 | 55 | buildTypes { 56 | release { 57 | // TODO: Add your own signing config for the release build. 58 | // Signing with the debug keys for now, so `flutter run --release` works. 59 | signingConfig signingConfigs.debug 60 | } 61 | } 62 | } 63 | 64 | flutter { 65 | source '../..' 66 | } 67 | 68 | dependencies { 69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 70 | implementation platform('com.google.firebase:firebase-bom:29.0.4') 71 | implementation 'com.google.firebase:firebase-analytics' 72 | implementation 'androidx.multidex:multidex: 2.0.1' 73 | } 74 | -------------------------------------------------------------------------------- /lib/components/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class CustomButton extends StatelessWidget { 6 | final String buttonText; 7 | final Color buttonColor; 8 | final Color textColor; 9 | final bool? leading; 10 | final VoidCallback onTap; 11 | const CustomButton( 12 | {Key? key, 13 | required this.buttonText, 14 | required this.buttonColor, 15 | required this.textColor, 16 | this.leading, 17 | required this.onTap}) 18 | : super(key: key); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return // Figma Flutter Generator Sign_buttonWidget - INSTANCE 23 | InkWell( 24 | onTap: onTap, 25 | child: Container( 26 | width: 315, 27 | height: 58, 28 | decoration: BoxDecoration( 29 | color: buttonColor, 30 | borderRadius: BorderRadius.circular(12), 31 | boxShadow: [ 32 | BoxShadow( 33 | color: Color.fromRGBO(15, 218, 136, 0.3), 34 | offset: Offset(0, 2), 35 | blurRadius: 4) 36 | ], 37 | // gradient: LinearGradient( 38 | // begin: Alignment(0, 1), 39 | // end: Alignment(-1, 0), 40 | // colors: [ 41 | // Color.fromRGBO(63, 223, 158, 1), 42 | // Color.fromRGBO(62, 213, 152, 1) 43 | // ]), 44 | ), 45 | child: Center( 46 | child: Row( 47 | mainAxisAlignment: MainAxisAlignment.center, 48 | children: [ 49 | Text( 50 | buttonText, 51 | textAlign: TextAlign.center, 52 | style: Theme.of(context) 53 | .textTheme 54 | .headline3! 55 | .copyWith(color: textColor, fontSize: 20.w), 56 | ), 57 | SizedBox( 58 | width: 5.h, 59 | ), 60 | leading == true 61 | ? Icon( 62 | FontAwesomeIcons.arrowRight, 63 | color: textColor, 64 | size: 17, 65 | ) 66 | : SizedBox(), 67 | ], 68 | ), 69 | )), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/src/screens/sign_up/sign_up.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | import 'package:sort_it/components/custom_button.dart'; 7 | import 'package:sort_it/components/phone_field.dart'; 8 | import 'package:sort_it/controller/sign_up_controller.dart'; 9 | import 'package:sort_it/src/screens/sign_up/components/otp.dart'; 10 | import 'package:sort_it/src/screens/success/success.dart'; 11 | 12 | class SignUp extends StatelessWidget { 13 | static String routeName = '/sign-up'; 14 | 15 | final SignUpController sc = Get.put(SignUpController()); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | resizeToAvoidBottomInset: false, 21 | body: Container( 22 | width: double.infinity, 23 | height: double.infinity, 24 | decoration: BoxDecoration( 25 | gradient: LinearGradient( 26 | begin: Alignment(0.6, 0.7), 27 | end: Alignment(-0.7, 0.6), 28 | colors: [ 29 | Color.fromRGBO(34, 52, 60, 1), 30 | Color.fromRGBO(31, 46, 53, 1) 31 | ]), 32 | ), 33 | child: Padding( 34 | padding: EdgeInsets.symmetric( 35 | horizontal: 0.1.sw, 36 | vertical: 0.1.sh, 37 | ), 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | children: [ 42 | Align( 43 | alignment: Alignment.center, 44 | child: Container( 45 | width: 0.3.sh, 46 | height: 0.3.sh, 47 | child: Lottie.asset('assets/lottie/otp.json'), 48 | ), 49 | ), 50 | Text( 51 | 'Sign Up', 52 | style: Theme.of(context).textTheme.headline1, 53 | ), 54 | Text( 55 | 'to start working', 56 | style: Theme.of(context).textTheme.headline2, 57 | ), 58 | PhoneField(hint: '98', controller: sc.phoneController), 59 | CustomButton( 60 | buttonText: 'Next', 61 | textColor: Colors.white, 62 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 63 | leading: true, 64 | onTap: () { 65 | Navigator.of(context).pushNamed(Otp.routeName); 66 | }, 67 | ), 68 | ], 69 | ), 70 | ), 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/src/screens/permission/permission.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | import 'package:sort_it/components/custom_button.dart'; 7 | import 'package:sort_it/controller/permission_controller.dart'; 8 | import 'package:sort_it/src/screens/choice/choice.dart'; 9 | import 'package:sort_it/src/screens/complete/complete_profile.dart'; 10 | 11 | class PermissionsPage extends StatelessWidget { 12 | static String routeName = '/permissions'; 13 | PermissionsPage({Key? key}) : super(key: key); 14 | 15 | final PermissionController pc = Get.put(PermissionController()); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | resizeToAvoidBottomInset: false, 21 | body: Container( 22 | width: double.infinity, 23 | height: double.infinity, 24 | decoration: BoxDecoration( 25 | gradient: LinearGradient( 26 | begin: Alignment(0.6, 0.7), 27 | end: Alignment(-0.7, 0.6), 28 | colors: [ 29 | Color.fromRGBO(34, 52, 60, 1), 30 | Color.fromRGBO(31, 46, 53, 1) 31 | ]), 32 | ), 33 | child: Padding( 34 | padding: EdgeInsets.symmetric( 35 | horizontal: 0.1.sw, 36 | vertical: 0.1.sh, 37 | ), 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 40 | crossAxisAlignment: CrossAxisAlignment.center, 41 | children: [ 42 | Text( 43 | 'Enable Location', 44 | style: Theme.of(context).textTheme.headline1, 45 | ), 46 | Container( 47 | width: 0.3.sh, 48 | height: 0.3.sh, 49 | child: Lottie.asset('assets/lottie/location.json'), 50 | ), 51 | Text( 52 | 'We need to know your location in order to suggest nearby stations', 53 | textAlign: TextAlign.center, 54 | style: Theme.of(context).textTheme.headline2, 55 | ), 56 | CustomButton( 57 | buttonText: 'Enable', 58 | textColor: Colors.white, 59 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 60 | leading: true, 61 | onTap: () { 62 | pc.getPermission(context); 63 | Navigator.of(context).pushNamed(Choice.routeName); 64 | }, 65 | ), 66 | ], 67 | ), 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/controller/welcome_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:sort_it/model/welcome_model.dart'; 4 | import 'package:sort_it/src/screens/sign_up/sign_up.dart'; 5 | 6 | class WelcomeController extends GetxController { 7 | ///-----------Page Controller PC ------------------/// 8 | PageController pc = PageController(); 9 | 10 | List posters = [ 11 | WelcomePoster( 12 | image: 'assets/images/splash/1 (5).png', 13 | heading: 'TRUST', 14 | caption: 15 | 'We have trained staff and ISO Marked machines for accurate results', 16 | index: 0), 17 | WelcomePoster( 18 | image: 'assets/images/splash/1 (2).png', 19 | heading: 'TIME CONVINIENT', 20 | caption: 21 | 'You\'re busy? Don\'t worry! We would come to you as per your time convenience', 22 | index: 1), 23 | WelcomePoster( 24 | image: 'assets/images/splash/1 (4).png', 25 | heading: 'EARN', 26 | caption: 'Give away your waste and earn on top of it!', 27 | index: 2), 28 | WelcomePoster( 29 | image: 'assets/images/splash/1 (3).png', 30 | heading: 'CATEGORIES', 31 | caption: 'Choose from Extensive range of categories we have to offer', 32 | index: 3), 33 | WelcomePoster( 34 | image: 'assets/images/splash/1 (6).png', 35 | heading: 'REGULATED PRICES', 36 | caption: 'We offer Accurate Market Prices', 37 | index: 4), 38 | WelcomePoster( 39 | image: 'assets/images/splash/1 (1).png', 40 | heading: 'RECYCLE', 41 | caption: 42 | 'We strongly believe nothing is waste, Everything has a right place', 43 | index: 5), 44 | ]; 45 | 46 | int selectedIndex = 0; 47 | 48 | void updateIndex(int val) { 49 | selectedIndex = val; 50 | update(); 51 | } 52 | 53 | void skipPage() { 54 | Get.offAllNamed(SignUp.routeName); 55 | } 56 | 57 | ///----------------Code For auto animation from the start of the screen-----------------/// 58 | ///---------------------May not be useful in some cases , so in hold -------------------/// 59 | // @override 60 | // void initState() { 61 | // _welcomeController.animateSlider(0, context); 62 | // super.initState(); 63 | // } 64 | // 65 | // void animateSlider(int nextPage, BuildContext context) { 66 | // Future.delayed(Duration(seconds: 1)).then((_) { 67 | // if (nextPage == posters.length) { 68 | // skipPage(); 69 | // } 70 | // if (pc.hasClients) 71 | // pc 72 | // .animateToPage(nextPage, 73 | // duration: Duration(milliseconds: 800), curve: Curves.easeOut) 74 | // .then((_) => animateSlider(nextPage + 1, context)); 75 | // }); 76 | // } 77 | } 78 | -------------------------------------------------------------------------------- /lib/components/password_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:get/get_core/src/get_main.dart'; 6 | import 'package:get/get_instance/src/extension_instance.dart'; 7 | import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; 8 | import 'package:sort_it/controller/sign_up_controller.dart'; 9 | 10 | class PasswordField extends StatelessWidget { 11 | final String hinttext; 12 | PasswordField({Key? key, required this.hinttext}) : super(key: key); 13 | 14 | SignUpController _controller = Get.put(SignUpController()); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Container( 19 | padding: EdgeInsets.all(8.0), 20 | decoration: BoxDecoration( 21 | borderRadius: BorderRadius.circular(12), 22 | color: Color(0xFF30444E), 23 | ), 24 | height: 60.0, 25 | child: Obx( 26 | () => TextFormField( 27 | style: Theme.of(context).textTheme.headline2, 28 | obscureText: _controller.isObscure.value, 29 | validator: (val) { 30 | String? msg = _controller.validatePassword(val!); 31 | if (msg != null) Fluttertoast.showToast(msg: msg); 32 | }, 33 | onSaved: (val) => _controller.password.value = val!, 34 | decoration: InputDecoration( 35 | fillColor: Color(0xFF30444E), 36 | contentPadding: new EdgeInsets.only(bottom: 3.h), 37 | border: InputBorder.none, 38 | prefixIcon: Prefix(), 39 | suffix: Suffix(), 40 | hintText: hinttext, 41 | hintStyle: Theme.of(context).textTheme.headline2), 42 | ), 43 | ), 44 | ); 45 | } 46 | 47 | Widget Prefix() { 48 | return Padding( 49 | padding: const EdgeInsets.only(right: 8.0), 50 | child: Container( 51 | width: 25, 52 | height: 50, 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.circular(12), 55 | color: Color(0xFF623A42), 56 | ), 57 | child: Padding( 58 | padding: const EdgeInsets.symmetric(vertical: 8.0), 59 | child: Icon( 60 | FontAwesomeIcons.lock, 61 | color: Color(0xFFFF575F), 62 | ), 63 | ), 64 | ), 65 | ); 66 | } 67 | 68 | Widget Suffix() { 69 | return Obx( 70 | () => IconButton( 71 | icon: Icon( 72 | _controller.isObscure.value 73 | ? FontAwesomeIcons.solidEyeSlash 74 | : FontAwesomeIcons.solidEye, 75 | color: Color(0xFFFF575F), 76 | ), 77 | onPressed: () { 78 | _controller.changeObscure(); 79 | }, 80 | ), 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/src/screens/home/components/progress.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class ProgressCard extends StatelessWidget { 6 | const ProgressCard({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | height: 50.h, 12 | width: double.infinity, 13 | padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h), 14 | decoration: BoxDecoration( 15 | color: Color(0xFF30444E), 16 | borderRadius: BorderRadius.circular(10), 17 | ), 18 | child: Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 20 | children: [ 21 | Container( 22 | width: 0.17.sw, 23 | height: 40.h, 24 | decoration: BoxDecoration( 25 | borderRadius: BorderRadius.circular(10), 26 | color: Color(0xFFFF565E), 27 | ), 28 | child: Icon( 29 | FontAwesomeIcons.arrowDown, 30 | color: Colors.white, 31 | ), 32 | ), 33 | Column( 34 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | Row( 38 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 39 | children: [ 40 | Text( 41 | 'Weekly Progress', 42 | style: Theme.of(context).textTheme.headline3, 43 | ), 44 | SizedBox( 45 | width: 0.1.sw, 46 | ), 47 | Text( 48 | '13%', 49 | style: Theme.of(context).textTheme.headline3!.copyWith( 50 | color: Color(0xFFFF565E), 51 | ), 52 | ), 53 | ], 54 | ), 55 | Container( 56 | width: 0.5.sw, 57 | height: 8.h, 58 | decoration: BoxDecoration( 59 | borderRadius: BorderRadius.circular(100), 60 | color: Color(0xFF2A3C44), 61 | ), 62 | child: Row( 63 | children: [ 64 | Container( 65 | width: 0.2.sw, 66 | height: 8.h, 67 | decoration: BoxDecoration( 68 | borderRadius: BorderRadius.circular(100), 69 | color: Color(0xFFFF565E), 70 | ), 71 | ), 72 | Spacer(), 73 | ], 74 | ), 75 | ), 76 | ], 77 | ), 78 | ], 79 | ), 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /lib/src/screens/choice/choice.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_navigation/src/extension_navigation.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | import 'package:sort_it/components/custom_button.dart'; 7 | import 'package:sort_it/src/screens/complete/complete_profile.dart'; 8 | 9 | class Choice extends StatelessWidget { 10 | static String routeName = '/choice'; 11 | const Choice({Key? key}) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | resizeToAvoidBottomInset: false, 17 | body: Container( 18 | width: double.infinity, 19 | height: double.infinity, 20 | decoration: BoxDecoration( 21 | gradient: LinearGradient( 22 | begin: Alignment(0.6, 0.7), 23 | end: Alignment(-0.7, 0.6), 24 | colors: [ 25 | Color.fromRGBO(34, 52, 60, 1), 26 | Color.fromRGBO(31, 46, 53, 1) 27 | ]), 28 | ), 29 | child: Padding( 30 | padding: EdgeInsets.symmetric( 31 | horizontal: 0.1.sw, 32 | vertical: 0.1.sh, 33 | ), 34 | child: Column( 35 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | children: [ 38 | Text( 39 | 'I am here to', 40 | style: Theme.of(context).textTheme.headline1, 41 | ), 42 | Container( 43 | width: 0.3.sh, 44 | height: 0.3.sh, 45 | child: Lottie.asset('assets/lottie/garbage.json'), 46 | ), 47 | Text( 48 | 'Please mention your use type', 49 | textAlign: TextAlign.center, 50 | style: Theme.of(context).textTheme.headline2, 51 | ), 52 | CustomButton( 53 | buttonText: 'Dump garbage', 54 | textColor: Colors.white, 55 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 56 | leading: true, 57 | onTap: () { 58 | ///Setting the type for further details of user in user db 59 | Get.toNamed(CompleteProfile.routeName); 60 | }, 61 | ), 62 | CustomButton( 63 | buttonText: 'Collect Garbage', 64 | textColor: Color.fromRGBO(63, 223, 158, 1), 65 | buttonColor: Color(0xFF286053), 66 | leading: false, 67 | onTap: () { 68 | ///Setting the type for further details of collector in db 69 | Get.toNamed(CompleteProfile.routeName); 70 | }, 71 | ), 72 | ], 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/src/screens/editprofile/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:sort_it/components/address_field.dart'; 6 | import 'package:sort_it/components/custom_button.dart'; 7 | import 'package:sort_it/components/email_field.dart'; 8 | import 'package:sort_it/components/name_field.dart'; 9 | import 'package:sort_it/components/phone_field.dart'; 10 | import 'package:sort_it/controller/editprofile_controller.dart'; 11 | import 'package:sort_it/src/screens/editprofile/components/upload.dart'; 12 | 13 | class Body extends StatelessWidget { 14 | Body({Key? key}) : super(key: key); 15 | 16 | final EditProfileController ep = Get.put(EditProfileController()); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Container( 21 | width: double.infinity, 22 | height: double.infinity, 23 | decoration: BoxDecoration( 24 | gradient: LinearGradient( 25 | begin: Alignment(0.6, 0.7), 26 | end: Alignment(-0.7, 0.6), 27 | colors: [ 28 | Color.fromRGBO(34, 52, 60, 1), 29 | Color.fromRGBO(31, 46, 53, 1) 30 | ]), 31 | ), 32 | child: Padding( 33 | padding: EdgeInsets.symmetric( 34 | horizontal: 0.1.sw, 35 | vertical: 0.1.sh, 36 | ), 37 | child: SingleChildScrollView( 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 40 | crossAxisAlignment: CrossAxisAlignment.center, 41 | children: [ 42 | Text( 43 | 'Edit Profile', 44 | style: Theme.of(context).textTheme.headline1, 45 | ), 46 | SizedBox( 47 | height: 10.h, 48 | ), 49 | Upload(), 50 | SizedBox( 51 | height: 10.h, 52 | ), 53 | SizedBox( 54 | height: 10.h, 55 | ), 56 | NameField(hint: 'Name', tec: ep.nameController), 57 | SizedBox( 58 | height: 10.h, 59 | ), 60 | EmailField(hint: 'Email', controller: ep.emailController), 61 | SizedBox( 62 | height: 10.h, 63 | ), 64 | PhoneField(hint: '98', controller: ep.phoneController), 65 | SizedBox( 66 | height: 10.h, 67 | ), 68 | AddressField(hint: 'Address', tec: ep.addController), 69 | SizedBox( 70 | height: 10.h, 71 | ), 72 | CustomButton( 73 | buttonText: 'Save', 74 | textColor: Colors.white, 75 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 76 | leading: true, 77 | onTap: () {}, 78 | ), 79 | ], 80 | ), 81 | ), 82 | ), 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/src/screens/welcome/welcome.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:sort_it/src/screens/sign_up/sign_up.dart'; 5 | import 'package:sort_it/src/screens/welcome/components/welcome_splash.dart'; 6 | import 'package:sort_it/controller/welcome_controller.dart'; 7 | 8 | class Welcome extends StatelessWidget { 9 | static String routeName = '/welcome'; 10 | Welcome({Key? key}) : super(key: key); 11 | WelcomeController _welcomeController = Get.put(WelcomeController()); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Container( 17 | padding: const EdgeInsets.all(10), 18 | height: double.infinity, 19 | width: double.infinity, 20 | color: Color(0xff1F2E35), 21 | child: Column( 22 | children: [ 23 | Expanded( 24 | child: PageView.builder( 25 | controller: _welcomeController.pc, 26 | onPageChanged: (index) { 27 | _welcomeController.updateIndex(index); 28 | }, 29 | itemCount: _welcomeController.posters.length, 30 | itemBuilder: (context, index) { 31 | return WelcomeSplash( 32 | welcomePoster: _welcomeController.posters[index]); 33 | }, 34 | ), 35 | ), 36 | SizedBox(height: 25.h), 37 | GetBuilder( 38 | builder: (controller) { 39 | return Row( 40 | mainAxisAlignment: MainAxisAlignment.center, 41 | children: [ 42 | ...controller.posters.map((poster) { 43 | return AnimatedContainer( 44 | margin: const EdgeInsets.symmetric(horizontal: 5), 45 | duration: Duration(milliseconds: 350), 46 | height: 10, 47 | width: 48 | poster.index == controller.selectedIndex ? 20 : 10, 49 | decoration: BoxDecoration( 50 | color: poster.index == controller.selectedIndex 51 | ? Color(0xff66C34F) 52 | : Color(0xff999999), 53 | borderRadius: BorderRadius.circular(15), 54 | ), 55 | ); 56 | }).toList(), 57 | ], 58 | ); 59 | }, 60 | ), 61 | SizedBox(height: 10.h), 62 | TextButton( 63 | onPressed: _welcomeController.skipPage, 64 | child: Text( 65 | 'Skip', 66 | style: TextStyle( 67 | fontSize: 18, 68 | color: Color(0xffBCDDB4), 69 | fontFamily: 'abzr', 70 | ), 71 | ), 72 | ), 73 | SizedBox(height: 20.h), 74 | ], 75 | ), 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /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/src/screens/map/components/card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class CustomCard extends StatelessWidget { 5 | const CustomCard({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container( 10 | width: double.infinity, 11 | height: 150.h, 12 | padding: EdgeInsets.symmetric( 13 | horizontal: 35.w, 14 | vertical: 15.h, 15 | ), 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.circular(10), 18 | boxShadow: [ 19 | BoxShadow( 20 | color: Color.fromRGBO(0, 0, 0, 0.20000000298023224), 21 | offset: Offset(0, 10), 22 | blurRadius: 20) 23 | ], 24 | color: Color.fromRGBO(31, 46, 53, 1), 25 | ), 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | crossAxisAlignment: CrossAxisAlignment.start, 29 | children: [ 30 | Row( 31 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 32 | children: [ 33 | Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Text( 37 | 'Waste disposal site', 38 | style: Theme.of(context).textTheme.headline5, 39 | ), 40 | Text( 41 | '📍 25, Birnin Kebbi Cres, Garki,\nAbuja • 2km', 42 | softWrap: true, 43 | style: Theme.of(context).textTheme.headline3, 44 | ), 45 | ], 46 | ), 47 | Container( 48 | width: 45, 49 | height: 45, 50 | decoration: BoxDecoration( 51 | image: DecorationImage( 52 | image: AssetImage('assets/images/Oval.png'), 53 | fit: BoxFit.fitWidth), 54 | borderRadius: BorderRadius.all(Radius.elliptical(45, 45)), 55 | ), 56 | ), 57 | ], 58 | ), 59 | Text( 60 | 'Routing', 61 | style: Theme.of(context).textTheme.headline4, 62 | ), 63 | Container( 64 | width: 290, 65 | height: 45, 66 | decoration: BoxDecoration( 67 | borderRadius: BorderRadius.circular(10), 68 | boxShadow: [ 69 | BoxShadow( 70 | color: Color.fromRGBO(0, 0, 0, 0.16), 71 | offset: Offset(0, 5), 72 | blurRadius: 10) 73 | ], 74 | color: Color(0xffFF575F), 75 | ), 76 | child: Center( 77 | child: Text( 78 | 'Stop', 79 | textAlign: TextAlign.center, 80 | style: Theme.of(context) 81 | .textTheme 82 | .headline3! 83 | .copyWith(color: Colors.white), 84 | ), 85 | ), 86 | ), 87 | ], 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/src/screens/store/store.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:sort_it/components/app_bar.dart'; 7 | import 'package:sort_it/controller/store_controller.dart'; 8 | import 'package:sort_it/src/screens/store/components/banner.dart'; 9 | import 'package:sort_it/src/screens/store/components/cartItem.dart'; 10 | import 'package:sort_it/src/screens/store/components/categoryItem.dart'; 11 | 12 | class Store extends StatelessWidget { 13 | static String routeName = '/store'; 14 | 15 | final StoreController s = Get.put(StoreController()); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | resizeToAvoidBottomInset: false, 21 | body: Container( 22 | width: double.infinity, 23 | height: double.infinity, 24 | decoration: BoxDecoration( 25 | gradient: LinearGradient( 26 | begin: Alignment(0.6, 0.7), 27 | end: Alignment(-0.7, 0.6), 28 | colors: [ 29 | Color.fromRGBO(34, 52, 60, 1), 30 | Color.fromRGBO(31, 46, 53, 1) 31 | ]), 32 | ), 33 | child: Padding( 34 | padding: EdgeInsets.symmetric( 35 | horizontal: 0.1.sw, 36 | vertical: 10.h, 37 | ), 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | children: [ 42 | Flexible( 43 | flex: 1, 44 | child: SingleChildScrollView( 45 | scrollDirection: Axis.horizontal, 46 | child: ListView.builder( 47 | shrinkWrap: true, 48 | scrollDirection: Axis.horizontal, 49 | itemCount: s.categories.length, 50 | itemBuilder: (context, index) { 51 | return s.categories[index]; 52 | }), 53 | ), 54 | ), 55 | Flexible( 56 | flex: 2, 57 | child: StoreBanner(), 58 | ), 59 | Flexible( 60 | flex: 2, 61 | child: Row( 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | CartItem( 65 | tagline: 'Blue Blazer', 66 | price: '\$ 45', 67 | image: 'assets/images/cart_item2.png', 68 | ), 69 | CartItem( 70 | tagline: 'Red Blazer', 71 | price: '\$ 47', 72 | image: 'assets/images/cart_item3.png', 73 | ), 74 | ], 75 | ), 76 | ), 77 | ]), 78 | ), 79 | )); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /assets/icons/qr_code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /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 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/controller/sign_in_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:firebase_storage/firebase_storage.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:fluttertoast/fluttertoast.dart'; 8 | import 'package:get/get.dart'; 9 | 10 | class SignInController extends GetxController { 11 | //------------------VARIABLES-------------// 12 | final FirebaseAuth _auth = FirebaseAuth.instance; 13 | var error = 'An error occured please check your credentials!'; 14 | String userEmail = ''; 15 | String userName = ''; 16 | String userPassword = ''; 17 | var isLogin = false; 18 | bool showPassword = false; 19 | final formKey = GlobalKey(); 20 | File? userImgfile; 21 | 22 | void pickImage(File? image) { 23 | userImgfile = image; 24 | } 25 | 26 | changePasswordVisibility() { 27 | showPassword = !showPassword; 28 | } 29 | 30 | changeLoginType() { 31 | isLogin = !isLogin; 32 | } 33 | 34 | Future trySubmit(BuildContext context) async { 35 | bool _isValid = formKey.currentState!.validate(); 36 | FocusScope.of(context).unfocus(); 37 | 38 | if (userImgfile == null && !isLogin) { 39 | ScaffoldMessenger.of(context).showSnackBar( 40 | SnackBar( 41 | content: Text('Please select an image'), 42 | backgroundColor: Theme.of(context).errorColor, 43 | ), 44 | ); 45 | return false; 46 | } 47 | 48 | if (_isValid) { 49 | formKey.currentState!.save(); 50 | return submitAuthForm( 51 | userEmail.trim(), 52 | userPassword.trim(), 53 | userName.trim(), 54 | isLogin, 55 | context, 56 | ); 57 | } 58 | return false; 59 | } 60 | 61 | Future submitAuthForm( 62 | String email, 63 | String password, 64 | String username, 65 | bool isLogin, 66 | BuildContext ctx, 67 | ) async { 68 | UserCredential currentuser; 69 | try { 70 | if (isLogin) { 71 | currentuser = await _auth.signInWithEmailAndPassword( 72 | email: email, password: password); 73 | 74 | Fluttertoast.showToast(msg: 'Welcome back !'); 75 | return true; 76 | } else { 77 | currentuser = await _auth.createUserWithEmailAndPassword( 78 | email: email, password: password); 79 | 80 | // final ref = FirebaseStorage.instance 81 | // .ref() 82 | // .child('user_images') 83 | // .child(currentuser.user!.uid + '.jpg'); 84 | // 85 | // await ref.putFile(image!); 86 | 87 | //final url = await ref.getDownloadURL(); 88 | 89 | await FirebaseFirestore.instance 90 | .collection('users') 91 | .doc(currentuser.user!.uid) 92 | .set({ 93 | 'name': username, 94 | 'email': email, 95 | 'image_url': null, 96 | }); 97 | 98 | Fluttertoast.showToast(msg: 'Welcome $username!'); 99 | return true; 100 | } 101 | } catch (err) { 102 | error = err.toString(); 103 | ScaffoldMessenger.of(ctx).showSnackBar( 104 | SnackBar( 105 | content: Text(error), 106 | action: SnackBarAction( 107 | onPressed: () {}, 108 | label: 'undo', 109 | ), 110 | backgroundColor: Colors.black, 111 | ), 112 | ); 113 | return false; 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/src/screens/sign_in/components/bunny.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Bunny { 4 | Bunny(this.controller) { 5 | setNeutralState(); 6 | } 7 | 8 | AnimationController controller; 9 | 10 | /// 各种状态过渡的起始帧数 11 | static const List _neutral_to_tracking = [4, 22]; 12 | static const List _tracking_to_neutral = [0, 0]; 13 | 14 | static const List _neutral_to_shy = [29, 39]; 15 | static const List _shy_to_neutral = [44, 54]; 16 | 17 | static const List _neutral_to_peek = [76, 68]; 18 | static const List _peek_to_neutral = [68, 76]; 19 | 20 | static const List _shy_to_peek = [59, 68]; 21 | static const List _peek_to_shy = [68, 59]; 22 | 23 | BunnyState currentState = BunnyState.neutral; 24 | 25 | void setNeutralState() { 26 | switch (currentState) { 27 | case BunnyState.neutral: 28 | return; 29 | case BunnyState.tracking: 30 | setMinMaxFrame(_tracking_to_neutral); 31 | break; 32 | case BunnyState.shy: 33 | setMinMaxFrame(_shy_to_neutral); 34 | break; 35 | case BunnyState.peek: 36 | setMinMaxFrame(_peek_to_neutral); 37 | break; 38 | } 39 | 40 | currentState = BunnyState.neutral; 41 | } 42 | 43 | void setShyState() { 44 | switch (currentState) { 45 | case BunnyState.neutral: 46 | case BunnyState.tracking: 47 | setMinMaxFrame(_neutral_to_shy); 48 | break; 49 | case BunnyState.shy: 50 | return; 51 | case BunnyState.peek: 52 | setMinMaxFrame(_peek_to_shy); 53 | break; 54 | } 55 | 56 | currentState = BunnyState.shy; 57 | } 58 | 59 | void setPeekState() { 60 | switch (currentState) { 61 | case BunnyState.neutral: 62 | case BunnyState.tracking: 63 | setMinMaxFrame(_neutral_to_peek); 64 | break; 65 | case BunnyState.shy: 66 | setMinMaxFrame(_shy_to_peek); 67 | break; 68 | case BunnyState.peek: 69 | return; 70 | } 71 | 72 | currentState = BunnyState.peek; 73 | } 74 | 75 | void setTrackingState() { 76 | switch (currentState) { 77 | case BunnyState.neutral: 78 | setMinMaxFrame(_tracking_to_neutral); 79 | break; 80 | case BunnyState.tracking: 81 | return; 82 | case BunnyState.shy: 83 | setMinMaxFrame(_shy_to_neutral); 84 | break; 85 | case BunnyState.peek: 86 | setMinMaxFrame(_peek_to_neutral); 87 | break; 88 | } 89 | 90 | currentState = BunnyState.tracking; 91 | } 92 | 93 | void setEyesPosition(double progress) { 94 | if (currentState != BunnyState.tracking) { 95 | setMinMaxFrame(_tracking_to_neutral); 96 | currentState = BunnyState.tracking; 97 | return; 98 | } 99 | if (progress > 1) { 100 | return; 101 | } 102 | 103 | final double frame = 104 | (_neutral_to_tracking[1] - _neutral_to_tracking[0]) * progress; 105 | controller.animateTo( 106 | framesToPercentage(frame.toInt() + _neutral_to_tracking[0]), 107 | duration: Duration.zero); 108 | } 109 | 110 | void setMinMaxFrame(List frames) { 111 | /// 移动至起始帧 112 | controller.animateTo(framesToPercentage(frames[0]), 113 | duration: Duration.zero); 114 | 115 | /// 动画至结束帧 116 | controller.animateTo(framesToPercentage(frames[1])); 117 | } 118 | 119 | /// 共77帧。将已知帧数转为百分比 120 | double framesToPercentage(int frame) { 121 | return frame / 77; 122 | } 123 | } 124 | 125 | enum BunnyState { 126 | /// 默认状态 127 | neutral, 128 | 129 | /// 跟踪(文字输入) 130 | tracking, 131 | 132 | /// 害羞(密码不可见) 133 | shy, 134 | 135 | /// 偷看(密码可见) 136 | peek 137 | } 138 | -------------------------------------------------------------------------------- /lib/model/user_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:meta/meta.dart'; 3 | import 'dart:convert'; 4 | 5 | UserModel userModelFromJson(String str) => UserModel.fromJson(json.decode(str)); 6 | 7 | String userModelToJson(UserModel data) => json.encode(data.toJson()); 8 | 9 | class UserModel { 10 | UserModel({ 11 | required this.coins, 12 | required this.profile, 13 | }); 14 | 15 | final Coins coins; 16 | final Profile profile; 17 | 18 | factory UserModel.fromJson(Map json) => UserModel( 19 | coins: Coins.fromJson(json["coins"]), 20 | profile: Profile.fromJson(json["profile"]), 21 | ); 22 | 23 | Map toJson() => { 24 | "coins": coins.toJson(), 25 | "profile": profile.toJson(), 26 | }; 27 | } 28 | 29 | class Coins { 30 | Coins({ 31 | required this.totalEarned, 32 | required this.totalSpent, 33 | required this.earnHistory, 34 | required this.spentHistory, 35 | }); 36 | 37 | final int totalEarned; 38 | final int totalSpent; 39 | final List earnHistory; 40 | final List spentHistory; 41 | 42 | factory Coins.fromJson(Map json) => Coins( 43 | totalEarned: json["total_earned"], 44 | totalSpent: json["total_spent"], 45 | earnHistory: List.from( 46 | json["earn_history"].map((x) => History.fromJson(x))), 47 | spentHistory: List.from( 48 | json["spent_history"].map((x) => History.fromJson(x))), 49 | ); 50 | 51 | Map toJson() => { 52 | "total_earned": totalEarned, 53 | "total_spent": totalSpent, 54 | "earn_history": List.from(earnHistory.map((x) => x.toJson())), 55 | "spent_history": 56 | List.from(spentHistory.map((x) => x.toJson())), 57 | }; 58 | } 59 | 60 | class History { 61 | History({ 62 | required this.time, 63 | required this.value, 64 | }); 65 | 66 | final int time; 67 | final int value; 68 | 69 | factory History.fromJson(Map json) => History( 70 | time: json["time"], 71 | value: json["value"], 72 | ); 73 | 74 | Map toJson() => { 75 | "time": time, 76 | "value": value, 77 | }; 78 | } 79 | 80 | class Profile { 81 | Profile({ 82 | required this.image, 83 | required this.uid, 84 | required this.phone, 85 | required this.name, 86 | required this.location, 87 | required this.email, 88 | }); 89 | 90 | final String image; 91 | final String uid; 92 | final String phone; 93 | final String name; 94 | final Location location; 95 | final String email; 96 | 97 | factory Profile.fromJson(Map json) => Profile( 98 | image: json["image"], 99 | uid: json["uid"], 100 | phone: json["phone"], 101 | name: json["name"], 102 | location: Location.fromJson(json["location"]), 103 | email: json["email"], 104 | ); 105 | 106 | Map toJson() => { 107 | "image": image, 108 | "uid": uid, 109 | "phone": phone, 110 | "name": name, 111 | "location": location.toJson(), 112 | "email": email, 113 | }; 114 | } 115 | 116 | class Location { 117 | Location({ 118 | required this.address, 119 | required this.coordinates, 120 | }); 121 | 122 | final String address; 123 | final GeoPoint coordinates; 124 | 125 | factory Location.fromJson(Map json) => Location( 126 | address: json["address"], 127 | coordinates: json["coordinates"], 128 | ); 129 | 130 | Map toJson() => { 131 | "address": address, 132 | "coordinates": coordinates, 133 | }; 134 | } 135 | -------------------------------------------------------------------------------- /lib/components/bottom_nav_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; 5 | import 'package:sort_it/controller/home_controller.dart'; 6 | 7 | Container CustomBottomNavbar(BuildContext context, HomeController c) { 8 | Widget BottomNavbarItem( 9 | {required String text, 10 | required IconData icon, 11 | required int currentIndex}) { 12 | return GestureDetector( 13 | onTap: () { 14 | c.onTappedBar(currentIndex); 15 | }, 16 | child: Container( 17 | decoration: BoxDecoration( 18 | borderRadius: BorderRadius.circular(50), 19 | boxShadow: c.selectedIndex.value == currentIndex 20 | ? [ 21 | BoxShadow( 22 | color: Color(0xff3DD598), 23 | spreadRadius: 5, 24 | blurRadius: 0, 25 | //offset: Offset(-1, 5), // changes position of shadow 26 | ), 27 | ] 28 | : [], 29 | ), 30 | padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 2.h), 31 | child: Column( 32 | mainAxisSize: MainAxisSize.min, 33 | children: [ 34 | Icon( 35 | icon, 36 | color: c.selectedIndex.value == currentIndex 37 | ? Colors.white 38 | : Color(0xff9796ae), 39 | size: 25, 40 | ), 41 | SizedBox(height: 4), 42 | Text( 43 | text, 44 | style: TextStyle( 45 | color: c.selectedIndex.value == currentIndex 46 | ? Colors.white 47 | : Color(0xff9796ae), 48 | fontFamily: 'abzr', 49 | fontSize: 11.w, 50 | letterSpacing: 0.06, 51 | fontWeight: FontWeight.normal, 52 | height: 1.2), 53 | ), 54 | ], 55 | ), 56 | ), 57 | ); 58 | } 59 | 60 | return Container( 61 | width: 390, 62 | height: 80, 63 | decoration: BoxDecoration( 64 | color: Color(0xFF30444E), 65 | borderRadius: BorderRadius.only( 66 | topLeft: Radius.circular(40), 67 | topRight: Radius.circular(40), 68 | )), 69 | child: Column( 70 | mainAxisAlignment: MainAxisAlignment.center, 71 | children: [ 72 | Obx( 73 | () => Container( 74 | padding: EdgeInsets.symmetric(horizontal: 16), 75 | child: Row( 76 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 77 | children: [ 78 | BottomNavbarItem( 79 | icon: Icons.home_rounded, text: 'Home', currentIndex: 0), 80 | BottomNavbarItem( 81 | icon: Icons.search_rounded, 82 | text: 'Discover', 83 | currentIndex: 1), 84 | BottomNavbarItem(icon: Icons.map, text: 'Map', currentIndex: 2), 85 | BottomNavbarItem( 86 | icon: Icons.account_circle_rounded, 87 | text: 'Profile', 88 | currentIndex: 3), 89 | BottomNavbarItem( 90 | icon: Icons.settings, text: 'Settings', currentIndex: 4), 91 | BottomNavbarItem( 92 | icon: Icons.ac_unit, text: 'Coin', currentIndex: 5), 93 | ], 94 | ), 95 | ), 96 | ), 97 | SizedBox( 98 | height: 7.h, 99 | ), 100 | Align( 101 | alignment: Alignment.bottomCenter, 102 | child: Container( 103 | height: 6, 104 | width: 80.w, 105 | decoration: BoxDecoration( 106 | borderRadius: BorderRadius.circular(50), 107 | color: Colors.white, 108 | ), 109 | ), 110 | ), 111 | ], 112 | ), 113 | ); 114 | } 115 | -------------------------------------------------------------------------------- /lib/src/screens/complete/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get_core/src/get_main.dart'; 4 | import 'package:get/get_instance/src/extension_instance.dart'; 5 | import 'package:get/get_navigation/src/extension_navigation.dart'; 6 | import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; 7 | import 'package:sort_it/components/custom_button.dart'; 8 | import 'package:sort_it/controller/complete_controller.dart'; 9 | import 'package:sort_it/src/screens/complete/complete_profile.dart'; 10 | import 'package:sort_it/src/screens/complete/components/passord_details.dart'; 11 | import 'package:sort_it/src/screens/complete/components/user_details.dart'; 12 | import 'package:sort_it/src/screens/success/success.dart'; 13 | 14 | class Body extends StatelessWidget { 15 | Body({Key? key}) : super(key: key); 16 | 17 | final CompleteProfileController cp = Get.put(CompleteProfileController()); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Container( 22 | width: double.infinity, 23 | height: double.infinity, 24 | decoration: BoxDecoration( 25 | gradient: LinearGradient( 26 | begin: Alignment(0.6, 0.7), 27 | end: Alignment(-0.7, 0.6), 28 | colors: [ 29 | Color.fromRGBO(34, 52, 60, 1), 30 | Color.fromRGBO(31, 46, 53, 1) 31 | ]), 32 | ), 33 | child: Padding( 34 | padding: EdgeInsets.symmetric( 35 | horizontal: 0.1.sw, 36 | vertical: 0.1.sh, 37 | ), 38 | child: Obx( 39 | () => Column( 40 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 41 | crossAxisAlignment: CrossAxisAlignment.start, 42 | children: [ 43 | Container( 44 | width: 50, 45 | height: 50, 46 | decoration: BoxDecoration( 47 | borderRadius: BorderRadius.circular(12), 48 | boxShadow: [ 49 | BoxShadow( 50 | color: Color.fromRGBO(15, 218, 136, 0.3), 51 | offset: Offset(0, 2), 52 | blurRadius: 10) 53 | ], 54 | gradient: LinearGradient( 55 | begin: Alignment(0, 1), 56 | end: Alignment(-1, 0), 57 | colors: [ 58 | Color.fromRGBO(63, 223, 158, 1), 59 | Color.fromRGBO(62, 213, 152, 1) 60 | ]), 61 | ), 62 | child: Image.asset('assets/images/logo.png'), 63 | ), 64 | cp.passwordState.value ? PasswordDetails() : UserDetails(), 65 | Row( 66 | children: [ 67 | Flexible( 68 | flex: 1, 69 | child: CustomButton( 70 | buttonText: '', 71 | textColor: Color.fromRGBO(63, 223, 158, 1), 72 | buttonColor: Color(0xFF286053), 73 | leading: false, 74 | onTap: () { 75 | if (cp.passwordState.value) { 76 | cp.goToPassword(newval: false); 77 | } else { 78 | Get.close(1); 79 | } 80 | }, 81 | ), 82 | ), 83 | SizedBox( 84 | width: 10.w, 85 | ), 86 | Flexible( 87 | flex: 4, 88 | child: CustomButton( 89 | buttonText: 'Next', 90 | textColor: Colors.white, 91 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 92 | leading: true, 93 | onTap: () { 94 | if (cp.passwordState.value) { 95 | Get.toNamed(Success.routeName); 96 | } else { 97 | cp.goToPassword(newval: true); 98 | } 99 | }, 100 | ), 101 | ), 102 | ], 103 | ), 104 | ], 105 | ), 106 | ), 107 | ), 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | This documentation contains a set of guidelines to help you during the contribution process. 4 | We are happy to welcome all the contributions from anyone willing to improve/add new scripts to this project. Thank you for helping out and remember, 5 | **no contribution is too small.** 6 | 7 | # Submitting Contributions👩‍💻👨‍💻 8 | Below you will find the process and workflow used to review and merge your changes. 9 | 10 | ## Step 1 : Find an issue 11 | - Take a look at the Existing Issues or create your **own** Issues! 12 | - Wait for the Issue to be assigned to you after which you can start working on it. 13 | - Note : Every change in this project should/must have an associated issue. 14 | 15 | ![Screenshot (9)](https://user-images.githubusercontent.com/55774240/153259633-684764f5-dd08-4d88-8524-4958af920537.png) 16 | 17 | ## Step 2 : Fork the Project 18 | - Fork this Repository. This will create a Local Copy of this Repository on your Github Profile. Keep a reference to the original project in `upstream` remote. 19 | ``` 20 | $ git clone https://github.com//sort_it 21 | $ cd sort_it 22 | $ git remote add upstream https://github.com/Lakhankumawat/sort_it 23 | ``` 24 | ![Screenshot (10)](https://user-images.githubusercontent.com/55774240/153259948-c6e3c977-68c2-43c1-8c90-87a738de22fb.png) 25 | 26 | 27 | - If you have already forked the project, update your copy before working. 28 | ``` 29 | $ git remote update 30 | $ git checkout 31 | $ git rebase upstream/ 32 | ``` 33 | ## Step 3 : Branch 34 | Create a new branch. Use its name to identify the issue your addressing. 35 | ``` 36 | # It will create a new branch with name Branch_Name and switch to that branch 37 | $ git checkout -b branch_name 38 | ``` 39 | ## Step 4 : Work on the issue assigned 40 | - Work on the issue(s) assigned to you. 41 | - Add all the files/folders needed. 42 | - After you've made changes or made your contribution to the project add changes to the branch you've just created by: 43 | ``` 44 | # To add all new files to branch Branch_Name 45 | $ git add . 46 | ``` 47 | ## Step 5 : Commit 48 | 49 | 🎀🎀Before submitting an issue please find the correct folder where your program will go , You can discuss about it in the discussion. 50 | 51 | - To commit give a descriptive message for the convenience of reveiwer by: 52 | ``` 53 | # This message get associated with all files you have changed 54 | $ git commit -m "message" 55 | ``` 56 | - **NOTE**: A PR should have only one commit. Multiple commits should be squashed. 57 | ## Step 6 : Work Remotely 58 | - Now you are ready to your work to the remote repository. 59 | - When your work is ready and complies with the project conventions, upload your changes to your fork: 60 | 61 | ``` 62 | # To push your work to your remote repository 63 | $ git push -u origin Branch_Name 64 | ``` 65 | 66 | ## Step 7 : Pull Request 67 | - Go to your repository in browser and click on compare and pull requests. Then add a title and description to your pull request that explains your contribution. 68 | 69 | - Voila! Your Pull Request has been submitted and will be reviewed by the moderators and merged.🥳 70 | 71 | ## 🌟Productivity Hacks 72 | 1. pubspec dependencies must be sorted alphabetically. 73 | 2. simple one liner names for folders and files until it's not an inbuilt library. 74 | 3. Do not use setstate , first see what is `getx` and ask doubts but never use setstate. 75 | 4. Do not Use MediaQuery for size use plugin `screen util`. 76 | 5. Do not make your custom styles instead add them in constants if exceptional otherwise most probably use heading. 77 | 6. For Designers color styling for app must be derived from some specific constants instead of assigning color itself. 78 | 7. and instead of smashing all of code in one file divide it into components. 79 | 80 | ## Need more help?🤔 81 | You can refer to the following articles on basics of Git and Github and also contact the Project Mentors, in case you are stuck: 82 | - [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 83 | - [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request) 84 | - [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) 85 | - [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6) 86 | - [Learn GitHub from Scratch](https://lab.github.com/githubtraining/introduction-to-github) 87 | 88 | 89 | ## Tip from us😇 90 | It always takes time to understand and learn. So, do not worry at all. We know **you have got this**!💪 91 | -------------------------------------------------------------------------------- /lib/src/screens/settings/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:get/get_navigation/src/extension_navigation.dart'; 7 | import 'package:sort_it/controller/settings_controller.dart'; 8 | import 'package:sort_it/src/screens/profile/profile.dart'; 9 | import 'package:sort_it/src/screens/settings/components/bottomContainer.dart'; 10 | import 'components/body.dart'; 11 | 12 | class Settings extends StatelessWidget { 13 | static String routeName = '/settings'; 14 | 15 | final SettingsController sc = Get.put(SettingsController()); 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | resizeToAvoidBottomInset: false, 20 | body: Container( 21 | width: double.infinity, 22 | height: double.infinity, 23 | decoration: BoxDecoration( 24 | gradient: LinearGradient( 25 | begin: Alignment(0.6, 0.7), 26 | end: Alignment(-0.7, 0.6), 27 | colors: [ 28 | Color.fromRGBO(34, 52, 60, 1), 29 | Color.fromRGBO(31, 46, 53, 1) 30 | ]), 31 | ), 32 | child: Padding( 33 | padding: EdgeInsets.symmetric(vertical: 50.w), 34 | child: SingleChildScrollView( 35 | child: Column( 36 | // mainAxisAlignment: MainAxisAlignment.spaceEvenly, 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | Container( 40 | width: double.maxFinite, 41 | height: 70.h, 42 | padding: 43 | EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h), 44 | decoration: BoxDecoration( 45 | color: Color.fromRGBO(48, 68, 78, 1), 46 | ), 47 | child: Row( 48 | mainAxisAlignment: MainAxisAlignment.spaceAround, 49 | children: [ 50 | Container( 51 | height: 33.h, 52 | width: 33.h, 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.circular(50), 55 | color: Color(0xFFFFC542), 56 | ), 57 | child: Center( 58 | child: Text( 59 | '⭕', 60 | style: Theme.of(context).textTheme.headline2, 61 | ), 62 | ), 63 | ), 64 | Column( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | mainAxisAlignment: MainAxisAlignment.center, 67 | children: [ 68 | Text( 69 | 'Alice Smith', 70 | style: 71 | Theme.of(context).textTheme.headline2!.copyWith( 72 | color: Colors.white, 73 | ), 74 | ), 75 | SizedBox( 76 | height: 5.h, 77 | ), 78 | Text( 79 | '91 23 456 7890', 80 | style: 81 | Theme.of(context).textTheme.headline2!.copyWith( 82 | color: Colors.white, 83 | ), 84 | ), 85 | SizedBox( 86 | height: 5.h, 87 | ), 88 | Text( 89 | 'randommail@gmail.com', 90 | style: Theme.of(context).textTheme.headline2, 91 | ), 92 | ], 93 | ), 94 | IconButton( 95 | onPressed: () { 96 | Get.toNamed(Profile.routeName); 97 | }, 98 | icon: Icon( 99 | FontAwesomeIcons.angleRight, 100 | color: Color.fromRGBO(150, 167, 175, 1), 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | SizedBox( 107 | height: 15.h, 108 | ), 109 | Body(), 110 | SizedBox( 111 | height: 15.h, 112 | ), 113 | BottomContainer(), 114 | ], 115 | ), 116 | ), 117 | ), 118 | ), 119 | ); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/src/screens/profile/profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:sort_it/controller/profile_controller.dart'; 7 | import 'package:sort_it/src/screens/editprofile/editprofile.dart'; 8 | import 'package:get/get_navigation/src/extension_navigation.dart'; 9 | 10 | class Profile extends StatelessWidget { 11 | static String routeName = '/profile'; 12 | 13 | final ProfileController pc = Get.put(ProfileController()); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | resizeToAvoidBottomInset: false, 19 | body: Container( 20 | width: double.infinity, 21 | height: double.infinity, 22 | decoration: BoxDecoration( 23 | gradient: LinearGradient( 24 | begin: Alignment(0.6, 0.7), 25 | end: Alignment(-0.7, 0.6), 26 | colors: [ 27 | Color.fromRGBO(34, 52, 60, 1), 28 | Color.fromRGBO(31, 46, 53, 1) 29 | ]), 30 | ), 31 | child: Padding( 32 | padding: EdgeInsets.symmetric( 33 | horizontal: 0.05.sw, 34 | vertical: 0.1.sh, 35 | ), 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | Text( 40 | 'Hi Auston', 41 | style: Theme.of(context).textTheme.headline1, 42 | ), 43 | // Container( 44 | // padding: EdgeInsets.all(10), 45 | // decoration: BoxDecoration( 46 | // borderRadius: BorderRadius.circular(30), 47 | // border: Border.all( 48 | // width: 1, 49 | // color: Color(0xFF96A7AF), 50 | // ), 51 | // ), 52 | // child: 53 | Row( 54 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 55 | children: [ 56 | Container( 57 | height: 0.2.sh, 58 | width: 0.25.sw, 59 | decoration: BoxDecoration( 60 | borderRadius: BorderRadius.circular(10), 61 | ), 62 | child: Image.asset( 63 | 'assets/images/cart_item1.png', 64 | fit: BoxFit.contain, 65 | ), 66 | ), 67 | Column( 68 | crossAxisAlignment: CrossAxisAlignment.start, 69 | children: [ 70 | Text( 71 | 'Auston Martin', 72 | style: Theme.of(context) 73 | .textTheme 74 | .headline1! 75 | .copyWith(fontSize: 20.w), 76 | ), 77 | SizedBox( 78 | height: 10.h, 79 | ), 80 | Text( 81 | 'auston@gmail.com', 82 | style: Theme.of(context) 83 | .textTheme 84 | .headline1! 85 | .copyWith(fontSize: 20.w), 86 | ), 87 | SizedBox( 88 | height: 10.h, 89 | ), 90 | Text( 91 | '+91 27392 93823', 92 | style: Theme.of(context) 93 | .textTheme 94 | .headline1! 95 | .copyWith(fontSize: 20.w), 96 | ), 97 | ], 98 | ), 99 | InkWell( 100 | onTap: () { 101 | Get.toNamed(EditProfile.routeName); 102 | }, 103 | child: Container( 104 | width: 50.w, 105 | height: 25.h, 106 | decoration: BoxDecoration( 107 | borderRadius: BorderRadius.circular(32.5), 108 | boxShadow: [ 109 | BoxShadow( 110 | color: Color.fromRGBO(235, 235, 253, 1), 111 | offset: Offset(0, 1), 112 | blurRadius: 14) 113 | ], 114 | color: Color.fromRGBO(62, 213, 152, 1), 115 | border: Border.all( 116 | color: Color.fromRGBO(183, 237, 218, 1), 117 | width: 1, 118 | ), 119 | ), 120 | child: Icon( 121 | FontAwesomeIcons.pen, 122 | color: Colors.white, 123 | ), 124 | ), 125 | ), 126 | ], 127 | ), 128 | ], 129 | ), 130 | ), 131 | ), 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/src/screens/sign_up/components/otp.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:lottie/lottie.dart'; 7 | import 'package:sms_autofill/sms_autofill.dart'; 8 | import 'package:sort_it/components/custom_button.dart'; 9 | import 'package:sort_it/controller/sign_up_controller.dart'; 10 | import 'package:sort_it/src/screens/permission/permission.dart'; 11 | import 'package:sort_it/src/screens/success/success.dart'; 12 | 13 | class Otp extends StatelessWidget { 14 | static String routeName = '/otp'; 15 | Otp({Key? key}) : super(key: key); 16 | 17 | final SignUpController sc = Get.find(); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | resizeToAvoidBottomInset: false, 23 | body: Container( 24 | width: double.infinity, 25 | height: double.infinity, 26 | decoration: BoxDecoration( 27 | gradient: LinearGradient( 28 | begin: Alignment(0.6, 0.7), 29 | end: Alignment(-0.7, 0.6), 30 | colors: [ 31 | Color.fromRGBO(34, 52, 60, 1), 32 | Color.fromRGBO(31, 46, 53, 1) 33 | ]), 34 | ), 35 | padding: EdgeInsets.symmetric(horizontal: 30.w, vertical: 40.h), 36 | child: Form( 37 | child: Column( 38 | mainAxisAlignment: MainAxisAlignment.start, 39 | children: [ 40 | Text( 41 | "Otp Verification", 42 | textAlign: TextAlign.center, 43 | style: Theme.of(context).textTheme.headline1, 44 | ), 45 | SizedBox( 46 | height: 10.h, 47 | ), 48 | Text.rich( 49 | TextSpan(text: 'We have sent code at \n\n', children: [ 50 | TextSpan( 51 | text: '+91${sc.phoneController.text}', 52 | style: Theme.of(context).textTheme.headline3, 53 | ), 54 | const TextSpan(text: '\n\n please verify'), 55 | ]), 56 | textAlign: TextAlign.center, 57 | style: Theme.of(context).textTheme.headline4, 58 | ), 59 | SizedBox( 60 | height: 10.h, 61 | ), 62 | buildTimer(context), 63 | SizedBox( 64 | height: 10.h, 65 | ), 66 | Align( 67 | alignment: Alignment.center, 68 | child: Container( 69 | width: 0.3.sh, 70 | height: 0.3.sh, 71 | child: Lottie.asset('assets/lottie/scan.json'), 72 | ), 73 | ), 74 | SizedBox( 75 | height: 10.h, 76 | ), 77 | Padding( 78 | padding: const EdgeInsets.all(8.0), 79 | child: PinFieldAutoFill( 80 | controller: sc.otpController, 81 | decoration: UnderlineDecoration( 82 | textStyle: Theme.of(context).textTheme.headline2, 83 | colorBuilder: FixedColorBuilder( 84 | Color.fromRGBO(150, 167, 175, 1), 85 | ), 86 | ), 87 | currentCode: sc.otpController.text, 88 | onCodeSubmitted: (code) {}, 89 | onCodeChanged: (code) { 90 | if (code!.length == 6) { 91 | FocusScope.of(context).unfocus(); 92 | 93 | sc.otpController.text = code; 94 | sc.isLoading.value = true; 95 | 96 | PhoneAuthCredential phoneAuthCredential = 97 | PhoneAuthProvider.credential( 98 | verificationId: sc.verificationId.value, 99 | smsCode: sc.otpController.text); 100 | sc.signInWithPhoneAuthCredential( 101 | phoneAuthCredential, context); 102 | //FocusScope.of(context).requestFocus(FocusNode()); 103 | } 104 | }, 105 | ), 106 | ), 107 | SizedBox( 108 | height: 0.1.sh, 109 | ), 110 | !sc.isLoading.value 111 | ? CustomButton( 112 | buttonText: 'Verify', 113 | textColor: Colors.white, 114 | buttonColor: Color.fromRGBO(63, 223, 158, 1), 115 | onTap: () { 116 | Navigator.of(context) 117 | .pushNamed(PermissionsPage.routeName); 118 | }, 119 | ) 120 | : const Center( 121 | child: CircularProgressIndicator(), 122 | ), 123 | ], 124 | )), 125 | ), 126 | ); 127 | } 128 | 129 | Row buildTimer(BuildContext context) { 130 | return Row( 131 | mainAxisAlignment: MainAxisAlignment.center, 132 | children: [ 133 | //Text("This code will expired in "), 134 | TweenAnimationBuilder( 135 | tween: Tween(begin: 45.0, end: 0.0), 136 | duration: const Duration(seconds: 45), 137 | builder: (_, dynamic value, child) => Text( 138 | "00:${value.toInt()}", 139 | style: Theme.of(context).textTheme.headline2, 140 | ), 141 | onEnd: () {}, 142 | ), 143 | ], 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/src/screens/scan/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get_core/src/get_main.dart'; 5 | import 'package:get/get_instance/src/extension_instance.dart'; 6 | import 'package:get/get_navigation/src/extension_navigation.dart'; 7 | import 'package:qr_code_scanner/qr_code_scanner.dart'; 8 | import 'package:sort_it/components/code_field.dart'; 9 | import 'package:sort_it/controller/scan_controller.dart'; 10 | import 'package:sort_it/src/screens/scan/components/bottom_container.dart'; 11 | import 'package:sort_it/src/screens/success/success.dart'; 12 | import 'dart:io'; 13 | 14 | import '../scan.dart'; 15 | 16 | class Body extends StatefulWidget { 17 | Body({Key? key}) : super(key: key); 18 | 19 | @override 20 | State createState() => _BodyState(); 21 | } 22 | 23 | class _BodyState extends State { 24 | ///-------------VARIABLES--------------/// 25 | final ScanController sc = Get.put(ScanController()); 26 | Barcode? result; 27 | QRViewController? controller; 28 | final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); 29 | 30 | @override 31 | void reassemble() { 32 | super.reassemble(); 33 | if (Platform.isAndroid) { 34 | controller!.pauseCamera(); 35 | } 36 | controller!.resumeCamera(); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | // For this example we check how width or tall the device is and change the scanArea and overlay accordingly. 42 | var scanArea = (MediaQuery.of(context).size.width < 400 || 43 | MediaQuery.of(context).size.height < 400) 44 | ? 80.h 45 | : 120.h; 46 | // To ensure the Scanner view is properly sizes after rotation 47 | // we need to listen for Flutter SizeChanged notification and update controller 48 | return Container( 49 | //height: 0.5.sh, 50 | padding: EdgeInsets.symmetric( 51 | horizontal: 0.1.sw, 52 | vertical: 15.h, 53 | ), 54 | child: Column( 55 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 56 | crossAxisAlignment: CrossAxisAlignment.center, 57 | children: [ 58 | Expanded( 59 | flex: 2, 60 | child: Column( 61 | children: [ 62 | SizedBox( 63 | height: 10.h, 64 | ), 65 | Align( 66 | alignment: Alignment.topLeft, 67 | child: ElevatedButton( 68 | onPressed: () { 69 | Get.close(1); 70 | }, 71 | style: ElevatedButton.styleFrom( 72 | shape: CircleBorder(), 73 | primary: Color(0xffd6d5d6), 74 | //padding: EdgeInsets.all(24), 75 | ), 76 | child: Icon( 77 | Icons.close, 78 | color: Colors.black, 79 | ), 80 | ), 81 | ), 82 | Text( 83 | 'Scan QR Code', 84 | style: Theme.of(context).textTheme.headline1!.copyWith( 85 | color: Colors.white, 86 | ), 87 | ), 88 | Text( 89 | 'Scan the QR code from garbage provider', 90 | textAlign: TextAlign.center, 91 | style: Theme.of(context).textTheme.headline2!.copyWith( 92 | color: Colors.white, 93 | ), 94 | ), 95 | ], 96 | ), 97 | ), 98 | Expanded( 99 | flex: 5, 100 | child: QRView( 101 | key: qrKey, 102 | onQRViewCreated: onQRViewCreated, 103 | overlay: QrScannerOverlayShape( 104 | borderColor: Color.fromRGBO(31, 46, 53, 1), 105 | borderRadius: 10, 106 | borderLength: 30, 107 | borderWidth: 10, 108 | cutOutSize: scanArea), 109 | onPermissionSet: (ctrl, p) => onPermissionSet(context, ctrl, p), 110 | )), 111 | SizedBox( 112 | height: 10.h, 113 | ), 114 | Expanded( 115 | flex: 3, 116 | child: BottomContainer( 117 | controller: controller, 118 | result: result, 119 | ), 120 | ), 121 | ], 122 | ), 123 | ); 124 | } 125 | 126 | void onQRViewCreated(QRViewController controller) { 127 | setState(() { 128 | this.controller = controller; 129 | }); 130 | bool scanned = false; 131 | controller.scannedDataStream.listen((scanData) { 132 | if (!scanned) { 133 | controller.pauseCamera(); 134 | result = scanData; 135 | print(result!.code); 136 | Navigator.push( 137 | context, 138 | MaterialPageRoute( 139 | builder: (context) => Success(), 140 | ), 141 | ).then((value) => controller.resumeCamera()); 142 | } 143 | }); 144 | } 145 | 146 | void onPermissionSet(BuildContext context, QRViewController ctrl, bool p) { 147 | log('${DateTime.now().toIso8601String()}_onPermissionSet $p'); 148 | if (!p) { 149 | ScaffoldMessenger.of(context).showSnackBar( 150 | const SnackBar(content: Text('no Permission')), 151 | ); 152 | } 153 | } 154 | 155 | @override 156 | void dispose() { 157 | controller?.dispose(); 158 | super.dispose(); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/src/screens/settings/components/bottomContainer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:flutter_svg/svg.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | import 'package:get/get_core/src/get_main.dart'; 7 | import 'package:get/get_instance/src/extension_instance.dart'; 8 | import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; 9 | import 'package:sort_it/constant/constant.dart' as constant; 10 | import 'package:sort_it/controller/settings_controller.dart'; 11 | 12 | class BottomContainer extends StatelessWidget { 13 | BottomContainer({Key? key}) : super(key: key); 14 | 15 | final SettingsController sc = Get.find(); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Container( 20 | width: double.maxFinite, 21 | height: 160.h, 22 | padding: EdgeInsets.symmetric(horizontal: 20.h, vertical: 10.h), 23 | decoration: BoxDecoration( 24 | color: Color.fromRGBO(48, 68, 78, 1), 25 | ), 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 28 | children: [ 29 | Row( 30 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 31 | children: [ 32 | Container( 33 | height: 17.h, 34 | width: 32.w, 35 | decoration: BoxDecoration( 36 | borderRadius: BorderRadius.circular(4), 37 | color: constant.colorShadeRed[1], 38 | ), 39 | child: Icon( 40 | FontAwesomeIcons.coins, 41 | size: 17.w, 42 | color: Colors.white, 43 | ), 44 | ), 45 | Text( 46 | 'My Coins', 47 | style: Theme.of(context).textTheme.headline5, 48 | ), 49 | IconButton( 50 | onPressed: () {}, 51 | icon: Icon( 52 | FontAwesomeIcons.angleRight, 53 | color: Color.fromRGBO(150, 167, 175, 1), 54 | ), 55 | ), 56 | ], 57 | ), 58 | Divider( 59 | thickness: 2, 60 | color: Color.fromRGBO(150, 167, 175, 1).withOpacity(0.1), 61 | ), 62 | Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | Container( 66 | height: 17.h, 67 | width: 32.w, 68 | decoration: BoxDecoration( 69 | borderRadius: BorderRadius.circular(4), 70 | color: constant.colorShadeYellow[1], 71 | ), 72 | child: Icon( 73 | FontAwesomeIcons.firstOrder, 74 | size: 17.w, 75 | color: Colors.white, 76 | ), 77 | ), 78 | Text( 79 | 'My Orders', 80 | style: Theme.of(context).textTheme.headline5, 81 | ), 82 | IconButton( 83 | onPressed: () {}, 84 | icon: Icon( 85 | FontAwesomeIcons.angleRight, 86 | color: Color.fromRGBO(150, 167, 175, 1), 87 | ), 88 | ), 89 | ], 90 | ), 91 | Divider( 92 | thickness: 2, 93 | color: Color.fromRGBO(150, 167, 175, 1).withOpacity(0.1), 94 | ), 95 | Row( 96 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 97 | children: [ 98 | Container( 99 | height: 17.h, 100 | width: 32.w, 101 | decoration: BoxDecoration( 102 | borderRadius: BorderRadius.circular(4), 103 | color: Color.fromRGBO(61, 213, 152, 1), 104 | ), 105 | child: Icon( 106 | FontAwesomeIcons.store, 107 | size: 17.w, 108 | color: Colors.white, 109 | ), 110 | ), 111 | Text( 112 | 'Store', 113 | style: Theme.of(context).textTheme.headline5, 114 | ), 115 | IconButton( 116 | onPressed: () {}, 117 | icon: Icon( 118 | FontAwesomeIcons.angleRight, 119 | color: Color.fromRGBO(150, 167, 175, 1), 120 | ), 121 | ), 122 | ], 123 | ), 124 | Divider( 125 | thickness: 2, 126 | color: Color.fromRGBO(150, 167, 175, 1).withOpacity(0.1), 127 | ), 128 | Row( 129 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 130 | children: [ 131 | Container( 132 | height: 17.h, 133 | width: 32.w, 134 | decoration: BoxDecoration( 135 | borderRadius: BorderRadius.circular(4), 136 | color: Colors.grey, 137 | ), 138 | child: Icon( 139 | Icons.feedback, 140 | size: 17.w, 141 | color: Colors.white, 142 | ), 143 | ), 144 | Text( 145 | 'Feedback', 146 | style: Theme.of(context).textTheme.headline5, 147 | ), 148 | IconButton( 149 | onPressed: () {}, 150 | icon: Icon( 151 | FontAwesomeIcons.angleRight, 152 | color: Color.fromRGBO(150, 167, 175, 1), 153 | ), 154 | ), 155 | ], 156 | ), 157 | ], 158 | ), 159 | ); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /lib/components/app_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:qr_flutter/qr_flutter.dart'; 5 | 6 | class AppDrawer extends StatelessWidget { 7 | AppDrawer({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Drawer( 12 | backgroundColor: Color(0xFF475E69), 13 | child: buildMenu(context), 14 | ); 15 | } 16 | 17 | Widget buildMenu(BuildContext context) { 18 | return SingleChildScrollView( 19 | padding: EdgeInsets.symmetric(vertical: 50.h, horizontal: 10.h), 20 | child: Column( 21 | mainAxisAlignment: MainAxisAlignment.center, 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Stack( 25 | clipBehavior: Clip.none, 26 | children: [ 27 | Container( 28 | decoration: BoxDecoration( 29 | border: Border.all( 30 | color: Color(0xFF96A7AF), 31 | width: 2, 32 | ), 33 | borderRadius: BorderRadius.circular(25), 34 | ), 35 | padding: EdgeInsets.only( 36 | left: 10.h, 37 | right: 10.h, 38 | top: 0.1.sh, 39 | bottom: 30.h, 40 | ), 41 | child: Column( 42 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 43 | crossAxisAlignment: CrossAxisAlignment.center, 44 | children: [ 45 | Row( 46 | mainAxisAlignment: MainAxisAlignment.center, 47 | children: [ 48 | Text( 49 | 'Sort It User', 50 | style: 51 | Theme.of(context).textTheme.headline2!.copyWith( 52 | color: Colors.white, 53 | ), 54 | ), 55 | SizedBox( 56 | width: 5.w, 57 | ), 58 | Icon( 59 | FontAwesomeIcons.solidCheckCircle, 60 | size: 15, 61 | color: Colors.white, 62 | ), 63 | ], 64 | ), 65 | Text( 66 | 'A15, WePeople, Street L1, NY', 67 | style: Theme.of(context).textTheme.headline3, 68 | ), 69 | QrImage( 70 | data: 'This QR code has an embedded image as well', 71 | version: QrVersions.auto, 72 | foregroundColor: Colors.white, 73 | size: 80.h, 74 | gapless: false, 75 | embeddedImageStyle: QrEmbeddedImageStyle( 76 | size: Size(80, 80), 77 | ), 78 | ), 79 | Text( 80 | 'Scan this code', 81 | style: Theme.of(context).textTheme.headline2!.copyWith( 82 | color: Colors.white, 83 | ), 84 | ), 85 | ], 86 | ), 87 | ), 88 | Positioned( 89 | left: 50.h, 90 | top: -20.h, 91 | child: CircleAvatar( 92 | backgroundColor: Colors.white, 93 | radius: 50.0.w, 94 | child: Image.asset('assets/images/user.png'), 95 | ), 96 | ), 97 | ], 98 | ), 99 | SizedBox( 100 | height: 20.h, 101 | ), 102 | ListTile( 103 | onTap: () {}, 104 | leading: const Icon(Icons.home, size: 20.0, color: Colors.white), 105 | title: const Text("Home"), 106 | textColor: Colors.white, 107 | dense: true, 108 | ), 109 | ListTile( 110 | onTap: () {}, 111 | leading: const Icon(Icons.verified_user, 112 | size: 20.0, color: Colors.white), 113 | title: const Text("Profile"), 114 | textColor: Colors.white, 115 | dense: true, 116 | 117 | // padding: EdgeInsets.zero, 118 | ), 119 | ListTile( 120 | onTap: () {}, 121 | leading: const Icon(Icons.monetization_on, 122 | size: 20.0, color: Colors.white), 123 | title: const Text("Wallet"), 124 | textColor: Colors.white, 125 | dense: true, 126 | 127 | // padding: EdgeInsets.zero, 128 | ), 129 | ListTile( 130 | onTap: () {}, 131 | leading: const Icon(Icons.shopping_cart, 132 | size: 20.0, color: Colors.white), 133 | title: const Text("Cart"), 134 | textColor: Colors.white, 135 | dense: true, 136 | 137 | // padding: EdgeInsets.zero, 138 | ), 139 | ListTile( 140 | onTap: () {}, 141 | leading: 142 | const Icon(Icons.star_border, size: 20.0, color: Colors.white), 143 | title: const Text("Favorites"), 144 | textColor: Colors.white, 145 | dense: true, 146 | 147 | // padding: EdgeInsets.zero, 148 | ), 149 | ListTile( 150 | onTap: () {}, 151 | leading: 152 | const Icon(Icons.settings, size: 20.0, color: Colors.white), 153 | title: const Text("Settings"), 154 | textColor: Colors.white, 155 | dense: true, 156 | 157 | // padding: EdgeInsets.zero, 158 | ), 159 | ], 160 | ), 161 | ); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/controller/editprofile_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:firebase_storage/firebase_storage.dart'; 4 | import 'package:fluttertoast/fluttertoast.dart'; 5 | import 'package:get/get_rx/src/rx_types/rx_types.dart'; 6 | import 'package:get/get_state_manager/src/simple/get_controllers.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:image_picker/image_picker.dart'; 9 | import 'dart:io'; 10 | 11 | class EditProfileController extends GetxController { 12 | //------------------VARIABLES-------------// 13 | final FirebaseAuth _auth = FirebaseAuth.instance; 14 | var errormessage = 'An error occured please check your credentials!'; 15 | String userEmail = ''; 16 | String userName = ''; 17 | String userPassword = ''; 18 | var isLogin = false; 19 | bool showPassword = false; 20 | final formKey = GlobalKey(); 21 | Rx? pickedImage; 22 | 23 | final TextEditingController nameController = TextEditingController(); 24 | final TextEditingController emailController = TextEditingController(); 25 | final TextEditingController passController = TextEditingController(); 26 | final TextEditingController phoneController = TextEditingController(); 27 | final TextEditingController addController = TextEditingController(); 28 | 29 | ///Set all the controller values for edit profile controller 30 | void setFields() {} 31 | 32 | void _imgFromCamera() async { 33 | final imageFile = await ImagePicker().pickImage( 34 | source: ImageSource.camera, 35 | imageQuality: 80, 36 | maxHeight: 120, 37 | maxWidth: 120, 38 | ); 39 | pickedImage!.value = File(imageFile!.path); 40 | } 41 | 42 | void _imgFromGallery() async { 43 | final image = await ImagePicker().pickImage( 44 | source: ImageSource.gallery, 45 | imageQuality: 80, 46 | maxHeight: 120, 47 | maxWidth: 120, 48 | ); 49 | pickedImage!.value = File(image!.path); 50 | } 51 | 52 | Future trySubmit(BuildContext context) async { 53 | bool _isValid = formKey.currentState!.validate(); 54 | FocusScope.of(context).unfocus(); 55 | 56 | // if (pickedImage == null ) { 57 | // ScaffoldMessenger.of(context).showSnackBar( 58 | // SnackBar( 59 | // content: Text('Please select an image'), 60 | // backgroundColor: Theme.of(context).errorColor, 61 | // ), 62 | // ); 63 | // return false; 64 | // } 65 | 66 | if (_isValid) { 67 | formKey.currentState!.save(); 68 | return submitAuthForm( 69 | userEmail.trim(), 70 | userPassword.trim(), 71 | userName.trim(), 72 | isLogin, 73 | pickedImage!.value, 74 | context, 75 | ); 76 | } 77 | return false; 78 | } 79 | 80 | Future submitAuthForm( 81 | String email, 82 | String password, 83 | String username, 84 | bool isLogin, 85 | File? image, 86 | BuildContext ctx, 87 | ) async { 88 | User? currentuser = _auth.currentUser; 89 | try { 90 | final ref = FirebaseStorage.instance 91 | .ref() 92 | .child('users') 93 | .child(currentuser!.uid + '.jpg'); 94 | 95 | await ref.putFile(image!); 96 | 97 | final url = await ref.getDownloadURL(); 98 | 99 | // await FirebaseFirestore.instance 100 | // .collection('users') 101 | // .doc(currentuser.uid) 102 | // .set({ 103 | // 'name': username, 104 | // 'email': email, 105 | // 'image_url': url, 106 | // }); 107 | 108 | Fluttertoast.showToast(msg: 'Welcome $username!'); 109 | return true; 110 | } catch (err) { 111 | errormessage = err.toString(); 112 | ScaffoldMessenger.of(ctx).showSnackBar( 113 | SnackBar( 114 | content: Text(errormessage), 115 | action: SnackBarAction( 116 | onPressed: () {}, 117 | label: 'undo', 118 | ), 119 | backgroundColor: Colors.black, 120 | ), 121 | ); 122 | return false; 123 | } 124 | } 125 | 126 | void showPicker(context) { 127 | showModalBottomSheet( 128 | shape: RoundedRectangleBorder( 129 | borderRadius: BorderRadius.circular(24), 130 | ), 131 | context: context, 132 | builder: (BuildContext bc) { 133 | return SafeArea( 134 | child: Container( 135 | decoration: BoxDecoration( 136 | borderRadius: BorderRadius.only( 137 | topLeft: Radius.circular(24), 138 | topRight: Radius.circular(24), 139 | ), 140 | color: Color(0xFF30444E), 141 | ), 142 | child: new Wrap( 143 | children: [ 144 | new ListTile( 145 | leading: new Icon( 146 | Icons.photo_library, 147 | color: Color.fromRGBO(63, 223, 158, 1), 148 | ), 149 | title: new Text( 150 | 'Photo Library', 151 | style: Theme.of(context).textTheme.headline2, 152 | ), 153 | onTap: () { 154 | //_imgFromGallery(); 155 | Navigator.of(context).pop(); 156 | }), 157 | new ListTile( 158 | leading: new Icon( 159 | Icons.photo_camera, 160 | color: Color.fromRGBO(63, 223, 158, 1), 161 | ), 162 | title: new Text( 163 | 'Camera', 164 | style: Theme.of(context).textTheme.headline2, 165 | ), 166 | onTap: () { 167 | // _imgFromCamera(); 168 | Navigator.of(context).pop(); 169 | }, 170 | ), 171 | ], 172 | ), 173 | ), 174 | ); 175 | }); 176 | } 177 | } 178 | --------------------------------------------------------------------------------