├── .gitignore ├── .metadata ├── PR_TEMPLATE.md ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── donation_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── Contributors.txt ├── apple_logo.png ├── dona1.png ├── google_logo.png ├── help.png ├── images │ ├── african2.jpg │ ├── african_child.jpg │ ├── asian_girl.jpg │ ├── children.jpg │ ├── old_man.jpg │ ├── screen1.png │ ├── screen2.png │ └── wheelchair.jpg ├── line.png └── logo.jpg ├── donation_icon.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── 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-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── GoogleService-Info.plist │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── RunnerTests │ └── RunnerTests.swift └── firebase_app_id_file.json ├── lib ├── main.dart └── src │ ├── common_widgets │ ├── bigbutton.dart │ └── textfield.dart │ └── features │ ├── authentication │ ├── controllers │ │ └── user.dart │ ├── models │ │ └── profile_setup.dart │ └── screens │ │ ├── ForgotPassword.dart │ │ ├── ForgotPasswordScreen.dart │ │ ├── OtpPage.dart │ │ ├── loginPage.dart │ │ ├── password_screen.dart │ │ └── signup_screen.dart │ ├── createfund │ └── create_fund_page.dart │ ├── donationcart │ ├── iconbutton.dart │ ├── item_card.dart │ ├── list_cart_item.dart │ └── mydonationbox.dart │ ├── donationmode │ └── donationmode_screen.dart │ ├── firebase │ └── firebase_options.dart │ ├── help_faq │ └── help_faq_page.dart │ ├── history │ └── historypage.dart │ ├── home │ ├── DonationDetails.dart │ ├── Donation_card.dart │ ├── baseHomeActivity.dart │ ├── donations_fragment.dart │ ├── feedPage.dart │ ├── hamburgerMenu.dart │ ├── hamburger_function.dart │ └── test.dart │ ├── intro │ └── screens │ │ ├── imageslider.dart │ │ ├── onboarding_screen.dart │ │ └── splash.dart │ ├── profile │ ├── achievements_screen.dart │ ├── profilePage.dart │ └── profile_screen.dart │ └── settings │ └── settingspage.dart ├── pubspec.lock └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /.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: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 17 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 18 | - platform: android 19 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 20 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 21 | - platform: ios 22 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 23 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 24 | - platform: linux 25 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 26 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 27 | - platform: macos 28 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 29 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 30 | - platform: web 31 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 32 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 33 | - platform: windows 34 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 35 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /PR_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Issue:** # 2 | 3 | **Short description of what this resolves:** 4 | 5 | **Changes proposed in this pull request and/or Screenshots of changes:** 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Donation App 2 | **Project maintainer** 3 | Gaurav Chhetri 4 | 5 | ## 🚀What issue does Donation App address? 6 | **Our app establishes a two-way connection between NGOs and donors. NGOs can directly communicate with donors, and vice versa. Essentially, it serves as a centralized hub for managing donations and specifying the organizations that will benefit from the contributions.**

