icon property

Widget get icon

Implementation

Widget get icon {
  switch (this) {
    case _ToastType.success:
      return _icon(Icons.check_circle_rounded);
    case _ToastType.error:
      return _icon(Icons.cancel);
    case _ToastType.loading:
      return const SizedBox(
        width: 54,
        height: 54,
        child: Center(
          child: CircularProgressIndicator(
            color: Colors.white,
            strokeWidth: 2,
          ),
        ),
      );
    case _ToastType.info:
      return _icon(Icons.info);
  }
}