title: Flutter with provider package UI doesn't Update at the detailpage
body: <p>I wrote a Flutter-app and managed my data with the providers package. With an icon button you can mark a product as a favorite. With my product-item which is loaded into a gridview the UI updates if I favorite a product(the icon changes from a border to a filled icon). But on the detail page which shows more details of a product the UI doesn't update if I press the button.</p>
  <p>This is the product class:</p>
  <pre><code>
  class Product with ChangeNotifier {
    final String id;
    final String title;
    final String description;
    final double price;
    final String imageUrl;
    bool isFavorite;
  
    Product({
      @required this.id,
      @required this.title,
      @required this.description,
      @required this.price,
      @required this.imageUrl,
      this.isFavorite = false,
    });
  
    void toggleFavoriteStatus() {
      isFavorite = !isFavorite;
      notifyListeners();
    }
  }
  
  </code></pre>
  <p>This is the products class where I manage my data:</p>
  <pre><code>import 'package:flutter/material.dart';
  
  import './product.dart';
  
  class Products with ChangeNotifier {
    List&lt;Product&gt; _items = [
      Product(
        id: 'p1',
        title: 'Red Shirt',
        description: 'A red shirt - it is pretty red!',
        price: 29.99,
        imageUrl:
            'https://cdn.pixabay.com/photo/2016/10/02/22/17/red-t-shirt-1710578_1280.jpg',
      ),
      Product(
        id: 'p2',
        title: 'Trousers',
        description: 'A nice pair of trousers.',
        price: 59.99,
        imageUrl:
            'https://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Trousers%2C_dress_%28AM_1960.022-8%29.jpg/512px-Trousers%2C_dress_%28AM_1960.022-8%29.jpg',
      ),
      Product(
        id: 'p3',
        title: 'Yellow Scarf',
        description: 'Warm and cozy - exactly what you need for the winter.',
        price: 19.99,
        imageUrl:
            'https://live.staticflickr.com/4043/4438260868_cc79b3369d_z.jpg',
      ),
      Product(
        id: 'p4',
        title: 'A Pan',
        description: 'Prepare any meal you want.',
        price: 49.99,
        imageUrl:
            'https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Cast-Iron-Pan.jpg/1024px-Cast-Iron-Pan.jpg',
      ),
    ];
  
    List&lt;Product&gt; get items {
      return [..._items];
    }
  
    Product findById(String id) {
      return _items.firstWhere((prod) =&gt; prod.id == id);
    }
  }
  </code></pre>
  <p>This is the product-item:</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  import '../screens/product_detail_screen.dart';
  import '../providers/product.dart';
  
  class ProductItem extends StatelessWidget {
    // final String id;
    // final String title;
    // final String imageUrl;
  
    // ProductItem(this.id, this.title, this.imageUrl);
  
    @override
    Widget build(BuildContext context) {
      final product = Provider.of&lt;Product&gt;(context, listen: false);
      return ClipRRect(
        borderRadius: BorderRadius.circular(10),
        child: GridTile(
          child: GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                ProductDetailScreen.routeName,
                arguments: product.id,
              );
            },
            child: Image.network(
              product.imageUrl,
              fit: BoxFit.cover,
            ),
          ),
          footer: GridTileBar(
            backgroundColor: Colors.black87,
            leading: Consumer&lt;Product&gt;(
              builder: (ctx, product, child) =&gt; IconButton(
                    icon: Icon(
                      product.isFavorite ? Icons.favorite : Icons.favorite_border,
                    ),
                    color: Theme.of(context).accentColor,
                    onPressed: () {
                      product.toggleFavoriteStatus();
                    },
                  ),
            ),
            title: Text(
              product.title,
              textAlign: TextAlign.center,
            ),
            trailing: IconButton(
              icon: Icon(
                Icons.shopping_cart,
              ),
              onPressed: () {},
              color: Theme.of(context).accentColor,
            ),
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>This is the detail-page:</p>
  <pre><code>import 'dart:html';
  
  import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  import '../providers/products.dart';
  
  class ProductDetailScreen extends StatelessWidget {
    // final String title;
    // final double price;
  
    // ProductDetailScreen(this.title, this.price);
    static const routeName = '/product-detail';
  
    @override
    Widget build(BuildContext context) {
      final productId =
          ModalRoute.of(context).settings.arguments as String; // is the id!
      final loadedProduct = Provider.of&lt;Products&gt;(
        context,
        listen: false,
      ).findById(productId);
      return Scaffold(
        appBar: AppBar(
          title: Text(loadedProduct.title),
          actions: &lt;Widget&gt;[
            IconButton(
              onTap: () {
                loadedProduct.toggleFavoriteStatus();
              },
              child: Icon(
                loadedProduct.isFavorite ? Icons.star : Icons.star_border,
                color: Colors.white,
              ),
            ),
          ],
        ),
      );
    }
  }
  
  </code></pre>
  <p>Thanks to everybody who tries to find a solution for this.</p>