Bumps [go_router](https://github.com/flutter/packages/tree/main/packages) from 14.8.1 to 15.0.0. <details> <summary>Commits</summary> <ul> <li><a href="b03228fba3"><code>b03228f</code></a> [go_router] Adds <code>caseSensitive</code> to <code>GoRoute</code> (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8992">#8992</a>)</li> <li><a href="2fcc4032dd"><code>2fcc403</code></a> [camera_android_camerax] Updates internal API wrapper to use ProxyApis (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8618">#8618</a>)</li> <li><a href="43890676d0"><code>4389067</code></a> [webview_flutter_android] Adds internal wrapper methods for native `WebViewCl...</li> <li><a href="7bdffbe33f"><code>7bdffbe</code></a> [webview_flutter_wkwebview] Fixes <code>loadFlutterAsset</code> exception and updates na...</li> <li><a href="f26b681ab4"><code>f26b681</code></a> [various] Update Android example toolchains (<a href="https://github.com/flutter/packages/tree/main/packages/issues/9062">#9062</a>)</li> <li><a href="312f23f9bf"><code>312f23f</code></a> [shared_preferences] Allow reading int as long in SharedPreferences <a href="https://github.com/flutter/packages/tree/main/packages/issues/165781">#165781</a> (...</li> <li><a href="2405f6a2b7"><code>2405f6a</code></a> [pigeon] swift equality methods (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8971">#8971</a>)</li> <li><a href="4a36dc63f7"><code>4a36dc6</code></a> [all_packages] Enforce property assignment for compile sdk over method assign...</li> <li><a href="eaf475cefb"><code>eaf475c</code></a> [google_maps_flutter] Fix iOS info window regression (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8939">#8939</a>)</li> <li><a href="07496eb030"><code>07496eb</code></a> [multicast_dns] MDnsClient::listen supports onError callback (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8888">#8888</a>)</li> <li>Additional commits viewable in <a href="https://github.com/flutter/packages/commits/go_router-v15.0.0/packages">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
provider_shopper
A Flutter sample app that shows a state management approach using the Provider package. This is the app discussed in the Simple app state management section of flutter.dev.
Goals for this sample
- Show simple use of
Providerfor providing an immutable value to a subtree - Illustrate a simple state management approach using the ChangeNotifier class
- Show use of
ProxyProviderfor provided objects that depend on other provided objects
The important bits
lib/main.dart
Here the app sets up objects it needs to track state: a catalog and a shopping cart. It builds
a MultiProvider to provide both objects at once to widgets further down the tree.
The CartModel instance is provided using a ChangeNotifierProxyProvider, which combines
two types of functionality:
- It will automatically subscribe to changes in
CartModel(if you only want this functionality simply useChangeNotifierProvider). - It takes the value of a previously provided object (in this case,
CatalogModel, provided just above), and uses it to build the value ofCartModel(if you only want this functionality, simply useProxyProvider).
lib/models/*
This directory contains the model classes that are provided in main.dart. These classes
represent the app state.
lib/screens/*
This directory contains widgets used to construct the two screens of the app: the catalog and
the cart. These widgets have access to the current state of both the catalog and the cart
via Provider.of.
Questions/issues
If you have a general question about Provider, the best places to go are:
If you run into an issue with the sample itself, please file an issue in the main Flutter repo.