neutral static method

void neutral(
  1. dynamic message, {
  2. int? duration,
  3. bool showIcon = true,
})

Implementation

static void neutral(dynamic message, {int? duration, bool showIcon = true}) {
  final snackBar = SnackBar(
    content: HStack([
      if (showIcon == true) Icon(Icons.info, color: Colors.white),
      12.widthBox,
      '$message'.text.white.ellipsis.maxLines(3).make().expand(),
    ]),
    backgroundColor: Colors.black,
    behavior: SnackBarBehavior.floating,
    duration: Duration(seconds: duration ?? 2),
  );
  ScaffoldMessenger.of(Get.context!)
      .showSnackBar(snackBar)
      .closed
      .then((value) => ScaffoldMessenger.of(Get.context!).clearSnackBars());
}