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

import '../dummy-data.dart';
import '../widgets/category_item.dart';

class CategoriesScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GridView(
        padding: const EdgeInsets.all(15),
        children: DUMMY_CATEGORIES
            .map((catData) => CategoryItem(
                  catData.id,
                  catData.title,
                  catData.color,
                ))
            .toList(),
        gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
          maxCrossAxisExtent: 200,
          childAspectRatio: 3 / 2, //For 200 width I want 300 pixels height
          crossAxisSpacing: 20,
          mainAxisSpacing: 20,
        ),
        // children: <Widget>[],
      ),
      /*
      appBar: AppBar(
        title: const Text('Meals'),
      ),*/
    );
  }
}
