pub struct DataCell {
pub child: WidgetRef,
pub placeholder: bool,
pub show_edit_icon: bool,
pub on_tap: Option<GestureTapCallback>,
pub on_double_tap: Option<GestureTapCallback>,
pub on_long_press: Option<GestureLongPressCallback>,
pub on_tap_down: Option<GestureTapDownCallback>,
pub on_tap_cancel: Option<GestureTapCancelCallback>,
}Expand description
Fields§
§child: WidgetRefThe data for the row.
Typically a Text widget or a DropdownButton widget.
If the cell has no data, then a Text widget with placeholder text should be provided
instead, and then the placeholder argument should be set to true.
placeholder: boolWhether the child is actually a placeholder.
If this is true, the default text style for the cell is changed to be appropriate for placeholder text.
show_edit_icon: boolWhether to show an edit icon at the end of the cell.
This does not make the cell actually editable; the caller must implement editing behavior
if desired (initiated from the on_tap callback).
If this is set, on_tap should also be set, otherwise tapping the icon
will have no effect.
on_tap: Option<GestureTapCallback>Called if the cell is tapped.
If non-null, tapping the cell will call this callback. If null (including
on_double_tap, on_long_press,
on_tap_cancel and on_tap_down), tapping the
cell will attempt to select the row (if DataRow::on_select_changed is provided).
on_double_tap: Option<GestureTapCallback>Called when the cell is double tapped.
If non-null, tapping the cell will call this callback. If null, tapping the cell will
attempt to select the row (if DataRow::on_select_changed is provided).
on_long_press: Option<GestureLongPressCallback>Called if the cell is long-pressed.
If non-null, long-pressing the cell will call this callback. If null, long-pressing the
cell will attempt to select the row (if DataRow::on_select_changed is provided).
on_tap_down: Option<GestureTapDownCallback>Called if the cell is tapped down.
If non-null, tapping down the cell will call this callback. If null, tapping down the
cell will attempt to select the row (if DataRow::on_select_changed is provided).
on_tap_cancel: Option<GestureTapCancelCallback>Called if the user cancels a tap was started on cell.
If non-null, canceling the tap gesture will call this callback. If null, canceling the
tap gesture will attempt to select the row (if DataRow::on_select_changed is
provided).
Implementations§
Source§impl DataCell
impl DataCell
Sourcepub fn new<K>(child: impl IntoWidget<K>) -> DataCell
pub fn new<K>(child: impl IntoWidget<K>) -> DataCell
Creates a data cell for a DataTable; Dart’s optional named arguments are the setters.
Sourcepub fn empty() -> DataCell
pub fn empty() -> DataCell
A data cell that has no content and that has zero width and height.
This cell is used by default for cells in a DataRow where no cell is specified.
Dart’s static const DataCell empty.
Sourcepub fn placeholder(self, placeholder: bool) -> DataCell
pub fn placeholder(self, placeholder: bool) -> DataCell
Dart DataCell(placeholder:).
Sourcepub fn show_edit_icon(self, show_edit_icon: bool) -> DataCell
pub fn show_edit_icon(self, show_edit_icon: bool) -> DataCell
Dart DataCell(showEditIcon:).
Sourcepub fn on_tap(self, on_tap: GestureTapCallback) -> DataCell
pub fn on_tap(self, on_tap: GestureTapCallback) -> DataCell
Dart DataCell(onTap:).
Sourcepub fn on_double_tap(self, on_double_tap: GestureTapCallback) -> DataCell
pub fn on_double_tap(self, on_double_tap: GestureTapCallback) -> DataCell
Dart DataCell(onDoubleTap:).
Sourcepub fn on_long_press(self, on_long_press: GestureLongPressCallback) -> DataCell
pub fn on_long_press(self, on_long_press: GestureLongPressCallback) -> DataCell
Dart DataCell(onLongPress:).
Sourcepub fn on_tap_down(self, on_tap_down: GestureTapDownCallback) -> DataCell
pub fn on_tap_down(self, on_tap_down: GestureTapDownCallback) -> DataCell
Dart DataCell(onTapDown:).
Sourcepub fn on_tap_cancel(self, on_tap_cancel: GestureTapCancelCallback) -> DataCell
pub fn on_tap_cancel(self, on_tap_cancel: GestureTapCancelCallback) -> DataCell
Dart DataCell(onTapCancel:).