mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-10 19:48:56 +03:30
Fix loading bug in pages and some search bug
This commit is contained in:
@@ -142,6 +142,7 @@ class _MyPackagesMineScreenState extends State<MyPackagesMineScreen> {
|
||||
myPackages.setLoading();
|
||||
await myPackages.searchMyPackages(searchVal ?? "");
|
||||
},
|
||||
textInputType: TextInputType.text,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
|
||||
@@ -211,6 +211,7 @@ class _PackageResultScreenState extends State<PackageResultScreen> {
|
||||
packages.setLoading();
|
||||
await packages.search(searchVal ?? "");
|
||||
},
|
||||
textInputType: TextInputType.text,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
|
||||
@@ -49,7 +49,13 @@ class _FormPageState extends State<FormPage> {
|
||||
_isLoadingButton = false;
|
||||
});
|
||||
if (result == 'done') {
|
||||
Navigator.of(context).popAndPushNamed(Routes.testResultScreen);
|
||||
// Navigator.of(context).popAndPushNamed(Routes.testResultScreen);
|
||||
Navigator.of(context).pop();
|
||||
prvObject.setLoading();
|
||||
prvObject.resetPageNumber();
|
||||
prvObject
|
||||
.getTestResults()
|
||||
.then((value) => {prvObject.resetLoading()});
|
||||
Fluttertoast.showToast(
|
||||
msg: "Test added.",
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
|
||||
@@ -49,7 +49,13 @@ class CycleAddSaveButton extends StatelessWidget {
|
||||
descriptionCTRL.text,
|
||||
striizerIdCTRL.text,
|
||||
);
|
||||
Navigator.of(context).pushReplacementNamed(Routes.cycleResultScreen);
|
||||
// Navigator.of(context).pushReplacementNamed(Routes.cycleResultScreen);
|
||||
Navigator.of(context).pop();
|
||||
var cycles =
|
||||
await Provider.of<CyclesProvider>(context, listen: false);
|
||||
cycles.setLoading();
|
||||
cycles.resetPageNumber();
|
||||
cycles.getCycleResults().then((value) => {cycles.resetLoading()});
|
||||
Fluttertoast.showToast(
|
||||
msg: "Cycle added.",
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
|
||||
@@ -54,7 +54,13 @@ class LabelAddSaveButton extends StatelessWidget {
|
||||
// eDateValue,
|
||||
striizerIdCTRL.text,
|
||||
);
|
||||
Navigator.of(context).pushReplacementNamed(Routes.labelResultScreen);
|
||||
// Navigator.of(context).pushReplacementNamed(Routes.labelResultScreen);
|
||||
Navigator.of(context).pop();
|
||||
var labels =
|
||||
await Provider.of<LabelsProvider>(context, listen: false);
|
||||
labels.setLoading();
|
||||
labels.resetPageNumber();
|
||||
labels.getLabelResults().then((value) => {labels.resetLoading()});
|
||||
Fluttertoast.showToast(
|
||||
msg: "Label added.",
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
|
||||
@@ -46,7 +46,7 @@ class LabelSearchBox extends StatelessWidget {
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
keyboardType: TextInputType.text,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
|
||||
@@ -59,8 +59,16 @@ class PackageAddSaveButton extends StatelessWidget {
|
||||
items,
|
||||
descriptionCTRL.text,
|
||||
);
|
||||
Navigator.of(context)
|
||||
.pushReplacementNamed(Routes.packageResultScreen);
|
||||
// Navigator.of(context)
|
||||
// .pushReplacementNamed(Routes.packageResultScreen);
|
||||
Navigator.of(context).pop();
|
||||
var packages =
|
||||
await Provider.of<PackageProvider>(context, listen: false);
|
||||
packages.setLoading();
|
||||
packages.resetPageNumber();
|
||||
packages
|
||||
.getPackageResults()
|
||||
.then((value) => {packages.resetLoading()});
|
||||
Fluttertoast.showToast(
|
||||
msg: "Package added.",
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
|
||||
@@ -46,7 +46,7 @@ class TestResultSearchBox extends StatelessWidget {
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
keyboardType: TextInputType.text,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
@@ -54,7 +54,7 @@ class TestResultSearchBox extends StatelessWidget {
|
||||
var testResults =
|
||||
await Provider.of<TestResultsProvider>(context, listen: false);
|
||||
testResults.setLoading();
|
||||
await testResults.search(textVal);
|
||||
await testResults.search(textVal ?? "");
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
|
||||
Reference in New Issue
Block a user