Add: CartProvider
This commit is contained in:
@@ -5,7 +5,9 @@ import 'dart:js_interop_unsafe' as js_util;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gymlink_module_web/main.dart';
|
||||
import 'package:gymlink_module_web/pages/main.dart';
|
||||
import 'package:gymlink_module_web/providers/cart.dart';
|
||||
import 'package:gymlink_module_web/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
@js.JSExport()
|
||||
class MyAppStateWeb extends State<MyApp> {
|
||||
@@ -30,11 +32,14 @@ class MyAppStateWeb extends State<MyApp> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'GymLink Module',
|
||||
theme: theme,
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: MainPage(isLoading: _isLoading),
|
||||
return ChangeNotifierProvider(
|
||||
create: (_) => CartProvider(),
|
||||
child: MaterialApp(
|
||||
title: 'GymLink Module',
|
||||
theme: theme,
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: MainPage(isLoading: _isLoading),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user