|
@@ -10,6 +10,7 @@ import 'package:turquessa_mesas_hoster/mvvm/viewmodels/home_view_model.dart';
|
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/modal_infonegaocio.dart';
|
|
|
import 'package:turquessa_mesas_hoster/mvvm/views/home/producto/producto_screen.dart';
|
|
|
import 'package:turquessa_mesas_hoster/utils/widgets/widgets.dart';
|
|
|
+import 'package:turquessa_mesas_hoster/utils/widgets/horario_modal.dart';
|
|
|
|
|
|
const List<Map<String, dynamic>> items = [
|
|
|
{
|
|
@@ -112,10 +113,12 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
final homeViewModel = Provider.of<HomeViewModel>(context, listen: false);
|
|
|
final productoViewModel =
|
|
|
Provider.of<ProductoViewModel>(context, listen: false);
|
|
|
+ setModalOffService(context);
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
Provider.of<ProductoViewModel>(context, listen: false)
|
|
|
.sincronizarProductosYCategorias();
|
|
|
homeViewModel.fetchLocalCategorias();
|
|
|
+ homeViewModel.isHorarioServicio();
|
|
|
productoViewModel.sincronizarProductos();
|
|
|
productoViewModel.sincronizarCategorias();
|
|
|
productoViewModel.fetchLocalAll();
|
|
@@ -124,9 +127,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
- final homeViewModel = Provider.of<HomeViewModel>(context);
|
|
|
- final pedidoViewModel = Provider.of<ProductoViewModel>(context);
|
|
|
- final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
+ final homeViewModel = Provider.of<HomeViewModel>(context, listen: false);
|
|
|
+
|
|
|
return Scaffold(
|
|
|
key: homeViewModel.scaffoldKey,
|
|
|
drawer: const CustomDrawer(),
|