fwdebug_flutter 1.2.1 copy "fwdebug_flutter: ^1.2.1" to clipboard
fwdebug_flutter: ^1.2.1 copied to clipboard

Flutter debugging libraray, wrapper for talker_flutter, inspector, FWDebug and so on, to facilitate development and testing.

fwdebug_flutter #

Flutter debugging libraray, wrapper for talker_flutter, inspector, FWDebug and so on, to facilitate development and testing.

Screenshot #

[fwdebug_flutter.gif]

Getting Started #

By default, fwdebug_flutter is available in all modes. If you want to enable it only in debug mode, you can set it at startup as follows:

FwdebugFlutter.isEnabled = kDebugMode;

In addition, in order to make iOS FWDebug only effective in debug mode, you need to add the following code between target 'Runner' do and end in ios/Podfile:

pod 'FWDebug', :configurations => ['Debug']

1. inspector #

Initialize the fwdebug_flutter inspector, for example:

Widget build(BuildContext context) {
  return MaterialApp(
    ...
    builder: (context, child) {
      return FwdebugFlutter.inspector(child: child!);
    },
  );
}

2. navigatorObserver #

Register the fwdebug_flutter navigatorObserver, for example:

Widget build(BuildContext context) {
  return MaterialApp(
    ...
    navigatorObservers: [FwdebugFlutter.navigatorObserver],
  );
}

3. intercept #

Forward Dio requests to fwdebug_flutter, for example:

final dio = Dio();
FwdebugFlutter.intercept(dio);
// dio.interceptors.add(FwdebugFlutter.interceptor);

4. systemLog #

Record logs to fwdebug_flutter, for example:

FwdebugFlutter.debug('This is a system debug log');
// FwdebugFlutter.info('This is a system info log');
// FwdebugFlutter.warning('This is a system warning log');
// FwdebugFlutter.error('This is a system error log');
// FwdebugFlutter.systemLog('This is a system debug log');

5. customLog #

Record custom logs to fwdebug_flutter, for example:

FwdebugFlutter.customLog('This is a custom debug log');
// FwdebugFlutter.customLog('This is a custom info log', level: LogLevel.info);
// FwdebugFlutter.customLog('This is a custom warning log', level: LogLevel.warning);
// FwdebugFlutter.customLog('This is a custom error log', level: LogLevel.error);

6. toggle #

Toggle fwdebug_flutter to show or hide, for example:

FwdebugFlutter.toggle();

7. registerEntry #

Register custom entry to fwdebug_flutter, for example:

FwdebugFlutter.registerEntry(
    'entry',
    GestureDetector(
        onTap: () { ... }, 
        child: Icon(icon, color: Colors.blue, size: 20),
    ),
);

8. registerInfo #

Register custom info to fwdebug_flutter, for example:

FwdebugFlutter.registerInfo('custom', () { ... });

9. registerUrl #

Register custom url to fwdebug_flutter, for example:

FwdebugFlutter.registerUrl('/custom');
// FwdebugFlutter.registerUrl('/custom', (url) { ... });

10. openUrl #

Register opening URL of fwdebug_flutter, for example:

FwdebugFlutter.openUrl((url) { ... });
1
likes
0
points
146
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter debugging libraray, wrapper for talker_flutter, inspector, FWDebug and so on, to facilitate development and testing.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

device_info_plus, dio, flutter, inspector, native_dio_adapter, package_info_plus, plugin_platform_interface, shared_preferences, talker, talker_dio_logger, talker_flutter, talker_logger

More

Packages that depend on fwdebug_flutter

Packages that implement fwdebug_flutter