material-components / material-components-flutter-codelabs

Codelabs for Material Components for Flutter
212 stars 247 forks source link

Missing instructions for MDC-104, step 7 prevents filtering from working #145

Closed alexandre-senecal closed 5 years ago

alexandre-senecal commented 5 years ago

The sample code to update home.dart does not pass category to the AsymetricView

In home.dart, add a variable for Category and pass it to the AsymmetricView. ... @override Widget build(BuildContext context) { // TODO: Pass Category variable to AsymmetricView (104) return AsymmetricView(products: ProductsRepository.loadProducts(Category.all)); } }

Should be replaced with

@override Widget build(BuildContext context) { // TODO: Pass Category variable to AsymmetricView (104) return AsymmetricView(products: ProductsRepository.loadProducts(category)); } }

rami-a commented 5 years ago

Thanks for the opening the issue @alexandre-senecal, I have pushed up a change to the instructions with this fix. If you could please verify the fix, that would be great!

alexandre-senecal commented 5 years ago

Looks good! Thank you @rami-a