|
@@ -1,4 +1,7 @@
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
+import 'package:provider/provider.dart';
|
|
|
|
+import 'package:turquessa_mesas_hoster/core/models/producto_model.dart';
|
|
|
|
+import 'package:turquessa_mesas_hoster/mvvm/viewmodels/creacion_pedido_view_model.dart';
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/custom_appbar.dart';
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/custom_appbar.dart';
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/navigation_rail.dart';
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/navigation_rail.dart';
|
|
|
|
|
|
@@ -10,10 +13,19 @@ class CreacionPedido extends StatefulWidget {
|
|
}
|
|
}
|
|
|
|
|
|
class _CreacionPedidoState extends State<CreacionPedido> {
|
|
class _CreacionPedidoState extends State<CreacionPedido> {
|
|
|
|
+ @override
|
|
|
|
+ void initState() {
|
|
|
|
+ // TODO: implement initState
|
|
|
|
+ super.initState();
|
|
|
|
+ }
|
|
|
|
+
|
|
final _selectedIndex = 0;
|
|
final _selectedIndex = 0;
|
|
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
|
+ CreacionPedidoViewModel creacionPedidoViewModel =
|
|
|
|
+ Provider.of<CreacionPedidoViewModel>(context, listen: false);
|
|
|
|
+ List<Producto> listaPedido = creacionPedidoViewModel.pedidosProvisionales;
|
|
return Container(
|
|
return Container(
|
|
decoration: const BoxDecoration(
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
gradient: LinearGradient(
|
|
@@ -74,11 +86,11 @@ class _CreacionPedidoState extends State<CreacionPedido> {
|
|
columnSpacing: 10,
|
|
columnSpacing: 10,
|
|
dataRowMinHeight: 40,
|
|
dataRowMinHeight: 40,
|
|
dataRowMaxHeight: 80,
|
|
dataRowMaxHeight: 80,
|
|
- columns: <DataColumn>[
|
|
|
|
- const DataColumn(label: Text('Cant')),
|
|
|
|
- const DataColumn(label: Text('Nombre')),
|
|
|
|
- const DataColumn(label: Text('SubTotal')),
|
|
|
|
- const DataColumn(label: Text('Acciones')),
|
|
|
|
|
|
+ columns: const <DataColumn>[
|
|
|
|
+ DataColumn(label: Text('Cant')),
|
|
|
|
+ DataColumn(label: Text('Nombre')),
|
|
|
|
+ DataColumn(label: Text('SubTotal')),
|
|
|
|
+ DataColumn(label: Text('Acciones')),
|
|
],
|
|
],
|
|
rows: <DataRow>[
|
|
rows: <DataRow>[
|
|
DataRow(selected: true, cells: <DataCell>[
|
|
DataRow(selected: true, cells: <DataCell>[
|
|
@@ -89,33 +101,33 @@ class _CreacionPedidoState extends State<CreacionPedido> {
|
|
icon: const Icon(Icons.pending_sharp),
|
|
icon: const Icon(Icons.pending_sharp),
|
|
onPressed: () {}))
|
|
onPressed: () {}))
|
|
]),
|
|
]),
|
|
- DataRow(cells: <DataCell>[
|
|
|
|
- const DataCell(Text('1')),
|
|
|
|
- const DataCell(Text(
|
|
|
|
- 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
- const DataCell(Text("\$100.00")),
|
|
|
|
- DataCell(IconButton(
|
|
|
|
- icon: const Icon(Icons.pending_sharp),
|
|
|
|
- onPressed: () {}))
|
|
|
|
- ]),
|
|
|
|
- DataRow(cells: <DataCell>[
|
|
|
|
- const DataCell(Text('1')),
|
|
|
|
- const DataCell(Text(
|
|
|
|
- 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
- const DataCell(Text("\$100.00")),
|
|
|
|
- DataCell(IconButton(
|
|
|
|
- icon: const Icon(Icons.pending_sharp),
|
|
|
|
- onPressed: () {}))
|
|
|
|
- ]),
|
|
|
|
- DataRow(cells: <DataCell>[
|
|
|
|
- const DataCell(Text('1')),
|
|
|
|
- const DataCell(Text(
|
|
|
|
- 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
- const DataCell(Text("\$100.00")),
|
|
|
|
- DataCell(IconButton(
|
|
|
|
- icon: const Icon(Icons.pending_sharp),
|
|
|
|
- onPressed: () {}))
|
|
|
|
- ]),
|
|
|
|
|
|
+ // DataRow(cells: <DataCell>[
|
|
|
|
+ // const DataCell(Text('1')),
|
|
|
|
+ // const DataCell(Text(
|
|
|
|
+ // 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
+ // const DataCell(Text("\$100.00")),
|
|
|
|
+ // DataCell(IconButton(
|
|
|
|
+ // icon: const Icon(Icons.pending_sharp),
|
|
|
|
+ // onPressed: () {}))
|
|
|
|
+ // ]),
|
|
|
|
+ // DataRow(cells: <DataCell>[
|
|
|
|
+ // const DataCell(Text('1')),
|
|
|
|
+ // const DataCell(Text(
|
|
|
|
+ // 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
+ // const DataCell(Text("\$100.00")),
|
|
|
|
+ // DataCell(IconButton(
|
|
|
|
+ // icon: const Icon(Icons.pending_sharp),
|
|
|
|
+ // onPressed: () {}))
|
|
|
|
+ // ]),
|
|
|
|
+ // DataRow(cells: <DataCell>[
|
|
|
|
+ // const DataCell(Text('1')),
|
|
|
|
+ // const DataCell(Text(
|
|
|
|
+ // 'Hamburguesa de Queso y Ahumado sin cebolla ni tomate')),
|
|
|
|
+ // const DataCell(Text("\$100.00")),
|
|
|
|
+ // DataCell(IconButton(
|
|
|
|
+ // icon: const Icon(Icons.pending_sharp),
|
|
|
|
+ // onPressed: () {}))
|
|
|
|
+ // ]),
|
|
]),
|
|
]),
|
|
),
|
|
),
|
|
Expanded(
|
|
Expanded(
|