builder static method

TransitionBuilder builder({
  1. bool? maintainState,
  2. int initialTabIndex = 0,
  3. double opacity = 0.9,
  4. DetectorBuilder? detectorBuilder,
  5. List<String> hiddenFields = const [],
  6. LogBucket? logBucket,
  7. HttpBucket? httpBucket,
  8. List<Widget> debugEntries = const [],
})

Convenience builder for WidgetsApp.builder.

Creates the Debug Overlay and puts in on top of the Router/Navigator.

DebugOverlay.enabled controls whether overlays are enabled and usable.

maintainState controls whether the overlay should maintain its state while being invisible to the user, this allows for a quick resume when toggling the overlay while inspecting something.

detectorBuilder allows the injection of a custom detector instead of the default DebugDetector.

hiddenFields specifies a list of fields whose values are hidden throughout the overlay.

Implementation

static TransitionBuilder builder({
  bool? maintainState,
  int initialTabIndex = 0,
  double opacity = 0.9,
  DetectorBuilder? detectorBuilder,
  List<String> hiddenFields = const [],
  LogBucket? logBucket,
  HttpBucket? httpBucket,
  List<Widget> debugEntries = const [],
}) {
  return (context, child) {
    return DebugOverlay(
      maintainState: maintainState,
      initialTabIndex: initialTabIndex,
      opacity: opacity,
      detectorBuilder: detectorBuilder,
      hiddenFields: hiddenFields,
      logBucket: logBucket,
      httpBucket: httpBucket,
      debugEntries: debugEntries,
      child: child ?? const SizedBox.shrink(),
    );
  };
}