showTooltip static method

void showTooltip(
  1. BuildContext context, {
  2. required GlobalKey<State<StatefulWidget>> key,
  3. required DataModel data,
})

Implementation

static void showTooltip(
  BuildContext context, {
  required GlobalKey key,
  required DataModel data,
}) {
  StepModel step = data.steps[0];
  Widget widget = SingleChildScrollView(
    child: Container(
      margin: EdgeInsets.zero,
      padding: EdgeInsets.zero,
      child: WebviewUtil.getWebViewWidget(
        step.content,
        step.textColor,
        contentHeight: step.height,
        contentwidth: step.width,
      ),
    ),
  );
  TourUtil.show(
    context,
    widgets: [widget],
    keys: [key],
    data: data,
    targetIdentifier: "keyTooltip",
  );

  WebviewUtil.load(null, step.content);
}