showMiniListPopup<T> function

Future<int?> showMiniListPopup<T>(
  1. BuildContext context,
  2. String title,
  3. List<T> dataSource, {
  4. double titleHeight = 60,
  5. ToString<T>? toLabel,
  6. BuildCheckChild<T>? buildItem,
  7. Color backgroundColor = Colors.white,
  8. Widget operation = const SizedBox(height: 15),
  9. EdgeInsetsGeometry padding = const EdgeInsets.only(left: 5, right: 5, bottom: 10),
})

Implementation

Future<int?> showMiniListPopup<T>(
  BuildContext context,
  String title,
  List<T> dataSource, {
  double titleHeight = 60,
  ToString<T>? toLabel,
  BuildCheckChild<T>? buildItem,
  Color backgroundColor = Colors.white,
  Widget operation = const SizedBox(height: 15),
  EdgeInsetsGeometry padding =
      const EdgeInsets.only(left: 5, right: 5, bottom: 10),
}) async {
  return await showCupertinoModalPopup<int>(
      context: context,
      builder: (ctx) {
        return MiniListBottomSheet<T>(
          title: Text(
            title,
            style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
          ),
          backgroundColor: backgroundColor,
          padding: padding,
          titleHeight: titleHeight,
          dataSource: dataSource,
          buildItem: buildItem,
          toLabel: toLabel,
          operation: operation,
        );
      });
}