# statusMsg method

void statusMsg(

1. String msg,
2. {Duration? duration,
3. InfoBarSeverity severity = InfoBarSeverity.info,
4. bool loading = false,
5. bool useWidget = false,
6. bool leadingIcon = true,
7. Widget widget = const Text('')}

)

## Implementation

    void statusMsg(
      String msg, {
      Duration? duration,
      InfoBarSeverity severity = InfoBarSeverity.info,
      bool loading = false,
      bool useWidget = false,
      bool leadingIcon = true,
      Widget widget = const Text(''),
    }) {
      if (!mounted) {
        return;
      }
      if (useWidget) {
        setState(() {
          status = 'WIDGET';
          this.loading = loading;
          statusWidget = widget;
          statusLeading = leadingIcon;
        });
      } else {
        setState(() {
          status = msg;
          this.loading = loading;
          statusLeading = leadingIcon;
        });
      }
      if (duration != null) {
        Future.delayed(duration, () {
          if (mounted) {
            setState(() {
              status = '';
              this.loading = false;
            });
          }
        });
      }
    }