Instabug Flutter Modular
An add-on for the Instabug Flutter SDK that provides screen loading support for Flutter Modular v5.
Installation
- Add
instabug_flutter_modularto yourpubspec.yamlfile.
dependencies:
instabug_flutter_modular:
- Install the package by running the following command.
flutter pub get
Usage
- Wrap your
AppParentModuleinsideInstabugModule:
void main() {
//...
runApp(
ModularApp(
module: InstabugModule(AppModule()),
child: const MyApp(),
),
);
}
- Add
InstabugNavigatorObserverto your navigation observers list:
@override
Widget build(BuildContext context) {
return MaterialApp.router(
routeInformationParser: Modular.routeInformationParser,
routerDelegate: Modular.routerDelegate
..setObservers([InstabugNavigatorObserver()]),
// ...
);
}