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