Click here to Skip to main content
15,569,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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(
            // Use future builder and DefaultAssetBundle to load the local JSON file
            child: FutureBuilder(
                future: DefaultAssetBundle
                    .loadString('assets/hebrew.json'), builder: (context, snapshot) {
                  // Decode the JSON
                  var new_data = json.decode(;
                  return ListView.builder(
                    // Build the ListView
                    itemBuilder: (BuildContext context, int index) {
                      return GestureDetector(
                        onTap: (){
                        child: Card(
                          child: Padding(
                            padding: EdgeInsets.all(20.0),
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.stretch,
                              children: <Widget>[
                                SizedBox(height: 10,),
                                SizedBox(height: 10,),
                    itemCount: new_data == null ? 0 : new_data.length,

What I have tried:

i tried to search on google but no result found
Updated 22-Dec-21 23:43pm

1 solution

i tried to search on google but no result found
What did you search for? Look at this: flutter search bar example - Google Search[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900