# Firebase Tutorial for Flutter: Getting Started | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 11, 2020, 11:25am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269 "2020-03-11T11:25:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [March 11, 2020, 11:25am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/1 "2020-03-11T11:25:23Z")

</div>

In this tutorial, you’ll learn how to use Firebase Firestore databases in Flutter by creating a fun app that will help you take care of your pets.

* * *
This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/7426050-firebase-tutorial-for-flutter-getting-started](https://www.raywenderlich.com/7426050-firebase-tutorial-for-flutter-getting-started)

---

<div class="post-metadata">

**Author:** ![destroplayer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/destroplayer/32/81494_2.png) [@destroplayer](https://forums.kodeco.com/u/destroplayer)\
**Post date:** [March 19, 2020, 8:12am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/2 "2020-03-19T08:12:06Z")

</div>

Don’t we need to add `cloud_firestore: ^0.13.4+2` to flutter dependencies?

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [March 19, 2020, 4:20pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/3 "2020-03-19T16:20:35Z")

</div>

There is a section of the article that states:  
" In Android Studio open _pubspec.yaml_ and add `cloud_firestore: ^0.13.0+1` after `flutter_form_builder: ^3.7.2` . Then click _Packages get_ to add the firestore library."

---

<div class="post-metadata">

**Author:** ![colesluggett](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/colesluggett/32/81494_2.png) [@colesluggett](https://forums.kodeco.com/u/colesluggett)\
**Post date:** [July 15, 2020, 5:17am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/4 "2020-07-15T05:17:36Z")

</div>

Trying to build after the step [Add DataRepository to Main](https://www.raywenderlich.com/7426050-firebase-tutorial-for-flutter-getting-started#toc-anchor-012) always gave me the same error. I tried to take the finished the project and set it up as well and it still failed. It seemed to be an issue with pods but I could never track down a solution.

Ever run into this?

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [July 18, 2020, 4:46pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/5 "2020-07-18T16:46:56Z")

</div>

Thanks for finding this. It took me awhile to figure it out. Turns out that the flutter\_form\_builder library depended on the flutter\_chips\_input library which had the problem. I updated the flutter\_form\_builder library to the latest version and the problem went away. Luckily Android Studio will let you know if the versions can be updated. I have:

flutter\_form\_builder: ^3.11.5  
cloud\_firestore: ^0.13.7

---

<div class="post-metadata">

**Author:** ![walshlogic](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/walshlogic/32/92331_2.png) [@walshlogic](https://forums.kodeco.com/u/walshlogic)\
**Post date:** [September 9, 2020, 4:19pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/6 "2020-09-09T16:19:05Z")

</div>

\*\* UPDATE: After a day of playing with this I found a fix within 10 minutes of this post!

Problem with flutter\_form\_builder version. Set to this version. Worked for me with code from the download.

flutter\_form\_builder: ^3.14.0-alpha.2

\*\*\* End Update \*\*\*

First let me say this tutorial has the best look/feel of any tutorial I’ve followed (both free and paid)! The work you put into this project shows. Unfortunately I have a similar issues posted above by colesluggett. From the start after downloading and PubGet the app errors. I have updated the form builder as Kevin suggested and further updated to latest available. I cleaned, doctored, removed Podfile.lock and had it rebuild. Continues to error out  
– event sent after app closed: {id: 0, progressId: null, message: Running “flutter pub get” in begin…}  
event sent after app closed: {id: 0, progressId: null, finished: true}  
Launching lib/main.dart on iPhone 11 Pro Max in debug mode…  
Running pod install…  
Warning: Podfile is out of date  
This can cause issues if your application depends on plugins that do not support iOS.  
See [Developing packages & plugins | Flutter](https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms) for details.  
If you have local Podfile edits you would like to keep, see [Move logic from user project's Podfile to a Ruby script in Flutter tools · Issue #45197 · flutter/flutter · GitHub](https://github.com/flutter/flutter/issues/45197) for instructions.  
To regenerate the Podfile, run:  
rm ios/Podfile

Running Xcode build…  
Xcode build done. 152.9s  
Failed to build iOS app  
Error output from Xcode build:  
↳  
\*\* BUILD FAILED \*\*

Xcode’s output:  
↳  
…/…/…/…/…/…/.pub-cache/hosted/pub.dartlang.org/flutter\_form\_builder-3.13.5/lib/src/fields/form\_builder\_range\_slider.dart:21:9: Error: Type ‘RangeSemanticFormatterCallback’ not found.  
final RangeSemanticFormatterCallback semanticFormatterCallback;  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
…/…/…/…/…/…/.pub-cache/hosted/pub.dartlang.org/flutter\_form\_builder-3.13.5/lib/src/fields/form\_builder\_range\_slider.dart:21:9: Error: ‘RangeSemanticFormatterCallback’ isn’t a type.  
final RangeSemanticFormatterCallback semanticFormatterCallback;  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

```

Could not build the application for the simulator.  
Error launching application on iPhone 11 Pro Max.

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [September 10, 2020, 5:28pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/7 "2020-09-10T17:28:28Z")

</div>

I have found that running `flutter clean` can help too

---

<div class="post-metadata">

**Author:** ![gisesonia](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gisesonia/32/102075_2.png) [@gisesonia](https://forums.kodeco.com/u/gisesonia)\
**Post date:** [November 12, 2020, 2:31am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/8 "2020-11-12T02:31:00Z")

</div>

Hi, great tutorial.  
Any possibility to update or create more tutorials like this about firebase?  
I saw many changes in firebase documentation, if I want to use the new version, still exist Document Reference in the code or change?

---

<div class="post-metadata">

**Author:** ![howardt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/howardt/32/81494_2.png) [@howardt](https://forums.kodeco.com/u/howardt)\
**Post date:** [February 21, 2021, 9:19pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/9 "2021-02-21T21:19:49Z")

</div>

Your tutorial is great.

I believe I ran into 2 minor problems, unrelated to Firebase.

Problem 1: If you don’t change the pet name or note fields from their previous values, they are over-written with null on “Update”. (Just initialize them in initState())  
Problem 2: Adding even one prescription gets you “BOTTOM OVERFLOWED BY X PIXELS”. Just add a SingleChildScrollView.

class \_PetDetailFormState extends State {  
final DataRepository repository = DataRepository();  
final \_formKey = GlobalKey();  
final dateFormat = DateFormat(‘yyyy-MM-dd’);  
String name;  
String type;  
String notes;

@override  
void initState() {  
// TODO set type to pet type

name = widget.pet.name;  
type = widget.pet.type;  
notes = widget.pet.notes;

super.initState();  
}

@override  
Widget build(BuildContext context) {  
return Container(  
padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),  
child: FormBuilder(  
key: \_formKey,  
autovalidateMode: AutovalidateMode.always,  
// autovalidate: true,  
child: SingleChildScrollView(  
padding: EdgeInsets.only(bottom: 15),  
child: Column(

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [February 22, 2021, 2:05am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/10 "2021-02-22T02:05:42Z")

</div>

Thanks so much for the suggestion. Now that I see those changes, they make total sense.

---

<div class="post-metadata">

**Author:** ![wyldebill](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/wyldebill/32/81494_2.png) [@wyldebill](https://forums.kodeco.com/u/wyldebill)\
**Post date:** [March 11, 2021, 5:05am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/11 "2021-03-11T05:05:47Z")

</div>

Any possibility of updating this tutorial? It is very good, but the content is outdated and the samples do not run out of the box. I realize that tech tutorials are moving targets these days as well.

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [March 11, 2021, 5:30am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/12 "2021-03-11T05:30:00Z")

</div>

I will let them know. We’ll have to schedule an update

---

<div class="post-metadata">

**Author:** ![digics](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/digics/32/81494_2.png) [@digics](https://forums.kodeco.com/u/digics)\
**Post date:** [May 5, 2021, 10:07pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/13 "2021-05-05T22:07:11Z")

</div>

Building the begin project before adding code to it on an M1 MacBook fails with an error message from Xcode:

Error output from Xcode build:  
↳  
objc[5936]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x203319160) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1201fc2b8). One of the two will be used. Which one is undefined.  
objc[5936]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x2033191b0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1201fc308). One of the two will be used. Which one is undefined.  
\*\* BUILD FAILED \*\*

Any ideas how to solve?

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [May 5, 2021, 10:46pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/14 "2021-05-05T22:46:19Z")

</div>

I don’t know if this will solve the problem, but my first thing I try is “flutter clean”, “flutter get” and then try again

---

<div class="post-metadata">

**Author:** ![saberhardy](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/saberhardy/32/101506_2.png) [@saberhardy](https://forums.kodeco.com/u/saberhardy)\
**Post date:** [October 12, 2021, 8:00am UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/15 "2021-10-12T08:00:33Z")

</div>

**Hello for every one;**

Thank you so much for your efforts guys, we are appreciating every line you made  
so, i have a suggestion for us :  
Please if you can make an update these projects to null safety because we are learning from this course a lot.  
I hope you take this in consideration, and we can continue learning.  
Honestly, this new feature( **null safety** ) is a **mind-blowing.**  
.  
So thank you so much in advance.  
We hope we can get response soon.  
Thanks for time

---

<div class="post-metadata">

**Author:** ![kevindmoore](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kevindmoore/32/109046_2.png) [@kevindmoore](https://forums.kodeco.com/u/kevindmoore)\
**Post date:** [October 15, 2021, 3:44pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/16 "2021-10-15T15:44:37Z")

</div>

This has been updated! Please see:  
[https://www.raywenderlich.com/26435435-firestore-tutorial-for-flutter-getting-started](https://www.raywenderlich.com/26435435-firestore-tutorial-for-flutter-getting-started)

---

<div class="post-metadata">

**Author:** ![venusatim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/venusatim/32/102075_2.png) [@venusatim](https://forums.kodeco.com/u/venusatim)\
**Post date:** [March 8, 2022, 10:01pm UTC](https://forums.kodeco.com/t/firebase-tutorial-for-flutter-getting-started-raywenderlich-com/101269/18 "2022-03-08T22:01:06Z")

</div>

Hi, I’m new member so apologies if I’m not supposed to post tutorial errors/edit requests here.

So in the book Firestore tutorial for flutter getting started, in the updating the pet model section, I experienced an error with the following code in the pets.dart file:

newPet.reference = snapshot.reference.id;

I had to change it to this code which is also in the final repository folder:

newPet.referenceId = snapshot.reference.id;
