hideWidget static method

Future<void> hideWidget(
  1. GlobalKey<State<StatefulWidget>> widgetKey
)

Hides a specific view from appearing in the video generated.

Provide the same GlobalKey you specify in your widget's key attribute.

Implementation

static Future<void> hideWidget(GlobalKey widgetKey) async {
  TestFairyBase.prepareTwoWayInvoke();

  TestFairyBase.hiddenWidgets.add(widgetKey);

  await TestFairyBase.channel.invokeMethod<void>('hideWidget');
}