DialogChoice<T> class

Class to represent a choice in the dialogues that list a choice list.

The choices are used in the following dialogs:

Below is an example of use in no showChoicesRadioDialog.

String result = await showChoicesRadioDialog<String>(context,
    title: Text('Select user'),
    choices: [
        DialogChoice(
            icon: Icon(Icons.person),
            title: Text('Ricardo Crescenti'),
            subtitle: Text('ricardo.crescenti@gmail.com'),
            value: 'ricardo.crescenti'),
        DialogChoice(
            icon: Icon(Icons.person),
            title: Text('Ana Luiza Crescenti'),
            subtitle: Text('analuiza.crescenti@gmail.com'),
            value: 'analuiza.crescenti'),
        DialogChoice(
            icon: Icon(Icons.person),
            title: Text('Luis Otavio Crescenti'),
            subtitle: Text('luisotavio.crescenti@gmail.com'),
            value: 'luisotavio.crescenti'),
    ]
);

Constructors

DialogChoice({Widget icon, @required Widget title, Widget subtitle, @required T value})
Standard constructor of the DialogChoice class

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
icon Widget
Icon to be listed in the choice list.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
subtitle Widget
Subtitle of choice (or additional information).
final
title Widget
Title of choice.
final
value → T
Value to be returned when the choice is selected.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited