show static method
Future<NiceSpotlightItem?>
show(
- BuildContext context, {
- required List<
NiceSpotlightCategory> categories, - 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),
),
),
);
}