openSelectionDialog function

void openSelectionDialog(
  1. AppModel app,
  2. BuildContext context,
  3. String name, {
  4. required String title,
  5. required List<String> options,
  6. required OnSelection onSelection,
  7. String? buttonLabel,
  8. double? widthFraction,
  9. bool? includeHeading = true,
})

Implementation

void openSelectionDialog(
  AppModel app,
  BuildContext context,
  String name, {
  required String title,
  required List<String> options,
  required OnSelection onSelection,
  String? buttonLabel,
  double? widthFraction, // percentage of screen width
  bool? includeHeading = true,
}) =>
    StyleRegistry.registry()
        .styleWithApp(app)
        .frontEndStyle()
        .dialogStyle()
        .openSelectionDialog(
          app,
          context, name, title: title,
          options: options, onSelection: onSelection,
          buttonLabel: buttonLabel,
          widthFraction: widthFraction, // percentage of screen width
          includeHeading: includeHeading,
        );