import 'package:flutter/material.dart';

class ListViewUtil {
  static ListView fromList<T>(List<T>? items, Widget Function(T item) map) =>
      ListView.builder(
        itemCount: items?.length ?? 0,
        itemBuilder: (context, index) =>
            items != null ? map(items[index]) : null,
      );
}
