Skip to content

Instantly share code, notes, and snippets.

@tx-TEM
Last active January 24, 2021 13:19
Show Gist options
  • Save tx-TEM/356e49447a4a4d7f2b4cce61b9148408 to your computer and use it in GitHub Desktop.
Save tx-TEM/356e49447a4a4d7f2b4cce61b9148408 to your computer and use it in GitHub Desktop.
flutter勉強メモ

Widget

StatelessWidget

State(状態)を持たないWidget。変数を定義しても、自分でその値を更新することはできない。

StatefulWidget

State(状態)を持つWidget。状態を持つため、自分の変数を更新することで自分自身を再ビルドすることができる。

createState

StatefulWidgetの状態と画面を定義するクラス。画面の本体? setStateで自身を更新することができる

変数

変数名の前に「_」をつけるとプライベート

設計

package:provider

package:providerというものが推奨されている?(2020年の記事より)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment