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
30 lines
629 B
Dart
30 lines
629 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
|
|
class SpezielleErnaehrungProvider extends ChangeNotifier {
|
|
double ratingSitzmoeglichkeit = 0;
|
|
double ratingKeineAhnung = 0;
|
|
String freiText = "";
|
|
|
|
void setRatingSitzmoeglichkeit(double rating) {
|
|
ratingSitzmoeglichkeit = rating;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setRatingKeineAhnung(double rating) {
|
|
ratingKeineAhnung = rating;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setFreiText(String text) {
|
|
freiText = text;
|
|
notifyListeners();
|
|
}
|
|
|
|
void resetAllFields(){
|
|
freiText = "";
|
|
ratingSitzmoeglichkeit = 0;
|
|
ratingKeineAhnung = 0;
|
|
notifyListeners();
|
|
}
|
|
} |