├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-50x50@1x.png
│ │ │ ├── Icon-App-50x50@2x.png
│ │ │ ├── Icon-App-57x57@1x.png
│ │ │ ├── Icon-App-57x57@2x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-72x72@1x.png
│ │ │ ├── Icon-App-72x72@2x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── assets
├── man.png
├── quote.png
├── woman.png
├── loadung.gif
├── error.svg
└── login.svg
├── screenshots
├── main.png
├── drawer.png
├── signin.png
├── reg_users.png
├── chat_window_1.png
└── chat_window_2.png
├── lib
├── Helpers
│ ├── TextHelper.dart
│ └── InternetCheck.dart
├── DataRepo.dart
├── SimpleAuth
│ ├── UserRepo.dart
│ ├── User.dart
│ ├── UserUtils.dart
│ ├── UserTile.dart
│ ├── UserPage.dart
│ └── login.dart
├── clippers
│ └── CurveClipper.dart
├── main.dart
├── painters
│ ├── SmallCurvePainter.dart
│ └── CurvePainter.dart
├── MessageLayout
│ ├── MessageRepo.dart
│ ├── Message.dart
│ ├── TextFormBuilder.dart
│ ├── buildMessageWidget.dart
│ └── mainMessageScreen.dart
├── Quote.dart
├── LayoutBuilder
│ ├── ErrorScreen.dart
│ ├── CommonListItemBuilder.dart
│ ├── SpecialListItemBuilder.dart
│ ├── DrawerBuilder.dart
│ └── ListBuilder.dart
└── imported
│ └── EnsureVisibleWhenFocused.dart
├── android
├── gradle.properties
├── .gitignore
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── quote_sender
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── web
└── index.html
├── .metadata
├── .gitignore
├── test
└── widget_test.dart
├── README.md
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/assets/man.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/assets/man.png
--------------------------------------------------------------------------------
/assets/quote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/assets/quote.png
--------------------------------------------------------------------------------
/assets/woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/assets/woman.png
--------------------------------------------------------------------------------
/assets/loadung.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/assets/loadung.gif
--------------------------------------------------------------------------------
/screenshots/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/main.png
--------------------------------------------------------------------------------
/screenshots/drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/drawer.png
--------------------------------------------------------------------------------
/screenshots/signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/signin.png
--------------------------------------------------------------------------------
/screenshots/reg_users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/reg_users.png
--------------------------------------------------------------------------------
/screenshots/chat_window_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/chat_window_1.png
--------------------------------------------------------------------------------
/screenshots/chat_window_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/screenshots/chat_window_2.png
--------------------------------------------------------------------------------
/lib/Helpers/TextHelper.dart:
--------------------------------------------------------------------------------
1 | import 'package:url_launcher/url_launcher.dart';
2 | import 'package:flutter/material.dart';
3 |
4 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AmanNegi/FlutterQuoteSender/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | quote_sender
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3
8 | channel: unknown
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/DataRepo.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'Quote.dart';
3 |
4 | class DataRepo {
5 | final CollectionReference collection =
6 | Firestore.instance.collection("Quotes");
7 |
8 | Stream getStream() {
9 | return collection.orderBy('date', descending: true).snapshots();
10 | }
11 |
12 | Future addQuote(Quote quote) {
13 | return collection.add(quote.toJson());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/quote_sender/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.quote_sender
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/UserRepo.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:quote_sender/MessageLayout/Message.dart';
3 | import 'User.dart';
4 |
5 | class UserRepo {
6 | CollectionReference reference = Firestore.instance.collection("User");
7 |
8 | Stream getStream() {
9 | return reference.snapshots();
10 | }
11 |
12 | Future addUser(User user) {
13 | return reference.add(user.toJson());
14 | }
15 |
16 | updateUser(User newUser) async {
17 | await reference.document(newUser.id).updateData(newUser.toJson());
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/clippers/CurveClipper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CurveClipper extends CustomClipper {
4 | @override
5 | Path getClip(Size size) {
6 | var width = size.width;
7 | var height = size.height;
8 | Path path = Path()
9 | ..moveTo(0, 0)
10 | ..lineTo(0, height * 0.70)
11 | ..quadraticBezierTo(width * 0.50, height, width, height * 0.70)
12 | ..lineTo(width, 0)
13 | ..lineTo(0, 0)
14 | ..close();
15 |
16 | return path;
17 | }
18 |
19 | @override
20 | bool shouldReclip(CustomClipper oldClipper) {
21 | return false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:quote_sender/Helpers/InternetCheck.dart';
3 | import './LayoutBuilder/ListBuilder.dart';
4 |
5 | void main() {
6 | InternetCheck.check();
7 | runApp(
8 | MaterialApp(
9 | theme: ThemeData(
10 | primaryColor: Colors.deepPurple[600],
11 | brightness: Brightness.dark,
12 | primaryColorDark: Colors.deepPurpleAccent[600]),
13 | home: MyApp(),
14 | ),
15 | );
16 | }
17 |
18 | class MyApp extends StatelessWidget {
19 | @override
20 | Widget build(BuildContext context) {
21 | return ListBuilder();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/lib/painters/SmallCurvePainter.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SmallCurvePainter extends CustomPainter {
4 | @override
5 | void paint(Canvas canvas, Size size) {
6 | var x = size.width;
7 | var y = size.height;
8 |
9 | Paint paint = new Paint()..color = Colors.white24
10 | ..maskFilter = MaskFilter.blur(BlurStyle.solid, 10.0);
11 | Path path = Path()
12 | ..moveTo(0, 0)
13 | ..lineTo(0, y * 0.150)
14 | ..quadraticBezierTo(x * 0.5, y * 0.250, x, y * 0.150)
15 | ..lineTo(x, 0)
16 | ..close();
17 | canvas.drawPath(path, paint);
18 | }
19 |
20 | @override
21 | bool shouldRepaint(CustomPainter oldDelegate) {
22 | return false;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | .vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Exceptions to above rules.
37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
38 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/User.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 |
3 | class User {
4 | String name;
5 | String id;
6 | String gender;
7 |
8 | DocumentReference reference;
9 |
10 | User({this.name, this.id, this.gender});
11 |
12 | factory User.fromSnapshot(DocumentSnapshot snapshot) {
13 | User message = User.fromJson(snapshot.data);
14 | message.reference = snapshot.reference;
15 | return message;
16 | }
17 |
18 | factory User.fromJson(Map json) {
19 | return User(
20 | name: json['name'] as String,
21 | gender: json['gender'] as String,
22 | id: json['id'] as String);
23 | }
24 |
25 | Map toJson() {
26 | return {'name': name, 'id': id, 'gender': gender};
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/MessageLayout/MessageRepo.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:quote_sender/MessageLayout/Message.dart';
3 |
4 | class MessageRepo {
5 | var reference = Firestore.instance.collection("Messages");
6 |
7 | void setReference(var groupId) {
8 | reference = Firestore.instance
9 | .collection("Messages")
10 | .document(groupId)
11 | .collection(groupId);
12 | }
13 |
14 | Stream getStream() {
15 | return reference.orderBy("date", descending: true).snapshots();
16 | }
17 |
18 | Future addMessage(Message message) {
19 | return reference
20 | .document(DateTime.now().millisecondsSinceEpoch.toString())
21 | .setData(message.toJson());
22 | }
23 |
24 | void addMessages() {}
25 | }
26 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/UserUtils.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 |
3 | class UserUtils {
4 | static SharedPreferences _sharedPreferences;
5 |
6 | static Future _initSharedPrefs() async {
7 | _sharedPreferences = await SharedPreferences.getInstance();
8 | }
9 |
10 | static Future saveToSharedPrefs(String key, dynamic value) async {
11 | await _initSharedPrefs();
12 | _sharedPreferences.setString(key, value);
13 | }
14 |
15 | static Future checkIfExists(String key) async {
16 | await _initSharedPrefs();
17 | return _sharedPreferences.containsKey(key);
18 | }
19 |
20 | static Future getFromSharedPrefs(String key) async {
21 | await _initSharedPrefs();
22 | return _sharedPreferences.getString(key);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 |
10 | classpath 'com.google.gms:google-services:4.3.3'
11 | classpath 'com.android.tools.build:gradle:3.5.0'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | }
21 | }
22 |
23 | rootProject.buildDir = '../build'
24 | subprojects {
25 | project.buildDir = "${rootProject.buildDir}/${project.name}"
26 | }
27 | subprojects {
28 | project.evaluationDependsOn(':app')
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/lib/Helpers/InternetCheck.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | class InternetCheck {
4 | static bool isInternetAvailable = false;
5 |
6 | static Future check() async {
7 | bool isConnected = false;
8 | try {
9 | final result = await InternetAddress.lookup('google.com');
10 | if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
11 | print(" connected ");
12 | print(result[0].toString());
13 | isInternetAvailable = true;
14 | isConnected = true;
15 | } else {
16 | print(" internet struck in between ");
17 | isConnected = false;
18 | isInternetAvailable = false;
19 | }
20 | } catch (e) {
21 | print('not connected ' + e.toString());
22 | isInternetAvailable = false;
23 | isConnected = false;
24 | }
25 | return isConnected;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/MessageLayout/Message.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 |
3 | class Message {
4 | String text;
5 | DateTime date;
6 | String idFrom;
7 | String idTo;
8 | DocumentReference reference;
9 |
10 | Message({this.reference, this.text, this.date, this.idFrom, this.idTo});
11 |
12 | factory Message.fromSnapshot(DocumentSnapshot snapshot) {
13 | Message message = Message.fromJson(snapshot.data);
14 | message.reference = snapshot.reference;
15 | return message;
16 | }
17 |
18 | factory Message.fromJson(Map json) {
19 | return Message(
20 | text: json['text'] as String,
21 | date: json['date'] == null ? null : (json['date'] as Timestamp).toDate(),
22 | idFrom: json['idFrom'] as String,
23 | idTo: json['idTo'] as String,
24 | );
25 | }
26 |
27 | Map toJson() {
28 | return {'text': text, 'date': date, 'idFrom': idFrom, 'idTo': idTo};
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/Quote.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 |
3 | class Quote {
4 | String quote;
5 | String author;
6 | DateTime date;
7 | String imageUrl;
8 |
9 | DocumentReference reference;
10 | Quote({this.quote, this.author, this.date, this.reference, this.imageUrl});
11 |
12 | factory Quote.fromSnapshot(DocumentSnapshot snapshot) {
13 | Quote quote = Quote.fromJson(snapshot.data);
14 | quote.reference = snapshot.reference;
15 | return quote;
16 | }
17 |
18 | factory Quote.fromJson(Map json) {
19 | return Quote(
20 | author: json['author'] as String,
21 | date:
22 | json['date'] == null ? null : (json['date'] as Timestamp).toDate(),
23 | quote: json['quote'] as String,
24 | imageUrl: json['imageUrl'] as String);
25 | }
26 |
27 | Map toJson() {
28 | return {
29 | 'quote': quote,
30 | 'date': date,
31 | 'author': author,
32 | 'imageUrl': imageUrl
33 | };
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/painters/CurvePainter.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:ui' as ui;
3 |
4 | class CurvePainter extends CustomPainter {
5 | @override
6 | void paint(Canvas canvas, Size size) {
7 | var width = size.width;
8 | var height = size.height;
9 | Paint paint = Paint();
10 | Paint paint2 = Paint()..color = Colors.white10;
11 | Path path = Path()
12 | ..moveTo(0, 0)
13 | ..lineTo(0, height * 0.40)
14 | ..quadraticBezierTo(width * 0.50, height * 0.60, width, height * 0.40)
15 | ..lineTo(width, 0)
16 | ..lineTo(0, 0)
17 | ..close();
18 |
19 | Path path2 = Path()
20 | ..moveTo(0, 0)
21 | ..lineTo(0, height * 0.43)
22 | ..quadraticBezierTo(width * 0.50, height * 0.63, width, height * 0.43)
23 | ..lineTo(width, 0)
24 | ..lineTo(0, 0)
25 | ..close();
26 |
27 | canvas.drawPath(path, paint);
28 | canvas.drawPath(path2, paint2);
29 | }
30 |
31 | @override
32 | bool shouldRepaint(CustomPainter oldDelegate) {
33 | return false;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:quote_sender/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "714257810914",
4 | "firebase_url": "https://flutterquote-b10fe.firebaseio.com",
5 | "project_id": "flutterquote-b10fe",
6 | "storage_bucket": "flutterquote-b10fe.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:714257810914:android:c841929a9aecaae7b025bb",
12 | "android_client_info": {
13 | "package_name": "com.example.quote_sender"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "714257810914-s6b9o0uga6jod0tb6uquchudk8mor4op.apps.googleusercontent.com",
19 | "client_type": 3
20 | }
21 | ],
22 | "api_key": [
23 | {
24 | "current_key": "AIzaSyA034VAtgTFDHx180mgaPeGliq2y362jDI"
25 | }
26 | ],
27 | "services": {
28 | "appinvite_service": {
29 | "other_platform_oauth_client": [
30 | {
31 | "client_id": "714257810914-s6b9o0uga6jod0tb6uquchudk8mor4op.apps.googleusercontent.com",
32 | "client_type": 3
33 | }
34 | ]
35 | }
36 | }
37 | }
38 | ],
39 | "configuration_version": "1"
40 | }
--------------------------------------------------------------------------------
/lib/LayoutBuilder/ErrorScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_svg/flutter_svg.dart';
3 | import 'package:pull_to_refresh/pull_to_refresh.dart';
4 |
5 | class ErrorScreen extends StatefulWidget {
6 | final Function onRefresh;
7 |
8 | ErrorScreen({this.onRefresh});
9 | @override
10 | _ErrorScreenState createState() => _ErrorScreenState();
11 | }
12 |
13 | class _ErrorScreenState extends State {
14 | RefreshController controller = RefreshController();
15 |
16 | @override
17 | void dispose() {
18 | controller.dispose();
19 | super.dispose();
20 | }
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return SmartRefresher(
25 | controller: controller,
26 | enablePullDown: true,
27 | enablePullUp: false,
28 | onRefresh: widget.onRefresh,
29 | child: Container(
30 | child: Column(
31 | children: [
32 | Spacer(),
33 | Container(height: 400, child: SvgPicture.asset("assets/error.svg")),
34 | Spacer(),
35 | Center(child: Text("Check your internet connection")),
36 | SizedBox(
37 | height: 20,
38 | ),
39 | ],
40 | ),
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/MessageLayout/TextFormBuilder.dart:
--------------------------------------------------------------------------------
1 | import "package:flutter/material.dart";
2 | import 'package:google_fonts/google_fonts.dart';
3 | import '../imported/EnsureVisibleWhenFocused.dart';
4 |
5 | class TextFormBuilder extends StatelessWidget {
6 | String hintText;
7 | Function validator;
8 | Function onSaved;
9 | Icon icon;
10 | TextInputType keybordType;
11 | TextFormBuilder({
12 | this.hintText,
13 | this.validator,
14 | this.onSaved,
15 | this.icon,
16 | this.keybordType,
17 | });
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return Theme(
22 | data: ThemeData(
23 | primaryColor: Colors.purpleAccent,
24 | primaryColorDark: Colors.purpleAccent),
25 | child: TextFormField(
26 | maxLines: 1,
27 | keyboardType: keybordType,
28 | validator: validator,
29 | autocorrect: false,
30 | onSaved: onSaved,
31 | style: GoogleFonts.aBeeZee(color: Colors.white),
32 | decoration: InputDecoration(
33 | hintText: hintText,
34 | hintStyle: GoogleFonts.aBeeZee(color: Colors.grey),
35 | prefixIcon: icon,
36 | border: OutlineInputBorder(
37 | borderSide: BorderSide(width: 1),
38 | gapPadding: 10.0,
39 | borderRadius: BorderRadius.circular(10.0),
40 | ),
41 | ),
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | quote_sender
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
10 |
14 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/UserTile.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 | import 'package:quote_sender/MessageLayout/mainMessageScreen.dart';
5 | import 'package:quote_sender/SimpleAuth/User.dart';
6 |
7 | class UserTile extends StatelessWidget {
8 | final DocumentSnapshot documentSnapshot;
9 | final String currentUserId;
10 | UserTile({this.documentSnapshot, this.currentUserId});
11 | @override
12 | Widget build(BuildContext context) {
13 | User user = User.fromSnapshot(documentSnapshot);
14 | String imagePath =
15 | user.gender == "Male" ? "assets/man.png" : "assets/woman.png";
16 | if (currentUserId == user.id) {
17 | return Container();
18 | }
19 | return Padding(
20 | padding: const EdgeInsets.all(15.0),
21 | child: InkWell(
22 | borderRadius: BorderRadius.circular(10.0),
23 | onTap: () {
24 | Navigator.of(context).push(
25 | MaterialPageRoute(
26 | builder: (BuildContext context) => MainMessageScreen(
27 | userSelected: user,
28 | ),
29 | ),
30 | );
31 | },
32 | child: Ink(
33 | decoration: BoxDecoration(
34 | borderRadius: BorderRadius.only(
35 | bottomRight: Radius.circular(10.0),
36 | topLeft: Radius.circular(10.0),
37 | topRight: Radius.circular(10.0)),
38 | color: Colors.white12,
39 | ),
40 | child: Padding(
41 | padding: const EdgeInsets.all(15.0),
42 | child: Container(
43 | child: Row(
44 | children: [
45 | Image.asset(
46 | imagePath,
47 | height: 40,
48 | ),
49 | SizedBox(
50 | width: 10.0,
51 | ),
52 | Text(
53 | user.name,
54 | style: GoogleFonts.aBeeZee(fontSize: 18),
55 | )
56 | ],
57 | ),
58 | ),
59 | )),
60 | ),
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 | apply plugin: 'com.google.gms.google-services'
28 |
29 | android {
30 | compileSdkVersion 28
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.quote_sender"
43 | minSdkVersion 16
44 | targetSdkVersion 28
45 | versionCode flutterVersionCode.toInteger()
46 | versionName flutterVersionName
47 | multiDexEnabled true
48 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
49 | }
50 |
51 | buildTypes {
52 | release {
53 | // TODO: Add your own signing config for the release build.
54 | // Signing with the debug keys for now, so `flutter run --release` works.
55 | signingConfig signingConfigs.debug
56 | }
57 | }
58 | }
59 |
60 | flutter {
61 | source '../..'
62 | }
63 |
64 | dependencies {
65 | implementation 'com.google.firebase:firebase-analytics:17.2.2'
66 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
67 | testImplementation 'junit:junit:4.12'
68 | androidTestImplementation 'androidx.test:runner:1.1.1'
69 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
70 | }
71 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/UserPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:quote_sender/LayoutBuilder/ListBuilder.dart';
4 | import 'package:quote_sender/SimpleAuth/User.dart';
5 | import 'package:quote_sender/SimpleAuth/UserRepo.dart';
6 | import 'package:quote_sender/SimpleAuth/UserTile.dart';
7 | import 'package:quote_sender/SimpleAuth/UserUtils.dart';
8 |
9 | class UserPage extends StatefulWidget {
10 | @override
11 | _UserPageState createState() => _UserPageState();
12 | }
13 |
14 | class _UserPageState extends State {
15 | UserRepo userRepo;
16 | String currentUserId;
17 |
18 | @override
19 | void initState() {
20 | userRepo = UserRepo();
21 | UserUtils.getFromSharedPrefs("id").then((value) {
22 | setState(() {
23 | currentUserId = value;
24 | });
25 | });
26 | super.initState();
27 | }
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | return Scaffold(
32 | appBar: AppBar(
33 | leading: IconButton(
34 | icon: Icon(Icons.arrow_back),
35 | onPressed: () {
36 | Navigator.pushReplacement(
37 | context,
38 | MaterialPageRoute(
39 | builder: (BuildContext contxt) => ListBuilder()));
40 | },
41 | ),
42 | automaticallyImplyLeading: false,
43 | title: Text(" Registered users "),
44 | ),
45 | body: StreamBuilder(
46 | stream: userRepo.getStream(),
47 | builder: (context, snapshot) {
48 | if (snapshot.hasData) {
49 | return _buildList(context, snapshot.data.documents);
50 | } else if (snapshot.hasError) {
51 | return _errorBuilder();
52 | } else
53 | return Center(child: CircularProgressIndicator());
54 | },
55 | ),
56 | );
57 | }
58 |
59 | _buildList(BuildContext context, List snapshot) {
60 | if (snapshot != null && snapshot.length > 0) {
61 | return ListView.builder(
62 | itemBuilder: (BuildContext context, int index) {
63 | return UserTile(
64 | documentSnapshot: snapshot[index],
65 | currentUserId: currentUserId,
66 | );
67 | },
68 | itemCount: snapshot.length,
69 | );
70 | } else {
71 | return Container();
72 | }
73 | }
74 |
75 | _errorBuilder() {
76 | //TODO: golbalize errror builder
77 | return Container(
78 | child: Center(
79 | child: Text("Some internet issue"),
80 | ),
81 | );
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/LayoutBuilder/CommonListItemBuilder.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 |
5 | import '../Quote.dart';
6 |
7 | class CommonListItemBuilder extends StatelessWidget {
8 | final DocumentSnapshot snapshot;
9 |
10 | CommonListItemBuilder({this.snapshot});
11 |
12 | Widget build(BuildContext context) {
13 | Quote quote = Quote.fromSnapshot(snapshot);
14 | //alata
15 | return Container(
16 | child: Row(
17 | children: [
18 | SizedBox(
19 | width: 20.0,
20 | ),
21 | ClipRRect(
22 | borderRadius: BorderRadius.only(
23 | bottomRight: Radius.circular(20.0),
24 | topLeft: Radius.circular(20.0),
25 | topRight: Radius.circular(20.0)),
26 | child: Stack(
27 | children: [
28 | Container(
29 | child: FadeInImage.assetNetwork(
30 | fadeInCurve: Curves.easeIn,
31 | placeholder: "assets/loadung.gif",
32 | image: quote.imageUrl,
33 | ),
34 | ),
35 | Positioned.fill(
36 | child: Align(
37 | alignment: Alignment.center,
38 | child: Wrap(
39 | direction: Axis.horizontal,
40 | children: [
41 | Padding(
42 | padding: const EdgeInsets.all(8.0),
43 | child: Text(
44 | quote.quote,
45 | overflow: TextOverflow.fade,
46 | maxLines: 5,
47 | style: GoogleFonts.sarala(
48 | fontSize: 22, fontWeight: FontWeight.w500),
49 | ),
50 | ),
51 | ],
52 | ),
53 | ),
54 | ),
55 | Positioned.fill(
56 | child: Align(
57 | child: Padding(
58 | padding: const EdgeInsets.only(bottom: 10.0, right: 10.0),
59 | child: Text(
60 | quote.author,
61 | style: GoogleFonts.kaushanScript(),
62 | ),
63 | ),
64 | alignment: Alignment.bottomRight,
65 | ),
66 | )
67 | ],
68 | ),
69 | ),
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FlutterQuoteSenderApp
2 | A Quote displaying app build using flutter which also supports in app messaging with other users.
3 |
4 |
5 | ## Topics Covered
6 |
7 | * **Firebase Cloud Firestore**
8 | Data regarding the quotes, images and users is received from the firestore. The messages are also saved there.
9 |
10 | * **Messaging through firebase**
11 | The app implements messaging feature as a side feature to help the users communicate. Check out the following [link](https://github.com/AmanNegi/FlutterQuoteSender/blob/master/lib/MessageLayout/buildMessageWidget.dart) for more details.
12 |
13 | * **Shared Prefrences**
14 | Shared prefrences is used to save local user data. eg: User firebase id.
15 |
16 | * **Pull to refresh**
17 | In order to refresh data pull to refresh is implemented using package from ```pub.dart``` check packages used for more details.
18 |
19 | * **Drawer**
20 | Side drawer is used to provide some functionality to the user.
21 |
22 | * **Clipper**
23 | Clipper class is used to create custom shaped widgets. Check out the [link](https://github.com/AmanNegi/FlutterQuoteSender/tree/master/lib/clippers) for more details.
24 |
25 | ## Screenshots of the application
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | ## Plugins/Packages used
39 | * [http](https://pub.dev/packages/http)
40 | * [url_launcher](https://pub.dev/packages/url_launcher)
41 | * [flutter_svg](https://pub.dev/packages/flutter_svg)
42 | * [google_fonts](https://pub.dev/packages/google_fonts)
43 | * [pull_to_refresh](https://pub.dev/packages/pull_to_refresh)
44 | * [intl](https://pub.dev/packages/intl)
45 | * [cloud_firestore](https://pub.dev/packages/cloud_firestore)
46 | * [firebase_core](https://pub.dev/packages/firebase_core)
47 |
48 | ## Authors
49 |
50 | > [**Aman Negi**](https://github.com/AmanNegi) - *Initial work*
51 |
52 |
53 | ## Feel Free to Contract
54 |
55 | * Gmail : akuro787898@gmail.com
56 | * Facebook : https://www.facebook.com/flyWithFlutter
57 |
--------------------------------------------------------------------------------
/lib/LayoutBuilder/SpecialListItemBuilder.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter/rendering.dart';
6 | import 'package:google_fonts/google_fonts.dart';
7 | import 'package:quote_sender/clippers/CurveClipper.dart';
8 | import 'package:quote_sender/painters/CurvePainter.dart';
9 | import '../painters/SmallCurvePainter.dart';
10 | import '../Quote.dart';
11 |
12 | class SpecialListItembuilder extends StatelessWidget {
13 | final DocumentSnapshot snapshot;
14 |
15 | SpecialListItembuilder({this.snapshot});
16 |
17 | Widget build(BuildContext context) {
18 | var height = MediaQuery.of(context).size.height;
19 | Quote quote = Quote.fromSnapshot(snapshot);
20 |
21 | return CustomPaint(
22 | foregroundPainter: SmallCurvePainter(),
23 | child: ClipPath(
24 | clipper: CurveClipper(),
25 | child: Container(
26 | height: height * 0.53,
27 | decoration: BoxDecoration(
28 | image: DecorationImage(
29 | alignment: Alignment.topCenter,
30 | fit: BoxFit.cover,
31 | //"https://image.freepik.com/free-vector/colorful-abstract-background-with-memphis-elements_23-2148468895.jpg"
32 | image: NetworkImage(quote.imageUrl),
33 | ),
34 | ),
35 | child: Column(
36 | children: [
37 | Container(
38 | height: 0.07 * height,
39 | ),
40 | Expanded(
41 | child: ListView(
42 | shrinkWrap: true,
43 | children: [
44 | Center(
45 | child: Padding(
46 | padding: const EdgeInsets.only(
47 | bottom: 60, left: 10.0, right: 10.0),
48 | child: Text(
49 | "‘‘" + quote.quote + "’’",
50 | textAlign: TextAlign.center,
51 | overflow: TextOverflow.fade,
52 | style: GoogleFonts.juliusSansOne(
53 | fontSize: 40, fontWeight: FontWeight.w900),
54 | ),
55 | ),
56 | ),
57 | Padding(
58 | padding: const EdgeInsets.only(bottom: 100),
59 | child: Row(
60 | mainAxisAlignment: MainAxisAlignment.center,
61 | children: [
62 | Text(
63 | quote.author,
64 | style: GoogleFonts.rockSalt(fontSize: 16.0),
65 | ),
66 | ],
67 | ),
68 | ),
69 | ],
70 | ),
71 | ),
72 | ],
73 | ),
74 | )),
75 | );
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/LayoutBuilder/DrawerBuilder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:quote_sender/MessageLayout/mainMessageScreen.dart';
4 | import 'package:quote_sender/SimpleAuth/UserPage.dart';
5 | import 'package:quote_sender/SimpleAuth/UserUtils.dart';
6 | import 'package:quote_sender/SimpleAuth/login.dart';
7 | import 'package:url_launcher/url_launcher.dart';
8 |
9 | class DrawerBuilder extends StatelessWidget {
10 | @override
11 | Drawer build(BuildContext context) {
12 | return Drawer(
13 | child: Column(
14 | children: [
15 | DrawerHeader(
16 | child: Container(),
17 | decoration: BoxDecoration(
18 | color: Theme.of(context).bottomAppBarColor,
19 | ),
20 | ),
21 | ListTile(
22 | onTap: () {
23 | UserUtils.checkIfExists("id").then((value) {
24 | if (value) {
25 | Navigator.of(context).push(
26 | MaterialPageRoute(
27 | builder: (BuildContext context) => UserPage(),
28 | ),
29 | );
30 | } else {
31 | Navigator.of(context).push(
32 | MaterialPageRoute(
33 | builder: (BuildContext context) => Login(),
34 | ),
35 | );
36 | }
37 | });
38 | },
39 | leading: Icon(
40 | Icons.supervised_user_circle,
41 | size: 30,
42 | ),
43 | title: Text("Talk to other users"),
44 | subtitle: Text("Find your friends"),
45 | ),
46 | ListTile(
47 | onTap: () {
48 | _launchURL("asterJoules@gmail.com", "A New Quote",
49 | "Enter your Quote here enter your name also.");
50 | },
51 | leading: Icon(
52 | Icons.assignment,
53 | size: 30,
54 | ),
55 | title: Text("Want your Quote next ?"),
56 | subtitle: Text("Become a contributor"),
57 | ),
58 | Divider(),
59 | ListTile(
60 | leading: Icon(
61 | Icons.feedback,
62 | size: 30,
63 | ),
64 | dense: true,
65 | onTap: () {
66 | _launchURL(
67 | "asterJoules@gmail.com", "Feedback", "Enter your error here");
68 | },
69 | title: Text("Give Feedback"),
70 | subtitle: Text("Report any issues"),
71 | ),
72 | Divider(),
73 | Spacer(),
74 | Divider(
75 | color: Colors.grey,
76 | ),
77 | Text("@AsterJoules", style: GoogleFonts.oswald()),
78 | SizedBox(
79 | height: 10.0,
80 | )
81 | ],
82 | ),
83 | );
84 | }
85 |
86 | _launchURL(String toMailId, String subject, String body) async {
87 | var url = 'mailto:$toMailId?subject=$subject&body=$body';
88 | if (await canLaunch(url)) {
89 | await launch(url);
90 | } else {
91 | throw 'Could not launch $url';
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: quote_sender
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^0.1.2
26 | firebase_core: ^0.4.0+9
27 | cloud_firestore: ^0.13.5
28 | http: ^0.12.1
29 | google_fonts: 1.0.0
30 | flutter_svg: ^0.17.4
31 | shared_preferences: ^0.5.7+3
32 | pull_to_refresh: ^1.5.8
33 | intl: ^0.16.1
34 | url_launcher: ^5.4.10
35 |
36 | dev_dependencies:
37 | flutter_test:
38 | sdk: flutter
39 | flutter_launcher_icons: ^0.7.5
40 |
41 | flutter_icons:
42 | android: true
43 | ios: true
44 | image_path: "assets/quote.png"
45 | # For information on the generic Dart part of this file, see the
46 | # following page: https://dart.dev/tools/pub/pubspec
47 |
48 | # The following section is specific to Flutter.
49 | flutter:
50 | # The following line ensures that the Material Icons font is
51 | # included with your application, so that you can use the icons in
52 | # the material Icons class.
53 | uses-material-design: true
54 | # To add assets to your application, add an assets section, like this:
55 | assets:
56 | - assets/.
57 | # - images/a_dot_ham.jpeg
58 | # An image asset can refer to one or more resolution-specific "variants", see
59 | # https://flutter.dev/assets-and-images/#resolution-aware.
60 | # For details regarding adding assets from package dependencies, see
61 | # https://flutter.dev/assets-and-images/#from-packages
62 | # To add custom fonts to your application, add a fonts section here,
63 | # in this "flutter" section. Each entry in this list should have a
64 | # "family" key with the font family name, and a "fonts" key with a
65 | # list giving the asset and other descriptors for the font. For
66 | # example:
67 | # fonts:
68 | # - family: Schyler
69 | # fonts:
70 | # - asset: fonts/Schyler-Regular.ttf
71 | # - asset: fonts/Schyler-Italic.ttf
72 | # style: italic
73 | # - family: Trajan Pro
74 | # fonts:
75 | # - asset: fonts/TrajanPro.ttf
76 | # - asset: fonts/TrajanPro_Bold.ttf
77 | # weight: 700
78 | #
79 | # For details regarding fonts from package dependencies,
80 | # see https://flutter.dev/custom-fonts/#from-packages
81 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/lib/LayoutBuilder/ListBuilder.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_svg/flutter_svg.dart';
4 | import 'package:google_fonts/google_fonts.dart';
5 | import 'package:pull_to_refresh/pull_to_refresh.dart';
6 | import 'package:quote_sender/Helpers/InternetCheck.dart';
7 | import 'package:quote_sender/LayoutBuilder/ErrorScreen.dart';
8 | import 'package:quote_sender/painters/CurvePainter.dart';
9 | import 'package:quote_sender/DataRepo.dart';
10 | import 'package:quote_sender/LayoutBuilder/CommonListItemBuilder.dart';
11 | import 'package:quote_sender/Quote.dart';
12 | import 'SpecialListItemBuilder.dart';
13 | import './DrawerBuilder.dart';
14 |
15 | class ListBuilder extends StatefulWidget {
16 | @override
17 | _ListBuilderState createState() => _ListBuilderState();
18 | }
19 |
20 | class _ListBuilderState extends State {
21 | DataRepo dataRepo = DataRepo();
22 | var height;
23 | Widget defaultWidget = Container();
24 | bool isInternet = true;
25 |
26 | @override
27 | void initState() {
28 | checkInternetState();
29 | super.initState();
30 | }
31 |
32 | checkInternetState() async {
33 | InternetCheck.check().then((bool isInternet) {
34 | setState(() {
35 | this.isInternet = isInternet;
36 | });
37 | print(" value received in initatate " + isInternet.toString());
38 | });
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | height = MediaQuery.of(context).size.height;
44 | return Scaffold(
45 | resizeToAvoidBottomInset: true,
46 | appBar: AppBar(
47 | //automaticallyImplyLeading: false,
48 | backgroundColor: Colors.black,
49 | title: Text(
50 | "Quotes",
51 | style: GoogleFonts.rockSalt(),
52 | ),
53 | centerTitle: true,
54 | ),
55 | // floatingActionButton: FloatingActionButton(
56 | // onPressed: _addQuote,
57 | // ),
58 | drawer: DrawerBuilder(),
59 | body: CustomPaint(
60 | painter: CurvePainter(),
61 | child: StreamBuilder(
62 | stream: dataRepo.getStream(),
63 | builder: (context, snapshot) {
64 | if (snapshot.hasData) {
65 | if (isInternet) {
66 | return _buildList(context, snapshot.data.documents);
67 | } else {
68 | return ErrorScreen(onRefresh: checkInternetState);
69 | }
70 | } else if (snapshot.hasError ||
71 | snapshot == null ||
72 | snapshot.connectionState == ConnectionState.none) {
73 | return ErrorScreen();
74 | } else
75 | return Center(child: CircularProgressIndicator());
76 | },
77 | )),
78 | );
79 | }
80 |
81 | void _addQuote() {
82 | dataRepo.addQuote(
83 | Quote(
84 | author: "aster",
85 | date: DateTime.now(),
86 | quote: "I'm selfish, impatient and a little insecure.",
87 | imageUrl:
88 | "https://image.freepik.com/free-vector/gradient-green-blue-abstract-geometric-background_23-2148362562.jpg"),
89 | );
90 | }
91 |
92 | Widget _buildList(BuildContext context, List snapshot) {
93 | if (snapshot.length == 0) {
94 | return Container(
95 | child: Center(
96 | child: Text(
97 | " No Items",
98 | style: TextStyle(color: Colors.white),
99 | ),
100 | ),
101 | );
102 | } else {
103 | return Column(children: [
104 | SpecialListItembuilder(
105 | snapshot: snapshot[0],
106 | ),
107 | Spacer(),
108 | _getHorizontalList(snapshot),
109 | ]);
110 | }
111 | }
112 |
113 | _getHorizontalList(List snapshot) {
114 | int length = snapshot.length - 1;
115 | print(snapshot.length.toString());
116 | if (length >= 1) {
117 | return Container(
118 | height: 36 / 100 * height,
119 | child: Column(
120 | children: [
121 | Align(
122 | alignment: Alignment.topLeft,
123 | child: Padding(
124 | padding: const EdgeInsets.only(left: 20.0, bottom: 5.0),
125 | child: Text(
126 | "Old Quotes",
127 | style: GoogleFonts.rockSalt(
128 | fontSize: 16.0,
129 | letterSpacing: 1.5,
130 | decoration: TextDecoration.overline),
131 | ),
132 | ),
133 | ),
134 | Container(
135 | height: 29 / 100 * height,
136 | child: ListView.builder(
137 | scrollDirection: Axis.horizontal,
138 | itemBuilder: (BuildContext context, int index) {
139 | return CommonListItemBuilder(
140 | snapshot: snapshot[index + 1],
141 | );
142 | },
143 | itemCount: length,
144 | ),
145 | ),
146 | ],
147 | ),
148 | );
149 | } else
150 | return Container();
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/lib/imported/EnsureVisibleWhenFocused.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/rendering.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | ///
7 | /// Helper class that ensures a Widget is visible when it has the focus
8 | /// For example, for a TextFormField when the keyboard is displayed
9 | ///
10 | /// How to use it:
11 | ///
12 | /// In the class that implements the Form,
13 | /// Instantiate a FocusNode
14 | /// FocusNode _focusNode = new FocusNode();
15 | ///
16 | /// In the build(BuildContext context), wrap the TextFormField as follows:
17 | ///
18 | /// new EnsureVisibleWhenFocused(
19 | /// focusNode: _focusNode,
20 | /// child: new TextFormField(
21 | /// ...
22 | /// focusNode: _focusNode,
23 | /// ),
24 | /// ),
25 | ///
26 | /// Initial source code written by Collin Jackson.
27 | /// Extended (see highlighting) to cover the case when the keyboard is dismissed and the
28 | /// user clicks the TextFormField/TextField which still has the focus.
29 | ///
30 | class EnsureVisibleWhenFocused extends StatefulWidget {
31 | const EnsureVisibleWhenFocused({
32 | Key key,
33 | @required this.child,
34 | @required this.focusNode,
35 | this.curve: Curves.ease,
36 | this.duration: const Duration(milliseconds: 100),
37 | }) : super(key: key);
38 |
39 | /// The node we will monitor to determine if the child is focused
40 | final FocusNode focusNode;
41 |
42 | /// The child widget that we are wrapping
43 | final Widget child;
44 |
45 | /// The curve we will use to scroll ourselves into view.
46 | ///
47 | /// Defaults to Curves.ease.
48 | final Curve curve;
49 |
50 | /// The duration we will use to scroll ourselves into view
51 | ///
52 | /// Defaults to 100 milliseconds.
53 | final Duration duration;
54 |
55 | @override
56 | _EnsureVisibleWhenFocusedState createState() => new _EnsureVisibleWhenFocusedState();
57 | }
58 |
59 | ///
60 | /// We implement the WidgetsBindingObserver to be notified of any change to the window metrics
61 | ///
62 | class _EnsureVisibleWhenFocusedState extends State with WidgetsBindingObserver {
63 |
64 | @override
65 | void initState(){
66 | super.initState();
67 | widget.focusNode.addListener(_ensureVisible);
68 | WidgetsBinding.instance.addObserver(this);
69 | }
70 |
71 | @override
72 | void dispose(){
73 | WidgetsBinding.instance.removeObserver(this);
74 | widget.focusNode.removeListener(_ensureVisible);
75 | super.dispose();
76 | }
77 |
78 | ///
79 | /// This routine is invoked when the window metrics have changed.
80 | /// This happens when the keyboard is open or dismissed, among others.
81 | /// It is the opportunity to check if the field has the focus
82 | /// and to ensure it is fully visible in the viewport when
83 | /// the keyboard is displayed
84 | ///
85 | @override
86 | void didChangeMetrics(){
87 | if (widget.focusNode.hasFocus){
88 | _ensureVisible();
89 | }
90 | }
91 |
92 | ///
93 | /// This routine waits for the keyboard to come into view.
94 | /// In order to prevent some issues if the Widget is dismissed in the
95 | /// middle of the loop, we need to check the "mounted" property
96 | ///
97 | /// This method was suggested by Peter Yuen (see discussion).
98 | ///
99 | Future _keyboardToggled() async {
100 | if (mounted){
101 | EdgeInsets edgeInsets = MediaQuery.of(context).viewInsets;
102 | while (mounted && MediaQuery.of(context).viewInsets == edgeInsets) {
103 | await new Future.delayed(const Duration(milliseconds: 10));
104 | }
105 | }
106 |
107 | return;
108 | }
109 |
110 | Future _ensureVisible() async {
111 | // Wait for the keyboard to come into view
112 | await Future.any([new Future.delayed(const Duration(milliseconds: 300)), _keyboardToggled()]);
113 |
114 | // No need to go any further if the node has not the focus
115 | if (!widget.focusNode.hasFocus){
116 | return;
117 | }
118 |
119 | // Find the object which has the focus
120 | final RenderObject object = context.findRenderObject();
121 | final RenderAbstractViewport viewport = RenderAbstractViewport.of(object);
122 |
123 | // If we are not working in a Scrollable, skip this routine
124 | if (viewport == null) {
125 | return;
126 | }
127 |
128 | // Get the Scrollable state (in order to retrieve its offset)
129 | ScrollableState scrollableState = Scrollable.of(context);
130 | assert(scrollableState != null);
131 |
132 | // Get its offset
133 | ScrollPosition position = scrollableState.position;
134 | double alignment;
135 |
136 | if (position.pixels > viewport.getOffsetToReveal(object, 0.0).offset) {
137 | // Move down to the top of the viewport
138 | alignment = 0.0;
139 | } else if (position.pixels < viewport.getOffsetToReveal(object, 1.0).offset){
140 | // Move up to the bottom of the viewport
141 | alignment = 1.0;
142 | } else {
143 | // No scrolling is necessary to reveal the child
144 | return;
145 | }
146 |
147 | position.ensureVisible(
148 | object,
149 | alignment: alignment,
150 | duration: widget.duration,
151 | curve: widget.curve,
152 | );
153 | }
154 |
155 | @override
156 | Widget build(BuildContext context) {
157 | return widget.child;
158 | }
159 | }
--------------------------------------------------------------------------------
/assets/error.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/MessageLayout/buildMessageWidget.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 | import 'package:quote_sender/MessageLayout/Message.dart';
5 | import 'package:intl/intl.dart';
6 | import 'package:url_launcher/url_launcher.dart';
7 |
8 | class BuildMessageWidget extends StatelessWidget {
9 | final String currentUserId;
10 | final DocumentSnapshot documentSnapshot;
11 |
12 | BuildMessageWidget(this.documentSnapshot, this.currentUserId);
13 |
14 | var width;
15 | String idTo;
16 | Message message;
17 | String date;
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | message = Message.fromSnapshot(documentSnapshot);
22 | date = DateFormat.jm().format(message.date.toLocal());
23 | idTo = message.idTo;
24 | width = MediaQuery.of(context).size.width;
25 |
26 | return _getWidget();
27 | }
28 |
29 | _getWidget() {
30 | if (idTo != currentUserId) {
31 | return Align(
32 | alignment: Alignment.centerRight,
33 | child: Padding(
34 | padding: const EdgeInsets.only(right: 10.0, top: 10.0),
35 | child: ClipRRect(
36 | borderRadius: BorderRadius.only(
37 | bottomLeft: Radius.circular(20.0),
38 | topLeft: Radius.circular(20.0),
39 | topRight: Radius.circular(20.0),
40 | ),
41 | child: Container(
42 | constraints: BoxConstraints(maxWidth: width * 0.7),
43 | padding: EdgeInsets.only(
44 | top: 15.0,
45 | left: 15.0,
46 | right: 10.0,
47 | bottom: 5.0,
48 | ),
49 | color: Colors.deepPurple[300],
50 | child: Column(
51 | crossAxisAlignment: CrossAxisAlignment.end,
52 | children: [
53 | buildTextWithLinks(message.text),
54 | SizedBox(
55 | height: 5.0,
56 | ),
57 | Text(date,
58 | style: GoogleFonts.aBeeZee(
59 | color: Colors.white54, fontSize: 10)),
60 | ],
61 | ),
62 | ),
63 | ),
64 | ),
65 | );
66 | } else {
67 | return Align(
68 | alignment: Alignment.centerLeft,
69 | child: Padding(
70 | padding: const EdgeInsets.only(left: 10.0, top: 10.0),
71 | child: ClipRRect(
72 | borderRadius: BorderRadius.only(
73 | bottomRight: Radius.circular(20.0),
74 | topLeft: Radius.circular(20.0),
75 | topRight: Radius.circular(20.0),
76 | ),
77 | child: Container(
78 | constraints: BoxConstraints(maxWidth: width * 0.7),
79 | padding: EdgeInsets.only(
80 | top: 15.0,
81 | left: 10.0,
82 | right: 15.0,
83 | bottom: 5.0,
84 | ),
85 | color: Colors.white30,
86 | child: Column(
87 | crossAxisAlignment: CrossAxisAlignment.start,
88 | children: [
89 | buildTextWithLinks(message.text),
90 | SizedBox(
91 | height: 5.0,
92 | ),
93 | Text(date,
94 | style: GoogleFonts.aBeeZee(
95 | color: Colors.white54, fontSize: 10))
96 | ],
97 | ),
98 | ),
99 | ),
100 | ),
101 | );
102 | }
103 | }
104 | }
105 |
106 | Text buildTextWithLinks(String textToLink) => Text.rich(TextSpan(
107 | children: linkify(textToLink), style: GoogleFonts.aBeeZee(fontSize: 16.0)));
108 |
109 | Future openUrl(String url) async {
110 | if (await canLaunch(url)) {
111 | await launch(url);
112 | } else {
113 | throw 'Could not launch $url';
114 | }
115 | }
116 |
117 | const String urlPattern = r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+';
118 | const String emailPattern = r'\S+@\S+';
119 | const String phonePattern = r'[\d-]{9,}';
120 | const String emojiPattern =
121 | r'(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])';
122 |
123 | final RegExp linkRegExp = RegExp(
124 | '($urlPattern)|($emailPattern)|($phonePattern)|($emojiPattern)',
125 | caseSensitive: false);
126 |
127 | WidgetSpan buildEmoteComponent(String text) {
128 | return WidgetSpan(
129 | child: Text(
130 | text,
131 | style: TextStyle(fontSize: 30),
132 | ));
133 | }
134 |
135 | WidgetSpan buildLinkComponent(String text, String linkToOpen) => WidgetSpan(
136 | child: InkWell(
137 | child: Text(text,
138 | style: GoogleFonts.abel(
139 | fontSize: 16.0,
140 | decoration: TextDecoration.underline,
141 | color: Colors.yellow)),
142 | onTap: () => openUrl(linkToOpen),
143 | ));
144 |
145 | List linkify(String text) {
146 | final List list = [];
147 | final RegExpMatch match = linkRegExp.firstMatch(text);
148 | if (match == null) {
149 | list.add(TextSpan(text: text));
150 | return list;
151 | }
152 |
153 | if (match.start > 0) {
154 | list.add(TextSpan(text: text.substring(0, match.start)));
155 | }
156 |
157 | final String linkText = match.group(0);
158 | if (linkText.contains(RegExp(urlPattern, caseSensitive: false))) {
159 | list.add(buildLinkComponent(linkText, linkText));
160 | } else if (linkText.contains(RegExp(emailPattern, caseSensitive: false))) {
161 | list.add(buildLinkComponent(linkText, 'mailto:$linkText'));
162 | } else if (linkText.contains(RegExp(phonePattern, caseSensitive: false))) {
163 | list.add(buildLinkComponent(linkText, 'tel:$linkText'));
164 | } else if (linkText.contains(RegExp(emojiPattern, caseSensitive: false))) {
165 | list.add(buildEmoteComponent(linkText));
166 | } else {
167 | throw 'Unexpected match: $linkText';
168 | }
169 |
170 | list.addAll(linkify(text.substring(match.start + linkText.length)));
171 |
172 | return list;
173 | }
174 |
--------------------------------------------------------------------------------
/lib/MessageLayout/mainMessageScreen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:core';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_svg/flutter_svg.dart';
6 | import 'package:google_fonts/google_fonts.dart';
7 | import 'package:cloud_firestore/cloud_firestore.dart';
8 |
9 | import 'package:quote_sender/MessageLayout/MessageRepo.dart';
10 | import 'package:quote_sender/MessageLayout/buildMessageWidget.dart';
11 | import 'package:quote_sender/SimpleAuth/User.dart';
12 | import 'package:quote_sender/SimpleAuth/UserUtils.dart';
13 | import 'Message.dart';
14 |
15 | class MainMessageScreen extends StatefulWidget {
16 | final User userSelected;
17 |
18 | MainMessageScreen({this.userSelected});
19 | @override
20 | _MainMessageScreenState createState() => _MainMessageScreenState();
21 | }
22 |
23 | class _MainMessageScreenState extends State {
24 | MessageRepo messageRepo;
25 | TextEditingController controller;
26 | final _formKey = GlobalKey();
27 | String messageEntered;
28 | String idFrom;
29 | String idTo;
30 | double bottom;
31 | ScrollController _scrollController = ScrollController();
32 |
33 | @override
34 | void dispose() {
35 | controller.dispose();
36 | _scrollController.dispose();
37 | super.dispose();
38 | }
39 |
40 | @override
41 | void initState() {
42 | messageRepo = MessageRepo();
43 | UserUtils.getFromSharedPrefs("id").then((value) {
44 | setState(() {
45 | idTo = widget.userSelected.id;
46 | idFrom = value;
47 | });
48 | controller = TextEditingController();
49 | String groupId = idFrom + "-" + idTo;
50 | if (idFrom.hashCode <= idTo.hashCode) {
51 | groupId = '$idFrom-$idTo';
52 | } else {
53 | groupId = '$idTo-$idFrom';
54 | }
55 | print(groupId + " the Group id ");
56 | messageRepo.setReference(groupId);
57 | });
58 |
59 | super.initState();
60 | }
61 |
62 | @override
63 | Widget build(BuildContext context) {
64 | return Scaffold(
65 | appBar: AppBar(
66 | title: Text("${widget.userSelected.name}"),
67 | ),
68 | body: Stack(
69 | children: [
70 | _listBuilder(),
71 | Align(
72 | alignment: Alignment.bottomCenter,
73 | child: Container(
74 | color: Colors.white12,
75 | child: Row(
76 | children: [
77 | Expanded(
78 | child: Padding(
79 | padding: const EdgeInsets.all(8.0),
80 | child: Form(
81 | key: _formKey,
82 | child: Theme(
83 | data: ThemeData(
84 | primaryColor: Colors.purpleAccent,
85 | primaryColorDark: Colors.purpleAccent,
86 | ),
87 | child: TextFormField(
88 | validator: (value) {
89 | if (value.isEmpty || value.length < 0) {
90 | return "Enter something..";
91 | }
92 | return null;
93 | },
94 | onSaved: (value) {
95 | setState(() {
96 | messageEntered = value;
97 | });
98 | },
99 | controller: controller,
100 | style: GoogleFonts.aBeeZee(color: Colors.white),
101 | cursorRadius: Radius.circular(20.0),
102 | decoration: InputDecoration(
103 | hintStyle: GoogleFonts.aBeeZee(
104 | color: Colors.white30),
105 | contentPadding: EdgeInsets.all(10.0),
106 | hintText: "Type your message.",
107 | border: UnderlineInputBorder(
108 | borderRadius: BorderRadius.circular(10.0),
109 | borderSide: BorderSide(
110 | width: 5.0, style: BorderStyle.solid),
111 | ),
112 | ),
113 | ),
114 | ),
115 | ),
116 | ),
117 | ),
118 | IconButton(
119 | icon: Icon(Icons.send),
120 | onPressed: () {
121 | if (_formKey.currentState.validate()) {
122 | _formKey.currentState.save();
123 | _formKey.currentState.reset();
124 | messageRepo.addMessage(Message(
125 | date: DateTime.now(),
126 | text: messageEntered,
127 | idFrom: idFrom,
128 | idTo: idTo));
129 | }
130 | },
131 | )
132 | ],
133 | )),
134 | ),
135 | ],
136 | ));
137 | }
138 |
139 | _errorBuilder() {
140 | return Container(
141 | child: Column(
142 | children: [
143 | Spacer(),
144 | SvgPicture.asset("assets/error.svg"),
145 | Spacer(),
146 | Center(child: Text("Check your internet connection")),
147 | SizedBox(
148 | height: 20,
149 | ),
150 | ],
151 | ),
152 | );
153 | }
154 |
155 | _listBuilder() {
156 | return Padding(
157 | padding: EdgeInsets.only(bottom: 80),
158 | child: StreamBuilder(
159 | stream: messageRepo.getStream(),
160 | builder: (context, snapshot) {
161 | if (snapshot.hasData) {
162 | return _buildList(context, snapshot.data.documents);
163 | } else if (snapshot.hasError) {
164 | return _errorBuilder();
165 | } else
166 | return Center(child: CircularProgressIndicator());
167 | },
168 | ),
169 | );
170 | }
171 |
172 | _buildList(BuildContext context, List document) {
173 | print("in _buildList : " + document.length.toString());
174 | if (document.length > 0) {
175 | return ListView.builder(
176 | reverse: true,
177 | controller: _scrollController,
178 | itemBuilder: (BuildContext context, int index) {
179 | return BuildMessageWidget(document[index], idFrom);
180 | },
181 | itemCount: document.length,
182 | );
183 | } else
184 | return Container();
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/lib/SimpleAuth/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_svg/flutter_svg.dart';
4 |
5 | import 'package:quote_sender/Helpers/InternetCheck.dart';
6 | import 'package:quote_sender/LayoutBuilder/ErrorScreen.dart';
7 | import 'package:quote_sender/SimpleAuth/UserPage.dart';
8 | import 'package:quote_sender/SimpleAuth/UserRepo.dart';
9 | import 'package:quote_sender/SimpleAuth/UserUtils.dart';
10 | import '../imported/EnsureVisibleWhenFocused.dart';
11 | import '../MessageLayout/TextFormBuilder.dart';
12 | import 'User.dart';
13 |
14 | class Login extends StatefulWidget {
15 | @override
16 | _LoginState createState() => _LoginState();
17 | }
18 |
19 | class _LoginState extends State {
20 | var _formKey = GlobalKey();
21 | FocusNode focusNode = new FocusNode();
22 | String userName;
23 | var height;
24 | String gender = "Female";
25 | bool isInternet = true;
26 | List genders = ["Female", "Male"];
27 |
28 | @override
29 | void initState() {
30 | checkInternetState();
31 | super.initState();
32 | }
33 |
34 | checkInternetState() async {
35 | InternetCheck.check().then((bool isInternet) {
36 | setState(() {
37 | this.isInternet = isInternet;
38 | });
39 | print(" value received in initatate " + isInternet.toString());
40 | });
41 | }
42 |
43 | @override
44 | Widget build(BuildContext context) {
45 | height = MediaQuery.of(context).size.height;
46 |
47 | return Scaffold(
48 | resizeToAvoidBottomInset: false,
49 | appBar: AppBar(
50 | centerTitle: true,
51 | title: Text("Sign in"),
52 | ),
53 | body: GestureDetector(
54 | onTap: () {
55 | FocusScope.of(context).requestFocus(new FocusNode());
56 | },
57 | child: EnsureVisibleWhenFocused(
58 | focusNode: focusNode, child: _getMainWidgetOnBasisOfInternet()),
59 | ));
60 | }
61 |
62 | _getMainWidgetOnBasisOfInternet() {
63 | if (isInternet) {
64 | return Material(
65 | child: _buildForm(),
66 | );
67 | } else {
68 | return ErrorScreen();
69 | }
70 | }
71 |
72 | _buildForm() {
73 | return Form(
74 | key: _formKey,
75 | child: Column(
76 | children: [
77 | SizedBox(
78 | height: (10 / 100) * height,
79 | ),
80 | Padding(
81 | padding: EdgeInsets.all(20.0),
82 | child: Container(
83 | decoration: BoxDecoration(
84 | color: Colors.white24,
85 | borderRadius: BorderRadius.circular(10.0)),
86 | height: (65 / 100) * height,
87 | child: SingleChildScrollView(
88 | reverse: true,
89 | child: Column(
90 | children: [
91 | Align(
92 | alignment: Alignment.topCenter,
93 | child: Container(
94 | height: height * 0.3,
95 | child: SvgPicture.asset("assets/login.svg"),
96 | ),
97 | ),
98 | Padding(
99 | padding: EdgeInsets.only(
100 | top: 8.0,
101 | left: 8.0,
102 | right: 8.0,
103 | ),
104 | child: TextFormBuilder(
105 | hintText: "Username",
106 | onSaved: (value) {
107 | setState(() {
108 | userName = value;
109 | });
110 | },
111 | validator: (String value) {
112 | if (value.length == 0)
113 | return "Enter a valid username";
114 | return null;
115 | },
116 | icon: Icon(
117 | Icons.text_fields,
118 | color: Colors.white,
119 | ),
120 | keybordType: TextInputType.visiblePassword,
121 | ),
122 | ),
123 | Padding(
124 | padding: const EdgeInsets.all(20.0),
125 | child: DropdownButtonFormField(
126 | onChanged: (value) {
127 | setState(() {
128 | gender = value;
129 | });
130 | },
131 | decoration: InputDecoration(),
132 | hint: Text("Select your gender"),
133 | value: gender,
134 | onSaved: (value) {
135 | setState(() {
136 | gender = value;
137 | });
138 | },
139 | validator: (value) {
140 | if (value == null) {
141 | return "Enter a valid gender";
142 | }
143 | return null;
144 | },
145 | items: genders.map((String value) {
146 | return new DropdownMenuItem(
147 | child: Text(value.toString()),
148 | value: value,
149 | );
150 | }).toList(),
151 | ),
152 | ),
153 | Padding(
154 | padding: EdgeInsets.only(
155 | top: 10.0,
156 | left: 10.0,
157 | right: 10.0,
158 | bottom: MediaQuery.of(context).viewInsets.bottom,
159 | ),
160 | child: ClipRRect(
161 | borderRadius: BorderRadius.circular(15.0),
162 | child: RaisedButton(
163 | child: Text("Sign in"),
164 | onPressed: _onPressed,
165 | color: Colors.deepPurple[700],
166 | ),
167 | ),
168 | ),
169 | ],
170 | ),
171 | ),
172 | ),
173 | ),
174 | ],
175 | ),
176 | );
177 | }
178 |
179 | _onPressed() async {
180 | if (_formKey.currentState.validate()) {
181 | _formKey.currentState.save();
182 |
183 | UserRepo userRepo = UserRepo();
184 | DocumentReference dref =
185 | await userRepo.addUser(User(name: userName, gender: gender));
186 |
187 | User newUser = User(gender: gender, id: dref.documentID, name: userName);
188 | userRepo.updateUser(newUser);
189 |
190 | await UserUtils.saveToSharedPrefs("id", dref.documentID);
191 | Navigator.of(context).pushReplacement(
192 | MaterialPageRoute(
193 | builder: (BuildContext context) => UserPage(),
194 | ),
195 | );
196 | }
197 | }
198 |
199 | @override
200 | void dispose() {
201 | focusNode.dispose();
202 | super.dispose();
203 | }
204 | }
205 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.11"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.5.2"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.5"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.2"
39 | cloud_firestore:
40 | dependency: "direct main"
41 | description:
42 | name: cloud_firestore
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "0.13.5"
46 | cloud_firestore_platform_interface:
47 | dependency: transitive
48 | description:
49 | name: cloud_firestore_platform_interface
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.1.0"
53 | cloud_firestore_web:
54 | dependency: transitive
55 | description:
56 | name: cloud_firestore_web
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "0.1.1+2"
60 | collection:
61 | dependency: transitive
62 | description:
63 | name: collection
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.14.11"
67 | convert:
68 | dependency: transitive
69 | description:
70 | name: convert
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "2.1.1"
74 | crypto:
75 | dependency: transitive
76 | description:
77 | name: crypto
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "2.1.3"
81 | cupertino_icons:
82 | dependency: "direct main"
83 | description:
84 | name: cupertino_icons
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "0.1.3"
88 | firebase:
89 | dependency: transitive
90 | description:
91 | name: firebase
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "7.3.0"
95 | firebase_core:
96 | dependency: "direct main"
97 | description:
98 | name: firebase_core
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "0.4.4+3"
102 | firebase_core_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: firebase_core_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.0.4"
109 | firebase_core_web:
110 | dependency: transitive
111 | description:
112 | name: firebase_core_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "0.1.1+2"
116 | flutter:
117 | dependency: "direct main"
118 | description: flutter
119 | source: sdk
120 | version: "0.0.0"
121 | flutter_launcher_icons:
122 | dependency: "direct dev"
123 | description:
124 | name: flutter_launcher_icons
125 | url: "https://pub.dartlang.org"
126 | source: hosted
127 | version: "0.7.5"
128 | flutter_svg:
129 | dependency: "direct main"
130 | description:
131 | name: flutter_svg
132 | url: "https://pub.dartlang.org"
133 | source: hosted
134 | version: "0.17.4"
135 | flutter_test:
136 | dependency: "direct dev"
137 | description: flutter
138 | source: sdk
139 | version: "0.0.0"
140 | flutter_web_plugins:
141 | dependency: transitive
142 | description: flutter
143 | source: sdk
144 | version: "0.0.0"
145 | google_fonts:
146 | dependency: "direct main"
147 | description:
148 | name: google_fonts
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.0.0"
152 | http:
153 | dependency: "direct main"
154 | description:
155 | name: http
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.12.1"
159 | http_parser:
160 | dependency: transitive
161 | description:
162 | name: http_parser
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "3.1.4"
166 | image:
167 | dependency: transitive
168 | description:
169 | name: image
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.1.4"
173 | intl:
174 | dependency: "direct main"
175 | description:
176 | name: intl
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "0.16.1"
180 | js:
181 | dependency: transitive
182 | description:
183 | name: js
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.6.1+1"
187 | matcher:
188 | dependency: transitive
189 | description:
190 | name: matcher
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.12.6"
194 | meta:
195 | dependency: transitive
196 | description:
197 | name: meta
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "1.1.8"
201 | path:
202 | dependency: transitive
203 | description:
204 | name: path
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "1.6.4"
208 | path_drawing:
209 | dependency: transitive
210 | description:
211 | name: path_drawing
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "0.4.1"
215 | path_parsing:
216 | dependency: transitive
217 | description:
218 | name: path_parsing
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "0.1.4"
222 | path_provider:
223 | dependency: transitive
224 | description:
225 | name: path_provider
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "1.6.9"
229 | path_provider_macos:
230 | dependency: transitive
231 | description:
232 | name: path_provider_macos
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "0.0.4+3"
236 | path_provider_platform_interface:
237 | dependency: transitive
238 | description:
239 | name: path_provider_platform_interface
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "1.0.2"
243 | pedantic:
244 | dependency: transitive
245 | description:
246 | name: pedantic
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "1.8.0+1"
250 | petitparser:
251 | dependency: transitive
252 | description:
253 | name: petitparser
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "2.4.0"
257 | platform:
258 | dependency: transitive
259 | description:
260 | name: platform
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "2.2.1"
264 | platform_detect:
265 | dependency: transitive
266 | description:
267 | name: platform_detect
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "1.4.0"
271 | plugin_platform_interface:
272 | dependency: transitive
273 | description:
274 | name: plugin_platform_interface
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "1.0.2"
278 | pub_semver:
279 | dependency: transitive
280 | description:
281 | name: pub_semver
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "1.4.4"
285 | pull_to_refresh:
286 | dependency: "direct main"
287 | description:
288 | name: pull_to_refresh
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "1.5.8"
292 | quiver:
293 | dependency: transitive
294 | description:
295 | name: quiver
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "2.0.5"
299 | shared_preferences:
300 | dependency: "direct main"
301 | description:
302 | name: shared_preferences
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "0.5.7+3"
306 | shared_preferences_macos:
307 | dependency: transitive
308 | description:
309 | name: shared_preferences_macos
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "0.0.1+9"
313 | shared_preferences_platform_interface:
314 | dependency: transitive
315 | description:
316 | name: shared_preferences_platform_interface
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "1.0.4"
320 | shared_preferences_web:
321 | dependency: transitive
322 | description:
323 | name: shared_preferences_web
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "0.1.2+7"
327 | sky_engine:
328 | dependency: transitive
329 | description: flutter
330 | source: sdk
331 | version: "0.0.99"
332 | source_span:
333 | dependency: transitive
334 | description:
335 | name: source_span
336 | url: "https://pub.dartlang.org"
337 | source: hosted
338 | version: "1.5.5"
339 | stack_trace:
340 | dependency: transitive
341 | description:
342 | name: stack_trace
343 | url: "https://pub.dartlang.org"
344 | source: hosted
345 | version: "1.9.3"
346 | stream_channel:
347 | dependency: transitive
348 | description:
349 | name: stream_channel
350 | url: "https://pub.dartlang.org"
351 | source: hosted
352 | version: "2.0.0"
353 | string_scanner:
354 | dependency: transitive
355 | description:
356 | name: string_scanner
357 | url: "https://pub.dartlang.org"
358 | source: hosted
359 | version: "1.0.5"
360 | term_glyph:
361 | dependency: transitive
362 | description:
363 | name: term_glyph
364 | url: "https://pub.dartlang.org"
365 | source: hosted
366 | version: "1.1.0"
367 | test_api:
368 | dependency: transitive
369 | description:
370 | name: test_api
371 | url: "https://pub.dartlang.org"
372 | source: hosted
373 | version: "0.2.11"
374 | typed_data:
375 | dependency: transitive
376 | description:
377 | name: typed_data
378 | url: "https://pub.dartlang.org"
379 | source: hosted
380 | version: "1.1.6"
381 | url_launcher:
382 | dependency: "direct main"
383 | description:
384 | name: url_launcher
385 | url: "https://pub.dartlang.org"
386 | source: hosted
387 | version: "5.4.10"
388 | url_launcher_macos:
389 | dependency: transitive
390 | description:
391 | name: url_launcher_macos
392 | url: "https://pub.dartlang.org"
393 | source: hosted
394 | version: "0.0.1+7"
395 | url_launcher_platform_interface:
396 | dependency: transitive
397 | description:
398 | name: url_launcher_platform_interface
399 | url: "https://pub.dartlang.org"
400 | source: hosted
401 | version: "1.0.7"
402 | url_launcher_web:
403 | dependency: transitive
404 | description:
405 | name: url_launcher_web
406 | url: "https://pub.dartlang.org"
407 | source: hosted
408 | version: "0.1.1+6"
409 | vector_math:
410 | dependency: transitive
411 | description:
412 | name: vector_math
413 | url: "https://pub.dartlang.org"
414 | source: hosted
415 | version: "2.0.8"
416 | xml:
417 | dependency: transitive
418 | description:
419 | name: xml
420 | url: "https://pub.dartlang.org"
421 | source: hosted
422 | version: "3.5.0"
423 | yaml:
424 | dependency: transitive
425 | description:
426 | name: yaml
427 | url: "https://pub.dartlang.org"
428 | source: hosted
429 | version: "2.2.1"
430 | sdks:
431 | dart: ">=2.7.0 <3.0.0"
432 | flutter: ">=1.12.13+hotfix.5 <2.0.0"
433 |
--------------------------------------------------------------------------------
/assets/login.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.quoteSender;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.quoteSender;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.quoteSender;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------