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.
#Flutter #Dart #app