|
@@ -1,7 +1,6 @@
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:turquessa_mesas_hoster/core/models/categoria_model.dart';
|
|
import 'package:turquessa_mesas_hoster/core/models/categoria_model.dart';
|
|
|
|
|
|
-
|
|
|
|
class CategoriasGrid extends StatefulWidget {
|
|
class CategoriasGrid extends StatefulWidget {
|
|
const CategoriasGrid({super.key});
|
|
const CategoriasGrid({super.key});
|
|
|
|
|
|
@@ -10,7 +9,6 @@ class CategoriasGrid extends StatefulWidget {
|
|
}
|
|
}
|
|
|
|
|
|
class _CategoriasGridState extends State<CategoriasGrid> {
|
|
class _CategoriasGridState extends State<CategoriasGrid> {
|
|
-
|
|
|
|
List<Categoria> categorias = [
|
|
List<Categoria> categorias = [
|
|
Categoria(
|
|
Categoria(
|
|
id: 1,
|
|
id: 1,
|
|
@@ -63,24 +61,20 @@ class _CategoriasGridState extends State<CategoriasGrid> {
|
|
itemCount: 20,
|
|
itemCount: 20,
|
|
itemBuilder: (context, index) {
|
|
itemBuilder: (context, index) {
|
|
return GestureDetector(
|
|
return GestureDetector(
|
|
- //* agregar al Carrito
|
|
|
|
- // onTap: set,
|
|
|
|
|
|
+ //* agregar al Carrito
|
|
|
|
+ // onTap: set,
|
|
child: CategoriaCard(categoria: categorias[index]),
|
|
child: CategoriaCard(categoria: categorias[index]),
|
|
- );
|
|
|
|
|
|
+ );
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
class CategoriaCard extends StatelessWidget {
|
|
class CategoriaCard extends StatelessWidget {
|
|
- final Categoria categoria;
|
|
|
|
|
|
+ final Categoria categoria;
|
|
const CategoriaCard({super.key, required this.categoria});
|
|
const CategoriaCard({super.key, required this.categoria});
|
|
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
- return Card(
|
|
|
|
- child: ,
|
|
|
|
- );
|
|
|
|
|
|
+ return Card();
|
|
}
|
|
}
|
|
-}G
|
|
|
|
|
|
+}
|