show static method

Future<NiceSpotlightItem?> show(
  1. BuildContext context, {
  2. required List<NiceSpotlightCategory> categories,
  3. String? placeholder,
})

Show the spotlight search dialog

Implementation

static Future<NiceSpotlightItem?> show(
  BuildContext context, {
  required List<NiceSpotlightCategory> categories,
  String? placeholder,
}) {
  return showDialog<NiceSpotlightItem>(
    context: context,
    barrierColor: Colors.black54,
    builder: (ctx) => Dialog(
      backgroundColor: Colors.transparent,
      child: NiceSpotlightSearch(
        categories: categories,
        placeholder: placeholder,
        onSelect: (item) => Navigator.pop(ctx, item),
      ),
    ),
  );
}