Files
mensaapp/lib/providers/essenProvider.dart
T
Ali 3cdc1dc169 delete all kinda stuff
delete function implemented
on pressed -> pop up => are you sure about that?
yes: all rating from all pages will be cleared
no: nothing happens, pop closes
2024-11-23 17:52:12 +01:00

29 lines
562 B
Dart

import 'package:flutter/material.dart';
class EssenProvider extends ChangeNotifier {
double ratingGeschmack = 0;
double ratingQuali = 0;
String freiText = "";
void setRatingGeschmack(double rating) {
ratingGeschmack = rating;
notifyListeners();
}
void setRatingQuali(double rating) {
ratingQuali = rating;
notifyListeners();
}
void setFreiText(String text) {
freiText = text;
notifyListeners();
}
void resetAllFields(){
freiText = "";
ratingGeschmack = 0;
ratingQuali = 0;
notifyListeners();
}
}