Flutter snippets 覚書(ポエム)

## Android Studio plugins
そのうち更新する。

### Flutter Snippets1
|Shortcut|Expanded|Description|Flutter Docs|
|:----|:----|:----|:----|
|animatedBldr|Animated Builder|Creates an Animated Builder. The child widget is passed to the builder|View Docs|
|aspectRatio|AspectRatio|Creates an AspectRatio|View Docs|
|build|Build Method|Describes the part of the user interface represented by the widget.| |
|column|Column|Creates a Column Widget|View Docs|
|container|Container|Creates a Container Widget|View Docs|
|customClipper|Custom Clipper|Used for creating custom shapes|View Docs|
|customPainter|Custom Painter|Used for creating custom paint|View Docs|
|customScrollV|Custom ScrollView|Creates a ScrollView that creates custom scroll effects using slivers. If the primary argument is true, the controller must be null.|View Docs|
|debugP|Debug Print|Prints a message to the console, which you can access using the flutter tool'slogscommand (flutter logs).|View Docs|
|dis|Dispose|Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again.|View Docs|
|futureBldr|Future Builder|Creates a Future Builder. This builds itself based on the latest snapshot of interaction with a Future|View Docs|
|initS|InitState|Called when this object is inserted into the tree. The framework will call this method exactly once for each State object it creates.|View Docs|
|layoutBldr|Layout Builder|Similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widget's constraints.|View Docs|
|listViewBldr|ListView.Builder|Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null itemCount improves the ability of the ListView to estimate the maximum scroll extent.|View Docs|
|mounted|Mounted|Whether this State object is currently in a tree.|View Docs|
|nosm|No Such Method|This method is invoked when a non-existent method or property is accessed.|View Docs|
|orientationBldr|Orientation Builder|Creates a builder which allows for the orientation of the device to be specified and referenced|View Docs|
|reassemble|Reassemble|Called whenever the application is reassembled during debugging, for example during hot reload.|View Docs|
|row| |Creates a Row Widget|View Docs|
|showDialog|Alert Dialog|Creates a showDialog that returns with AlertDialog|View Docs|
|singleChildSV|Single Child Scroll View|Creates a scroll view with a single child|View Docs|
|snk|Sink|A Sink is the input of a stream.|View Docs|
|streamBldr|Stream Builder|Creates a new StreamBuilder that builds itself based on the latest snapshot of interaction with the specified stream|View Docs|
|statefulBldr|Stateful Builder|Creates a widget that both has state and delegates its build to a callback. Useful for rebuilding specific sections of the widget tree.|View Docs|
|strm|StreamController|A source of asynchronous data events. A stream can be of any data type.|View Docs|
|subj|BehaviorSubject|A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream.|View Docs|
|txt|Text|Creates a Text Widget|View Docs|
|toStr|To String|Returns a string representation of this object.|View Docs|
|tweenAnimationBldr|Tween Animation Builder|Widget builder that animates a property of a Widget to a target value whenever the target value changes.|View Docs|
|valueListenableBldr|Value Listenable Builder|Given a ValueListenable and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes.|View Docs|
|Cupertino Specific| | | |
|Shortcut|Expanded|Description|Flutter Docs|
|cupeApp|Cupertino App|Create a New Cupertino App|View Docs|
|importC|Cupertino Package|Import Cupertino package.|View Docs|
|Material Specific| | | |
|Shortcut|Expanded|Description|Flutter Docs|
|importM|Material Package|Import Material package|View Docs|
|mateApp|Material App|Create a new Material App|View Docs|
|scfAll|Scaffold|Creates a Scaffold containing an Appbar, BottomNavigationBar and FloatingActionButton|View Docs|
|scfAppBar|Scaffold|Creates a Scaffold containing an Appbar| |
|scfAppBarFab|Scaffold|Creates a Scaffold containing an Appbar and Floating Action Button| |
|scfAppBarBtmNav|Scaffold|Creates a Scaffold containing an Appbar and Bottom Navigation Bar| |

