- Use the Flutter Outline tab to wrap widget with
Center()
, and other such single-child widgets. - A lot of things can be done from the Android Studio UI: wrapping widgets with other widgets, removing a wrapping widget....and so and so far. (Option + Enter on Mac). Development goes much faster.
- Uninitialized variables are dynamically typed in Dart! There is a
dynamic
data type! - Stateless vs stateful widgets. Any widgets that need to maintain a record of their state are stateful.
- Hot reload won't be enabled for stateful widgets. Need hot restart.
setState()
can be called from anywhere inside the widget. Any variables that are changed in thesetState()
method are marked dirty, and any code that accesses the variable are run again.- When to use keys: Keys maintain state.
- Flutter Packages: To install any package, click on "Installing" tab of any package. Adding a
^
means it will use the latest version as long as major version number does not change - Dribbble for flutter design inspiration!
- Using Themes
- Accent colors, default colors, everything is customizable.
theme: ThemeData.dark().copyWith( primaryColor: Colors.red, accentColor: Colors.red, floatingActionButtonTheme: FloatingActionButtonThemeData(backgroundColor: Colors.blue), textTheme: TextTheme( body1: TextStyle(color: Colors.white), ), ),
- Notice how FloatingAction has its own theme and doesn't always take the accent color.
- Any widget can be wrapped with its own
ThemeData()
- The Flutter Cookbook: Common "recipes" for common flutter apps. Lots of common things are covered there!
- Find Color HEX codes easily with the Colorzilla plugin
- LaTeX support
- Styling
color
is technically a part of thedecoration
(BoxDecoration(..)
) property
- Dart Language Tour: Final and Const
- Use
copyWith
to customize indvidual widgets - Composition over inheritance! Composition over inheritance!
- You can click through on widgets to get to the actual code. Very useful, because you can compose your own widgets based on stuff a few layers below.
- Navigation cookbook
- Stack of screens
- Named routes
async
andawait
for asynchronous programming- Geolocator Package
- HTTP package
- dart:convert has libraries for converting JSON, XML, base64, etc.
- Loading spinners
widget
property: Maintains the state of a stateful widget. Since there can be more than oneState
object associated with aStatefulWidget
instance, this property is very useful.- [
Platform.iOS
] to check for iOS for example. - TODO: Read about mixins
AnimationController
s can be used easily because it sets the whole state every frame.copyWith()
is quite cool!- TODO: Understand
StreamBuilder()
- Don't place
ListView
s as direct children ofRow
s orColumn
s Bottomsheet
- Stateful Widgets: State is passed through call backs.
- When you convert stateless widgets to stateful, a rebuild of the app is required.
Provider
package is Google's recommendation for managing stateProvider
in theTodoey
appTaskData
class will provide all relevant listeners with updates to task propertie.s.- The
ChangeNotifier
should be at a level where all listeners are available, i.e. below in three. - On updating provider data, the
notifyListeners()
method HAS to be called
- Getting Started: Installing Flutter
- Git for Windows
- Git for Mac
- Install Android Studio
- iOS Setup Instructions
- Material Design
- Scaffold Documentation
- AppBar Documentation
- Material Design Colour System
- Image Widget Documentation
- Make Flowcharts with Draw.io
- Learn More About the Pubspec File
- Adding Assets
- Generating App Icons with AppIcon.co
- Flutter Documentation on Deploying to Physical iOS Devices
- Homebrew for MacOS
- Troubleshooting: Physical iOS Device Testing
- Troubleshooting: Physical Android Device Testing
- MiCard Stub Project
- Widgets Catalogue
- Container Documentation
- Column Documentation
- Row Documentation
- Tomek's Flutter Layout Cheat Sheet
- Download fancy fonts from fonts.google.com
- How to add fonts to the pubspec.yaml file
- The Icons Class
- Material Design Icons
- Icons on materialpalette.com
- Card Class Documentation
- The Padding Class
- The ListTile Class
- Flutter's Horizontal Rule - The Divider
- MiCard Completed Project
- Dicee Stub Project
- Expanded Class: Children of this widget expand to fill available space.
flex
property can be used with expanded widgets to adjust size proportionally
- Image Widget Documentation
Image.asset('images/dice1.png')
Simple way to directly load an asset into an image
- FlatButton Documentation
- Run code snippets on DartPad
- Dart Math Library
- Random Class
- Dicee Completed Project
- XyloPhone Stub Project
- Flutter Packages
- Guide to Using Flutter Packages
- Luan Nico's Audioplayers Package
- AudioCache Documentation
- DartPad Functions Exercise
- Xylophone Completed Project
- Quizzler Stub Project
- List Gist for DartPad List Practice
- Dart List Language Tour
- RFlutter Alert Package
- Dart Constructors
- Quizzler Starting File for Challenge
- Quizzler Solution & Completed Project
- BMI Stub Project
- Dribbble: Find Designers and Design inspiration
- Ruben Vaalt's beautiful BMI Calculator Design
- Using Themes
- The Flutter Cookbook
- ThemeData Class
- Find Color HEX codes easily with the Colorzilla plugin
- The Color Class
- How do HEX codes for with colours?
- The Key Class
- When to Use Keys - Flutter Widgets 101 Ep. 4
- Dart Language Tour: Final and Const
- Font Awesome Flutter Package
- The GestureDetector Class
- Slider Class
- FloatingActionButton Class
- ShapeBorder Class
- RawMaterialButton Class
- Navigating between Screens on Flutter
- LAB Navigation Demo
- Navigate with Named Routes
- Definition of the Body Mass Index (BMI)
- BMI Completed Project
- Clima Stub Project
- Get the Location using the Geolocator Package
- Android X Compatilibity
- Starter Code Snippet for Async Await Demo
- Illustrating Lifecycles with the LAB Navigation Demo
- Location Refactoring Challenge Instructions
- OpenWeatherMap APIs
- Fetching Data from the Internet
- The Dart http package
- OpenWeatherMap Current Weather Documentation
- HTTP Package API Reference
- HTTP Response Class Documentation
- List of HTTP Status Codes
- Chrome Plugin for Formatting and Viewing JSON
- JSON Mate: Formatting and Viewing JSON without a plugin
- Loading Indicators from the Flutter Spinkit
- The State Class
- OpenWeatherMap Weather Conditions
- Create and Style a TextField
- The TextField Class
- Clima Completed Project
- Bitcoin Ticker Stub Project
- Flutter DropdownButton
- Dropdown Menu Design
- 99 Bottles of Beer Programming Language Collection
- DartPad For in Loop Mini Challenge
- Cupertino (iOS) Style Widgets
- CupertinoPicker Class Documentation
- Register for a coinapi.io API key
- Coin API Docs
- Bronze Challenge Start Code
- Silver Challenge Starter Code
- Gold Challenge Starter Code
- Bitcoin Completed Project
- Flash Chat Stub Project
- Dart Language Keywords
- Hero Animations
- Curves Class Documentation
- CurvedAnimation Class Documentation
- Tween Animation Class
- Dart Language Tour: Mixins
- Pre-packaged Animations: Flutter Sequence Animation
- Pre-packaged Animations: Rubber
- Pre-packaged Animations: Sprung
- Pre-packaged Animations: Animated Text Kit
- Refactoring Challenge Instructions
- Create your Firebase Account Here
- Firebase Core Package for Flutter
- Firebase Auth Package for Flutter
- Cloud Firestore Package for Flutter
- Troubleshooting: Firebase & Flutter: Common Errors
- Showing a Spinner: The Modal Progress HUD
- Firebase Documentation
- Kitsune-kun visualising Dart Streams and Nagashi Sōmen
- StreamBuilder Class Documentation
- AsyncSnapshot Class Documentation
- ListView Class Documentation
- Guide to the Firestore Security Rules
- Flash Chat Completed Project