Skip to content

Instabug/instabug_flutter_modular

Repository files navigation

Instabug Flutter Modular

Pub Twitter

An add-on for the Instabug Flutter SDK that provides screen loading support for Flutter Modular v5.

Installation

  1. Add instabug_flutter_modular to your pubspec.yaml file.
dependencies:
  instabug_flutter_modular:
  1. Install the package by running the following command.
flutter pub get

Usage

  1. Wrap your AppParentModule inside InstabugModule:
void main() {
  //...
  
  runApp(
    ModularApp(
      module: InstabugModule(AppModule()),
      child: const MyApp(),
    ),
  );
}
  1. Add InstabugNavigatorObserver to your navigation observers list:
@override
Widget build(BuildContext context) {
  return MaterialApp.router(
    routeInformationParser: Modular.routeInformationParser,
    routerDelegate: Modular.routerDelegate
      ..setObservers([InstabugNavigatorObserver()]),

    // ...
  );
}