title: how to build search bar in flutter?
body: <p>i m a beginner in flutter and i need help. The goal is to have a search bar in order to find users with their name.
  i call users with provider and their data with the AppUserData model class</p>
  <p>here is my code</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:models/user.dart';
  import 'package:provider/provider.dart';
  
  class UserList extends StatefulWidget {
    @override
    FilterLocalListPageState createState() =&gt; FilterLocalListPageState();
  }
  
  class FilterLocalListPageState extends State&lt;UserList&gt; {
  
  
    @override
    Widget build(BuildContext context) {
      final users = Provider.of&lt;List&lt;AppUserData&gt;&gt;(context);
  
      return Scaffold(
        appBar: AppBar(
          title: Text(&quot;users&quot;),
          centerTitle: true,
        ),
        body: Column(
          children: &lt;Widget&gt;[
            Expanded(
              child: ListView.builder(
                itemCount: users.length,
                itemBuilder: (context, index) {
                  return buildBook(users[index]);
                },
              ),
            ),
          ],
        ),
      );
    }
  
    Widget buildBook(AppUserData user) =&gt; ListTile(
          leading: Image.network(
            user.profilepic,
            fit: BoxFit.cover,
            width: 50,
            height: 50,
          ),
          title: Text(user.name),
        );
  }
  </code></pre>
  <p>Thank for your help</p>