How to handle dart application exceptions ?

frezyx

Stanislav Ilin

Posted on August 30, 2022

How to handle dart application exceptions ?

Talker - package to handle dart application exceptions.

šŸš€ The main goal of the project provide ability to understand where the error occurs in a short time
āœ… Can work with different state managements
āœ… Can work with any crash reporting tool (Firebase Crashlytics, Sentry, Your own, etc)
āœ… Flutter app logs UI output at screen
āœ… Integrated logs and exceptions history
āœ… Showing UI exception alerts

Easy to use

You can use Talker instance everywhere in your app
Simple and concise syntax will help you with this

final talker = Talker();
// Handle exceptions and errors
try {
  // your code...
} on Exception catch (e, st) {
    talker.handle(e, st, 'Exception with');
}

// Log your app info
talker.info('App is started');
talker.critical('āŒ Houston, we have a problem!');
talker.error('šŸšØ The service is not available');
Enter fullscreen mode Exit fullscreen mode

More examples you can get here

Customization

Talker package has a lot of customizations like:
āœ… Custom logs with any color and message
āœ… Logs history (contains all application info)
āœ… Custom Filters, Formatters, outputs
āœ… Observers for making custom logic
āœ… Data stream to handle logs in any point of code

I am launching a series of articles about this technology.
In each new article I will talk about a certain feature of this approach to error handling in the Flutter/dart application

šŸ˜Ž Go to the GitHub repository page!
šŸ„µ Here you can see beautiful examples of usage and code snippets.

Show some ā¤ļø and star the repo to support the project!

šŸ’– šŸ’Ŗ šŸ™… šŸš©
frezyx
Stanislav Ilin

Posted on August 30, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related