Skip to content

Developer utils to make your life easier; e.g. try handlers to easily find source of bug, help classes for code editor inline tips.

License

Notifications You must be signed in to change notification settings

kek-tech/flutter_dev_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bbb415b · Feb 28, 2023

History

16 Commits
Sep 29, 2022
Oct 5, 2022
Feb 28, 2023
Feb 28, 2023
Sep 5, 2022
Sep 5, 2022
Feb 28, 2023
Sep 28, 2022
Feb 26, 2023
Sep 5, 2022
Feb 28, 2023

Repository files navigation

flutter_dev_utils

Flutter dev utils to make your life easier

Features

  • Sync and async tryCatchHandler

    • Used for state management to ensure you never miss an exception.
  • CallerLogger

    • Built off logger package with functionality to print caller, ignore certain callers, and filter printed logs by caller type
  • Help

    • Stop clicking those purple stackoverflow links! HelpFoo classes can be used for inline code help.

    Alt Text

Usage

CallerLogger

var logger = CallerLogger(
  ignoreCallers: {
    'syncTryCatchHandler', // logs from this function will be ignored
  },
  filter: TypeFilter(
    ignoreTypes: {
      IgnoredClass, // logs from this class will be ignored
    },
    ignoreLevel: Level.warning, // logs of Level.warning and anove will always be shown
  ),
  level: Level.verbose, // show logs of Level.verbose and above
);

See example/main_caller_logger.dart for more info.

tryCatchHandler

syncTryCatchHandler(
      tryFunction: () =>
          jsonDecode('notJson'), // this should throw an exception and print a detailed log
    );

Additional information

Making Changes

  1. Run flutter test
  2. Change version number in pubspec.yaml
  3. Update CHANGELOG.md
  4. Run dart pub publish --dry-run
  5. Run dart pub publish

About

Developer utils to make your life easier; e.g. try handlers to easily find source of bug, help classes for code editor inline tips.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages