message method

void message(
  1. String text, {
  2. bool success = false,
  3. dynamic error = false,
})

Implementation

void message(String text, {bool success = false, error = false}) {
  this.text = text;
  if (success) {
    this.success();
  } else if (error) {
    this.error();
  } else {
    this.normal();
  }
  updateState();
}