7 | 8 | 9 | ## 🧷Getting Started 10 | - [Setup Git](https://git-scm.com/downloads) 11 | - [Setting up Android Studio](https://developer.android.com/studio/install) 12 | 13 | ## ✒Tech Stack 14 | * Flutter 15 | * Firebase 16 | 17 | ## Requirements 18 | - Android Studio Giraffe | 2022.3.1 19 | - SDK Version: '>=2.18.0 <3.10.0' 20 | 21 | ## Claim an issue 22 | Comment on the issue. In case of no activity on the issue even after 2 days, the issue will be reassigned. If you have difficulty approaching the issue, feel free to ask on our discord channel. 23 | 24 | 25 | ## How To Contibute 26 | 27 | We welcome your contributions. Please follow the below guidelines while contributing to this project: 28 | 29 | 1. Fork and star⭐ the repository and clone locally. 30 | 2. Create an upstream remote and sync your local copy before your branch. See detailed instructions [here](https://help.github.com/articles/syncing-a-fork) 31 | 3. Do the work and commit changes with good commit messages. 32 | 4. Once you are confident in your work, create a pull request to the `master` branch of the upstream repository with proper descriptions explaining what you did and wait until we review it😊. 33 | 34 | > Check out [GitHub Flow](https://guides.github.com/introduction/flow/) for more details. 35 | 36 | 🧷**Directly cloning from Android Studio (Alternate method):-** 37 | 38 | - Go to FILE ➡️ NEW ➡️ PROJECT FROM VERSION CONTROL. 39 | - Copy and paste the url of **FORKED repo** in the URL field and click clone. 40 | 41 | ## 🧾Common Rules: 42 | - The repository is divided into several tasks. **Each task will be opened subsequently for a limited amount of time and all the submissions have to be made within those allotted days only.** NO submission will be accepted after the allotted time ends. The details for the specific tasks and the time allotted for each can be found in their specific issues. 43 | - The submissions will be judged by the mentors and points🎉 will be allotted by them for each particular task based on various aspects like design thinking process, originality of the idea, visual appeal of the submission, code architecture etc. 44 | - These tasks are for learning and not just scoring points so any kind of Plagiarism or attempt thereof wouldn't be tolerated and would lead to disqualification from OpenCode. 45 | - **Your code should be error-free before creating a pull request.** 46 | 47 | > ALL THE FINAL DECISIONS FOR THE JUDGMENT AND AWARDING OF POINTS ⚖️ BASED ON THE SUBMISSION RESIDE WITH THE MENTORS & ORGANISERS. No claim can be made on the number of points awarded by the Mentors & Organisers🙂. 48 | 49 | ## 🗒️Guidlines 50 | Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics. 51 | 52 | - Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern given in [PR_TEMPLATE.md](https://github.com/opencodeiiita/Donation-app/blob/master/PR_TEMPLATE.md) 53 | 54 | - Provide the relevant screenshot for easier review. 55 | 56 | - Pull Request older than 2 days with no response from the contributor shall be marked closed. 57 | 58 | 59 | ## 📢Communication 60 | Whether you are working on a new feature or facing a doubt please feel free to ask us on our [discord](https://discord.gg/D9999YTkS8) channel. We will be happy to help you out😊. 61 | 62 | ## ✒️Reference Links 63 | - [Download and install the latest version of Git.](https://git-scm.com/downloads) 64 | - [Set your username in Git.](https://help.github.com/articles/setting-your-username-in-git) 65 | - [Set your commit email address in Git.](https://help.github.com/articles/setting-your-commit-email-address-in-git) 66 | - [Set up flutter and Android Studio](https://flutter.dev/docs/get-started/install) 67 | - [Or setting up VS code for flutter](https://flutter.dev/docs/development/tools/vs-code) 68 | - [Firebase official Documentation](https://firebase.google.com/docs) 69 | -------------------------------------------------------------------------------- /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 https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | id("com.google.gms.google-services") 6 | } 7 | 8 | def localProperties = new Properties() 9 | def localPropertiesFile = rootProject.file('local.properties') 10 | if (localPropertiesFile.exists()) { 11 | localPropertiesFile.withReader('UTF-8') { reader -> 12 | localProperties.load(reader) 13 | } 14 | } 15 | 16 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 17 | if (flutterVersionCode == null) { 18 | flutterVersionCode = '1' 19 | } 20 | 21 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 22 | if (flutterVersionName == null) { 23 | flutterVersionName = '1.0' 24 | } 25 | 26 | def flutterMinSdkVersion = localProperties.getProperty('flutter.minSdkVersion') 27 | if (flutterMinSdkVersion == null) { 28 | flutterMinSdkVersion = '1.0' 29 | } 30 | 31 | 32 | 33 | android { 34 | namespace "com.example.donation_app" 35 | compileSdkVersion flutter.compileSdkVersion 36 | ndkVersion "25.1.8937393" 37 | 38 | 39 | compileOptions { 40 | sourceCompatibility JavaVersion.VERSION_1_8 41 | targetCompatibility JavaVersion.VERSION_1_8 42 | } 43 | 44 | kotlinOptions { 45 | jvmTarget = '1.8' 46 | } 47 | 48 | sourceSets { 49 | main.java.srcDirs += 'src/main/kotlin' 50 | } 51 | 52 | defaultConfig { 53 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 54 | applicationId "com.example.donation_app" 55 | // You can update the following values to match your application needs. 56 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 57 | targetSdkVersion flutter.targetSdkVersion 58 | versionCode flutterVersionCode.toInteger() 59 | versionName flutterVersionName 60 | multiDexEnabled true 61 | minSdkVersion 21 62 | } 63 | 64 | buildTypes { 65 | release { 66 | // TODO: Add your own signing config for the release build. 67 | // Signing with the debug keys for now, so `flutter run --release` works. 68 | signingConfig signingConfigs.debug 69 | } 70 | } 71 | } 72 | 73 | flutter { 74 | source '../..' 75 | } 76 | 77 | dependencies { 78 | implementation 'androidx.multidex:multidex:2.0.1' 79 | implementation(platform("com.google.firebase:firebase-bom:32.7.0")) 80 | implementation("com.google.firebase:firebase-analytics") 81 | } 82 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "1085876463007", 4 | "project_id": "donation-app-a7e3f", 5 | "storage_bucket": "donation-app-a7e3f.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:1085876463007:android:b9079197295f94d42749aa", 11 | "android_client_info": { 12 | "package_name": "com.example.donation_app" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "1085876463007-1pmpvjhq66rhtil995u3mokdllfv1gi7.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.example.donation_app", 21 | "certificate_hash": "0381434fb6d4427377b846f0f16c98be578d2464" 22 | } 23 | }, 24 | { 25 | "client_id": "1085876463007-7sjl1t16hhv8enolfjgv1sof5lh1k2ra.apps.googleusercontent.com", 26 | "client_type": 1, 27 | "android_info": { 28 | "package_name": "com.example.donation_app", 29 | "certificate_hash": "0e472c5f1ece87b156a435c640e399154524c719" 30 | } 31 | }, 32 | { 33 | "client_id": "1085876463007-a0q3m5vrpprhlheiv8an4unc800hkd9g.apps.googleusercontent.com", 34 | "client_type": 1, 35 | "android_info": { 36 | "package_name": "com.example.donation_app", 37 | "certificate_hash": "a0fb0288c6b86d6b9d029ee07bb978edace16dfd" 38 | } 39 | }, 40 | { 41 | "client_id": "1085876463007-e90l9sirhock4s57cj4o95ss784v5ogj.apps.googleusercontent.com", 42 | "client_type": 1, 43 | "android_info": { 44 | "package_name": "com.example.donation_app", 45 | "certificate_hash": "e6457282e79f3d4a2f1e9fc138b7e348c8f1172d" 46 | } 47 | }, 48 | { 49 | "client_id": "1085876463007-fsovhrelfk0hqlbkp58ao17945jlcskm.apps.googleusercontent.com", 50 | "client_type": 1, 51 | "android_info": { 52 | "package_name": "com.example.donation_app", 53 | "certificate_hash": "7bb00266d92d20ddff32c4626b6afd798f747438" 54 | } 55 | }, 56 | { 57 | "client_id": "1085876463007-uj15l7ub5n3mlaecl3h3moc7pdjdbrr6.apps.googleusercontent.com", 58 | "client_type": 1, 59 | "android_info": { 60 | "package_name": "com.example.donation_app", 61 | "certificate_hash": "fdeb92824aebacd19caf8264a29c7ef4e5f5958d" 62 | } 63 | }, 64 | { 65 | "client_id": "1085876463007-v0bglucvd9t5p9ajmuj4fk098c00mlti.apps.googleusercontent.com", 66 | "client_type": 1, 67 | "android_info": { 68 | "package_name": "com.example.donation_app", 69 | "certificate_hash": "c46d6c2e204bf01e5c0ed80da5938031f2ea29fa" 70 | } 71 | }, 72 | { 73 | "client_id": "1085876463007-va12fjbf5alg2kgkig7567dpqkeedkg6.apps.googleusercontent.com", 74 | "client_type": 1, 75 | "android_info": { 76 | "package_name": "com.example.donation_app", 77 | "certificate_hash": "3eebfd544d1c8d2d553a9953ca3de7f99be6198d" 78 | } 79 | }, 80 | { 81 | "client_id": "1085876463007-8js7d88odhu9glu6utjf61rto43unpoa.apps.googleusercontent.com", 82 | "client_type": 3 83 | } 84 | ], 85 | "api_key": [ 86 | { 87 | "current_key": "AIzaSyDd-FO3ln8hdByls1opp3U1FlbuwS9aNpI" 88 | } 89 | ], 90 | "services": { 91 | "appinvite_service": { 92 | "other_platform_oauth_client": [ 93 | { 94 | "client_id": "1085876463007-8js7d88odhu9glu6utjf61rto43unpoa.apps.googleusercontent.com", 95 | "client_type": 3 96 | }, 97 | { 98 | "client_id": "1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh.apps.googleusercontent.com", 99 | "client_type": 2, 100 | "ios_info": { 101 | "bundle_id": "com.example.donationApp" 102 | } 103 | } 104 | ] 105 | } 106 | } 107 | } 108 | ], 109 | "configuration_version": "1" 110 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/donation_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.donation_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /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 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | tasks.register("clean", Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | } 9 | settings.ext.flutterSdkPath = flutterSdkPath() 10 | 11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") 12 | 13 | repositories { 14 | google() 15 | mavenCentral() 16 | gradlePluginPortal() 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false 21 | } 22 | } 23 | 24 | plugins { 25 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 26 | id "com.android.application" version "7.3.0" apply false 27 | id("com.google.gms.google-services") version "4.4.0" apply false 28 | } 29 | 30 | include ":app" 31 | -------------------------------------------------------------------------------- /assets/Contributors.txt: -------------------------------------------------------------------------------- 1 | Hello Contributors!!! 2 | 3 | This file contains the list of all the Participants who 4 | participated in contributing to Donation_App 5 | 6 | Add your name in this file in the following format- 7 | 8 | Name: Participant Name 9 | Github_id: GitHub User ID 10 | 11 | An example is provided for your reference. 12 | 13 | Name: Ishant Kumawat ish 14 | Github_id: insanecoder02 15 | 16 | Name: Amitabh Singh 17 | Github_id: optimus-pride 18 | 19 | 20 | Name: Sagnik Mandal 21 | Github_id: criticic 22 | 23 | 24 | Name: Gaurav Chhetri 25 | Github_id: Muffinboy19 26 | 27 | Name: Arin Kulkarni 28 | Github_id: akoolarni 29 | 30 | Name: Kushal Bansal 31 | Github_id: kushal7201 32 | 33 | Name: Jai Khanna 34 | Github_id: CodinJack 35 | 36 | Name: Parth Revanwar 37 | Github_id: theprocoder2367 38 | 39 | Name: Harshal Gainer 40 | Github_id: Harshal5167 41 | 42 | Name: Sushmitha 43 | Github_id: imsushmitha-13 44 | 45 | Name: Veerathu Sri Sindhu 46 | Github_id: Sindhu194 47 | 48 | Name: Aditya Reddy 49 | Github_id: illum1nadi 50 | 51 | 52 | Name :Pranav Bansal 53 | Github_id : PranavBansal21 54 | 55 | Name: Aryan Raj 56 | Github_id: Aryan4884 57 | 58 | Name :Vraj Shah 59 | Github_id : VrajShah34 60 | 61 | Name :Sanjay Paul 62 | Github_id :rebornstar1 63 | 64 | Name: Vasu Singla 65 | Github_id: vasusingla545 66 | 67 | Name: Ayush Krishna 68 | Github_id: Ayushk00 69 | 70 | Name:Satvik Dubey 71 | Github_id: Satvik7773 72 | 73 | 74 | Name:Yuvraj Singh Kanoujia 75 | Github_id: yuvrajSingh930 76 | 77 | Name: Chirag malik 78 | Github_id: chiragmalik2612 79 | 80 | Name: Anushka Pandit 81 | Github_id: anushkp1107 82 | 83 | Name:Piyush Tiwari 84 | Github_id: Piyush-raj-Tiwari 85 | 86 | 87 | Name: Nivedh Biju Pazhayedathuparambil 88 | Github_id: Nivedh-Biju 89 | 90 | 91 | Name: Aryan Yadav 92 | Github_id: aryan0931 93 | 94 | Name: Shrutika Rathi 95 | Github_id: shrutikarathi6 96 | 97 | Name: Vibhor Agarwal 98 | Github_id: Vibhor-28 99 | 100 | Name: Sarthak Verma 101 | Github_id: sarthakvermaa 102 | 103 | Name: Nishant Kale 104 | Github_id: nishantkale22 105 | 106 | Name: Aditya Arya 107 | Github_id: arya-007 108 | 109 | Name: Tejas Sharma 110 | Github_id: Tej-as1 111 | 112 | 113 | Name: Poonam Gate 114 | Github_id: PoonamGate 115 | 116 | 117 | Name: Dikshant Khandelwal 118 | Github_id: DikshantK2004 119 | 120 | Name :Rudresh Dabre 121 | Github_id : Rudreshdabre12 122 | 123 | Name: Ajay Kumar 124 | Github_id: ajay484 125 | 126 | 127 | Name:Asher Ahmad 128 | Github_id: AshAhmad2022 129 | 130 | 131 | 132 | Name: Samar Anusimi 133 | Github_id: samaranusimi 134 | 135 | Name: Mansa Mahendru 136 | Github_id: Hannah2k23 137 | 138 | 139 | Name: Komal Pardasani 140 | Github_id: KomalPardasani 141 | 142 | Name: Nandini gupta 143 | Github_id: Nandinig24 144 | 145 | 146 | Name: Parth Kansagra 147 | Github_id: parth_1egend 148 | 149 | Name: Swati Shah 150 | Github_id: shahswati098 151 | 152 | Name: Vineesh Mittal 153 | Github_id: vineeshmittal1 154 | 155 | Name: Rohit Pandey 156 | Github_id: Rohit-110 157 | 158 | Name: Shreeta Mishra 159 | Github_id: apricity24 160 | 161 | Name: Ayush Sahu 162 | Github_id: Murdock9803 163 | 164 | Name: Buddhi Sagar Panjiyar 165 | Github_id: iam-buddhi 166 | 167 | 168 | Name: Dhruv Agrawal 169 | Github_id: DHRUVV23 170 | 171 | 172 | Name: Ashutosh Sahu 173 | Github_id: Ashutosh9993 174 | 175 | Name: Agatsya Narayanan 176 | Github_id: Agatsya0494 177 | 178 | Name:Vertika Bajpai 179 | Github_id: VertikaBajpai 180 | 181 | -------------------------------------------------------------------------------- /assets/apple_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/apple_logo.png -------------------------------------------------------------------------------- /assets/dona1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/dona1.png -------------------------------------------------------------------------------- /assets/google_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/google_logo.png -------------------------------------------------------------------------------- /assets/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/help.png -------------------------------------------------------------------------------- /assets/images/african2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/african2.jpg -------------------------------------------------------------------------------- /assets/images/african_child.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/african_child.jpg -------------------------------------------------------------------------------- /assets/images/asian_girl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/asian_girl.jpg -------------------------------------------------------------------------------- /assets/images/children.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/children.jpg -------------------------------------------------------------------------------- /assets/images/old_man.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/old_man.jpg -------------------------------------------------------------------------------- /assets/images/screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/screen1.png -------------------------------------------------------------------------------- /assets/images/screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/screen2.png -------------------------------------------------------------------------------- /assets/images/wheelchair.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/images/wheelchair.jpg -------------------------------------------------------------------------------- /assets/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/line.png -------------------------------------------------------------------------------- /assets/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/assets/logo.jpg -------------------------------------------------------------------------------- /donation_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/donation_icon.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.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/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/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/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/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 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh 9 | ANDROID_CLIENT_ID 10 | 1085876463007-1pmpvjhq66rhtil995u3mokdllfv1gi7.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyBnH6nQrjfBvIQ7lXVgY7CyQ89OwAqsFq4 13 | GCM_SENDER_ID 14 | 1085876463007 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | com.example.donationApp 19 | PROJECT_ID 20 | donation-app-a7e3f 21 | STORAGE_BUCKET 22 | donation-app-a7e3f.appspot.com 23 | IS_ADS_ENABLED 24 | 25 | IS_ANALYTICS_ENABLED 26 | 27 | IS_APPINVITE_ENABLED 28 | 29 | IS_GCM_ENABLED 30 | 31 | IS_SIGNIN_ENABLED 32 | 33 | GOOGLE_APP_ID 34 | 1:1085876463007:ios:9689334a1740f8dd2749aa 35 | 36 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Donation App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | donation_app 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 | GIDClientID 32 | 1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh.apps.googleusercontent.com 33 | CFBundleURLTypes 34 | 35 | 36 | CFBundleTypeRole 37 | Editor 38 | CFBundleURLSchemes 39 | 40 | com.googleusercontent.apps.1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh 41 | 42 | 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | CADisableMinimumFrameDurationOnPhone 58 | 59 | UIApplicationSupportsIndirectInputEvents 60 | 61 | NSPhotoLibraryUsageDescription 62 | This app requires access to the camera. 63 | NSAppTransportSecurity 64 | 65 | NSAllowsArbitraryLoads 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:1085876463007:ios:9689334a1740f8dd2749aa", 5 | "FIREBASE_PROJECT_ID": "donation-app-a7e3f", 6 | "GCM_SENDER_ID": "1085876463007" 7 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/donationmode/donationmode_screen.dart'; 2 | import 'package:donation_app/src/features/home/DonationDetails.dart'; 3 | import 'package:donation_app/src/features/home/baseHomeActivity.dart'; 4 | import 'package:donation_app/src/features/donationcart/mydonationbox.dart'; 5 | import 'package:donation_app/src/features/intro/screens/onboarding_screen.dart'; 6 | import 'package:firebase_core/firebase_core.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'src/features/intro/screens/splash.dart'; 9 | import 'src/features/authentication/screens/loginPage.dart'; 10 | import 'src/features/authentication/screens/signup_screen.dart'; 11 | import 'src/features/home/feedPage.dart'; 12 | import 'src/features/home/donations_fragment.dart'; 13 | import 'src/features/profile/profilePage.dart'; 14 | import 'src/features/firebase/firebase_options.dart'; 15 | 16 | 17 | /* 18 | this is the homepage which contains the bottom nav bar and other stuff 19 | */ 20 | 21 | import 'src/features/firebase/firebase_options.dart'; 22 | 23 | void main() async { 24 | WidgetsFlutterBinding.ensureInitialized(); 25 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 26 | runApp(const MaterialApp( 27 | // home: SplashScreen(), 28 | // home: DonationsFragment(), 29 | home: DonationMode(), 30 | debugShowCheckedModeBanner: false, 31 | )); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /lib/src/common_widgets/bigbutton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BigButton extends StatelessWidget { 4 | const BigButton({super.key, required this.press, required this.buttonname}); 5 | final VoidCallback press; 6 | final String buttonname; 7 | @override 8 | Widget build(BuildContext context) { 9 | return SizedBox( 10 | width: double.infinity, 11 | height: 70, 12 | child: ElevatedButton( 13 | onPressed: press, 14 | style: ElevatedButton.styleFrom( 15 | backgroundColor: const Color(0xFF209FA6), 16 | shape: const RoundedRectangleBorder( 17 | borderRadius: 18 | BorderRadius.all(Radius.circular(20)), 19 | ), 20 | ), 21 | child: Text(buttonname, 22 | style: const TextStyle( 23 | fontSize: 20, 24 | color: Colors.white, 25 | fontWeight: FontWeight.w400)), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/common_widgets/textfield.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | class CustomTextField extends StatelessWidget { 5 | const CustomTextField({super.key, required this.fieldname, required this.controller, required this.h}); 6 | final String fieldname; 7 | final TextEditingController controller; 8 | final double h; 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | width: double.infinity, 13 | height: h, 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(10), 16 | color: Colors.grey[200], 17 | ), 18 | child: TextFormField( 19 | keyboardType: TextInputType.multiline, 20 | controller: controller, 21 | decoration: InputDecoration( 22 | border: InputBorder.none, 23 | hintText: fieldname, 24 | hintStyle: GoogleFonts.poppins(), 25 | contentPadding: const EdgeInsets.symmetric( 26 | vertical: 20.0, 27 | horizontal: 20.0, 28 | ), 29 | focusedBorder: const OutlineInputBorder( 30 | borderSide: BorderSide( 31 | color: Color.fromARGB(255, 32, 159, 166), 32 | ), 33 | borderRadius: BorderRadius.all( 34 | Radius.circular(10), 35 | ), 36 | ), 37 | ), 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/src/features/authentication/controllers/user.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | String username; 3 | String password; 4 | 5 | User(this.username, this.password); 6 | } 7 | -------------------------------------------------------------------------------- /lib/src/features/authentication/models/profile_setup.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:firebase_storage/firebase_storage.dart'; 4 | import 'package:donation_app/src/features/home/baseHomeActivity.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:cloud_firestore/cloud_firestore.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:image_picker/image_picker.dart'; 9 | import 'package:fluttertoast/fluttertoast.dart'; 10 | import 'package:google_fonts/google_fonts.dart'; 11 | 12 | class ProfileSetup extends StatefulWidget { 13 | final String uid; 14 | 15 | const ProfileSetup(this.uid, {Key? key}) : super(key: key); 16 | 17 | @override 18 | State createState() => _ProfileSetupState(); 19 | } 20 | 21 | class _ProfileSetupState extends State { 22 | File? _image; 23 | final picker = ImagePicker(); 24 | final TextEditingController _nameController = TextEditingController(); 25 | 26 | Future getImage() async { 27 | XFile? pickedFile = await picker.pickImage( 28 | source: ImageSource.gallery, maxWidth: 512, maxHeight: 512); 29 | 30 | setState(() { 31 | if (pickedFile != null) { 32 | _image = File(pickedFile.path); 33 | } else { 34 | print('No image selected.'); 35 | } 36 | }); 37 | } 38 | 39 | Future _uploadImageAndData() async { 40 | if (_image != null) { 41 | // Upload image to Firebase Storage 42 | Reference ref = FirebaseStorage.instance 43 | .ref() 44 | .child('profile_images') 45 | .child('${widget.uid}.jpg'); 46 | UploadTask uploadTask = ref.putFile(_image!); 47 | TaskSnapshot downloadUrl = (await uploadTask); 48 | String url = await downloadUrl.ref.getDownloadURL(); 49 | 50 | await FirebaseFirestore.instance 51 | .collection('users') 52 | .doc(widget.uid) 53 | .update({ 54 | 'photoURL': url, 55 | 'displayName': _nameController.text, 56 | }); 57 | 58 | await FirebaseAuth.instance.currentUser! 59 | .updateDisplayName(_nameController.text); 60 | await FirebaseAuth.instance.currentUser!.updatePhotoURL(url); 61 | 62 | Fluttertoast.showToast( 63 | msg: 'Logged in as ${_nameController.text}', 64 | toastLength: Toast.LENGTH_SHORT, 65 | gravity: ToastGravity.CENTER, 66 | timeInSecForIosWeb: 1, 67 | backgroundColor: const Color(0xFF209FA6), 68 | textColor: Colors.white, 69 | fontSize: 16.0, 70 | ); 71 | return true; 72 | } else { 73 | Fluttertoast.showToast(msg: 'Please select an image'); 74 | return false; 75 | } 76 | } 77 | 78 | @override 79 | Widget build(BuildContext context) { 80 | return Scaffold( 81 | appBar: AppBar(title: Text('Profile Setup')), 82 | body: Center( 83 | child: Padding( 84 | padding: const EdgeInsets.all(20), 85 | child: Column( 86 | mainAxisAlignment: MainAxisAlignment.center, 87 | children: [ 88 | GestureDetector( 89 | onTap: getImage, 90 | child: CircleAvatar( 91 | radius: 100, 92 | backgroundImage: _image != null ? FileImage(_image!) : null, 93 | child: _image == null ? Icon(Icons.add_a_photo) : null, 94 | ), 95 | ), 96 | SizedBox(height: 50), 97 | TextField( 98 | controller: _nameController, 99 | textAlign: TextAlign.start, 100 | cursorColor: const Color.fromARGB(255, 32, 159, 166), 101 | decoration: InputDecoration( 102 | focusColor: Colors.grey[100], 103 | labelText: 'Enter your name', 104 | labelStyle: GoogleFonts.poppins(), 105 | contentPadding: const EdgeInsets.symmetric( 106 | vertical: 20.0, 107 | horizontal: 20.0, 108 | ), 109 | border: const OutlineInputBorder( 110 | borderRadius: BorderRadius.all( 111 | Radius.circular(20), 112 | ), 113 | borderSide: BorderSide( 114 | width: 0.2, 115 | ), 116 | ), 117 | focusedBorder: const OutlineInputBorder( 118 | borderSide: BorderSide( 119 | color: Color.fromARGB(255, 32, 159, 166), 120 | ), 121 | borderRadius: BorderRadius.all( 122 | Radius.circular(20), 123 | ), 124 | ), 125 | ), 126 | ), 127 | SizedBox(height: 20), 128 | SizedBox( 129 | width: double.infinity, 130 | height: 70, 131 | child: ElevatedButton( 132 | style: ElevatedButton.styleFrom( 133 | backgroundColor: const Color(0xFF209FA6), 134 | shape: const RoundedRectangleBorder( 135 | borderRadius: BorderRadius.all(Radius.circular(20)), 136 | ), 137 | ), 138 | onPressed: () async { 139 | bool success = await _uploadImageAndData(); 140 | if (success) { 141 | Navigator.pushAndRemoveUntil( 142 | context, 143 | MaterialPageRoute( 144 | builder: (context) => basehomeActivity(), 145 | ), 146 | (route) => false, 147 | ); 148 | } 149 | }, 150 | child: const Text('Continue', 151 | style: TextStyle( 152 | fontSize: 20, 153 | color: Colors.white, 154 | fontWeight: FontWeight.w400)), 155 | ), 156 | ), 157 | ], 158 | ), 159 | ), 160 | ), 161 | ); 162 | } 163 | 164 | @override 165 | void dispose() { 166 | _nameController.dispose(); 167 | super.dispose(); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/ForgotPassword.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/home/baseHomeActivity.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() { 5 | runApp(const MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | const MyApp({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return MaterialApp( 14 | title: 'Sign In', 15 | theme: ThemeData( 16 | primarySwatch: Colors.blue, 17 | visualDensity: VisualDensity.adaptivePlatformDensity, 18 | ), 19 | builder: (context, child) { 20 | return MediaQuery( 21 | data: MediaQuery.of(context).copyWith( 22 | textScaler: const TextScaler.linear(1.0), 23 | ), 24 | child: child!, 25 | ); 26 | }, 27 | home: const SignInPage(), 28 | ); 29 | } 30 | } 31 | 32 | class SignInPage extends StatelessWidget { 33 | const SignInPage({super.key}); 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | backgroundColor: Colors.white, 39 | body: Center( 40 | child: Column( 41 | mainAxisAlignment: MainAxisAlignment.center, 42 | children: [ 43 | Row( 44 | mainAxisAlignment: MainAxisAlignment.center, 45 | children: [ 46 | Image.asset( 47 | 'help.png', 48 | width: 50.0, 49 | height: 50.0, 50 | ), 51 | const SizedBox(width: 165.0), 52 | Image.asset( 53 | 'line.png', 54 | width: 40.0, 55 | height: 40.0, 56 | ), 57 | ], 58 | ), 59 | const SizedBox(height: 100.0), 60 | const Text( 61 | 'Forgot password?', 62 | style: TextStyle( 63 | fontSize: 25.0, 64 | fontWeight: FontWeight.bold, 65 | ), 66 | ), 67 | const SizedBox(height: 25.0), 68 | Container( 69 | width: 250.0, 70 | height: 50.0, 71 | decoration: BoxDecoration( 72 | color: const Color.fromARGB(255, 252, 252, 252), 73 | border: Border.all( 74 | color: const Color.fromARGB(255, 217, 241, 252), 75 | width: 1.0, 76 | ), 77 | borderRadius: BorderRadius.circular(10.0), 78 | ), 79 | child: TextFormField( 80 | textAlign: TextAlign.center, 81 | decoration: const InputDecoration( 82 | hintText: 'Your Email', 83 | hintStyle: TextStyle( 84 | color: Colors.grey, 85 | ), 86 | border: InputBorder.none, 87 | ), 88 | style: const TextStyle( 89 | color: Colors.grey, 90 | ), 91 | ), 92 | ), 93 | const SizedBox(height: 20.0), 94 | ElevatedButton( 95 | onPressed: () { 96 | // Navigator.push( 97 | // context, 98 | // MaterialPageRoute(builder: (context) => OtpPage()), // Replace 'OtpPage' with your actual class name 99 | // ); 100 | }, 101 | style: ElevatedButton.styleFrom( 102 | minimumSize: const Size(257.0, 55.0), 103 | backgroundColor: const Color.fromARGB(255, 32, 159, 166), 104 | shape: RoundedRectangleBorder( 105 | borderRadius: BorderRadius.circular(10.0), 106 | ), 107 | ), 108 | child: const Text( 109 | 'Reset', 110 | style: TextStyle(color: Colors.white), 111 | ), 112 | ), 113 | 114 | const SizedBox(height: 20.0), 115 | Row( 116 | mainAxisAlignment: MainAxisAlignment.center, 117 | children: [ 118 | const Text( 119 | 'New User?', 120 | style: TextStyle( 121 | color: Colors.grey, 122 | ), 123 | ), 124 | const SizedBox(width: 5.0), 125 | TextButton( 126 | onPressed: () {}, 127 | style: TextButton.styleFrom( 128 | padding: EdgeInsets.zero, // Set padding to zero 129 | ), 130 | child: const Text( 131 | 'Create Account', 132 | style: TextStyle( 133 | color: Color.fromARGB(255, 32, 159, 166), 134 | fontWeight: FontWeight.bold, 135 | ), 136 | ), 137 | ), 138 | ], 139 | ), 140 | const SizedBox(height: 120.0), 141 | ], 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | 148 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/ForgotPasswordScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /* 5 | this is the forgotpasswordScreen this is responsible for mangement of the forgot passowrd 6 | */ 7 | 8 | class ForgotPasswordScreen extends StatelessWidget { 9 | final TextEditingController emailController = TextEditingController(); 10 | 11 | ForgotPasswordScreen({super.key}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: const Text('Forgot Password'), 18 | ), 19 | body: Padding( 20 | padding: const EdgeInsets.all(16.0), 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | children: [ 24 | TextField( 25 | controller: emailController, 26 | decoration: const InputDecoration(labelText: 'Email'), 27 | ), 28 | const SizedBox(height: 20.0), 29 | ElevatedButton( 30 | onPressed: () async { 31 | try { 32 | await FirebaseAuth.instance.sendPasswordResetEmail( 33 | email: emailController.text, 34 | ); 35 | ScaffoldMessenger.of(context).showSnackBar( 36 | const SnackBar( 37 | content: Text('Password reset email sent!'), 38 | ), 39 | ); 40 | } catch (e) { 41 | ScaffoldMessenger.of(context).showSnackBar( 42 | SnackBar( 43 | content: Text('Error: $e'), 44 | ), 45 | ); 46 | } 47 | }, 48 | child: const Text('Reset Password'), 49 | ), 50 | ], 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/OtpPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp(const MyApp()); 5 | } 6 | 7 | class MyApp extends StatelessWidget { 8 | const MyApp({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | title: 'Sign In', 14 | theme: ThemeData( 15 | primarySwatch: Colors.blue, 16 | visualDensity: VisualDensity.adaptivePlatformDensity, 17 | ), 18 | builder: (context, child) { 19 | return MediaQuery( 20 | data: MediaQuery.of(context).copyWith( 21 | textScaler: const TextScaler.linear(1.0), 22 | ), 23 | child: child!, 24 | ); 25 | }, 26 | home: const SignInPage(), 27 | ); 28 | } 29 | } 30 | 31 | class SignInPage extends StatelessWidget { 32 | const SignInPage({super.key}); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | backgroundColor: Colors.white, 38 | body: Center( 39 | child: Column( 40 | mainAxisAlignment: MainAxisAlignment.center, 41 | children: [ 42 | Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | Image.asset( 46 | 'help.png', 47 | width: 50.0, 48 | height: 50.0, 49 | ), 50 | const SizedBox(width: 165.0), 51 | Image.asset( 52 | 'line.png', 53 | width: 40.0, 54 | height: 40.0, 55 | ), 56 | ], 57 | ), 58 | const SizedBox(height: 50.0), 59 | const Text( 60 | 'Verification', 61 | style: TextStyle( 62 | fontSize: 30.0, 63 | fontWeight: FontWeight.bold, 64 | ), 65 | ), 66 | const SizedBox(height: 10.0), 67 | Row( 68 | mainAxisAlignment: MainAxisAlignment.center, 69 | children: [ 70 | const Text( 71 | 'Enter code we sent on', 72 | style: TextStyle( 73 | color: Colors.grey, 74 | fontSize: 14, 75 | ), 76 | ), 77 | const SizedBox(width: 5.0), 78 | TextButton( 79 | onPressed: () {}, 80 | style: TextButton.styleFrom( 81 | padding: EdgeInsets.zero, 82 | ), 83 | child: const Text( 84 | 'he******nik@gmail.com', 85 | style: TextStyle( 86 | color: Color.fromARGB(255, 32, 159, 166), 87 | fontWeight: FontWeight.bold, 88 | fontSize: 14, 89 | ), 90 | ), 91 | ), 92 | ], 93 | ), 94 | const SizedBox(height: 25.0), 95 | Row( 96 | mainAxisAlignment: MainAxisAlignment.center, 97 | children: [ 98 | Container( 99 | width: 53.0, 100 | height: 53.0, 101 | decoration: BoxDecoration( 102 | color: const Color.fromARGB(255, 252, 252, 252), 103 | border: Border.all( 104 | color: const Color.fromARGB(255, 217, 241, 252), 105 | width: 1.0, 106 | ), 107 | borderRadius: BorderRadius.circular(20.0), 108 | ), 109 | child: TextFormField( 110 | textAlign: TextAlign.center, 111 | decoration: const InputDecoration( 112 | hintText: '', 113 | hintStyle: TextStyle( 114 | color: Colors.grey, 115 | ), 116 | border: InputBorder.none, 117 | ), 118 | style: const TextStyle( 119 | color: Colors.grey, 120 | ), 121 | ), 122 | ), 123 | const SizedBox(width: 15.0), 124 | Container( 125 | width: 53.0, 126 | height: 53.0, 127 | decoration: BoxDecoration( 128 | color: const Color.fromARGB(255, 252, 252, 252), 129 | border: Border.all( 130 | color: const Color.fromARGB(255, 217, 241, 252), 131 | width: 1.0, 132 | ), 133 | borderRadius: BorderRadius.circular(20.0), 134 | ), 135 | child: TextFormField( 136 | textAlign: TextAlign.center, 137 | decoration: const InputDecoration( 138 | hintText: '', 139 | hintStyle: TextStyle( 140 | color: Colors.grey, 141 | ), 142 | border: InputBorder.none, 143 | ), 144 | style: const TextStyle( 145 | color: Colors.grey, 146 | ), 147 | ), 148 | ), 149 | const SizedBox(width: 15.0), 150 | Container( 151 | width: 53.0, 152 | height: 53.0, 153 | decoration: BoxDecoration( 154 | color: const Color.fromARGB(255, 252, 252, 252), 155 | border: Border.all( 156 | color: const Color.fromARGB(255, 217, 241, 252), 157 | width: 1.0, 158 | ), 159 | borderRadius: BorderRadius.circular(20.0), 160 | ), 161 | child: TextFormField( 162 | textAlign: TextAlign.center, 163 | decoration: const InputDecoration( 164 | hintText: '', 165 | hintStyle: TextStyle( 166 | color: Colors.grey, 167 | ), 168 | border: InputBorder.none, 169 | ), 170 | style: const TextStyle( 171 | color: Colors.grey, 172 | ), 173 | ), 174 | ), 175 | const SizedBox(width: 15.0), 176 | Container( 177 | width: 53.0, 178 | height: 53.0, 179 | decoration: BoxDecoration( 180 | color: const Color.fromARGB(255, 252, 252, 252), 181 | border: Border.all( 182 | color: const Color.fromARGB(255, 217, 241, 252), 183 | width: 1.0, 184 | ), 185 | borderRadius: BorderRadius.circular(20.0), 186 | ), 187 | child: TextFormField( 188 | textAlign: TextAlign.center, 189 | decoration: const InputDecoration( 190 | hintText: '', 191 | hintStyle: TextStyle( 192 | color: Colors.grey, 193 | ), 194 | border: InputBorder.none, 195 | ), 196 | style: const TextStyle( 197 | color: Colors.grey, 198 | ), 199 | ), 200 | ), 201 | ], 202 | ), 203 | const SizedBox(height: 35.0), 204 | ElevatedButton( 205 | onPressed: () {}, 206 | style: ElevatedButton.styleFrom( 207 | minimumSize: const Size(257.0, 55.0), 208 | backgroundColor: const Color.fromARGB(255, 32, 159, 166), 209 | shape: RoundedRectangleBorder( 210 | borderRadius: BorderRadius.circular(10.0), 211 | ), 212 | ), 213 | child: const Text( 214 | 'Continue', 215 | style: TextStyle(color: Colors.white), 216 | ), 217 | ), 218 | const SizedBox(height: 20.0), 219 | TextButton( 220 | onPressed: () {}, 221 | child: const Text( 222 | 'Resend', 223 | style: TextStyle( 224 | color: Color.fromARGB(255, 32, 159, 166), 225 | fontWeight: FontWeight.bold, 226 | ), 227 | ), 228 | ), 229 | const SizedBox(height: 90.0), 230 | const Text( 231 | 'By clicking the Continue button, you agree to', 232 | style: TextStyle( 233 | color: Colors.grey, 234 | fontSize: 14, 235 | ), 236 | ), 237 | const Text( 238 | 'the terms of service and privacy policy', 239 | style: TextStyle( 240 | color: Colors.grey, 241 | fontSize: 14, 242 | ), 243 | ), 244 | const SizedBox(height: 20.0), 245 | ], 246 | ), 247 | ), 248 | ); 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/loginPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/authentication/screens/signup_screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:social_login_buttons/social_login_buttons.dart'; 6 | import 'package:firebase_auth/firebase_auth.dart'; 7 | import 'package:google_sign_in/google_sign_in.dart'; 8 | import '../../home/baseHomeActivity.dart'; 9 | import 'package:cloud_firestore/cloud_firestore.dart'; 10 | /* 11 | this is the screen responsible for handling of the login actvity 12 | 13 | this page also conatins the code of the sign in activity to oo 14 | */ 15 | 16 | class loginPage extends StatefulWidget { 17 | const loginPage({super.key}); 18 | 19 | @override 20 | _loginPageState createState() => _loginPageState(); 21 | } 22 | 23 | Future signInUser(String email, String password) async { 24 | try { 25 | await FirebaseAuth.instance.signInWithEmailAndPassword( 26 | email: email, 27 | password: password, 28 | ); 29 | } on FirebaseAuthException catch (e) { 30 | if (e.code == 'invalid-email') { 31 | Fluttertoast.showToast(msg: 'Email format is incorrect!'); 32 | } else if (e.code == 'invalid-credential') { 33 | Fluttertoast.showToast(msg: 'Invalid Credentials'); 34 | } 35 | Fluttertoast.showToast(msg: "ERROR! Please try after some time"); 36 | throw e; 37 | } 38 | } 39 | 40 | Future signInUserGoogle() async { 41 | try { 42 | final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); 43 | final GoogleSignInAuthentication? googleAuth = 44 | await googleUser?.authentication; 45 | final credential = GoogleAuthProvider.credential( 46 | accessToken: googleAuth?.accessToken, idToken: googleAuth?.idToken); 47 | await FirebaseAuth.instance.signInWithCredential(credential); 48 | final User? user = FirebaseAuth.instance.currentUser; 49 | FirebaseFirestore db = FirebaseFirestore.instance; 50 | await db.collection("users").doc(user?.uid).set({ 51 | "email": user?.email, 52 | "displayName": user?.displayName, 53 | "photoURL": user?.photoURL, 54 | }); 55 | } on FirebaseAuthException catch (e) { 56 | Fluttertoast.showToast(msg: "ERROR! Please try after some time"); 57 | throw e; 58 | } 59 | } 60 | 61 | class _loginPageState extends State { 62 | final TextEditingController emailController = TextEditingController(text: ""); 63 | final TextEditingController passwordController = 64 | TextEditingController(text: ""); 65 | 66 | @override 67 | void initState() { 68 | super.initState(); 69 | } 70 | 71 | @override 72 | void dispose() { 73 | emailController.dispose(); 74 | passwordController.dispose(); 75 | super.dispose(); 76 | } 77 | 78 | @override 79 | Widget build(BuildContext context) { 80 | return Scaffold( 81 | resizeToAvoidBottomInset: false, 82 | body: Column( 83 | children: [ 84 | Container( 85 | height: 40, // Adjust the height as needed 86 | child: AppBar( 87 | automaticallyImplyLeading: false, 88 | backgroundColor: Colors.transparent, 89 | ), 90 | ), 91 | Row( 92 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 93 | children: [ 94 | const Padding( 95 | padding: EdgeInsets.only(left: 20), 96 | child: Text( 97 | "Help", 98 | style: TextStyle( 99 | fontStyle: FontStyle.italic, 100 | fontSize: 40 101 | ), 102 | ), 103 | ), 104 | Padding( 105 | padding: const EdgeInsets.only(right: 20), 106 | child: Image.asset( 107 | 'assets/line.png', 108 | width: 60, 109 | height: 60, 110 | ), 111 | ), 112 | ], 113 | ), 114 | const SizedBox(height: 30), 115 | Column( 116 | crossAxisAlignment: CrossAxisAlignment.start, 117 | children: [ 118 | Center( 119 | child: Padding( 120 | padding: const EdgeInsets.only(left: 20, right: 20), 121 | child: Column( 122 | children: [ 123 | const Text('Sign In', 124 | style: TextStyle( 125 | fontSize: 40, fontWeight: FontWeight.w500)), 126 | const SizedBox(height: 35), 127 | Container( 128 | height: 55, 129 | child: TextField( 130 | controller: emailController, 131 | textAlign: TextAlign.center, 132 | cursorColor: const Color.fromARGB(255, 32, 159, 166), 133 | decoration: InputDecoration( 134 | focusColor: Colors.grey[100], 135 | hintText: 'Your Email', 136 | hintStyle: GoogleFonts.poppins(), 137 | contentPadding: const EdgeInsets.symmetric( 138 | vertical: 20.0, 139 | horizontal: 20.0, 140 | ), 141 | border: const OutlineInputBorder( 142 | borderRadius: BorderRadius.all( 143 | Radius.circular(20), 144 | ), 145 | borderSide: BorderSide( 146 | width: 0.2, 147 | )), 148 | focusedBorder: const OutlineInputBorder( 149 | borderSide: BorderSide( 150 | color: Color.fromARGB(255, 32, 159, 166), 151 | ), 152 | borderRadius: BorderRadius.all( 153 | Radius.circular(20), 154 | ), 155 | ), 156 | ), 157 | ), 158 | ), 159 | const SizedBox(height: 20), 160 | Container( 161 | height: 55, 162 | child: TextField( 163 | controller: passwordController, 164 | textAlign: TextAlign.center, 165 | cursorColor: const Color.fromARGB(255, 32, 159, 166), 166 | decoration: InputDecoration( 167 | focusColor: Colors.grey[100], 168 | hintText: 'Password here', 169 | hintStyle: GoogleFonts.poppins(), 170 | contentPadding: const EdgeInsets.symmetric( 171 | vertical: 20.0, 172 | horizontal: 20.0, 173 | ), 174 | border: const OutlineInputBorder( 175 | borderRadius: BorderRadius.all( 176 | Radius.circular(20), 177 | ), 178 | borderSide: BorderSide( 179 | width: 0.2, 180 | )), 181 | focusedBorder: const OutlineInputBorder( 182 | borderSide: BorderSide( 183 | color: Color.fromARGB(255, 32, 159, 166), 184 | ), 185 | borderRadius: BorderRadius.all( 186 | Radius.circular(20), 187 | ), 188 | ), 189 | ), 190 | ), 191 | ), 192 | const SizedBox(height: 20), 193 | SizedBox( 194 | width: double.infinity, 195 | height: 70, 196 | child: ElevatedButton( 197 | onPressed: () { 198 | if (emailController.text.isEmpty || 199 | passwordController.text.isEmpty) { 200 | Fluttertoast.showToast( 201 | msg: 'Please enter both email and password.'); 202 | return; 203 | } 204 | signInUser(emailController.text, 205 | passwordController.text) 206 | .then((_) { 207 | Navigator.push( 208 | context, 209 | MaterialPageRoute( 210 | builder: (context) => basehomeActivity()), 211 | ); 212 | }).catchError((error) { 213 | print(error); 214 | }); 215 | }, 216 | style: ElevatedButton.styleFrom( 217 | backgroundColor: const Color(0xFF209FA6), 218 | shape: const RoundedRectangleBorder( 219 | borderRadius: 220 | BorderRadius.all(Radius.circular(20)), 221 | ), 222 | ), 223 | child: const Text('Continue', 224 | style: TextStyle( 225 | fontSize: 20, 226 | color: Colors.white, 227 | fontWeight: FontWeight.w400)), 228 | ), 229 | ), 230 | const SizedBox(height: 20), 231 | Text( 232 | 'or continue with', 233 | style: TextStyle( 234 | fontSize: 20, 235 | fontWeight: FontWeight.w300, 236 | color: Colors.grey[600]), 237 | ), 238 | const SizedBox(height: 20), 239 | SocialLoginButton( 240 | buttonType: SocialLoginButtonType.apple, 241 | backgroundColor: Colors.white, 242 | borderRadius: 20, 243 | onPressed: () { 244 | // APPLE BUTTON 245 | }), 246 | const SizedBox(height: 20), 247 | SocialLoginButton( 248 | buttonType: SocialLoginButtonType.google, 249 | backgroundColor: Colors.white, 250 | borderRadius: 20, 251 | onPressed: () { 252 | signInUserGoogle().then((_) { 253 | Navigator.push( 254 | context, 255 | MaterialPageRoute( 256 | builder: (context) => basehomeActivity()), 257 | ); 258 | }).catchError((error) { 259 | print(error); 260 | }); 261 | }), 262 | const SizedBox(height: 20), 263 | Row( 264 | mainAxisAlignment: MainAxisAlignment.center, 265 | children: [ 266 | Text( 267 | 'New User? ', 268 | style: GoogleFonts.poppins( 269 | textStyle: TextStyle( 270 | fontSize: 15, 271 | fontWeight: FontWeight.w300, 272 | color: Colors.grey[400], 273 | ), 274 | ), 275 | ), 276 | GestureDetector( 277 | onTap: () { 278 | Navigator.push( 279 | context, 280 | MaterialPageRoute( 281 | builder: (context) => const SignUpScreen(), 282 | ), 283 | ); 284 | }, 285 | child: const Text('Create Account', 286 | style: TextStyle( 287 | fontSize: 15, 288 | fontWeight: FontWeight.w600, 289 | color: Color.fromARGB(255, 32, 159, 166))), 290 | ), 291 | ], 292 | ), 293 | ], 294 | ), 295 | ), 296 | ), 297 | ], 298 | ), 299 | ], 300 | ), 301 | ); 302 | } 303 | } 304 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/password_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:donation_app/src/features/authentication/models/profile_setup.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:fluttertoast/fluttertoast.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | 8 | class PasswordScreen extends StatefulWidget { 9 | final String email; 10 | 11 | const PasswordScreen(this.email, {super.key}); 12 | 13 | @override 14 | State createState() => _PasswordScreenState(); 15 | } 16 | 17 | class _PasswordScreenState extends State { 18 | final TextEditingController passwordController = TextEditingController(); 19 | final TextEditingController confirmPasswordController = 20 | TextEditingController(); 21 | 22 | bool _obscureText = true; 23 | 24 | void _toggle() { 25 | setState(() { 26 | _obscureText = !_obscureText; 27 | }); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Scaffold( 33 | appBar: AppBar( 34 | automaticallyImplyLeading: false, 35 | ), 36 | resizeToAvoidBottomInset: false, 37 | body: Column( 38 | children: [ 39 | Row( 40 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 41 | children: [ 42 | Padding( 43 | padding: const EdgeInsets.only(left: 20), 44 | child: Image.asset( 45 | 'assets/help.png', 46 | width: 70, 47 | height: 70, 48 | ), 49 | ), 50 | Padding( 51 | padding: const EdgeInsets.only(right: 20), 52 | child: Image.asset( 53 | 'assets/line.png', 54 | width: 60, 55 | height: 60, 56 | ), 57 | ) 58 | ], // 59 | ), 60 | const SizedBox(height: 100), 61 | // Text(widget.email), 62 | Padding( 63 | padding: const EdgeInsets.only(left: 30, right: 30), 64 | child: Column( 65 | children: [ 66 | const Text( 67 | "Enter Password", 68 | style: TextStyle( 69 | fontSize: 40, 70 | fontWeight: FontWeight.w500, 71 | ), 72 | ), 73 | const SizedBox(height: 80), 74 | TextField( 75 | controller: confirmPasswordController, 76 | textAlign: TextAlign.left, 77 | obscureText: _obscureText, 78 | enableSuggestions: false, 79 | autocorrect: false, 80 | decoration: InputDecoration( 81 | focusColor: Colors.grey[100], 82 | hintText: 'Confirm Password', 83 | hintStyle: GoogleFonts.poppins(), 84 | contentPadding: const EdgeInsets.symmetric( 85 | vertical: 20.0, 86 | horizontal: 20.0, 87 | ), 88 | border: const OutlineInputBorder( 89 | borderRadius: BorderRadius.all( 90 | Radius.circular(20), 91 | ), 92 | borderSide: BorderSide( 93 | width: 0.2, 94 | )), 95 | focusedBorder: const OutlineInputBorder( 96 | borderSide: BorderSide( 97 | color: Color.fromARGB(255, 32, 159, 166), 98 | ), 99 | borderRadius: BorderRadius.all( 100 | Radius.circular(20), 101 | ), 102 | ), 103 | suffixIcon: IconButton( 104 | padding: const EdgeInsets.all(20), 105 | icon: Icon(_obscureText 106 | ? Icons.visibility 107 | : Icons.visibility_off), 108 | onPressed: _toggle, 109 | )), 110 | keyboardType: TextInputType.visiblePassword, 111 | textInputAction: TextInputAction.done, 112 | ), 113 | const SizedBox(height: 30), 114 | TextField( 115 | controller: passwordController, 116 | textAlign: TextAlign.left, 117 | obscureText: _obscureText, 118 | enableSuggestions: false, 119 | autocorrect: false, 120 | decoration: InputDecoration( 121 | focusColor: Colors.grey[100], 122 | hintText: 'Enter Password', 123 | hintStyle: GoogleFonts.poppins(), 124 | contentPadding: const EdgeInsets.symmetric( 125 | vertical: 20.0, 126 | horizontal: 20.0, 127 | ), 128 | border: const OutlineInputBorder( 129 | borderRadius: BorderRadius.all( 130 | Radius.circular(20), 131 | ), 132 | borderSide: BorderSide( 133 | width: 0.2, 134 | )), 135 | focusedBorder: const OutlineInputBorder( 136 | borderSide: BorderSide( 137 | color: Color.fromARGB(255, 32, 159, 166), 138 | ), 139 | borderRadius: BorderRadius.all( 140 | Radius.circular(20), 141 | ), 142 | ), 143 | suffixIcon: IconButton( 144 | padding: const EdgeInsets.all(20), 145 | icon: Icon(_obscureText 146 | ? Icons.visibility 147 | : Icons.visibility_off), 148 | onPressed: _toggle, 149 | )), 150 | keyboardType: TextInputType.visiblePassword, 151 | textInputAction: TextInputAction.done, 152 | ), 153 | const SizedBox(height: 60), 154 | SizedBox( 155 | width: double.infinity, 156 | height: 70, 157 | child: ElevatedButton( 158 | onPressed: () async { 159 | String? uid = await createAccount(); 160 | if (uid != null) { 161 | Navigator.push( 162 | context, 163 | MaterialPageRoute( 164 | builder: (context) => ProfileSetup(uid), 165 | ), 166 | ); 167 | } 168 | }, 169 | style: ElevatedButton.styleFrom( 170 | backgroundColor: const Color(0xFF209FA6), 171 | shape: const RoundedRectangleBorder( 172 | borderRadius: BorderRadius.all(Radius.circular(20)), 173 | ), 174 | ), 175 | child: const Text('Continue', 176 | style: TextStyle( 177 | fontSize: 20, 178 | color: Colors.white, 179 | fontWeight: FontWeight.w400)), 180 | ), 181 | ) 182 | ], 183 | ), 184 | ), 185 | ], 186 | ), 187 | ); 188 | } 189 | 190 | Future createAccount() async { 191 | try { 192 | final credential = 193 | await FirebaseAuth.instance.createUserWithEmailAndPassword( 194 | email: widget.email, 195 | password: passwordController.text, 196 | ); 197 | FirebaseFirestore db = FirebaseFirestore.instance; 198 | await db.collection('users').doc(credential.user!.uid).set({ 199 | 'email': credential.user!.email, 200 | 'displayName': '', 201 | 'photoURL': '', 202 | }); 203 | return credential.user!.uid; 204 | } on FirebaseAuthException catch (e) { 205 | if (e.code == 'weak-password') { 206 | Fluttertoast.showToast( 207 | msg: 'The password provided is too weak.', 208 | toastLength: Toast.LENGTH_LONG, 209 | gravity: ToastGravity.CENTER, 210 | timeInSecForIosWeb: 1, 211 | backgroundColor: const Color(0xFF209FA6), 212 | textColor: Colors.white, 213 | fontSize: 16.0, 214 | ); 215 | return null; 216 | } else if (e.code == 'email-already-in-use') { 217 | Fluttertoast.showToast( 218 | msg: 'The account already exists for that email.', 219 | toastLength: Toast.LENGTH_LONG, 220 | gravity: ToastGravity.CENTER, 221 | timeInSecForIosWeb: 1, 222 | backgroundColor: const Color(0xFF209FA6), 223 | textColor: Colors.white, 224 | fontSize: 16.0, 225 | ); 226 | return null; 227 | } 228 | } catch (e) { 229 | Fluttertoast.showToast( 230 | msg: e.toString(), 231 | toastLength: Toast.LENGTH_SHORT, 232 | gravity: ToastGravity.CENTER, 233 | timeInSecForIosWeb: 1, 234 | backgroundColor: Colors.red, 235 | textColor: Colors.white, 236 | fontSize: 16.0, 237 | ); 238 | return null; 239 | } 240 | } 241 | } 242 | -------------------------------------------------------------------------------- /lib/src/features/authentication/screens/signup_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/home/baseHomeActivity.dart'; 2 | import 'package:donation_app/src/features/authentication/screens/loginPage.dart'; 3 | import 'package:donation_app/src/features/authentication/screens/password_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:social_login_buttons/social_login_buttons.dart'; 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | import 'package:fluttertoast/fluttertoast.dart'; 9 | import 'package:google_sign_in/google_sign_in.dart'; 10 | import 'package:cloud_firestore/cloud_firestore.dart'; 11 | 12 | class SignUpScreen extends StatefulWidget { 13 | const SignUpScreen({super.key}); 14 | 15 | @override 16 | _SignUpScreenState createState() => _SignUpScreenState(); 17 | } 18 | 19 | class _SignUpScreenState extends State { 20 | final TextEditingController emailController = TextEditingController(); 21 | 22 | Future signUpUserGoogle() async { 23 | try { 24 | final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); 25 | final GoogleSignInAuthentication? googleAuth = 26 | await googleUser?.authentication; 27 | final credential = GoogleAuthProvider.credential( 28 | accessToken: googleAuth?.accessToken, idToken: googleAuth?.idToken); 29 | await FirebaseAuth.instance.signInWithCredential(credential); 30 | 31 | final User? user = FirebaseAuth.instance.currentUser; 32 | FirebaseFirestore db = FirebaseFirestore.instance; 33 | await db.collection("users").doc(user?.uid).set({ 34 | "email": user?.email, 35 | "displayName": user?.displayName, 36 | "photoURL": user?.photoURL, 37 | }); 38 | } on FirebaseAuthException catch (e) { 39 | Fluttertoast.showToast(msg: "ERROR! Please try after some time"); 40 | throw e; 41 | } 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Scaffold( 47 | // appbar is not required? how to remove it? (automaticallyImplyLeading: false,) 48 | appBar: AppBar( 49 | automaticallyImplyLeading: false, 50 | ), 51 | resizeToAvoidBottomInset: false, 52 | body: Column( 53 | children: [ 54 | Row( 55 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 56 | children: [ 57 | Padding( 58 | padding: const EdgeInsets.only(left: 20), 59 | child: Image.asset( 60 | 'assets/help.png', 61 | width: 70, 62 | height: 70, 63 | ), 64 | ), 65 | Padding( 66 | padding: const EdgeInsets.only(right: 20), 67 | child: Image.asset( 68 | 'assets/line.png', 69 | width: 60, 70 | height: 60, 71 | ), 72 | ), 73 | ], 74 | ), 75 | const SizedBox(height: 60), 76 | Column( 77 | crossAxisAlignment: CrossAxisAlignment.start, 78 | children: [ 79 | Center( 80 | child: Padding( 81 | padding: const EdgeInsets.only(left: 20, right: 20), 82 | child: Column( 83 | children: [ 84 | const Text('Sign Up', 85 | style: TextStyle( 86 | fontSize: 50, fontWeight: FontWeight.w500)), 87 | const SizedBox(height: 35), 88 | 89 | const SizedBox(height: 20), 90 | SizedBox( 91 | width: double.infinity, 92 | height: 70, 93 | child: ElevatedButton( 94 | onPressed: () { 95 | Navigator.push( 96 | context, 97 | MaterialPageRoute( 98 | builder: (context) => 99 | PasswordScreen(emailController.text)), 100 | ); 101 | }, 102 | style: ElevatedButton.styleFrom( 103 | backgroundColor: const Color(0xFF209FA6), 104 | shape: const RoundedRectangleBorder( 105 | borderRadius: 106 | BorderRadius.all(Radius.circular(20)), 107 | ), 108 | ), 109 | child: const Text('Continue', 110 | style: TextStyle( 111 | fontSize: 20, 112 | color: Colors.white, 113 | fontWeight: FontWeight.w400)), 114 | ), 115 | ), 116 | const SizedBox(height: 20), 117 | Text( 118 | 'or continue with', 119 | style: TextStyle( 120 | fontSize: 20, 121 | fontWeight: FontWeight.w300, 122 | color: Colors.grey[600]), 123 | ), 124 | const SizedBox(height: 20), 125 | SocialLoginButton( 126 | buttonType: SocialLoginButtonType.apple, 127 | backgroundColor: Colors.white, 128 | borderRadius: 20, 129 | onPressed: () { 130 | // APPLE BUTTON 131 | }), 132 | const SizedBox(height: 20), 133 | SocialLoginButton( 134 | buttonType: SocialLoginButtonType.google, 135 | backgroundColor: Colors.white, 136 | borderRadius: 20, 137 | onPressed: () { 138 | signUpUserGoogle().then((_) { 139 | Navigator.push( 140 | context, 141 | MaterialPageRoute( 142 | builder: (context) => basehomeActivity()), 143 | ); 144 | }).catchError((error) { 145 | print(error); 146 | }); 147 | }), 148 | const SizedBox(height: 20), 149 | Row( 150 | mainAxisAlignment: MainAxisAlignment.center, 151 | children: [ 152 | Text( 153 | 'Have account? ', 154 | style: GoogleFonts.poppins( 155 | textStyle: TextStyle( 156 | fontSize: 15, 157 | fontWeight: FontWeight.w300, 158 | color: Colors.grey[400], 159 | ), 160 | ), 161 | ), 162 | GestureDetector( 163 | onTap: () { 164 | Navigator.push( 165 | context, 166 | MaterialPageRoute( 167 | builder: (context) => const loginPage(), 168 | ), 169 | ); 170 | }, 171 | child: const Text('Log In', 172 | style: TextStyle( 173 | fontSize: 15, 174 | fontWeight: FontWeight.w600, 175 | color: Color.fromARGB(255, 32, 159, 166))), 176 | ), 177 | ], 178 | ), 179 | ], 180 | ), 181 | ), 182 | ), 183 | ], 184 | ), 185 | ], 186 | ), 187 | ); 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/src/features/createfund/create_fund_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CreateFundPage extends StatelessWidget { 4 | const CreateFundPage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text("Create Fund", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 11 | leading: BackButton(), 12 | backgroundColor: Colors.white, 13 | ), 14 | body: const Center( 15 | child: Text( 16 | 'create fund page', 17 | ), 18 | ), 19 | 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/features/donationcart/iconbutton.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/donationcart/item_card.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'list_cart_item.dart'; 4 | 5 | import '../home/feedPage.dart'; 6 | 7 | class IconB extends StatelessWidget { 8 | const IconB({super.key, required this.name, required this.ic, required this.press}); 9 | final VoidCallback press; 10 | final String name; 11 | final IconData ic; 12 | @override 13 | Widget build(BuildContext context) { 14 | return Column( 15 | children: [ 16 | Ink( 17 | decoration: const ShapeDecoration( 18 | shape: RoundedRectangleBorder( 19 | borderRadius: BorderRadius.horizontal( 20 | left: Radius.circular(25), 21 | right: Radius.circular(25), 22 | ), 23 | ), 24 | color: tealLikeColor, 25 | ), 26 | child: IconButton( 27 | onPressed: press, 28 | icon: Icon(ic, color: Colors.white)), 29 | ), 30 | Text(name,style: TextStyle(fontSize: 8),), 31 | ] 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/features/donationcart/item_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CartItem extends StatefulWidget { 4 | CartItem({super.key, this.itemname}); 5 | final itemname; 6 | 7 | @override 8 | State createState() => _CartItemState(); 9 | } 10 | 11 | class _CartItemState extends State { 12 | int count=1; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.fromLTRB(0, 5, 0, 5), 18 | child: Row( 19 | children: [ 20 | Expanded( 21 | child: Container( 22 | child: Row( 23 | children: [ 24 | IconButton( 25 | onPressed: (){}, 26 | icon: const Icon(Icons.close)), 27 | Text( 28 | widget.itemname, 29 | style: TextStyle( 30 | fontSize: 15, 31 | ), 32 | ) 33 | ], 34 | ), 35 | ), 36 | ), 37 | Expanded( 38 | child: Container( 39 | child: Row( 40 | children: [ 41 | Expanded(child: SizedBox.fromSize()), 42 | Container( 43 | child: IconButton( 44 | onPressed: (){ 45 | setState(() { 46 | if(count!=0){ 47 | count--; 48 | } 49 | }); 50 | }, 51 | icon: const Icon(Icons.remove)), 52 | ), 53 | Expanded(child: SizedBox.fromSize()), 54 | Text( 55 | "$count", 56 | style: TextStyle( 57 | fontSize: 20, 58 | ), 59 | ), 60 | Expanded(child: SizedBox.fromSize()), 61 | Container( 62 | child: IconButton( 63 | onPressed: (){ 64 | setState(() { 65 | count++; 66 | }); 67 | }, 68 | icon: const Icon(Icons.add)), 69 | ), 70 | Expanded(child: SizedBox.fromSize()), 71 | ], 72 | ) 73 | ), 74 | ) 75 | ], 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/src/features/donationcart/list_cart_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'item_card.dart'; 3 | 4 | 5 | List cart=[]; 6 | 7 | var map_item={'Shirts': 0,'Pants': 0,'T-Shirts': 0,'Jeans': 0,'Shoes': 0,'Sweeter': 0,'Dress': 0,'Suits': 0,'Custom': 0}; -------------------------------------------------------------------------------- /lib/src/features/donationcart/mydonationbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/donationcart/item_card.dart'; 2 | import 'package:donation_app/src/features/donationcart/iconbutton.dart'; 3 | import 'package:donation_app/src/features/donationmode/donationmode_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | import 'list_cart_item.dart'; 7 | 8 | class MyDonationBox extends StatefulWidget { 9 | const MyDonationBox({super.key}); 10 | 11 | @override 12 | State createState() => _MyDonationBoxState(); 13 | } 14 | 15 | class _MyDonationBoxState extends State { 16 | void fun(String type){ 17 | if( map_item[type]==0){ 18 | cart.add(CartItem(itemname: type)); 19 | map_item[type]=1; 20 | } 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Stack( 26 | children: [ 27 | Scaffold( 28 | backgroundColor: Colors.white, 29 | appBar: AppBar( 30 | title: const Text("My Donation Box", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 31 | leading: BackButton(), 32 | actions: [cart.length!=0?TextButton( 33 | onPressed: (){ 34 | Navigator.push( 35 | context, 36 | MaterialPageRoute(builder: (context) => const DonationMode()), 37 | ); 38 | }, 39 | child: Text("confirm", 40 | style: TextStyle(color: Colors.black), 41 | ), 42 | ):Text(''), 43 | ], 44 | backgroundColor: Colors.white, 45 | ), 46 | body: cart.length!=0?SingleChildScrollView( 47 | child: Column( 48 | children: [ 49 | const Row( 50 | children: [ 51 | Expanded(child: Center( 52 | child: Text( 53 | "Catagorey", 54 | style: TextStyle( 55 | fontSize: 15, 56 | ), 57 | ), 58 | ), 59 | ), 60 | Expanded(child: Center( 61 | child: Text( 62 | "Catagorey", 63 | style: TextStyle( 64 | fontSize: 15, 65 | ), 66 | ), 67 | ), 68 | ), 69 | ], 70 | ), 71 | ...cart, 72 | ], 73 | ), 74 | ):Center(child: Text("Empty Cart",style: TextStyle(fontSize: 30,color: Colors.grey),)), 75 | ), 76 | Align( 77 | alignment: Alignment.bottomCenter, 78 | child: Container( 79 | padding: EdgeInsets.fromLTRB(0, 0, 0, 10), 80 | width: 200, 81 | margin: const EdgeInsets.symmetric(horizontal: 10), 82 | height: 70, 83 | child: ElevatedButton( 84 | onPressed: () { 85 | showDialog( 86 | context: context, 87 | builder: (BuildContext context){ 88 | return AlertDialog( 89 | 90 | scrollable: true, 91 | content: Container( 92 | child: Column( 93 | children: [ 94 | Row( 95 | children: [ 96 | TextButton( 97 | onPressed: (){ 98 | setState(() { 99 | 100 | }); 101 | Navigator.pop(context); 102 | }, 103 | child: Text('back',style: TextStyle(color: Colors.black),), 104 | ), 105 | ], 106 | ), 107 | Row( 108 | children: [ 109 | Expanded(child: IconB(name: "Shirts",ic: Icons.add,press: (){setState(() {fun("Shirts");});})), 110 | Expanded(child: IconB(name: "Pants",ic: Icons.add,press: (){setState(() {fun("Pants");});})), 111 | Expanded(child: IconB(name: "T-Shirts",ic: Icons.add,press: (){setState(() {fun("T-Shirts");});})), 112 | Expanded(child: IconB(name: "Jeans",ic: Icons.add,press: (){setState(() {fun("Jeans");});})), 113 | ], 114 | ), 115 | Row( 116 | children: [ 117 | Expanded(child: IconB(name: "Shoes",ic: Icons.add,press: (){setState(() {fun("Shoes");});})), 118 | Expanded(child: IconB(name: "Sweater",ic: Icons.add,press: (){setState(() {fun("Sweeter");});})), 119 | Expanded(child: IconB(name: "Dress",ic: Icons.add,press: (){setState(() {fun("Dress");});})), 120 | Expanded(child: IconB(name: "Suits",ic: Icons.add,press: (){setState(() {fun("Suits");});})), 121 | ], 122 | ), 123 | Row( 124 | children: [ 125 | Expanded(child: IconB(name: "Custom",ic: Icons.add,press: (){setState(() {fun("Custom");});})), 126 | Expanded(child: IconB(name: "Custom",ic: Icons.add,press: (){setState(() {fun("Custom");});})), 127 | Expanded(child: IconB(name: "Custom",ic: Icons.add,press: (){setState(() {fun("Custom");});})), 128 | Expanded(child: IconB(name: "Custom",ic: Icons.add,press: (){setState(() {fun("Custom");});})), 129 | ], 130 | ), 131 | ], 132 | ), 133 | ) 134 | ); 135 | } 136 | ); 137 | }, 138 | style: ElevatedButton.styleFrom( 139 | backgroundColor: const Color(0xff209fa6), 140 | shape: RoundedRectangleBorder( 141 | borderRadius: BorderRadius.circular(30), 142 | ), 143 | ), 144 | child: const Text('Add To Box', 145 | style: TextStyle( 146 | fontSize: 20, 147 | color: Colors.white, 148 | fontWeight: FontWeight.w600)), 149 | ), 150 | ), 151 | ), 152 | ] 153 | ); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/src/features/donationmode/donationmode_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/common_widgets/bigbutton.dart'; 2 | import 'package:donation_app/src/features/intro/screens/onboarding_screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import '../../common_widgets/textfield.dart'; 6 | import 'package:intl/intl.dart'; 7 | 8 | final formatter = DateFormat('dd/MM/yy'); 9 | 10 | 11 | class DonationMode extends StatefulWidget { 12 | const DonationMode({super.key}); 13 | 14 | @override 15 | State createState() => _DonationModeState(); 16 | } 17 | 18 | 19 | 20 | class _DonationModeState extends State { 21 | TextEditingController phoneController=TextEditingController(text: ""); 22 | DateTime? _selectedDate; 23 | void _datePicker() async { 24 | final currentDate = DateTime.now(); 25 | final firstDate = 26 | DateTime(currentDate.year-1, currentDate.month, currentDate.day); 27 | final pickedDate = await showDatePicker( 28 | context: context, 29 | initialDate: currentDate, 30 | firstDate: firstDate, 31 | lastDate: DateTime(2025), 32 | builder: (context, child) { 33 | return Theme( 34 | data: Theme.of(context).copyWith( 35 | colorScheme: const ColorScheme.light( 36 | primary: Color(0xFF209FA6), // <-- SEE HERE 37 | onPrimary: Colors.white, // <-- SEE HERE 38 | onSurface: Colors.black, // <-- SEE HERE 39 | ), 40 | textButtonTheme: TextButtonThemeData( 41 | style: TextButton.styleFrom( 42 | primary: Color(0xFF209FA6), // button text color 43 | ), 44 | ), 45 | ), 46 | child: child!, 47 | ); 48 | }, 49 | ); 50 | setState(() { 51 | _selectedDate = pickedDate; 52 | }); 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return Scaffold( 58 | appBar: AppBar( 59 | title: const Text("Donation Mode", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 60 | leading: const BackButton(), 61 | backgroundColor: Colors.white, 62 | ), 63 | body: SafeArea( 64 | minimum: EdgeInsets.fromLTRB(20, 0, 20, 0), 65 | child: Column( 66 | children: [ 67 | const Spacer(), 68 | const Center( 69 | child: Text( 70 | "How would you like to Send\nyour Donation ?", 71 | textAlign: TextAlign.center, 72 | style: TextStyle( 73 | fontSize: 18, 74 | ), 75 | ), 76 | ), 77 | const Spacer(), 78 | const SizedBox(height: 20,), 79 | BigButton( 80 | press: () { 81 | showDialog( 82 | context: context, 83 | builder: (BuildContext context) { 84 | return Dialog( 85 | child :SingleChildScrollView( 86 | child: Container( 87 | decoration: BoxDecoration( 88 | borderRadius: BorderRadius.circular(20), 89 | color: Colors.white, 90 | ), 91 | height: 560, 92 | child: Padding( 93 | padding: const EdgeInsets.all(15.0), 94 | child: Column( 95 | children: [ 96 | const Align( 97 | alignment: Alignment.centerLeft, 98 | child: const Text( 99 | "Please enter Pickup Details", 100 | textAlign: TextAlign.left, 101 | ), 102 | ), 103 | SizedBox(height: 20,), 104 | CustomTextField( 105 | h: 50, 106 | fieldname: 'Your Phone', 107 | controller: phoneController, 108 | ), 109 | SizedBox(height: 10,), 110 | CustomTextField( 111 | h: 100, 112 | fieldname: 'Pickup Address', 113 | controller: phoneController, 114 | ), 115 | SizedBox(height: 10,), 116 | CustomTextField( 117 | h: 50, 118 | fieldname: 'Landmark(Optional)', 119 | controller: phoneController, 120 | ), 121 | SizedBox(height: 10,), 122 | Container( 123 | width: double.infinity, 124 | height: 50, 125 | decoration: BoxDecoration( 126 | borderRadius: BorderRadius.circular(10), 127 | color: Colors.grey[200], 128 | ), 129 | child: Row( 130 | mainAxisAlignment: MainAxisAlignment.start, 131 | crossAxisAlignment: CrossAxisAlignment.center, 132 | children: [ 133 | Spacer(), 134 | Text(_selectedDate == null 135 | ? "No Date Selected" 136 | : formatter.format(_selectedDate!), 137 | ), 138 | Spacer(), 139 | IconButton( 140 | onPressed: _datePicker, 141 | icon: const Icon(Icons.calendar_today)), 142 | ], 143 | ), 144 | ), 145 | SizedBox(height: 10,), 146 | SizedBox(height: 10,), 147 | BigButton( 148 | press: (){}, 149 | buttonname: "Continue", 150 | ), 151 | SizedBox(height: 10,), 152 | TextButton( 153 | onPressed: (){ 154 | Navigator.pop(context); 155 | }, 156 | child: Text("Back",style: TextStyle(color: Colors.grey),), 157 | ), 158 | ], 159 | ), 160 | ), 161 | ), 162 | ), 163 | ); 164 | }, 165 | ); 166 | }, 167 | buttonname: "Pick Up"), 168 | const SizedBox(height: 10,), 169 | BigButton(press: (){}, buttonname: "Drop Off"), 170 | 171 | 172 | const Spacer(), 173 | ], 174 | ), 175 | ), 176 | 177 | ); 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /lib/src/features/firebase/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | if (kIsWeb) { 20 | return web; 21 | } 22 | switch (defaultTargetPlatform) { 23 | case TargetPlatform.android: 24 | return android; 25 | case TargetPlatform.iOS: 26 | return ios; 27 | case TargetPlatform.macOS: 28 | throw UnsupportedError( 29 | 'DefaultFirebaseOptions have not been configured for macos - ' 30 | 'you can reconfigure this by running the FlutterFire CLI again.', 31 | ); 32 | case TargetPlatform.windows: 33 | throw UnsupportedError( 34 | 'DefaultFirebaseOptions have not been configured for windows - ' 35 | 'you can reconfigure this by running the FlutterFire CLI again.', 36 | ); 37 | case TargetPlatform.linux: 38 | throw UnsupportedError( 39 | 'DefaultFirebaseOptions have not been configured for linux - ' 40 | 'you can reconfigure this by running the FlutterFire CLI again.', 41 | ); 42 | default: 43 | throw UnsupportedError( 44 | 'DefaultFirebaseOptions are not supported for this platform.', 45 | ); 46 | } 47 | } 48 | 49 | static const FirebaseOptions web = FirebaseOptions( 50 | apiKey: 'AIzaSyAPIcOxSWCkE1hoWMM4zu8VvfoqRJphHCw', 51 | appId: '1:1085876463007:web:6ca93ddf5e5acbf32749aa', 52 | messagingSenderId: '1085876463007', 53 | projectId: 'donation-app-a7e3f', 54 | authDomain: 'donation-app-a7e3f.firebaseapp.com', 55 | storageBucket: 'donation-app-a7e3f.appspot.com', 56 | measurementId: 'G-2G1QP3YQZD', 57 | ); 58 | 59 | static const FirebaseOptions android = FirebaseOptions( 60 | apiKey: 'AIzaSyDd-FO3ln8hdByls1opp3U1FlbuwS9aNpI', 61 | appId: '1:1085876463007:android:b9079197295f94d42749aa', 62 | messagingSenderId: '1085876463007', 63 | projectId: 'donation-app-a7e3f', 64 | storageBucket: 'donation-app-a7e3f.appspot.com', 65 | ); 66 | 67 | static const FirebaseOptions ios = FirebaseOptions( 68 | apiKey: 'AIzaSyBnH6nQrjfBvIQ7lXVgY7CyQ89OwAqsFq4', 69 | appId: '1:1085876463007:ios:9689334a1740f8dd2749aa', 70 | messagingSenderId: '1085876463007', 71 | projectId: 'donation-app-a7e3f', 72 | storageBucket: 'donation-app-a7e3f.appspot.com', 73 | androidClientId: '1085876463007-1pmpvjhq66rhtil995u3mokdllfv1gi7.apps.googleusercontent.com', 74 | iosClientId: '1085876463007-hbjvbpkg1g7cgvcm4devdro17ir9tfhh.apps.googleusercontent.com', 75 | iosBundleId: 'com.example.donationApp', 76 | ); 77 | } 78 | -------------------------------------------------------------------------------- /lib/src/features/help_faq/help_faq_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HelpPage extends StatelessWidget { 4 | const HelpPage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text("Help & FAQ", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 11 | leading: BackButton(), 12 | backgroundColor: Colors.white, 13 | ), 14 | body: const Center( 15 | child: Text( 16 | 'Help and FAQ Page', 17 | ), 18 | ), 19 | 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/features/history/historypage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HistoryPage extends StatelessWidget { 4 | const HistoryPage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text("History", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 11 | leading: BackButton(), 12 | backgroundColor: Colors.white, 13 | ), 14 | body: const Center( 15 | child: Text( 16 | 'History Page', 17 | ), 18 | ), 19 | 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/features/home/DonationDetails.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:video_player/video_player.dart'; 3 | // 4 | // class DonationDetails extends StatelessWidget { 5 | // const DonationDetails({super.key}); 6 | // 7 | // static List random_images = [ 8 | // 'https://pbs.twimg.com/media/D8dDZukXUAAXLdY.jpg', 9 | // 'https://pbs.twimg.com/profile_images/1249432648684109824/J0k1DN1T_400x400.jpg', 10 | // 'https://i0.wp.com/thatrandomagency.com/wp-content/uploads/2021/06/headshot.png?resize=618%2C617&ssl=1', 11 | // 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTaOjCZSoaBhZyODYeQMDCOTICHfz_tia5ay8I_k3k&s' 12 | // ]; 13 | // 14 | // 15 | // // this is the donation page this is present as screen through the bottom nav bar in the main_activity 16 | // @override 17 | // Widget build(BuildContext context) { 18 | // return Scaffold( 19 | // body: SafeArea( 20 | // minimum: const EdgeInsets.all(25), 21 | // child: Column( 22 | // children: [ 23 | // Row( 24 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 25 | // children: [ 26 | // TextButton( 27 | // onPressed: () {Navigator.pop(context);}, 28 | // child: const Text( 29 | // 'Back', 30 | // style: TextStyle(color: Color(0xff1A2441), fontSize: 14.0), 31 | // ), 32 | // ), 33 | // TextButton( 34 | // onPressed: () {}, 35 | // child: const Text( 36 | // 'Share', 37 | // style: TextStyle(color: Color(0xff1A2441), fontSize: 14.0), 38 | // ), 39 | // ), 40 | // ], 41 | // ), 42 | // Expanded( 43 | // child: SingleChildScrollView( 44 | // child: Column( 45 | // crossAxisAlignment: CrossAxisAlignment.start, 46 | // children: [ 47 | // const SizedBox(height: 30), 48 | // Row( 49 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 50 | // children: [ 51 | // Expanded( 52 | // child: Container( 53 | // height: 270, 54 | // decoration: BoxDecoration( 55 | // image: DecorationImage( 56 | // image: const NetworkImage( 57 | // 'https://pbs.twimg.com/media/D8dDZukXUAAXLdY.jpg'), 58 | // fit: BoxFit.cover, 59 | // colorFilter: ColorFilter.mode( 60 | // Colors.black.withOpacity(0.5), 61 | // BlendMode.darken), 62 | // ), 63 | // borderRadius: BorderRadius.circular(30)), 64 | // child: const Center( 65 | // child: Text( 66 | // "10+ \nImage", 67 | // style: TextStyle( 68 | // fontSize: 20, 69 | // color: Colors.white, 70 | // fontWeight: FontWeight.bold, 71 | // ), 72 | // textAlign: TextAlign.center, 73 | // ), 74 | // ), 75 | // ), 76 | // ), 77 | // const SizedBox(width: 20,), 78 | // Expanded( 79 | // child: Container( 80 | // height: 270, 81 | // decoration: BoxDecoration( 82 | // borderRadius: BorderRadius.circular(30)), 83 | // child: const VideoPlayerWidget(), 84 | // ), 85 | // ), 86 | // ], 87 | // ), 88 | // const SizedBox(height: 30), 89 | // const Text( 90 | // "Education", 91 | // style: TextStyle(fontSize: 16, color: Color(0xff209fa6)), 92 | // ), 93 | // const SizedBox( 94 | // height: 15, 95 | // ), 96 | // Row( 97 | // crossAxisAlignment: CrossAxisAlignment.start, 98 | // children: [ 99 | // const Expanded( 100 | // child: Column( 101 | // crossAxisAlignment: CrossAxisAlignment.start, 102 | // children: [ 103 | // Text( 104 | // "Education Dono for Poor Child", 105 | // style: TextStyle( 106 | // fontSize: 24, fontWeight: FontWeight.bold), 107 | // softWrap: true, 108 | // ), 109 | // Text( 110 | // "20 days left", 111 | // style: TextStyle( 112 | // fontSize: 16, 113 | // color: Color(0xff9ca5bb), 114 | // fontWeight: FontWeight.w300), 115 | // ) 116 | // ], 117 | // ), 118 | // ), 119 | // Column( 120 | // mainAxisAlignment: MainAxisAlignment.center, 121 | // children: [ 122 | // for (int i = 0; i < random_images.length; i++) 123 | // Container( 124 | // margin: const EdgeInsets.symmetric(horizontal: 0), 125 | // child: Align( 126 | // heightFactor: 0.75, 127 | // child: CircleAvatar( 128 | // radius: 10, 129 | // backgroundImage: NetworkImage( 130 | // random_images[i], 131 | // ), 132 | // ), 133 | // )), 134 | // Container( 135 | // margin: const EdgeInsets.symmetric(horizontal: 0), 136 | // child: const Align( 137 | // heightFactor: 0.5, 138 | // child: CircleAvatar( 139 | // radius: 10, 140 | // backgroundColor: Color(0xff209fa6), 141 | // child: Text( 142 | // "25", 143 | // style: TextStyle( 144 | // fontSize: 8, color: Colors.white), 145 | // )), 146 | // )), 147 | // ], 148 | // ), 149 | // ], 150 | // ), 151 | // const SizedBox(height: 30), 152 | // Row( 153 | // children: [ 154 | // Row( 155 | // children: [ 156 | // Container( 157 | // height: 50, 158 | // width: 50, 159 | // decoration: BoxDecoration( 160 | // color: const Color(0xff209fa6), 161 | // borderRadius: BorderRadius.circular(10)), 162 | // child: const Center( 163 | // child: Icon( 164 | // Icons.my_location, 165 | // color: Colors.white, 166 | // ), 167 | // ), 168 | // ), 169 | // const SizedBox(width: 10), 170 | // const Column( 171 | // crossAxisAlignment: CrossAxisAlignment.start, 172 | // children: [ 173 | // Text( 174 | // "Target Amount", 175 | // style: TextStyle( 176 | // fontSize: 14, 177 | // color: Color(0xff9ca5bb), 178 | // fontWeight: FontWeight.w300, 179 | // ), 180 | // ), 181 | // Text( 182 | // "\$10.000", 183 | // style: TextStyle( 184 | // fontSize: 16, fontWeight: FontWeight.bold), 185 | // ) 186 | // ], 187 | // ), 188 | // ], 189 | // ), 190 | // const SizedBox(width: 30), 191 | // Row( 192 | // children: [ 193 | // Container( 194 | // height: 50, 195 | // width: 50, 196 | // decoration: BoxDecoration( 197 | // color: const Color(0xff209fa6), 198 | // borderRadius: BorderRadius.circular(10)), 199 | // child: const Center( 200 | // child: Icon( 201 | // Icons.my_location, 202 | // color: Colors.white, 203 | // ), 204 | // ), 205 | // ), 206 | // const SizedBox(width: 10), 207 | // const Column( 208 | // crossAxisAlignment: CrossAxisAlignment.start, 209 | // children: [ 210 | // Text( 211 | // "Raised", 212 | // style: TextStyle( 213 | // fontSize: 14, 214 | // color: Color(0xff9ca5bb), 215 | // fontWeight: FontWeight.w300, 216 | // ), 217 | // ), 218 | // Text( 219 | // "\$10.000", 220 | // style: TextStyle( 221 | // fontSize: 16, fontWeight: FontWeight.bold), 222 | // ) 223 | // ], 224 | // ), 225 | // ], 226 | // ), 227 | // ], 228 | // ), 229 | // const SizedBox(height: 20), 230 | // const Row( 231 | // mainAxisAlignment: MainAxisAlignment.start, 232 | // crossAxisAlignment: CrossAxisAlignment.center, 233 | // children: [ 234 | // CircleAvatar( 235 | // radius: 20, 236 | // backgroundImage: NetworkImage( 237 | // 'https://pbs.twimg.com/profile_images/1249432648684109824/J0k1DN1T_400x400.jpg', 238 | // ), 239 | // ), 240 | // Text( 241 | // " by ", 242 | // style: TextStyle(fontSize: 24), 243 | // ), 244 | // Text( 245 | // "NCAPA", 246 | // style: TextStyle( 247 | // fontSize: 24, 248 | // color: Color(0xff209fa6), 249 | // fontWeight: FontWeight.w600), 250 | // ), 251 | // ], 252 | // ), 253 | // const SizedBox(height: 20), 254 | // const Text( 255 | // "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum", 256 | // style: TextStyle(fontSize: 16), 257 | // softWrap: true, 258 | // ), 259 | // ], 260 | // ), 261 | // )), 262 | // Align( 263 | // alignment: Alignment.bottomCenter, 264 | // child: Container( 265 | // width: double.infinity, 266 | // margin: const EdgeInsets.symmetric(horizontal: 10), 267 | // height: 70, 268 | // child: ElevatedButton( 269 | // onPressed: () {}, 270 | // style: ElevatedButton.styleFrom( 271 | // backgroundColor: const Color(0xff209fa6), 272 | // shape: RoundedRectangleBorder( 273 | // borderRadius: BorderRadius.circular(30), 274 | // ), 275 | // ), 276 | // child: const Text('Donate', 277 | // style: TextStyle( 278 | // fontSize: 20, 279 | // color: Colors.white, 280 | // fontWeight: FontWeight.w600)), 281 | // ), 282 | // ), 283 | // ), 284 | // ], 285 | // ), 286 | // ), 287 | // ); 288 | // } 289 | // } 290 | // 291 | // class VideoPlayerWidget extends StatelessWidget { 292 | // const VideoPlayerWidget({super.key}); 293 | // 294 | // @override 295 | // Widget build(BuildContext context) { 296 | // return const VideoPlayerScreen(); 297 | // } 298 | // } 299 | // 300 | // class VideoPlayerScreen extends StatefulWidget { 301 | // const VideoPlayerScreen({super.key}); 302 | // 303 | // @override 304 | // State createState() => _VideoPlayerState(); 305 | // } 306 | // 307 | // class _VideoPlayerState extends State { 308 | // late VideoPlayerController _controller; 309 | // late Future _initializeVideoPlayerFuture; 310 | // 311 | // @override 312 | // void initState() { 313 | // super.initState(); 314 | // 315 | // // Create and store the VideoPlayerController. The VideoPlayerController 316 | // // offers several different constructors to play videos from assets, files, 317 | // // or the internet. 318 | // _controller = VideoPlayerController.networkUrl( 319 | // Uri.parse( 320 | // 'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4', 321 | // ), 322 | // ); 323 | // 324 | // // Initialize the controller and store the Future for later use. 325 | // _initializeVideoPlayerFuture = _controller.initialize(); 326 | // 327 | // // Use the controller to loop the video. 328 | // _controller.setLooping(true); 329 | // } 330 | // 331 | // @override 332 | // void dispose() { 333 | // // Ensure disposing of the VideoPlayerController to free up resources. 334 | // _controller.dispose(); 335 | // 336 | // super.dispose(); 337 | // } 338 | // 339 | // @override 340 | // Widget build(BuildContext context) { 341 | // return FutureBuilder( 342 | // future: _initializeVideoPlayerFuture, 343 | // builder: (context, snapshot) { 344 | // if (snapshot.connectionState == ConnectionState.done) { 345 | // return ClipRRect( 346 | // borderRadius: BorderRadius.circular(30), 347 | // child: Stack(children: [ 348 | // VideoPlayer(_controller), 349 | // Center( 350 | // child: CircleAvatar( 351 | // radius: 30, 352 | // backgroundColor: Colors.white.withOpacity(0.8), 353 | // child: IconButton( 354 | // onPressed: () { 355 | // setState(() { 356 | // // If the video is playing, pause it. 357 | // if (_controller.value.isPlaying) { 358 | // _controller.pause(); 359 | // } else { 360 | // // If the video is paused, play it. 361 | // _controller.play(); 362 | // } 363 | // }); 364 | // }, 365 | // icon: Icon( 366 | // _controller.value.isPlaying 367 | // ? Icons.pause 368 | // : Icons.play_arrow, 369 | // color: const Color(0xff209fa6), 370 | // ), 371 | // ), 372 | // ), 373 | // ) 374 | // ])); 375 | // } else { 376 | // return const Center( 377 | // child: CircularProgressIndicator(), 378 | // ); 379 | // } 380 | // }, 381 | // ); 382 | // } 383 | // } 384 | -------------------------------------------------------------------------------- /lib/src/features/home/Donation_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DonationCard extends StatefulWidget { 4 | const DonationCard({super.key}); 5 | 6 | @override 7 | State createState() => _DonationCardState(); 8 | } 9 | 10 | class _DonationCardState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/features/home/baseHomeActivity.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:donation_app/src/features/home/feedPage.dart'; 3 | import 'package:donation_app/main.dart'; 4 | import 'package:donation_app/src/features/home/hamburgerMenu.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:google_sign_in/google_sign_in.dart'; 8 | import 'package:rive/rive.dart'; 9 | import 'hamburger_function.dart'; 10 | 11 | 12 | /* 13 | this page is responsible for the homeactivity and the hamburger transtition 14 | */ 15 | 16 | class basehomeActivity extends StatefulWidget { 17 | const basehomeActivity({super.key}); 18 | 19 | @override 20 | State createState() => _basehomeActivityState(); 21 | } 22 | 23 | class _basehomeActivityState extends State with SingleTickerProviderStateMixin 24 | { 25 | 26 | 27 | 28 | late SMIBool isSideBarClosed; 29 | bool isSideMenuClosed=true; 30 | 31 | late AnimationController _animationController; 32 | late Animation animation; 33 | late Animation scalAnimation; 34 | late Animation borderanimation; 35 | 36 | @override 37 | void initState() { 38 | // TODO: implement initState 39 | 40 | _animationController = AnimationController( 41 | vsync: this, 42 | duration: const Duration(milliseconds: 200), 43 | )..addListener(() { 44 | setState(() {}); 45 | }); 46 | 47 | animation = Tween(begin: 0, end: 1).animate( 48 | CurvedAnimation(parent: _animationController 49 | , curve: Curves.fastOutSlowIn), 50 | ); 51 | borderanimation = Tween(begin: 0, end: 24).animate( 52 | CurvedAnimation(parent: _animationController 53 | , curve: Curves.fastOutSlowIn), 54 | ); 55 | scalAnimation = Tween(begin: 1, end: 0.8).animate( 56 | CurvedAnimation(parent: _animationController 57 | , curve: Curves.fastOutSlowIn), 58 | ); 59 | super.initState(); 60 | } 61 | 62 | @override 63 | void dispose() { 64 | // TODO: implement dispose 65 | _animationController.dispose(); 66 | super.dispose(); 67 | } 68 | @override 69 | Widget build(BuildContext context) { 70 | return Scaffold( 71 | backgroundColor: const Color.fromARGB(255,32,159,166), 72 | resizeToAvoidBottomInset: false, 73 | extendBody: true, 74 | body: Stack( 75 | children: [ 76 | AnimatedPositioned( 77 | duration: const Duration(milliseconds: 200), 78 | curve: Curves.fastOutSlowIn, 79 | width: 270, 80 | left: isSideMenuClosed ? -288 : 0 , 81 | height: MediaQuery.of(context).size.height, 82 | child: hamburgerMenu( 83 | pressa: (){ 84 | if (isSideMenuClosed) { 85 | _animationController.forward(); 86 | } else { 87 | _animationController.reverse(); 88 | } 89 | setState(() { 90 | isSideMenuClosed =!isSideMenuClosed; 91 | }); 92 | }, 93 | ), 94 | ), 95 | Transform.translate( 96 | offset: Offset(animation.value*270,0), 97 | child: Transform.scale( 98 | scale: scalAnimation.value, 99 | child: ClipRRect( 100 | borderRadius: BorderRadius.all(Radius.circular(borderanimation.value)), 101 | child: feedPage( 102 | press: (){ 103 | if (isSideMenuClosed) { 104 | _animationController.forward(); 105 | } else { 106 | _animationController.reverse(); 107 | } 108 | setState(() { 109 | isSideMenuClosed =!isSideMenuClosed; 110 | }); 111 | }, 112 | ), 113 | ), 114 | ) 115 | ), 116 | ], 117 | ), 118 | 119 | ); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/src/features/home/feedPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:donation_app/src/features/home/Donation_card.dart'; 3 | import 'package:donation_app/src/features/createfund/create_fund_page.dart'; 4 | import 'package:donation_app/src/features/home/donations_fragment.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | /* 8 | this screen is responsible to show the feed it is a part of the screen which are displayed by the bottomnavbar 9 | */ 10 | 11 | const tealLikeColor = Color.fromARGB(255, 32, 159, 166); 12 | 13 | class feedPage extends StatefulWidget { 14 | const feedPage({super.key, required this.press}); 15 | 16 | final VoidCallback press; 17 | 18 | @override 19 | State createState() => _feedPageState(); 20 | } 21 | 22 | class _feedPageState extends State { 23 | final _donationstream = 24 | FirebaseFirestore.instance.collection('Donations').snapshots(); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | backgroundColor: Colors.white, 30 | body: SafeArea( 31 | child: Column( 32 | children: [ 33 | Padding( 34 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), 35 | child: Row( 36 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 37 | children: [ 38 | Ink( 39 | decoration: const ShapeDecoration( 40 | shape: RoundedRectangleBorder( 41 | borderRadius: BorderRadius.horizontal( 42 | left: Radius.circular(20), 43 | right: Radius.circular(20), 44 | ), 45 | ), 46 | color: tealLikeColor, 47 | ), 48 | child: IconButton( 49 | onPressed: widget.press, 50 | icon: const Icon(Icons.menu, color: Colors.white)), 51 | ), 52 | Ink( 53 | decoration: const ShapeDecoration( 54 | shape: RoundedRectangleBorder( 55 | side: BorderSide(color: tealLikeColor), 56 | borderRadius: BorderRadius.horizontal( 57 | left: Radius.circular(20), 58 | right: Radius.circular(20), 59 | ), 60 | ), 61 | ), 62 | child: IconButton( 63 | onPressed: () {}, 64 | icon: const Icon( 65 | Icons.search, 66 | color: tealLikeColor, 67 | size: 30, 68 | ), 69 | ), 70 | ), 71 | ], 72 | ), 73 | ), 74 | Expanded( 75 | child: SingleChildScrollView( 76 | child: Column( 77 | crossAxisAlignment: CrossAxisAlignment.stretch, 78 | children: [ 79 | StartFundingButton(), 80 | const Padding( 81 | padding: EdgeInsets.symmetric(vertical: 16.0), 82 | child: Row( 83 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 84 | children: [ 85 | CategoryButton( 86 | icon: Icons.apps, 87 | label: 'All', 88 | color: Colors.blue, 89 | ), 90 | CategoryButton( 91 | icon: Icons.local_hospital, 92 | label: 'Medical', 93 | color: Colors.teal, 94 | ), 95 | CategoryButton( 96 | icon: Icons.school, 97 | label: 'Education', 98 | color: Colors.orange, 99 | ), 100 | CategoryButton( 101 | icon: Icons.masks, 102 | label: 'Pandemic', 103 | color: Colors.red, 104 | ), 105 | ], 106 | ), 107 | ), 108 | const Padding( 109 | padding: EdgeInsets.only(left: 20, right: 20), 110 | child: Row( 111 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 112 | children: [ 113 | Text( 114 | 'Popular', 115 | style: TextStyle( 116 | color: Colors.black, 117 | fontSize: 26, 118 | fontWeight: FontWeight.w500, 119 | ), 120 | ), 121 | Text( 122 | "See All", 123 | style: TextStyle( 124 | color: tealLikeColor, 125 | fontSize: 16, 126 | fontWeight: FontWeight.w400, 127 | ), 128 | ) 129 | ], 130 | ), 131 | ), 132 | StreamBuilder( 133 | stream: _donationstream, 134 | builder: (context, snapshot) { 135 | if (snapshot.hasError) { 136 | return const Text("connection error..."); 137 | } 138 | if (snapshot.connectionState == 139 | ConnectionState.waiting) { 140 | return const Text("Loading..."); 141 | } 142 | var docs = snapshot.data!.docs; 143 | return ListView.builder( 144 | shrinkWrap: true, 145 | physics: const NeverScrollableScrollPhysics(), 146 | itemCount: docs.length, 147 | itemBuilder: (context, index) { 148 | return GestureDetector( 149 | onTap: (){ 150 | Navigator.push( 151 | context, 152 | MaterialPageRoute( 153 | builder: (context) => const DonationsFragment(), 154 | ), 155 | ); 156 | }, 157 | child: Card( 158 | color: const Color.fromARGB(255, 251, 253, 255), 159 | shape: RoundedRectangleBorder( 160 | borderRadius: BorderRadius.circular(30), 161 | side: const BorderSide(color: Colors.blue), 162 | ), 163 | margin: 164 | const EdgeInsets.fromLTRB(15, 7.5, 15, 7.5), 165 | child: Padding( 166 | padding: const EdgeInsets.all(20.0), 167 | child: Column( 168 | crossAxisAlignment: 169 | CrossAxisAlignment.stretch, 170 | children: [ 171 | Container( 172 | height: 100, 173 | padding: const EdgeInsets.fromLTRB( 174 | 0, 0, 0, 10), 175 | child: ClipRRect( 176 | borderRadius: BorderRadius.circular(25), 177 | child: Image( 178 | fit: BoxFit.cover, 179 | image: NetworkImage( 180 | docs[index]['addImage'], 181 | ), 182 | ), 183 | ), 184 | ), 185 | Row( 186 | children: [ 187 | Expanded( 188 | flex: 2, 189 | child: Text( 190 | docs[index]['addTitle'], 191 | softWrap: true, 192 | style: const TextStyle( 193 | fontSize: 20, 194 | fontWeight: FontWeight.w500, 195 | ), 196 | ), 197 | ), 198 | Expanded(flex: 1, child: SizedBox()), 199 | ], 200 | ), 201 | Text( 202 | "By " + docs[index]['addOrganisation'], 203 | style: const TextStyle( 204 | fontSize: 15, 205 | fontWeight: FontWeight.w400, 206 | color: Colors.blueGrey), 207 | ), 208 | Padding( 209 | padding: EdgeInsets.fromLTRB(0, 10, 0, 0), 210 | child: Row( 211 | children: [ 212 | Expanded( 213 | child: Text( 214 | '\$' + 215 | docs[index]['addRaised'] 216 | .toString() + 217 | ' Raised ', 218 | style: const TextStyle( 219 | fontSize: 16, 220 | fontWeight: FontWeight.w500, 221 | color: Color.fromARGB( 222 | 255, 32, 159, 166), 223 | ), 224 | ), 225 | ), 226 | Expanded( 227 | child: Text( 228 | 'Target-\$' + 229 | docs[index]['addTarget'] 230 | .toString(), 231 | textAlign: TextAlign.right, 232 | style: const TextStyle( 233 | fontSize: 16, 234 | fontWeight: FontWeight.w500, 235 | ), 236 | ), 237 | ), 238 | ], 239 | ), 240 | ), 241 | ], 242 | ), 243 | ), 244 | ), 245 | ); 246 | }, 247 | ); 248 | }, 249 | ), 250 | ], 251 | ), 252 | ), 253 | ), 254 | ], 255 | ), 256 | ), 257 | ); 258 | } 259 | } 260 | 261 | class StartFundingButton extends StatelessWidget { 262 | const StartFundingButton({super.key}); 263 | 264 | @override 265 | Widget build(BuildContext context) { 266 | return Container( 267 | margin: const EdgeInsets.only(top: 16, left: 20, right: 20), 268 | width: double.infinity, 269 | decoration: BoxDecoration( 270 | color: tealLikeColor, 271 | borderRadius: BorderRadius.circular(40), 272 | ), 273 | child: Column(children: [ 274 | Container( 275 | margin: const EdgeInsets.only(top: 25), 276 | child: const Text( 277 | 'Start Your', 278 | style: TextStyle( 279 | color: Colors.white, 280 | fontSize: 22, 281 | fontWeight: FontWeight.w500, 282 | ), 283 | ), 284 | ), 285 | Container( 286 | margin: const EdgeInsets.only(top: 7), 287 | child: const Text( 288 | 'Own Funding', 289 | style: TextStyle( 290 | color: Colors.white, 291 | fontSize: 22, 292 | fontWeight: FontWeight.w500, 293 | ), 294 | ), 295 | ), 296 | Container( 297 | margin: const EdgeInsets.only(top: 3), 298 | child: const Text( 299 | 'Create Your Own Dono Post', 300 | style: TextStyle( 301 | color: Colors.white, 302 | fontSize: 16, 303 | fontWeight: FontWeight.w200, 304 | ), 305 | ), 306 | ), 307 | Container( 308 | margin: const EdgeInsets.only(top: 20, bottom: 15), 309 | child: TextButton( 310 | onPressed: () { 311 | Navigator.push( 312 | context, 313 | MaterialPageRoute( 314 | builder: (context) => const CreateFundPage(), 315 | ), 316 | ); 317 | }, 318 | style: TextButton.styleFrom( 319 | padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 13), 320 | shape: RoundedRectangleBorder( 321 | borderRadius: BorderRadius.circular(10), 322 | ), 323 | backgroundColor: Colors.white, 324 | ), 325 | child: const Text( 326 | 'Start Now', 327 | style: TextStyle( 328 | color: tealLikeColor, 329 | fontSize: 15, 330 | ), 331 | ), 332 | ), 333 | ), 334 | ]), 335 | ); 336 | } 337 | } 338 | 339 | class CategoryButton extends StatelessWidget { 340 | final IconData icon; 341 | final String label; 342 | final Color color; 343 | const CategoryButton( 344 | {super.key, 345 | required this.icon, 346 | required this.label, 347 | required this.color}); 348 | 349 | @override 350 | Widget build(BuildContext context) { 351 | return Column( 352 | children: [ 353 | Ink( 354 | decoration: ShapeDecoration( 355 | shape: const CircleBorder( 356 | side: BorderSide(width: 1.5, color: Colors.white)), 357 | color: color.withOpacity(0.1), 358 | ), 359 | child: IconButton( 360 | icon: Icon(icon, size: 25), 361 | color: color, 362 | onPressed: () { 363 | // can make another parameter for a function to be called when pressed 364 | }), 365 | ), 366 | Text( 367 | label, 368 | style: const TextStyle( 369 | color: Colors.black54, 370 | fontSize: 12, 371 | fontWeight: FontWeight.w400, 372 | ), 373 | ), 374 | ], 375 | ); 376 | } 377 | } 378 | -------------------------------------------------------------------------------- /lib/src/features/home/hamburgerMenu.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:donation_app/src/features/createfund/create_fund_page.dart'; 3 | import 'package:donation_app/src/features/donationcart/mydonationbox.dart'; 4 | import 'package:donation_app/src/features/home/donations_fragment.dart'; 5 | import 'package:donation_app/src/features/help_faq/help_faq_page.dart'; 6 | import 'package:donation_app/src/features/history/historypage.dart'; 7 | import 'package:donation_app/src/features/profile/profilePage.dart'; 8 | import 'package:donation_app/src/features/settings/settingspage.dart'; 9 | import 'package:firebase_auth/firebase_auth.dart'; 10 | import 'package:flutter/cupertino.dart'; 11 | import 'package:flutter/material.dart'; 12 | import 'package:google_sign_in/google_sign_in.dart'; 13 | import '../authentication/screens/loginPage.dart'; 14 | 15 | const tealLikeColor = Color.fromARGB(255, 32, 159, 166); 16 | const whiteg =Color.fromARGB(255,222,240,241); 17 | 18 | 19 | /* 20 | this screen cotains all the buttons and code responsible for hte hamburrger menu 21 | */ 22 | class hamburgerMenu extends StatelessWidget { 23 | const hamburgerMenu({super.key, required this.pressa}); 24 | final VoidCallback pressa; 25 | 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | body: Container( 31 | width: 288, 32 | height: double.infinity, 33 | color: tealLikeColor, 34 | child: SafeArea( 35 | child: Column( 36 | crossAxisAlignment: CrossAxisAlignment.start, 37 | children: [ 38 | TextButton( 39 | onPressed:pressa , 40 | child: const Text( 41 | 'back', 42 | style: TextStyle( 43 | color: Colors.white, 44 | ), 45 | ) 46 | ), 47 | const Padding( 48 | padding: EdgeInsets.fromLTRB(15, 20, 0, 0), 49 | child: CircleAvatar( 50 | radius: 45, 51 | backgroundColor: Colors.white24, 52 | child: Icon(CupertinoIcons.person,color: Colors.white,size: 45,), 53 | ), 54 | ), 55 | const Padding( 56 | padding: EdgeInsets.fromLTRB(15,0,0,0), 57 | child: Text('David William', 58 | style: TextStyle( 59 | fontSize: 35, 60 | color: Colors.white 61 | ), 62 | ), 63 | ), 64 | const Padding( 65 | padding: EdgeInsets.fromLTRB(15,0,0,20), 66 | child: Text('hellobesnik@gmail.com', 67 | style: TextStyle( 68 | fontSize: 15, 69 | color: Color.fromARGB(255,141,208,211) 70 | ), 71 | ), 72 | ), 73 | TextButton( 74 | onPressed: (){ 75 | Navigator.push( 76 | context, 77 | MaterialPageRoute( 78 | builder: (context) => const CreateFundPage(), 79 | ), 80 | ); 81 | }, 82 | child: const Text( 83 | 'Create Fund', 84 | style: TextStyle( 85 | fontSize: 16, 86 | color: whiteg, 87 | ), 88 | ), 89 | ), 90 | TextButton( 91 | onPressed: (){ 92 | Navigator.push( 93 | context, 94 | MaterialPageRoute(builder: (context) => const profilePage()), 95 | ); 96 | }, 97 | child: const Text( 98 | 'Profile', 99 | style: TextStyle( 100 | fontSize: 16, 101 | color: whiteg, 102 | ), 103 | ), 104 | ), 105 | TextButton( 106 | onPressed: (){ 107 | Navigator.push( 108 | context, 109 | MaterialPageRoute(builder: (context) => const SettingsPage()), 110 | ); 111 | }, 112 | child: const Text( 113 | 'Settings', 114 | style: TextStyle( 115 | fontSize: 16, 116 | color: whiteg, 117 | ), 118 | ), 119 | ), 120 | TextButton( 121 | onPressed: (){ 122 | Navigator.push( 123 | context, 124 | MaterialPageRoute(builder: (context) => const HistoryPage()), 125 | ); 126 | }, 127 | child: const Text( 128 | 'History', 129 | style: TextStyle( 130 | fontSize: 16, 131 | color: whiteg, 132 | ), 133 | ), 134 | ), 135 | TextButton( 136 | onPressed: (){ 137 | Navigator.push( 138 | context, 139 | MaterialPageRoute(builder: (context) => MyDonationBox()), 140 | ); 141 | }, 142 | child: const Text( 143 | 'Donate', 144 | style: TextStyle( 145 | fontSize: 16, 146 | color: whiteg, 147 | ), 148 | ), 149 | ), 150 | TextButton( 151 | onPressed: (){ 152 | Navigator.push( 153 | context, 154 | MaterialPageRoute(builder: (context) => const HelpPage()), 155 | ); 156 | }, 157 | child: const Text( 158 | 'Help & FAQ', 159 | style: TextStyle( 160 | fontSize: 16, 161 | color: whiteg, 162 | ), 163 | ), 164 | ), 165 | const Expanded( 166 | flex: 1, 167 | child: SizedBox() 168 | ), 169 | Padding( 170 | padding: const EdgeInsets.fromLTRB(5, 0, 0, 30), 171 | child: TextButton( 172 | onPressed: ()async { 173 | final navigator = Navigator.of(context); 174 | await FirebaseAuth.instance.signOut(); 175 | await GoogleSignIn().signOut(); 176 | 177 | navigator.pushAndRemoveUntil(MaterialPageRoute( 178 | builder: (c) => const loginPage()),(route)=>false); 179 | }, 180 | child: const Row( 181 | children: [ 182 | Padding( 183 | padding: EdgeInsets.fromLTRB(0,0,10,0), 184 | child: Text('LogOut',style: TextStyle(color: Color.fromARGB(255,222,240,241),fontSize: 16),), 185 | ), 186 | Icon(IconData(0xf88b, fontFamily: 'MaterialIcons'),color: whiteg,), 187 | ], 188 | ) 189 | ), 190 | ) 191 | ], 192 | ), 193 | ), 194 | ), 195 | ); 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /lib/src/features/home/hamburger_function.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class hamburger_function extends StatelessWidget { 4 | const hamburger_function({super.key, required this.press}); 5 | 6 | final VoidCallback press; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Padding( 11 | padding: const EdgeInsets.fromLTRB(20, 21, 0, 0), 12 | child: SafeArea( 13 | child: GestureDetector( 14 | onTap: press, 15 | child: Container( 16 | decoration: const ShapeDecoration( 17 | shape: RoundedRectangleBorder( 18 | borderRadius: BorderRadius.horizontal( 19 | left: Radius.circular(20), 20 | right: Radius.circular(20), 21 | ), 22 | ), 23 | color: Color.fromARGB(255, 32, 159, 166), 24 | ), 25 | child: IconButton( 26 | onPressed: press, 27 | icon: const Icon(Icons.menu, color: Colors.white)), 28 | ), 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/features/home/test.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencodeiiita/Donation-App/94c551f74e503244520e13e03df8943cac79f84b/lib/src/features/home/test.dart -------------------------------------------------------------------------------- /lib/src/features/intro/screens/imageslider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:ui'; 3 | import 'package:flutter/material.dart'; 4 | 5 | FlutterView view = WidgetsBinding.instance.platformDispatcher.views.first; 6 | // Dimensions in physical pixels (px) 7 | Size size = view.physicalSize / view.devicePixelRatio; 8 | double w = size.width; 9 | double h = size.height; 10 | 11 | class ImageSlider extends StatefulWidget { 12 | const ImageSlider({super.key}); 13 | 14 | @override 15 | State createState() => _ImageSliderState(); 16 | } 17 | 18 | class _ImageSliderState extends State { 19 | int currentIndex = 0; 20 | List images = [ 21 | "asian_girl.jpg", 22 | "children.jpg", 23 | "old_man.jpg", 24 | "wheelchair.jpg", 25 | "african_child.jpg", 26 | "african2.jpg", 27 | ]; 28 | Image _image = Image.asset("assets/images/asian_girl.jpg"); 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | startImageSlider(); 34 | } 35 | 36 | void startImageSlider() { 37 | const Duration duration = Duration(seconds: 3); 38 | 39 | Timer.periodic(duration, (Timer timer) { 40 | if (!mounted) { 41 | return; 42 | } 43 | 44 | setState(() { 45 | currentIndex = (currentIndex + 1) % images.length; 46 | _image = Image.asset("assets/images/${images[currentIndex]}"); 47 | }); 48 | }); 49 | } 50 | 51 | @override 52 | Widget build(BuildContext context) { 53 | return Container( 54 | height: h*0.5, 55 | child: ClipRRect( 56 | borderRadius: BorderRadius.circular(30.0), 57 | child: AnimatedSwitcher( 58 | duration: const Duration(seconds: 1), 59 | child: Image( 60 | image: _image.image, 61 | fit: BoxFit.fill, 62 | key: ValueKey(_image), 63 | ), 64 | ), 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/src/features/intro/screens/onboarding_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:ui'; 3 | 4 | import 'package:donation_app/src/features/authentication/screens/signup_screen.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:smooth_page_indicator/smooth_page_indicator.dart'; 8 | 9 | import 'imageslider.dart'; 10 | FlutterView view = WidgetsBinding.instance.platformDispatcher.views.first; 11 | // Dimensions in physical pixels (px) 12 | Size size = view.physicalSize / view.devicePixelRatio; 13 | double w = size.width; 14 | double h = size.height; 15 | 16 | class OnBoardingScreen extends StatefulWidget { 17 | const OnBoardingScreen({super.key}); 18 | 19 | @override 20 | State createState() => _OnBoardingScreenState(); 21 | } 22 | 23 | class _OnBoardingScreenState extends State { 24 | @override 25 | 26 | late PageController _pageController; 27 | @override 28 | void initState() { 29 | _pageController= PageController(initialPage: 0); 30 | super.initState(); 31 | } 32 | 33 | @ override 34 | void dispose(){ 35 | _pageController.dispose(); 36 | super.dispose(); 37 | } 38 | 39 | 40 | Widget build(BuildContext context) { 41 | return Scaffold( 42 | body: SafeArea( 43 | child: Padding( 44 | padding: const EdgeInsets.all(16.0), 45 | child: Column( 46 | children:[ 47 | Expanded( 48 | child: PageView.builder( 49 | itemCount: demo_data.length, 50 | controller: _pageController, 51 | itemBuilder: (context,index)=>OnboardContent( 52 | specialwidget: demo_data[index].widget, 53 | title: demo_data[index].title, 54 | description: demo_data[index].description, 55 | ), 56 | ), 57 | ), 58 | Padding( 59 | padding: const EdgeInsets.all(8.0), 60 | child: SmoothPageIndicator( 61 | controller: _pageController, // PageController 62 | count: demo_data.length, 63 | effect: const ExpandingDotsEffect( 64 | spacing: 5.0, 65 | radius: 5.0, 66 | dotWidth: 10.0, 67 | dotHeight: 10.0, 68 | strokeWidth: 10, 69 | dotColor: Color.fromARGB(255, 174, 182, 210), 70 | activeDotColor: Color.fromARGB(255, 32, 159, 166), 71 | ), 72 | ), 73 | ), 74 | Container( 75 | width: 80, 76 | height:80, 77 | decoration: BoxDecoration( 78 | shape: BoxShape.circle, 79 | border: Border.all( 80 | color: const Color.fromARGB(255, 32, 159, 166), 81 | width: 0.5, 82 | ), 83 | ), 84 | child: Align( 85 | alignment: Alignment.center, 86 | child: Container( 87 | width: 60, 88 | height: 60, 89 | decoration: const BoxDecoration( 90 | shape: BoxShape.circle, 91 | color: Color.fromARGB(255, 32, 159, 166), 92 | ), 93 | child: IconButton( 94 | onPressed: () { 95 | _pageController.page!=demo_data.length-1? 96 | _pageController.nextPage( 97 | duration: Duration(milliseconds: 300), 98 | curve: Curves.ease, 99 | ):Navigator.push( 100 | context, 101 | MaterialPageRoute( 102 | builder: (context) => const SignUpScreen(), 103 | ), 104 | ); 105 | }, 106 | icon: const Icon( 107 | Icons.keyboard_arrow_right, 108 | color: Colors.white, 109 | size: 30, 110 | ), 111 | ), 112 | ), 113 | ), 114 | ), 115 | ], 116 | ), 117 | ), 118 | ), 119 | ); 120 | } 121 | } 122 | 123 | class OnBoard extends StatelessWidget { 124 | const OnBoard({super.key, required this.title, required this.description,required this.widget}); 125 | final String title,description; 126 | final Widget widget; 127 | @override 128 | Widget build(BuildContext context) { 129 | return const Placeholder(); 130 | } 131 | } 132 | 133 | 134 | final List demo_data=[ 135 | OnBoard( 136 | widget: Container( 137 | height: h*0.5, 138 | child: Image.asset(fit: BoxFit.cover,"assets/images/screen1.png"), 139 | ), 140 | title: "Let's Help\nEach Other", 141 | description: "When we give cheerfully and accept\ngratefully, everyone is blessed", 142 | ), 143 | OnBoard( 144 | widget: Container( 145 | height: h*0.5, 146 | child: Image.asset(fit: BoxFit.cover,"assets/images/screen2.png"), 147 | ), 148 | title: "We Can Help\nPoor People", 149 | description: "When we give cheerfully and accept\ngratefully, everyone is blessed", 150 | ), 151 | const OnBoard( 152 | widget: ImageSlider(), 153 | title: "We Can Help\nPoor People", 154 | description: "When we give cheerfully and accept\ngratefully, everyone is blessed", 155 | ), 156 | ]; 157 | 158 | 159 | class OnboardContent extends StatelessWidget { 160 | const OnboardContent({super.key, required this.specialwidget, required this.title, required this.description}); 161 | 162 | final String title,description; 163 | final Widget specialwidget; 164 | 165 | @override 166 | Widget build(BuildContext context) { 167 | return Column( 168 | children: [ 169 | const Spacer(), 170 | specialwidget, 171 | const Spacer(), 172 | Text( 173 | title , 174 | style: GoogleFonts.poppins( 175 | textStyle: const TextStyle( 176 | fontSize: 30, 177 | color: Color.fromARGB(255, 26, 36, 65), 178 | fontWeight: FontWeight.w500, 179 | )), 180 | textAlign: TextAlign.center, 181 | ), 182 | Text( 183 | description, 184 | style: GoogleFonts.poppins( 185 | textStyle: const TextStyle( 186 | fontSize: 14, 187 | color: Color.fromARGB(255, 174, 182, 199), 188 | fontWeight: FontWeight.normal, 189 | )), 190 | textAlign: TextAlign.center, 191 | ), 192 | const Spacer(), 193 | ], 194 | ); 195 | } 196 | } 197 | 198 | -------------------------------------------------------------------------------- /lib/src/features/intro/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:animated_splash_screen/animated_splash_screen.dart'; 2 | import 'package:donation_app/src/features/intro/screens/onboarding_screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | 6 | 7 | class SplashScreen extends StatelessWidget { 8 | const SplashScreen({super.key, Key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return AnimatedSplashScreen( 13 | splash: Text('Help', 14 | style: GoogleFonts.poppins( 15 | textStyle: const TextStyle( 16 | color: Colors.white, 17 | fontStyle: FontStyle.italic, 18 | fontWeight: FontWeight.w400, 19 | fontSize: 60))), 20 | backgroundColor: const Color.fromARGB(255, 32, 159, 166), 21 | 22 | //Color(RGBA(32,159,166,255)) 23 | splashTransition: SplashTransition.scaleTransition, 24 | nextScreen: const OnBoardingScreen()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/features/profile/achievements_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AchievementsScreen extends StatelessWidget { 4 | const AchievementsScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return const Center(child: Text("Achievements Screen")); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/src/features/profile/profilePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:donation_app/src/features/profile/achievements_screen.dart'; 2 | import 'package:donation_app/src/features/profile/profile_screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class profilePage extends StatefulWidget { 6 | const profilePage({super.key}); 7 | 8 | @override 9 | State createState() => _profilePageState(); 10 | } 11 | 12 | class _profilePageState extends State with SingleTickerProviderStateMixin{ 13 | 14 | late TabController _tabController ; 15 | 16 | @override 17 | void initState(){ 18 | _tabController = new TabController(length: 2, vsync: this,initialIndex: 0)..addListener(() { 19 | setState(() { 20 | 21 | }); 22 | }); 23 | super.initState(); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | appBar: AppBar( 30 | title: const Text("My Profile", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 31 | leading: BackButton(), 32 | backgroundColor: Colors.white, 33 | bottom: TabBar( 34 | tabs: [ 35 | Tab(child: Text("Profile",style: TextStyle(fontSize: 18),),), 36 | Tab(child: Text("Achievements",style: TextStyle(fontSize: 18),),), 37 | ], indicatorColor: Color.fromARGB(255, 32, 159, 166), 38 | controller: _tabController, 39 | labelColor: Color.fromARGB(255, 32, 159, 166), 40 | indicatorSize: TabBarIndicatorSize.tab , 41 | ), 42 | ), 43 | body: TabBarView( 44 | controller: _tabController, 45 | children: const [ 46 | ProfileScreen(), 47 | AchievementsScreen(), 48 | ], 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/src/features/profile/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ProfileScreen extends StatelessWidget { 5 | const ProfileScreen({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Column( 10 | children: [ 11 | Padding( 12 | padding: EdgeInsets.fromLTRB(0, 10, 0, 0), 13 | child: CircleAvatar( 14 | radius: 45, 15 | backgroundColor: Colors.grey, 16 | child: Icon(CupertinoIcons.person,color: Colors.white,size: 45,), 17 | ), 18 | ), 19 | const Expanded( 20 | child: Text('David William', 21 | style: TextStyle( 22 | fontSize: 30, 23 | color: Colors.black, 24 | ), 25 | ), 26 | ), 27 | const Expanded( 28 | child: Text('hellobesnik@gmail.com', 29 | style: TextStyle( 30 | fontSize: 15, 31 | color: Colors.black, 32 | ), 33 | ), 34 | ), 35 | const Divider(color: Color.fromARGB(255, 32, 159, 166),), 36 | const Expanded( 37 | child: Padding( 38 | padding: EdgeInsets.fromLTRB(50, 0, 0, 0), 39 | child: Align( 40 | alignment: Alignment.centerLeft, 41 | child: Text('Basic Info', 42 | style: TextStyle( 43 | fontSize: 20, 44 | ), 45 | ), 46 | ), 47 | ), 48 | ), 49 | Expanded( 50 | child: Padding( 51 | padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), 52 | child: Row( 53 | children: [ 54 | const Column( 55 | crossAxisAlignment: CrossAxisAlignment.start, 56 | children: [ 57 | Text('NAME', 58 | style: TextStyle( 59 | fontSize: 15, 60 | color: Colors.black, 61 | ), 62 | ), 63 | Text('Parth Revanwar', 64 | style: TextStyle( 65 | 66 | fontSize: 15, 67 | color: Colors.black, 68 | ), 69 | ), 70 | ], 71 | ), 72 | const Expanded(child: SizedBox()), 73 | IconButton(onPressed: (){}, 74 | icon: const Icon( 75 | Icons.keyboard_arrow_right, 76 | size: 30, 77 | ) 78 | ), 79 | ], 80 | ), 81 | ), 82 | ), 83 | Expanded( 84 | child: Padding( 85 | padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), 86 | child: Row( 87 | children: [ 88 | const Column( 89 | crossAxisAlignment: CrossAxisAlignment.start, 90 | children: [ 91 | Text('PASSWORD', 92 | style: TextStyle( 93 | fontSize: 15, 94 | color: Colors.black, 95 | ), 96 | ), 97 | Text('*********', 98 | style: TextStyle( 99 | fontSize: 15, 100 | color: Colors.black, 101 | ), 102 | ), 103 | ], 104 | ), 105 | const Expanded(child: SizedBox()), 106 | IconButton(onPressed: (){}, 107 | icon: const Icon( 108 | Icons.keyboard_arrow_right, 109 | size: 30, 110 | ) 111 | ), 112 | ], 113 | ), 114 | ), 115 | ), 116 | const Divider(color: Color.fromARGB(255, 32, 159, 166),), 117 | const Expanded( 118 | child: Padding( 119 | padding: EdgeInsets.fromLTRB(50, 0, 0, 0), 120 | child: Align( 121 | alignment: Alignment.centerLeft, 122 | child: Text('Contact Information', 123 | style: TextStyle( 124 | fontSize: 20, 125 | ), 126 | ), 127 | ), 128 | ), 129 | ), 130 | Expanded( 131 | child: Padding( 132 | padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), 133 | child: Row( 134 | children: [ 135 | const Column( 136 | crossAxisAlignment: CrossAxisAlignment.start, 137 | children: [ 138 | Text('EMAIL', 139 | style: TextStyle( 140 | fontSize: 15, 141 | color: Colors.black, 142 | ), 143 | ), 144 | Text('hellobesnik@gmail.com', 145 | style: TextStyle( 146 | fontSize: 15, 147 | color: Colors.black, 148 | ), 149 | ), 150 | ], 151 | ), 152 | const Expanded(child: SizedBox()), 153 | IconButton(onPressed: (){}, 154 | icon: const Icon( 155 | Icons.keyboard_arrow_right, 156 | size: 30, 157 | ) 158 | ), 159 | ], 160 | ), 161 | ), 162 | ), 163 | Expanded( 164 | child: Padding( 165 | padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), 166 | child: Row( 167 | children: [ 168 | const Column( 169 | crossAxisAlignment: CrossAxisAlignment.start, 170 | children: [ 171 | Text('PHONE', 172 | style: TextStyle( 173 | fontSize: 15, 174 | color: Colors.black, 175 | ), 176 | ), 177 | Text('7564895214', 178 | style: TextStyle( 179 | fontSize: 15, 180 | color: Colors.black, 181 | ), 182 | ), 183 | ], 184 | ), 185 | const Expanded(child: SizedBox()), 186 | IconButton(onPressed: (){}, 187 | icon: const Icon( 188 | Icons.keyboard_arrow_right, 189 | size: 30, 190 | ) 191 | ), 192 | ], 193 | ), 194 | ), 195 | ), 196 | const Divider(color: Colors.white), 197 | ], 198 | ); 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /lib/src/features/settings/settingspage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SettingsPage extends StatelessWidget { 4 | const SettingsPage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text("Settings", style: TextStyle(color: Colors.black, fontSize: 25.0, fontWeight: FontWeight.w600),), 11 | leading: BackButton(), 12 | backgroundColor: Colors.white, 13 | ), 14 | body: const Center( 15 | child: Text( 16 | 'settings page', 17 | ), 18 | ), 19 | 20 | );; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: donation_app 2 | description: "A new Flutter project." 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 6 | 7 | # The following defines the version and build number for your application. 8 | # A version number is three numbers separated by dots, like 1.2.43 9 | # followed by an optional build number separated by a +. 10 | # Both the version and the builder number may be overridden in flutter 11 | # build by specifying --build-name and --build-number, respectively. 12 | # In Android, build-name is used as versionName while build-number used as versionCode. 13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 15 | # Read more about iOS versioning at 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 17 | # In Windows, build-name is used as the major, minor, and patch parts 18 | # of the product and file versions while build-number is used as the build suffix. 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: '>=3.2.0 <4.0.0' 23 | 24 | # Dependencies specify other packages that your package needs in order to work. 25 | # To automatically upgrade your package dependencies to the latest versions 26 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 27 | # dependencies can be manually updated by changing the version numbers below to 28 | # the latest version available on pub.dev. To see which dependencies have newer 29 | # versions available, run `flutter pub outdated`. 30 | dependencies: 31 | rive: ^0.12.4 32 | flutter: 33 | sdk: flutter 34 | firebase_core: ^2.24.2 35 | firebase_auth: ^4.15.3 36 | fluttertoast: ^8.2.4 37 | 38 | 39 | 40 | # The following adds the Cupertino Icons font to your application. 41 | # Use with the CupertinoIcons class for iOS style icons. 42 | cupertino_icons: ^1.0.2 43 | animated_splash_screen: ^1.3.0 44 | page_transition: ^2.1.0 45 | cached_network_image: ^3.3.0 46 | social_login_buttons: ^1.0.7 47 | video_player: ^2.8.1 48 | google_fonts: ^6.1.0 49 | cloud_firestore: ^4.13.6 50 | image_picker: ^1.0.6 51 | firebase_storage: ^11.6.0 52 | google_sign_in: ^6.2.1 53 | smooth_page_indicator: ^1.1.0 54 | bottom_drawer: ^0.0.5 55 | date_field: ^4.0.1 56 | 57 | 58 | dev_dependencies: 59 | flutter_test: 60 | sdk: flutter 61 | 62 | # The "flutter_lints" package below contains a set of recommended lints to 63 | # encourage good coding practices. The lint set provided by the package is 64 | # activated in the `analysis_options.yaml` file located at the root of your 65 | # package. See that file for information about deactivating specific lint 66 | # rules and activating additional ones. 67 | flutter_lints: ^3.0.1 68 | 69 | # For information on the generic Dart part of this file, see the 70 | # following page: https://dart.dev/tools/pub/pubspec 71 | 72 | # The following section is specific to Flutter packages. 73 | flutter: 74 | 75 | # The following line ensures that the Material Icons font is 76 | # included with your application, so that you can use the icons in 77 | # the material Icons class. 78 | uses-material-design: true 79 | 80 | # To add assets to your application, add an assets section, like this: 81 | assets: 82 | - assets/images/asian_girl.jpg 83 | - assets/images/old_man.jpg 84 | - assets/images/african_child.jpg 85 | - assets/images/children.jpg 86 | - assets/images/wheelchair.jpg 87 | - assets/images/african2.jpg 88 | - assets/google_logo.png 89 | - assets/apple_logo.png 90 | - assets/help.png 91 | - assets/line.png 92 | - assets/images/screen1.png 93 | - assets/images/screen2.png 94 | 95 | # An image asset can refer to one or more resolution-specific "variants", see 96 | # https://flutter.dev/assets-and-images/#resolution-aware 97 | 98 | # For details regarding adding assets from package dependencies, see 99 | # https://flutter.dev/assets-and-images/#from-packages 100 | 101 | # To add custom fonts to your application, add a fonts section here, 102 | # in this "flutter" section. Each entry in this list should have a 103 | # "family" key with the font family name, and a "fonts" key with a 104 | # list giving the asset and other descriptors for the font. For 105 | # example: 106 | # fonts: 107 | # - family: Schyler 108 | # fonts: 109 | # - asset: fonts/Schyler-Regular.ttf 110 | # - asset: fonts/Schyler-Italic.ttf 111 | # style: italic 112 | # - family: Trajan Pro 113 | # fonts: 114 | # - asset: fonts/TrajanPro.ttf 115 | # - asset: fonts/TrajanPro_Bold.ttf 116 | # weight: 700 117 | # 118 | # For details regarding fonts from package dependencies, 119 | # see https://flutter.dev/custom-fonts/#from-packages 120 | --------------------------------------------------------------------------------