r/FlutterDev • • Jan 02 '24

Discussion Exhausted with Flutter

I just started learning flutter and it is exhausting me. I have been stuck to link with Firebase and it has been getting over my mind for the last two days. It gives errors on everything I try. I think I have to give up. Please let me know if one of you has a good tutorial or way to cope with this. Thanks

Edit: I am tryna learn flutter from freecodecamp crash course and trying to follow them integrating firebase for flutter

1 Upvotes

76 comments sorted by

27

u/Schnausages Jan 02 '24

i swear people are trying to sprint before they can walk and then coming here saying they quit

9

u/HeadConclusion6915 Jan 02 '24

Haha lol i was so fed up sitting for 6 hours in front of my laptop but now I'm feeling great and will continue

4

u/[deleted] Jan 03 '24

Try the pompodoro technique. Regular movement helps a shit ton with shaking brain fog

3

u/dostick Jan 03 '24

yes, that should be a part of all Flutter tutorials: when frustrated don't seek help about Flutter. the problem is YOU.

2

u/HeadConclusion6915 Jan 04 '24

Ok I'll keep that in mind 😭

9

u/ercantomac Jan 02 '24

That's the spirit👍🏻

2

u/charithasds Jan 03 '24

Exactly, I have been off again on again with Flutter back from 2020 and I love to start it all over with my side projects with all the new improrovements it brings. Never been a dull ride.

17

u/boing_boing_splat Jan 02 '24

There's a bunch of advice here about steering clear from firebase but you've still not really given any details of what it is you're trying to do. Sometimes changing technology or framework can add MORE problems than they solve if you're not tackling the underlying issue.

Can you give us a bit more information?

3

u/HeadConclusion6915 Jan 02 '24

I'm tryna follow freecodecamp tutorial to learn flutter and he's using firebase for auth. So I'm trying to do the same but catch up so many errors every time I debug the code. I just wanna ask if there's any good tutorial of how it will work

5

u/boing_boing_splat Jan 02 '24

Cool sorry if my reply was snarky! What errors are you finding?

Freecodecamp is generally pretty good. It might be a really simple setup issue. Don't lose heart!

3

u/[deleted] Jan 03 '24

That’s pretty old. Check the flutter examples at the Firebase site.

2

u/Cattyto Jan 02 '24

Hey there, concerning the advice you mentioned about steering from Firebase, are they related to big projects or just side projects. I plan on using Firebase storage for a simple link saver app. Thanks!

5

u/towcar Jan 03 '24

My understanding is that firebase can be a little bulky on a project, some people don't care for Google and want more independent solutions. There are also scenarios (like any tool) where you can accidentally rack up a large bill. Firestore database is one that can be bad if a developer is not diligent.

However it is very popular, I myself have been using firebase for years on multiple projects, both large and small. It's great at so many things that it becomes preferable to use as an all-in-one solution, rather than adding a ton of different platforms. I doubt you'll have any issues using it.

1

u/Cattyto Jan 27 '24

Thanks for your response. Did your write a Data layer just incase you have to migrate? like a previous user suggested

2

u/towcar Jan 27 '24

Did your write a Data layer just incase you have to migrate?

I did, but not for migration reasons.

I've worked with firebase enough that I am pretty confident with my math estimations on potential billing costs over time. They do have some pricing tools to make it easier. Knowing your own project plans in detail helps quite a bit.

I think I know what comment you are referring to. I simply disagree with that comment about avoiding firestore/realtime database. With some of these projects, maybe if they became multi-million dollar businesses, then migration would be on the table. If someone thinks they need to migrate within a year because of costs, they either coded their app poorly or didn't properly evaluate firebase for more than 10 minutes. Same goes with any backend server/storage solutions.

1

u/Cattyto Jan 28 '24

I dont know how to go about the migration process right now but i was just trying to get thing right concerning the backend of my app before choosing one, i might go with Supabase and if a migration is needed, that would be a future problem.

Is your data layer connected to firebase in a way that makes it easier for you to switch to a SQL database later on (Just an example) ? and how did you go about it if firebase/firestore is not a relational database

3

u/kidfromtheast Jan 03 '24 edited Jan 03 '24

Avoid:

  1. Firebase Firestore / Firebase Realtime Database, Note:

    1. For proof of concept product, you can use this. But, as a prequisite:

      1. You have to use Interface for the Data layer, so you can migrate from Firebase to on premise MySQL / MongoDB in the future once you need scale.

      2. If you don't, then prepare for an expensive monthly bill.

  2. Cloud Function.

Use:

  1. Google Analytics / Firebase Analytics.

  2. Remote Config.

4

