The ListView widget can contain several list elements, and scrolling through the entire list to get to the desired list element would be time consuming. For example, consider your contacts list; to get to a particular contact, one will have to scroll several times. To obliterate this, you can add a filter and use it to retrieve the desired list element that matches the input text.
Let's consider a flat data source, that is, an array that contains a list of strings:
var listElements = ['Leonardo DiCaprio', 'Johnny Depp', 'Bradley Cooper', 'Al Pacino', 'Tom Cruise','Jude Law', 'Robert Downey Jr.', 'Will Smith', 'Robert De Niro', 'Christian Bale', 'Brad Pitt','Tom Hanks', 'Robert Pattinson', 'Ben Stiller'];
Now when initializing the ListView widget, provide the preceding elements as a dataSource
and also include a filterable
...