mirrored_repositories/get_wallpaper/lib/presentation
import 'package:flutter/material.dart';

class DefaultGridView extends StatelessWidget {
  const DefaultGridView(
      {super.key,
      required this.itemCount,
      required this.itemBuilder,
      this.controller});

  final int itemCount;
  final ScrollController? controller;
  final Widget Function(BuildContext, int) itemBuilder;

  @override
  Widget build(BuildContext context) {
    return GridView.builder(
      // controller: controller,
      shrinkWrap: true,
      physics: const NeverScrollableScrollPhysics(),
      keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
      padding: const EdgeInsets.all(8),
      gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 2,
        childAspectRatio: 2 / 3,
        crossAxisSpacing: 8,
        mainAxisSpacing: 8,
      ),
      itemCount: itemCount,
      itemBuilder: itemBuilder,
    );
  }
}
