criticalAnnouncement function
void
criticalAnnouncement(})
Implementation
void criticalAnnouncement(String msg,
{String preformat = "&l&n&o&e",
List<int> colors = const [0x4a2c2c, 0x4a3b2c, 0x4a492c, 0x4a422c],
int? boxSpin}) {
assert(colors.length == 4, "colors must have 4 values");
if (boxSpin != null) {
colors = [
_argb2rgb(ui.Color(boxSpin).toARGB32()),
_argb2rgb(ui.Color(boxSpin).spin(-22).toARGB32()),
_argb2rgb(ui.Color(boxSpin).spin(22).toARGB32()),
_argb2rgb(ui.Color(boxSpin).spin(44).toARGB32())
];
}
announcement(
msg: msg,
fringes: true,
thick: true,
preformat: preformat,
tl: Color.hex("#${colors[0].toRadixString(16)}"),
tr: Color.hex("#${colors[1].toRadixString(16)}"),
br: Color.hex("#${colors[2].toRadixString(16)}"),
bl: Color.hex("#${colors[3].toRadixString(16)}"));
}