Option constructor

Option({
  1. Key? key,
  2. String? text,
  3. VoidCallback? onPressed,
  4. dynamic result,
})

Supply the button's text, callback and dynamic result value.

Implementation

Option({this.key, this.text, this.onPressed, this.result})
    : assert(result != null, 'Must provide a option result!');