working on filtering
This commit is contained in:
@@ -48,9 +48,9 @@ class ListPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.all(Constants.edgeInset),
|
||||
itemCount: provider.quotes.length,
|
||||
itemCount: provider.filteredQuotes.length,
|
||||
itemBuilder: (context, index) {
|
||||
final quote = provider.quotes[index];
|
||||
final quote = provider.filteredQuotes[index];
|
||||
|
||||
return
|
||||
ListTile(
|
||||
@@ -211,7 +211,6 @@ class ListPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget filterBar(BuildContext context, QuoteProvider provider) {
|
||||
int filterBy = 0; // 0 = by author, 1 = by quote
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(Constants.edgeInset),
|
||||
child: Row(
|
||||
@@ -231,7 +230,7 @@ class ListPage extends StatelessWidget {
|
||||
IconButton(
|
||||
icon: Icon(Icons.search),
|
||||
onPressed: () {
|
||||
// TODO: filtering
|
||||
provider.filterQuotes;
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
|
||||
Reference in New Issue
Block a user