Hello i am loading json from local assets file and show in listview in my flutter app anyone know how to implement searchbar here is my code
body: Container(
<pre> child: Center(
child: FutureBuilder(
future: DefaultAssetBundle
.of(context)
.loadString('assets/hebrew.json'), builder: (context, snapshot) {
var new_data = json.decode(snapshot.data.toString());
return ListView.builder(
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: (){
_showMyDialog(new_data[index]['eng'],new_data[index]['hebrew'],new_data[index]['urdu']);
},
child: Card(
child: Padding(
padding: EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(new_data[index]['eng']),
SizedBox(height: 10,),
Text(new_data[index]['hebrew']),
SizedBox(height: 10,),
Text(new_data[index]['urdu'])
],
),
),
),
);
},
itemCount: new_data == null ? 0 : new_data.length,
);
}),
),
))
;
What I have tried:
i tried to search on google but no result found