DEV Community

Stanislav Ilin
Stanislav Ilin

Posted on • Edited on

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!

Top comments (8)

Collapse
 
frezyx profile image
Stanislav Ilin

Thank you

Collapse
 
behrjozef profile image
Jozef Behr

Thank you mate for sharing this , New for me.

Collapse
 
arifpateldubaiprestonuk profile image
Arif Patel Dubai Preston UK

πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯

Collapse
 
frezyx profile image
Stanislav Ilin

πŸ‘πŸ‘πŸ‘

Collapse
 
katongole_isaac profile image
katongole Isaac

hi bro whats up, good work thanks

Collapse
 
frezyx profile image
Stanislav Ilin

Thanks 😊