Proper Error Handling in Flutter & Dart (#1 - Principles)

preview_player
Показать описание
📗 Learn from the written tutorial & get the code 👇👇

🎯 The biggest Flutter conference in Europe:

📧 Get Flutter news 📰 and resources:

👨‍💻 Do you write good code? Find out now!

As much as we'd all like to close our eyes and pretend that errors don't exist, we still have to deal with exceptions on a daily basis. Modern languages, including Dart, support exception throwing and catching. However, if you've developed apps for some time you may have become frustrated with this special flow of errors in the program. Is there a way to return errors just like you return regular values while keeping the code maintainable?

This two-part tutorial series will show you how to deal with errors properly. In the first part, you're going to learn the best practices of classic error handling, using try-catch blocks. The second part will introduce powerful concepts from functional programming that will make handling errors even more streamlined.

Go to my website for more information, code examples, and articles:

Follow me on social media:
Рекомендации по теме
Комментарии
Автор

Thanks Reso Coder!! I got my error handling working using your video and GetX package. You are awesome!!!

ronaldoolesco
Автор

dude you are a genius. I have never seen anyone teach those things. Thanks alot man

PasinduBroomer
Автор

Thank you for the tutorial, it helped me a lot!!

Manudoido
Автор

Thank you so much for this tutorial. It helped me a lot 🙂

shakilsarwar
Автор

Thank you. I need to see this type of solution without state management

quicksketch
Автор

Thanks Reso. You are handling specific exceptions. What about handling the other exceptions? Is the strategy in the above examples to let the App crash and show the default error widget. Please clarify.

kirangicool
Автор

Is there a tutorial you did that shows what VS Code plugins do you use? xD
they are really helpful!

ziyadmansy
Автор

28:30 "Your memory is unreliable"
So true 😪

sharbelokzan
Автор

Would have been nice to cover HTTP errors that doesn't throw but return a body with status code not 200. Do you throw in the Try block? What do you throw exactly?

LjaDjXQKeymSDxh
Автор

Is it possible to use the error as a trigger? I want to use the HttpExeption (401) as a trigger to display a bottomSheet, so the user knows to login

Trang
Автор

Is it a bad practice to return a Future.error with our custom message instead of a Failure object ?

alban.l
Автор

How to make indicator rulers, like the one you have in your vscode? Is there any plugin or setting to do that?

muhammadvikral
Автор

How can i user error handling with Riverpod and ?

hammadpervez
Автор

Do anyone the extension to show those pretty arrows?

sergioestebanbarraganmunoz
Автор

Which extension you are using for dart code coloring???

WikkiOnIlluminati
Автор

how do you add emoji in code? is that a package?

martinrupertbulquerin
Автор

Hi brother please a complete video on square inapp payments please

usamaqureshi