showInfoDialog static method
      
void
showInfoDialog(
    
    
- BuildContext context, {
 - required GlobalKey<
State< key,StatefulWidget> > - required DataModel data,
 - dynamic onOkPressed()?,
 
Implementation
static void showInfoDialog(BuildContext context,
    {required GlobalKey key,
    required DataModel data,
    Function()? onOkPressed}) {
  var isDarkTheme = Theme.of(context).brightness == Brightness.dark;
  StepModel step = data.steps[0];
  Widget widget = AlertDialog(
    backgroundColor: isDarkTheme ? Colors.black : Colors.white,
    title: Text(
      step.title.toString(),
    ),
    // backgroundColor: AppTheme.backgroundColor,
    content: SingleChildScrollView(
      child: ListBody(
        children: <Widget>[
          Text(
            step.content.toString(),
          ),
        ],
      ),
    ),
    actions: <Widget>[
      // TextButton(
      //   onPressed: () => Navigator.pop(context),
      //   child: const Text(
      //     'Cancel',
      //   ),
      // ),
      TextButton(
        onPressed: onOkPressed == null
            ? () {
                TourUtil.finish();
              }
            : () {
                TourUtil.finish();
                onOkPressed();
              },
        child: const Text(
          'OK',
        ),
      ),
    ],
  );
  TourUtil.show(
    context,
    widgets: [widget],
    keys: [key],
    data: data,
    targetIdentifier: "keyInfoDialog",
  );
}