wrap static method

Widget wrap(
  1. Widget app
)

Wrap the app with the debug panel overlay.

This should be used at the root of your app:

runApp(
  FlutterDebugPanel.wrap(
    MyApp(),
  ),
);

Implementation

static Widget wrap(Widget app) {
  if (!_initialized) {
    init();
  }

  if (!_config.enable) {
    return app;
  }

  return _DebugPanelWrapper(
    config: _config,
    child: app,
  );
}