import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../data/benchmarks_list.dart';
import 'widgets/benchmark_card.dart';

class BenchmarkScreen extends StatelessWidget {
  const BenchmarkScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return GridView.builder(
      padding: const EdgeInsets.all(12),
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: MediaQuery.of(context).size.shortestSide < 600 ? 2 : 3,
        crossAxisSpacing: 12.0,
        mainAxisSpacing: 12,
      ),
      itemCount: benchmarksList.length,
      itemBuilder: (context, index) {
        return BenchmarkCard(
          benchmark: benchmarksList[index],
        );
      },
    );
  }
}
