Added: Some TODOs
This commit is contained in:
20
lib/providers/cart.dart
Normal file
20
lib/providers/cart.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gymlink_module_web/tools/prefs.dart';
|
||||
|
||||
//TODO: Возможно нужно дорабатывать
|
||||
class CartProvider extends ChangeNotifier {
|
||||
int _cartLength = 0;
|
||||
|
||||
int get cartLength => _cartLength;
|
||||
|
||||
CartProvider() {
|
||||
updateCartLength();
|
||||
}
|
||||
|
||||
void updateCartLength() {
|
||||
getCart().then((value) {
|
||||
_cartLength = value.length;
|
||||
notifyListeners();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user