u/Puzzleheaded_Mud8889 Jan 04 '24

This should read I AVOID

1

u/Cattyto Jan 27 '24

What about superbase?, have you tried it out?. I am trying to use it for a new project.

2

u/kidfromtheast Jan 27 '24 edited Jan 27 '24

I do not know about superbase and I have not tried it out.

In my honest opinion, use what you good at and confident at. A little more expensive is ok as long as you are confident with it.

I would not use Superbase or other providers. If I must chose providers, here's my list: GCP, AWS, Azure or Alibaba Cloud because:

  1. They have data centers on my country. So, latency will be minimal.

  2. They have SQL and NoSQL offerings. I would always choose SQL over NoSQL unless I have good reason to use NoSQL.

  3. They have other offerings such as GPU, which we use to train CNN model for our clients.

  4. They offer generous credits. Especially if you are a startup funded by VC. And you kind of to use them because VC told you so.

1

u/Cattyto Jan 27 '24

Nice take, at the end it boils down to being confident with the tool :). Thanks man and have a nice weekend!

7

u/[deleted] Jan 02 '24

Can you provide details on what you’re trying to achieve?

0

u/HeadConclusion6915 Jan 02 '24

I was watching tutorial of flutter from freecodecamp on yt and following the guy to save user auth on firebase.

2

u/Puzzleheaded_Mud8889 Jan 03 '24

For what it's worth, most libraries on pub.dev will have some errors.

Additionally, Firebase - meh, you won't find many large production apps using Firebase imo. Amplify is ok, although you will definitely run into bugs!

If you just want to get started, you can do so in 10 minutes with this: https://aws.amazon.com/getting-started/hands-on/build-flutter-mobile-app-part-one/

1

u/Flaky-Car4565 Jan 03 '24

I'm just using Firebase for the first time, but overall it seems like it's been quicker to set up and fewer errors than I ran into with Amplify

0

u/HeadConclusion6915 Jan 03 '24

Can I do it with azure? I've it's subscription and I was learning azure too

1

u/Puzzleheaded_Mud8889 Jan 04 '24

Probably, but you will prob need to write your own controllers with Riverpod which is intermediate to advanced. Go Amplify of Firebase if you are just getting started.

2

u/NoMansSkyWasAlright Jan 02 '24

What was the year that that video was put out?

2

u/this_is_a_long_nickn Jan 02 '24

Hard to say anything with confidence without more info, but - just saying - could not be the (old?) pub get bug that it fetched ancient firebase deps, which of course create gazillions of compilation errors? As a quick check, compare what you have as pub spec against the published version numbers.

PS- I’m not an expert on firebase, but I remember that biting people’s ass.

16

u/esDotDev Jan 02 '24

Firebase integration with Flutter is a giant complicated mess. It also kills the cross-platform story for your app as many of the firebase libs are not supported on web or desktop. Not to mention what it does to your build / compile times on iOS :'(

I'd look into other solutions like supabase which are implemented in pure dart, which makes them much less flaky / complicated and has virtually no impact on your build times or supported platforms: https://supabase.com/

9

u/MadThad762 Jan 02 '24

I also recommend checking out supabase. I connected it to my flutter app in no time and I’m very new to flutter.

1

u/HeadConclusion6915 Jan 02 '24

alright thanks

10

u/or9ob Jan 02 '24

Huh. I am an experienced engineer, but otherwise brand new to Flutter, Firebase and app development (I was a backend dev).

I was to set up Firebase with Flutter, just following the Firebase docs within like half a day.

3

u/esDotDev Jan 02 '24

One of those things where if everything goes well then all is good, but if anything doesn't work, it can be a multi-day exercise of banging your head against the keyboard. You're basically adding a few million lines of C++ code to your app and crossing your fingers that you don't hit any compilation issues.

1

u/mdausmann Jan 02 '24

+1 for supabase I got mine working ok for email and social login. I did however need to use an additional library to get a nice UI for the login. It worked ok but the project wasn't from the core team so got broke by some updates.

1

u/HeadConclusion6915 Jan 03 '24

Its docs and official tutorials aren't so much clear

2

u/KaiN_SC Jan 02 '24

Its easy to set up these days even I dont like Firebase before of other reasons but you are right, it kills multi platform.

Im tired of all these half baked platforms and sticked with a Azure for my last project and its great. Using your favorite backend framework from your day job is also way better and you basically have no limitations.

My app runs on all platforms and is released on all except the Apples ones but thats for other reasons.

0

u/HeadConclusion6915 Jan 02 '24

Is integration of flutter with ms azure is good? I have some experience with azure and I guess it will work for me.. if it's easy