### Flutter Snippets2
|Shortcut|Description|
|:----|:----|
|pagestart|Create page with MaterialApp.|
|page|Create page without MaterialApp.|
|btn_falt|Create FlatButton Widget|
|btn_falt_icon|Create FlatButton.icon Widget|
|btn_raised|Create RaisedButton Widget|
|btn_falt_icon|Create RasiedButton.icon Widget|
|btn_outline|Create OutlineButton Widget|
|btn_outline_icon|Create OutlineButton.icon Widget|
|btn_text|Create TextButton Widget|
|btn_text_icon|Create TextButton.icon Widget|
|btn_popup|Create PopupMenuButton Widget|
|btn_dropdown|Create DropdownButton Widget|
|btn_icon|Create IconButton Widget|
|animatedBldr|Animated Builder|Creates an Animated Builder.|
|aspectRatio|AspectRatio |Creates an AspectRatio|
|build|Build Method|
|column|Column |Creates a Column Widget|
|container|Container |Creates a Container Widget|
|customClipper|Custom Clipper|
|customPainter|Custom Painter|
|customScrollV|Custom ScrollView|
|debugP|Debug Print|
|dis|Dispose|
|futureBldr|Future Builder|Creates a Future Builder.|
|initS|InitState|
|layoutBldr|Layout Builder|
|listViewBldr|ListView.Builder|
|mounted|Mounted|Whether this State object is currently in a tree.|
|nosm|No Such Method|
|orientationBldr|Orientation Builder|
|reassemble|Reassemble|
|row|Creates a Row Widget|
|showDialog|Alert Dialog|
|singleChildSV|Single Child Scroll View|Creates a scroll view with a single child|
|snk|Sink|A Sink is the input of a stream.|
|streamBldr|Stream Builder|
|statefulBldr|Stateful Builder|
|strm|StreamController|
|subj|BehaviorSubject|
|text|Text |Creates a Text Widget|
|toStr|To String|Returns a string representation of this object.|
|tweenAnimationBldr|Tween Animation Builder|
|valueListenableBldr|Value Listenable Builder|
|cupeApp|Cupertino App |Create a New Cupertino App|
|importC|Cupertino Package|Import Cupertino package.|
|importM|Material Package |Import Material package|
|mateApp|Material App |Create a new Material App|
|scfAll|Scaffold |Creates a Scaffold containing an Appbar, BottomNavigationBar and FloatingActionButton|
|scfAppBar|Scaffold |Creates a Scaffold containing an Appbar|
|scfAppBarFab|Scaffold |Creates a Scaffold containing an Appbar and Floating Action Button|
|scfAppBarBtmNav|Scaffold |Creates a Scaffold containing an Appbar and Bottom Navigation Bar|

### Flutter Riverpod Snippets
|Shortcut|Description|
|:----|:----|
|consumer|Creates a Consumer widget to obtain a Provider of Riverpod.|
|changeNotifierProvider|Creates a ChangeNotifierProvider of Riverpod.|
|changeNotifierProviderFamily|Creates a ChangeNotifierProvider.family of Riverpod.|
|provider|Create a Provider of RiverPod.|
|providerFamily|Create a Provider.family of RiverPod.|
|futureProvider|Create a FutureProvider of Riverpod.|
|futureProviderFamily|Create a FutureProvider.family of Riverpod.|
|streamProvider|Create a StreamProvider of Riverpod.|
|streamProviderFamily|Create a StreamProvider.family of Riverpod.|
|scopedProvider|Create a ScopedProvider of Riverpod.|
|stateNotifier|Creates a StateNotifier of state_provider.|
|stateNotifierProvider|Creates a StateNotifierProvider of Riverpod.|
|stateNotifierProviderFamily|Creates a StateNotifierProvider.family of Riverpod.|
|stateProvider|Create a StateProvider of Riverpod.|
|stateProviderFamily|Create a StateProvider.family of Riverpod.|

### Riverpod snippets

```dart
class MyModel {}

class MyStateNotifier extends StateNotifier<MyModel> {
  MyStateNotifier(): super(MyModel());
}

final provider = StateNotifierProvider<MyStateNotifier, MyModel>((ref) {
  return MyStateNotifier();
});

Widget build(BuildContext context, ScopedReader watch) {
  MyStateNotifier notifier = watch(provider.notifier);
}

Widget build(BuildContext context, ScopedReader watch) {
  MyModel state = watch(provider);
}
```