ZeroSkeletonListView constructor

ZeroSkeletonListView({
  1. Key? key,
  2. SkeletonItem? item,
  3. SkeletonItem itemBuilder(
    1. BuildContext,
    2. int
    )?,
  4. int? itemCount,
  5. bool scrollable = false,
  6. EdgeInsets? padding = const EdgeInsets.symmetric(horizontal: 16),
  7. double? spacing = 8,
})

Implementation

ZeroSkeletonListView({
  Key? key,
  this.item,
  this.itemBuilder,
  this.itemCount,
  this.scrollable = false,
  this.padding = const EdgeInsets.symmetric(horizontal: 16),
  this.spacing = 8,
}) : super(
          key: key,
          child: ListView.builder(
            padding: padding,
            physics: scrollable ? null : const NeverScrollableScrollPhysics(),
            itemCount: itemCount,
            itemBuilder: itemBuilder ??
                (context, index) =>
                    item ??
                    ZeroSkeletonListTile(
                      hasSubtitle: true,
                    ),
          ));