t×tecexpressby TeKOcloud
DEv0.7.1
Navigation & feedback / FLUTTER

TxActionSheet.

Interactive preview

Bottom action sheet with a cancel action.

TxActionSheet

ParameterTypeDefaultMeaning
itemsList<TxAction>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
titleString?nullView title.
onItemClickValueChanged<TxAction>?nullReports the activated entry; arguments follow the callback signature.
cancelTextString'Abbrechen'Cancel action label.
Member / type / returnMeaning
static Future<TxAction?> show(BuildContext context, {List<TxAction> items = const [], Object? dataSource, String? title})Opens the native overlay alternative; follow the return contract in the signature.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {

  return TxActionSheet(title: 'Actions', items: const [TxAction(id: 'copy', text: 'Copy')], onItemClick: (action) {});
}
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Future<void> open(BuildContext context) async {
  final selected = await TxActionSheet.show(context, items: const [TxAction(id: 'copy', text: 'Copy')]);
  debugPrint('${selected?.id}');
}