5

u/[deleted] Jan 02 '24

Use CLI, integrating Firebase manually is guaranteed to go wrong.

1

u/HeadConclusion6915 Jan 03 '24

Then what to use?

1

u/[deleted] Jan 03 '24

1

u/HeadConclusion6915 Jan 03 '24

I've tried this video and configured everything according to it but the problem lying is when i enter flutter fire configure, it shows 0 projects found. I've tried keeping the CLI control in my project folder using cd command and also tried keeping it inside the project folder but it always shows 0 projects found

4

u/Kardon403 Jan 02 '24

You can read tutorials but follow the actual code examples from firebase.google.com since they’re the most up to date.

1

u/HeadConclusion6915 Jan 03 '24

I followed firebase official website tutorial yesterday but no luck with that

1

u/Kardon403 Jan 03 '24

Why? Is your development environment not setup correctly?

2

u/tommyboy11011 Jan 02 '24

Are you going to be running a backend? I use php/mysql and handle my own customer logins no different then a website would.

1

u/HeadConclusion6915 Jan 03 '24

I'm just learning flutter and nothing else. I'm not doing any real time projects but hope so will start in a month or so

1

u/tommyboy11011 Jan 03 '24

Skip the firebase then and just continue on. I got my start watching a yt channel called learnflutterwithme. Simple easy to understand English.

2

u/Puzzleheaded_Mud8889 Jan 03 '24

What were you doing before you learned Flutter? If you know React, which tbh, everyone should know React, you should be able to learn it in a few days.

This video was pretty good: https://www.youtube.com/watch?v=VPvVD8t02U8

I watched 4 hours and wrote my first app the following week.

If you are new to programming, I would honestly start with something easier like React. You'll be able to use it anywhere, and Flutter is a breeze afterward.

2

u/HeadConclusion6915 Jan 03 '24

I I'm working on cpp in university and dart is almost the same. You can say I want to learn a side skill for freelancing

2

u/Puzzleheaded_Mud8889 Jan 04 '24

Nice. I have found it to be pretty good. The caliber of apps you can make cross platform is pretty impressive.

1

u/HeadConclusion6915 Jan 04 '24

What app should I build first for my best practice after learning flutter?

2

u/searayman Jan 03 '24

Honestly take a look at the official documentation for most up to date. And work with Google Bard or Chat GPT to ask it to explain things you dont understand.

1

u/HeadConclusion6915 Jan 03 '24

Yeah these things help a lot. Thanks for suggesting

2

u/[deleted] Jan 06 '24

You can visit flutter firebase docs for any implementations related to firebase. They might help you.

1

u/HeadConclusion6915 Jan 06 '24

thanks

2

u/[deleted] Jan 06 '24

It's normal to feel this way. Good luck bro

40

u/Raul_U Jan 02 '24

Just try to avoid old tutorials Flutter and Firebase are always improving in the past most of my errors were due I was following old tutorials

3

u/Larkonath Jan 03 '24

This is a big problem with Flutter: if you leave it a couple of months, when you come back nothing compile anymore.

It doesn't feel as V3 but Beta 0.5

They have to stop the churn and start making it backward compatible.

1

u/morning_mushroom Jan 03 '24

I have been setting up push notifications with OneSignal for two weeks, why are you complaining?

1

u/HeadConclusion6915 Jan 03 '24

Wow bro u got such a dedication 😅👏👏👏

5

u/[deleted] Jan 02 '24

I'd try to avoid firebase

1

u/another_codeguy Jan 03 '24

The way i learned flutter was to start with fireship's introduction to flutter, then following through freecodecamp's instagram clone, but it has been 2-3 years since the video was published, so there are errors after updates. For me it cleared basics than i learned from various sites like flutters own documentation, geeksforgeeks, stackoverflow etc.

1

u/mattgwriter7 Jan 08 '24

I would try Flutter tutorials that don't use Firebase. Lots to learn in Flutter without needing it at all.

2

u/[deleted] Jan 03 '24 edited Jan 03 '24

[removed] — view removed comment

1

u/HeadConclusion6915 Jan 03 '24

I guess if it's simple, it will be easy to learn for a newbie like me.. but I'll shift to some other platform once i start building real time projects

2

u/[deleted] Jan 03 '24

[removed] — view removed comment

2

u/HeadConclusion6915 Jan 03 '24

Yeah I saw the tutorials are from roughly 2 years ago😅😅😂

0

u/[deleted] Jan 03 '24

[deleted]

1

u/HeadConclusion6915 Jan 04 '24

Yeah it is helping me alot, writing configurations for my android phone connection to teach me the row column model, it does it all