Draft.random constructor

Draft.random(
  1. String text, {
  2. Key? key,
})

Implementation

factory Draft.random(String text, {Key? key}) {
  Random random = Random();
  return Draft(
      text: text,
      color: Color.fromARGB(
          255, random.nextInt(255), random.nextInt(255), random.nextInt(255)),
      borderColor: Color.fromARGB(
          255, random.nextInt(255), random.nextInt(255), random.nextInt(255)),
      key: key);
}