provider
Provider |
The most basic form of provider. It takes a value and exposes it, whatever the value is. |
ListenableProvider |
A specific provider for Listenable object. ListenableProvider will listen to the object and ask widgets which depend on it to rebuild whenever the listener is called. |
ChangeNotifierProvider |
A specification of ListenableProvider for ChangeNotifier. It will automatically call ChangeNotifier.dispose when needed. |
ValueListenableProvider |
Listen to a ValueListenable and only expose ValueListenable.value. |
StreamProvider |
Listen to a Stream and expose the latest value emitted. |
FutureProvider |
Takes a Future and updates dependents when the future completes. |
ListenableProxyProvider |
A variation of ListenableProvider that builds its value from values obtained from other providers. |
ProxyProvider |
A provider that builds a value based on other providers. |
snackbar |
ScaffoldMessenger. of(context). showSnackBar( SnackBar( content: const Text('snack'), duration: const Duration(seconds: 1), )); |
bottomNavigationBar | return Scaffold( |
WidgetsBindingObserver |
class _LifecycleWatcherState extends State<LifecycleWatcher> with WidgetsBindingObserver { AppLifecycleState _lastLifecycleState; @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); } @override void dispose() { WidgetsBinding.instance.removeObserver(this); super.dispose(); } @override void didChangeAppLifecycleState(AppLifecycleState state) { setState(() { _lastLifecycleState = state; }); } @override Widget build(BuildContext context) { if (_lastLifecycleState == null) return Text('This widget has not observed any lifecycle changes.', textDirection: TextDirection.ltr); return Text('The most recent lifecycle state this widget observed was: $_lastLifecycleState.', textDirection: TextDirection.ltr); } } |
https://medium.com/flutter-korea/row-column-widgets-8c1ff09a6219
https://bsscco.github.io/posts/flutter-introduction-to-animations/
'flutter' 카테고리의 다른 글
Execution failed for task ':app:mergeDexDebug'. (3) | 2019.11.01 |
---|---|
dart lang cheatsheet (0) | 2019.10.29 |
여러가지 화면크기와 화면방향으로 개발하기 (0) | 2019.04.23 |
bloc todo (0) | 2019.04.19 |
Widget, State, BuildContext 그리고 InheritedWidget (1) | 2019.04.16 |