import 'package:flutter/material.dart'; import '../config/style.dart'; class BookingProvider with ChangeNotifier { bool checkbox1 = true; bool checkbox2 = false; bool checkbox3 = false; int _counter = 1; void addCounter() { _counter++; notifyListeners(); } void minusCounter() { if (_counter > 1) { _counter--; } else { _counter = _counter; } notifyListeners(); } int get counter => _counter; void updateCheckbox1(bool newValue) { checkbox1 = newValue; checkbox2 = false; checkbox3 = false; notifyListeners(); } void updateCheckbox2(bool newValue) { checkbox2 = newValue; checkbox1 = false; checkbox3 = false; notifyListeners(); } void updateCheckbox3(bool newValue) { checkbox3 = newValue; checkbox1 = false; checkbox2 = false; notifyListeners(); } Color getColor(Set states) { const Set interactiveStates = { MaterialState.selected, MaterialState.focused, MaterialState.pressed, }; if (states.any(interactiveStates.contains)) { return Colors.green; } return AppStyle.textCategGrey; } }