mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 00:08:55 +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();
|
myPackages.setLoading();
|
||||||
await myPackages.searchMyPackages(searchVal ?? "");
|
await myPackages.searchMyPackages(searchVal ?? "");
|
||||||
},
|
},
|
||||||
|
textInputType: TextInputType.text,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ class _PackageResultScreenState extends State<PackageResultScreen> {
|
|||||||
packages.setLoading();
|
packages.setLoading();
|
||||||
await packages.search(searchVal ?? "");
|
await packages.search(searchVal ?? "");
|
||||||
},
|
},
|
||||||
|
textInputType: TextInputType.text,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
|
|||||||
@@ -49,7 +49,13 @@ class _FormPageState extends State<FormPage> {
|
|||||||
_isLoadingButton = false;
|
_isLoadingButton = false;
|
||||||
});
|
});
|
||||||
if (result == 'done') {
|
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(
|
Fluttertoast.showToast(
|
||||||
msg: "Test added.",
|
msg: "Test added.",
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
|||||||
@@ -49,7 +49,13 @@ class CycleAddSaveButton extends StatelessWidget {
|
|||||||
descriptionCTRL.text,
|
descriptionCTRL.text,
|
||||||
striizerIdCTRL.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(
|
Fluttertoast.showToast(
|
||||||
msg: "Cycle added.",
|
msg: "Cycle added.",
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
|||||||
@@ -54,7 +54,13 @@ class LabelAddSaveButton extends StatelessWidget {
|
|||||||
// eDateValue,
|
// eDateValue,
|
||||||
striizerIdCTRL.text,
|
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(
|
Fluttertoast.showToast(
|
||||||
msg: "Label added.",
|
msg: "Label added.",
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class LabelSearchBox extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 5 * _deviceBlockSize,
|
fontSize: 5 * _deviceBlockSize,
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.text,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
|
|||||||
@@ -59,8 +59,16 @@ class PackageAddSaveButton extends StatelessWidget {
|
|||||||
items,
|
items,
|
||||||
descriptionCTRL.text,
|
descriptionCTRL.text,
|
||||||
);
|
);
|
||||||
Navigator.of(context)
|
// Navigator.of(context)
|
||||||
.pushReplacementNamed(Routes.packageResultScreen);
|
// .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(
|
Fluttertoast.showToast(
|
||||||
msg: "Package added.",
|
msg: "Package added.",
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class TestResultSearchBox extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 5 * _deviceBlockSize,
|
fontSize: 5 * _deviceBlockSize,
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.text,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
@@ -54,7 +54,7 @@ class TestResultSearchBox extends StatelessWidget {
|
|||||||
var testResults =
|
var testResults =
|
||||||
await Provider.of<TestResultsProvider>(context, listen: false);
|
await Provider.of<TestResultsProvider>(context, listen: false);
|
||||||
testResults.setLoading();
|
testResults.setLoading();
|
||||||
await testResults.search(textVal);
|
await testResults.search(textVal ?? "");
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(7),
|
padding: EdgeInsets.all(7),
|
||||||
|
|||||||
Reference in New Issue
Block a user