Skip to content

Commit

Permalink
added screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-Bharaj committed Aug 30, 2021
1 parent 01c3f1b commit fdfb7c1
Show file tree
Hide file tree
Showing 31 changed files with 91 additions and 51 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,21 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

flutter/ephemeral/

# Visual Studio user-specific files.
*.suo
*.user
*.userosscache
*.sln.docstates

# Visual Studio build-related files.
x64/
x86/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.psbapplications.flashchat"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const kMessageTextFieldDecoration = InputDecoration(

const kMessageContainerDecoration = BoxDecoration(
border: Border(
top: BorderSide(color: Colors.lightBlueAccent, width: 2.0),
top: BorderSide(width: 2.0),
),
);

Expand Down
31 changes: 12 additions & 19 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ class FlashChat extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.light().copyWith(
primaryColor: Colors.blue,
dividerTheme: DividerThemeData(color: Colors.black54),
iconTheme: IconThemeData(color: Colors.black),
),
darkTheme: ThemeData.dark().copyWith(
primaryColor: Colors.blueGrey.shade900,
dividerTheme: DividerThemeData(color: Colors.white),
iconTheme: IconThemeData(color: Colors.white),
),
initialRoute: WelcomeScreen.id,
routes: {
WelcomeScreen.id: (context) => WelcomeScreen(),
Expand All @@ -24,22 +35,4 @@ class FlashChat extends StatelessWidget {
},
);
}
}

/*
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: Text("Hello World"),
),
);
}
}*/
}
63 changes: 46 additions & 17 deletions lib/screens/chat_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flashchat/constants.dart';
import 'package:firebase_auth/firebase_auth.dart';
Expand All @@ -6,6 +7,7 @@ import 'package:cloud_firestore/cloud_firestore.dart';
final _firestore = FirebaseFirestore.instance;
// FirebaseUser? loggedInUser;
User? loggedInUser;

class ChatScreen extends StatefulWidget {
static const String id = 'chat_screen';
@override
Expand Down Expand Up @@ -50,7 +52,7 @@ class _ChatScreenState extends State<ChatScreen> {
}),
],
title: Text('⚡️Chat'),
backgroundColor: Colors.lightBlueAccent,
// backgroundColor: Colors.lightBlueAccent,
),
body: SafeArea(
child: Column(
Expand All @@ -73,19 +75,37 @@ class _ChatScreenState extends State<ChatScreen> {
),
),
FlatButton(
onPressed: () {
messageTextController.clear();
_firestore.collection('messages').add({
'text': messageText,
'sender': loggedInUser!.email,
'time': FieldValue.serverTimestamp(),
});
},
child: Text(
'Send',
style: kSendButtonTextStyle,
),
),
onPressed: () {
messageTextController.clear();
_firestore.collection('messages').add({
'text': messageText,
'sender': loggedInUser!.email,
'time': FieldValue.serverTimestamp(),
});
},
child: Material(
color: Theme.of(context).brightness == Brightness.dark
? Colors.blue.shade900
: Colors.lightBlue,
elevation: 18.0,
borderRadius: BorderRadius.circular(30),
child: Padding(
padding: EdgeInsets.fromLTRB(10, 5, 3, 5),
child: Icon(
Icons.send_rounded,
size: 40.0,
),
),
)
// Text(
// 'Send',
// style: TextStyle(
// color: Theme.of(context).brightness == Brightness.dark ? Colors.blue.shade900 : Colors.lightBlue,
// fontWeight: FontWeight.bold,
// fontSize: 18.0,
// ),
// ),
),
],
),
),
Expand All @@ -100,7 +120,10 @@ class MessagesStream extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StreamBuilder<QuerySnapshot>(
stream: _firestore.collection('messages').orderBy('time',descending: false).snapshots(),
stream: _firestore
.collection('messages')
.orderBy('time', descending: false)
.snapshots(),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Center(
Expand Down Expand Up @@ -161,7 +184,7 @@ class MessageBubble extends StatelessWidget {
sender,
style: TextStyle(
fontSize: 12.0,
color: Colors.black54,
// color: Colors.black54,
),
),
Material(
Expand All @@ -176,7 +199,13 @@ class MessageBubble extends StatelessWidget {
topRight: Radius.circular(30.0),
),
elevation: 5.0,
color: isMe ? Colors.lightBlueAccent : Colors.white,
color: isMe
? Theme.of(context).brightness == Brightness.dark
? Colors.blue.shade900
: Colors.lightBlue
: Theme.of(context).brightness == Brightness.dark
? Colors.white70
: Colors.white,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
child: Text(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
// backgroundColor: Colors.white,
body: ModalProgressHUD(
inAsyncCall: showSpinner,
child: Padding(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/registration_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
// backgroundColor: Colors.white,
body: ModalProgressHUD(
inAsyncCall: showSpinner,
child: Padding(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/welcome_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class _WelcomeScreenState extends State<WelcomeScreen>
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: animation!.value,
// backgroundColor: animation!.value,
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.0),
child: Column(
Expand Down
14 changes: 7 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ packages:
name: cloud_firestore
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.0"
cloud_firestore_platform_interface:
dependency: transitive
description:
name: cloud_firestore_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
version: "5.3.0"
cloud_firestore_web:
dependency: transitive
description:
name: cloud_firestore_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
version: "2.3.0"
collection:
dependency: transitive
description:
Expand Down Expand Up @@ -91,28 +91,28 @@ packages:
name: firebase_auth
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "3.0.0"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
version: "6.0.0"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "3.0.0"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.4.0"
firebase_core_platform_interface:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies:

cupertino_icons: ^1.0.3
animated_text_kit: ^4.2.1
firebase_core: ^1.3.0
firebase_auth: ^2.0.0
cloud_firestore: ^2.3.0
firebase_core: ^1.4.0
firebase_auth: ^3.0.0
cloud_firestore: ^2.4.0
modal_progress_hud_nsn: ^0.1.0-nullsafety-1
# modal_progress_hud: ^0.1.3

Expand Down
Binary file added screenshots/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/22.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/33.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fdfb7c1

Please sign in to comment.