Git Product home page Git Product logo

flash-chat-flutter's Introduction

App Brewery Banner

Flash Chat ⚡️

Our Goal

The objective of this tutorial is to learn how to incorporate Firebase into our Flutter apps. We'll be using Firebase Cloud Firestore as well as the Firebase authentication package to equip our app with a cloud-based NoSQL database and secure authentication methods.

What you will create

We’re going to build a modern messaging app where users can sign up and log in to chat.

Finished App

What you will learn

  • How to incorporate Firebase into your Flutter projects.
  • How to use Firebase authentication to register and sign in users.
  • How to create beautiful animations using the Flutter Hero widget.
  • How to create custom aniamtions using Flutter's animation controller.
  • Learn all about mixins and how they differ from superclasses.
  • Learn about Streams and how they work.
  • Learn to use ListViews to build scrolling views.
  • How to use Firebase Cloud Firestore to store and retrieve data on the fly.

This is a companion project to The App Brewery's Complete Flutter Development Bootcamp, check out the full course at www.appbrewery.co

End Banner

flash-chat-flutter's People

Contributors

angelabauer avatar themuellenator avatar unpublishedworks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flash-chat-flutter's Issues

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x7f

when run with android device
Pixel 4 API 31 ( android-arm64-aarch64 )
this my debug console

F/m.android.phon(10563): runtime.cc:668]   native: #35 pc 00000000000b19a0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264)
F/m.android.phon(10563): runtime.cc:668]   native: #36 pc 000000000005144c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/m.android.phon(10563): runtime.cc:668]   at android.os.HwBlob.getString(Native method)
F/m.android.phon(10563): runtime.cc:668]   at android.hardware.radio.V1_6.SetupDataCallResult.readEmbeddedFromParcel(SetupDataCallResult.java:266)
F/m.android.phon(10563): runtime.cc:668]   at android.hardware.radio.V1_6.SetupDataCallResult.readFromParcel(SetupDataCallResult.java:235)
F/m.android.phon(10563): runtime.cc:668]   at android.hardware.radio.V1_6.IRadioResponse$Stub.onTransact(IRadioResponse.java:6325)
F/m.android.phon(10563): runtime.cc:668]
F/m.android.phon(10563): runtime.cc:676] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x7f
F/m.android.phon(10563): runtime.cc:676]     string: '`�M��'
F/m.android.phon(10563): runtime.cc:676]     input: '0x60 0x05 0x4d 0xf0 <0x7f>'
F/m.android.phon(10563): runtime.cc:676]     in call to NewStringUTF
F/m.android.phon(10563): runtime.cc:676]     from java.lang.String android.os.HwBlob.getString(long)
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Error connecting to the service protocol: failed to connect to http://127.0.0.1:65440/ElxNbg9yDpY=/
Exited (sigterm)

DART version problem

The current Dart SDK version is 3.0.5.

Because clima requires SDK version >=2.12.0 <3.0.5, version solving failed.

183. Registering Users with Firebase using FirebaseAuth

code is exactly matched with the lesson but these two errors came out of nowhere:-

