1.Flutter Provider Snippets
以下、Flutter で Provider パッケージ利用時のスニペットです。
providerOf
(Get the a specific Type from the context)コンテキストから特定のタイプを取得します
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image.png?resize=272%2C95&ssl=1)
providerOfFalse
(Get the a specific Type from the context without listen changes)リッスン変更せずにコンテキストから特定の Type を取得します
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-1.png?resize=391%2C69&ssl=1)
consumer
(Create a consumer)consumer部の作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-2.png?resize=337%2C138&ssl=1)
selector
(Create a selector with 1 property)プロパティを1つ持つセレクタを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-3.png?resize=319%2C175&ssl=1)
selector2
(Create a selector with 2 properties)2つのプロパティを持つセレクターを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-4.png?resize=353%2C176&ssl=1)
selector3
(Create a selector with 3 properties)3つのプロパティを持つセレクターを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-5.png?resize=379%2C172&ssl=1)
provider
(Create a provider)プロバイダーの作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-6.png?resize=252%2C123&ssl=1)
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-7.png?resize=343%2C123&ssl=1)
changeNotifierProvider
(Create a changeNotifierProxyProvider with 1 dependency)依存関係を1つ持つchangeNotifierProxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-8.png?resize=361%2C116&ssl=1)
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-9.png?resize=459%2C133&ssl=1)
changeNotifierProxyProvider2
(Create a changeNotifierProxyProvider with 2 dependencies)2つの依存関係を持つchangeNotifierProxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-10.png?resize=600%2C137&ssl=1)
changeNotifierProxyProvider3
(Create a changeNotifierProxyProvider with 3 dependencies)3つの依存関係を持つchangeNotifierProxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-11.png?resize=600%2C106&ssl=1)
proxyProvider
(Create a proxyProvider with 1 dependency)依存関係を1つ持つproxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-12.png?resize=462%2C149&ssl=1)
proxyProvider2
(Create a proxyProvider with 2 dependencies)2つの依存関係を持つproxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-13.png?resize=523%2C148&ssl=1)
proxyProvider3
(Create a proxyProvider with 3 dependencies)3つの依存関係を持つproxyProviderを作成
![](https://i0.wp.com/zakku-spot.com/wp-content/uploads/2024/07/image-14.png?resize=600%2C137&ssl=1)