Flutter debugging libraray, wrapper for talker_flutter, inspector, FWDebug and so on, to facilitate development and testing.
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;
Initialize the fwdebug_flutter inspector, for example:
Widget build(BuildContext context) {
return MaterialApp(
...
builder: (context, child) {
return FwdebugFlutter.inspector(child: child!);
},
);
}
Register the fwdebug_flutter navigatorObserver, for example:
Widget build(BuildContext context) {
return MaterialApp(
...
navigatorObservers: [FwdebugFlutter.navigatorObserver],
);
}
Forward Dio requests to fwdebug_flutter, for example:
final dio = Dio();
FwdebugFlutter.intercept(dio);
// dio.interceptors.add(FwdebugFlutter.interceptor);
Record logs to fwdebug_flutter, for example:
FwdebugFlutter.systemLog('This is a system log');
Record custom logs to fwdebug_flutter, for example:
FwdebugFlutter.customLog('This is a custom log');
Toggle fwdebug_flutter to show or hide, for example:
FwdebugFlutter.toggle();
Register custom entry to fwdebug_flutter, for example:
FwdebugFlutter.registerEntry(
'entry',
GestureDetector(
onTap: () { ... },
child: Icon(icon, color: Colors.blue, size: 20),
),
);
Register custom info to fwdebug_flutter, for example:
FwdebugFlutter.registerInfo('custom', () { ... });
Register custom url to fwdebug_flutter, for example:
FwdebugFlutter.registerUrl('/custom');
// FwdebugFlutter.registerUrl('/custom', (url) { ... });
Register opening URL of fwdebug_flutter, for example:
FwdebugFlutter.openUrl((url) { ... });