lib/screens/chat_screen.dart:14:3: Error: Type 'FirebaseUser' not found.
FirebaseUser loggedInUser;
^^^^^^^^^^^^
lib/screens/chat_screen.dart:12:7: Error: The non-abstract class '_ChatScreenState' is missing implementations for these members:

  • State.build
    Try to either
  • provide an implementation,
  • inherit an implementation from a superclass or mixin,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class _ChatScreenState extends State {
^^^^^^^^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/widgets/framework.dart:1428:10: Context: 'State.build' is defined here.
Widget build(BuildContext context);
^^^^^
lib/screens/chat_screen.dart:14:3: Error: 'FirebaseUser' isn't a type.
FirebaseUser loggedInUser;
^^^^^^^^^^^^

Firebase registration process not completed

I followed steps to register new user using firebase and
when i click on the register button no thing happens and user not added in firebase.
this message displayed:

I/BiChannelGoogleApi( 2003): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@278608d
W/DynamiteModule( 2003): Local module descriptor class for com.google.firebase.auth not found.
W/GooglePlayServicesUtil( 2003): Google Play Store is missing.

A non-null String must be provided to a Text widget

Having error on 'The Flutter ListView' Video
so the flash chat only 1 data is appearing while the rest is cover by a red error box

`class MessageBubble extends StatelessWidget {
MessageBubble({this.sender, this.text});

final String sender;
final String text;

@OverRide
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
sender,
style: TextStyle(
fontSize: 12.0,
color: Colors.black54,
),
),
Material(
borderRadius: BorderRadius.circular(30.0),
elevation: 5.0,
color: Colors.lightBlueAccent,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
child: Text(
text,
style: TextStyle(
color: Colors.white,
fontSize: 15.0
),
),
),
),
],
),
);
}
}
`

Issues with #16. Authenticating Users with FirebaseAuth

does anyone have the update of this tutorial, this process is old and so my register screen cannot navigate into the chat screen, tried to follow all the processes of migrating and updating deprecated codes but still no avail. I am literally going nuts here.
I keep seeing this in the run Console;
"Ignoring header X-Firebase-Locale because its value was null."
what is this and how do i fix it, better still has anyone passed this tutorial epsiode in 2020, current day. Pleaassse help me, I am new to flutter programming

can't run the starter app

my android studio is unable to run the chat app with the following error

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter build bundle --suppress-analytics --target D:\courses\flash-chat-flutter\lib\main.dart --filesystem-scheme org-dartlang-root --track-widget-creation --compilation-trace-file compilation.txt --depfile D:\courses\flash-chat-flutter\build\app\intermediates\flutter\debug/snapshot_blob.bin.d --asset-dir D:\courses\flash-chat-flutter\build\app\intermediates\flutter\debug/flutter_assets --debug

exception

FileSystemException: FileSystemException: Cannot open file, path = 'D:\courses\flash-chat-flutter\build\app\intermediates\flutter\debug/flutter_assets\packages/cupertino_icons/assets/CupertinoIcons.ttf' (OS Error: The system cannot find the path specified.
, errno = 3)

#0      _File.open.<anonymous closure> (dart:io/file_impl.dart:364:9)
#1      _rootRunUnary (dart:async/zone.dart:1132:38)
#2      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#5      Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#6      Future._completeWithValue (dart:async/future_impl.dart:483:5)
#7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
#8      _rootRun (dart:async/zone.dart:1124:13)
#9      _CustomZone.run (dart:async/zone.dart:1021:19)
#10     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#11     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#13     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

flutter doctor

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.437], locale en-US)
    • Flutter version 1.5.4-hotfix.2 at C:\Users\ahmed\flutter\Sdk
    • Framework revision 7a4c33425d (3 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\ahmed\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: D:\programs\Android\AndroidStudio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.3)
    • Android Studio at D:\programs\Android\AndroidStudio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2019.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.4
    • Flutter plugin version 35.3.3
    • Dart plugin version 191.7141.49

[!] VS Code (version 1.33.1)
    • VS Code at C:\Users\ahmed\AppData\Local\Programs\Microsoft VS Code
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category.

Please Help

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException
: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
    output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 3s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 64.0s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Gradle task assembleDebug failed with exit code 1

Platform exception ,the api key is invalid

Even i have provided the latest json file it is showing platform exception,the api key is invalid during run time.
I have tried everything but nothing help.
Please help.

Exception caught by gesture

The following NoSuchMethodError was thrown while handling a gesture:
The getter 'email' was called on null.
Receiver: null
Tried calling: email
// This is the message that I am getting
Screenshot (83)

Need help to resolve this.

flutter/flutter#62747
Here is the full code I posted on official flutter community

Starter app text color

The app is themed in dark mode, thus the text in the app is white by default. This is problematic because the textfields are on a white background so you can't see the text.

keywords Fireabaseuser cannot be used

I cannot use the keyword firebaseuser and currentuser in the method that is under the chat screen.
If I use the firebaseuser it is striked out as [ info: 'FirebaseUser' is deprecated and shouldn't be used. Deprecated in favor of User. When updating your code it is recommended to namespace your 'firebase_auth' import to avoid class naming conflicts if you already have a 'User' class in your project e.g. import 'package:firebase_auth/firebase_auth.dart' as auth;, User then becomes auth.User.. (deprecated_member_use at [flash_chat] lib\screens\chat_screen.dart:14)]

and for currentuser keyword it says the expression cannot be invoked

Message ordering in chat screen.

the messages do not get ordered in firestore and hence i an=m unable to retrieve them in order to display on the chat screen.

No firebase app

I followed all the steps in firebase configuration, every time I go to the registration page I got this error

"No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.