mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 06:58:55 +03:30
Set some save button progress bar and toast message
This commit is contained in:
@@ -18,6 +18,18 @@ class Auth with ChangeNotifier {
|
||||
return token != null;
|
||||
}
|
||||
|
||||
bool isloading = false;
|
||||
|
||||
void resetLoading() {
|
||||
isloading = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoading() {
|
||||
isloading = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
String? get token {
|
||||
if (_expiaryDate != null &&
|
||||
_expiaryDate!.isAfter(DateTime.now()) &&
|
||||
|
||||
@@ -67,6 +67,17 @@ class CyclesProvider extends ChangeNotifier {
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
bool isloadingButton = false;
|
||||
void resetLoadingButton() {
|
||||
isloadingButton = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoadingButton() {
|
||||
isloadingButton = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getHospitalsFilters() async {
|
||||
var response = await http.get(
|
||||
Uri.parse(Url.filterItems),
|
||||
|
||||
@@ -52,6 +52,17 @@ class ItemProvider extends ChangeNotifier {
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
bool isloadingButton = false;
|
||||
void resetLoadingButton() {
|
||||
isloadingButton = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoadingButton() {
|
||||
isloadingButton = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getHospitalsFilters() async {
|
||||
var response = await http.get(
|
||||
Uri.parse(Url.filterItems),
|
||||
@@ -154,7 +165,7 @@ class ItemProvider extends ChangeNotifier {
|
||||
catchImages = [];
|
||||
return 'done';
|
||||
} else {
|
||||
return 'error';
|
||||
return 'error ${response.statusCode}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,17 @@ class LabelsProvider extends ChangeNotifier {
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
bool isloadingButton = false;
|
||||
void resetLoadingButton() {
|
||||
isloadingButton = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoadingButton() {
|
||||
isloadingButton = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getHospitalsFilters() async {
|
||||
var response = await http.get(
|
||||
Uri.parse(Url.filterItems),
|
||||
|
||||
@@ -85,6 +85,17 @@ class PackageProvider extends ChangeNotifier {
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
bool isloadingButton = false;
|
||||
void resetLoadingButton() {
|
||||
isloadingButton = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoadingButton() {
|
||||
isloadingButton = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getHospitalsFilters() async {
|
||||
var response = await http.get(
|
||||
Uri.parse(Url.filterItems),
|
||||
|
||||
@@ -312,7 +312,7 @@ class TestResultsProvider with ChangeNotifier {
|
||||
catchImages = [];
|
||||
return 'done';
|
||||
} else {
|
||||
return 'error';
|
||||
return 'error ${response.statusCode}';
|
||||
}
|
||||
// var response = await http
|
||||
// .post(Url.createTestResult, body: json.encode(values), headers: {
|
||||
|
||||
Reference in New Issue
Block a user