mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 09:28:56 +03:30
Set search test result by api
This commit is contained in:
@@ -17,12 +17,13 @@ class TestResultSearchBox extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var textVal;
|
||||
return TextField(
|
||||
onEditingComplete: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
onChanged: (value) {
|
||||
Provider.of<TestResultsProvider>(context, listen: false).search(value);
|
||||
onChanged: (value) async {
|
||||
textVal = value;
|
||||
},
|
||||
controller: searchCTRL,
|
||||
decoration: InputDecoration(
|
||||
@@ -37,6 +38,26 @@ class TestResultSearchBox extends StatelessWidget {
|
||||
labelText: 'Search by test name',
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 2, horizontal: 3),
|
||||
suffixIcon: InkWell(
|
||||
onTap: () async {
|
||||
var testResults =
|
||||
await Provider.of<TestResultsProvider>(context, listen: false);
|
||||
testResults.setLoading();
|
||||
await testResults.search(textVal);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.space_bar,
|
||||
// size: 4 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
Reference in New Issue
Block a user