talker_bloc_logger

Creator: coderz1093

Last updated:

0 purchases

talker_bloc_logger Image
talker_bloc_logger Images

Languages

Categories

Add to Cart

Description:

talker bloc logger

talker_bloc_logger #
Lightweight and customizable BLoC state management library logger on talker base.
Talker - Advanced exception handling and logging for dart/flutter applications 🚀










Preview #
This is how the logs of your BLoC's event callign and state emits will look in the console

For better understanding how it works check
Web Demo page





Getting started #
Follow these steps to use this package
Add dependency #
dependencies:
talker_bloc_logger: ^4.4.1
copied to clipboard
Usage #
Just set TalkerBlocObserver as Bloc.observer field and it will work
import 'package:talker_bloc_logger/talker_bloc_logger.dart';


Bloc.observer = TalkerBlocObserver();
copied to clipboard
Using with Talker #
You can add your talker instance for TalkerBlocObserver if your app already uses Talker.
In this case, all logs and errors will fall into your unified tracking system
import 'package:talker_bloc_logger/talker_bloc_logger.dart';
import 'package:talker/talker.dart';

final talker = Talker();
Bloc.observer = TalkerBlocObserver(talker: talker);
copied to clipboard
Settings #
This package has a lot of customization options
You can enable/disable somethings events, Bloc creation, changes, closing logs, etc...
Bloc.observer = TalkerBlocObserver(
settings: TalkerBlocLoggerSettings(
enabled: true,
printEventFullData: false,
printStateFullData: false,
printChanges: true,
printClosings: true,
printCreations: true,
printEvents: true,
printTransitions: true,
// If you want log only AuthBloc transitions
transitionFilter: (bloc, transition) =>
bloc.runtimeType.toString() == 'AuthBloc',
// If you want log only AuthBloc events
eventFilter: (bloc, event) => bloc.runtimeType.toString() == 'AuthBloc',
),
);
copied to clipboard
Additional information #
The project is under development and ready for your pull-requests and issues 👍
Thank you for support ❤️

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.