Skip to content

Flutter

Glossary

148 terms from Flutter, in plain words, each with the chapter that teaches it.

#

.adaptive constructors
Constructors such as `CircularProgressIndicator.adaptive()` that draw the iOS style on iPhones and the Material style elsewhere. They give small native touches without extra code.

A

Access-Control headers
Extra response headers the practice server sends so a browser (the Chrome version of the app) is allowed to call it. Chrome also sends an `OPTIONS` request before a `POST` to check them.
Android emulator
A virtual Android phone that runs as a program on your computer, so you can test the app without a real phone.
Android Studio
Google's official development environment for Android. Installing it also provides the Android SDK and the Device Manager, where you create a virtual phone (an emulator) to run apps on.
AndroidManifest.xml
The Android project file that declares the app's name, permissions such as `INTERNET`, and similar settings. The main one affects release builds; a separate debug one only affects debug builds.
API
The set of requests a server understands and how it answers them. Kettle & Crane's API answers `GET /products` and `POST /orders`.
APK
An Android install file you can copy straight onto a phone, handy for testers. `flutter build apk` makes one.
app bar
The bar across the top of a screen, made with the `AppBar` widget. It holds a `title`, `actions` at the right end, and a back arrow when there is a screen below.
app bundle
The `.aab` file Google Play wants. Play uses it to make small installs for each kind of phone; `flutter build appbundle` creates it.
app id
The unique name the stores know your app by, such as `com.kettleandcrane.kc_order`. It starts from the `--org` value and can never change once the app is in a store.
as (cast)
A cast tells Dart to treat a value as a certain type, such as `json['name'] as String`, and checks at run time that it really is that type. It fails with an error if the key is missing or the type is wrong.
AsyncValue
The value you get from watching a `FutureProvider`: it is either loading, holding data, or holding an error. Its `when` method takes one function for each case and runs the one that fits.

B

Badge
A widget that puts a small count bubble on another widget. Kettle & Crane uses it to show how many lines are in the cart on the bag icon.
build method
The method that returns the widgets a widget is made of. Flutter calls it whenever it needs to draw the widget, so it should be quick; its `BuildContext` says where the widget sits in the tree.
build number
The number after `+` in `version: 1.0.0+1` in `pubspec.yaml`. The stores use it to tell uploads apart, so each upload needs a higher one.
busy flag
A `bool` in a State that is `true` while a task such as sending an order is running. It disables the button so a double tap can't send twice.

C

Card
A widget that draws a panel with rounded corners and a soft shadow around its child. Each product on the menu is shown in a Card.
Center
A widget that puts its one `child` in the middle of the space it has.
child and children
Widgets that hold one other widget take `child`; widgets that hold several, such as `Column` and `Row`, take a `children` list. Using the wrong one gives a named-parameter error.
CircularProgressIndicator
A spinning circle that shows something is loading. The `.adaptive()` version uses the iOS style on iPhones.
cleartext
Traffic sent over plain `http://` instead of encrypted `https://`. Phones block it by default, so you allow it only in debug builds to reach the practice server.
client
The program that sends requests to a server and uses the responses it gets back. In the Kettle & Crane example, the client is the app, which asks the server for the menu.
color scheme
A set of matching colors for backgrounds, buttons, cards and text. `ColorScheme.fromSeed` builds a whole scheme from one brand color, such as Kettle & Crane's coffee brown.
Column
A widget that stacks its `children` from top to bottom. It never scrolls, and you place its children with `mainAxisAlignment` and `crossAxisAlignment`.
const
Marks a widget or value that never changes, so Flutter builds it once and reuses it. It also lets a parent skip rebuilding that part of the tree.
constraints
Flutter's sizing rule: each widget tells its children the smallest and largest size allowed, each child picks a size within that, and the parent sets the position. It explains most layout surprises.
ConsumerStatefulWidget
Riverpod's version of `StatefulWidget`, whose State extends `ConsumerState` and so has a `ref` field. Use it when a screen needs both providers and its own state, like the cart form.
ConsumerWidget
Riverpod's version of `StatelessWidget`; its `build` gets an extra `WidgetRef ref` parameter for reading providers.
Content-Type
A header that tells the receiver what kind of data the body holds. `Content-Type: application/json` tells the server that an order's body is JSON.
context.mounted
A check that a widget is still on screen. After an `await`, the customer may have left the screen, so check `mounted` before using `context` or `setState`.
cross axis
The direction across a `Row` or `Column`'s main axis: left to right in a `Column`, top to bottom in a `Row`. `crossAxisAlignment` lines children up along it.
Cupertino
Flutter's widgets in the iOS style, for screens that should look native on iPhones.

D

dart run
The command that runs a Dart program. The practice server starts with `dart run bin/server.dart` from the `kc_server` folder.
debug build
The build `flutter run` makes while you develop: slower and larger, with hot reload and a DEBUG banner.
device
Anything Flutter can run your app on: a real phone, an emulator, a simulator or Chrome.
DevTools
Flutter's set of debugging tools, including a performance view that shows how often widgets rebuild.
dialog
A small box over the screen that asks a question. `showDialog` opens an `AlertDialog`, which is a route, so `Navigator.pop` closes it.
disabled
A button that is gray and ignores taps because its `onPressed` is `null`. The Place order button is disabled when the cart is empty or an order is being sent.
dispose()
The `State` method that runs once when a widget is removed for good; free controllers there and then call `super.dispose()`. Its partner `initState()` runs once when the state is created.
dropdown
A field that opens a list so the customer can pick one value, such as a pickup time. `DropdownButtonFormField` is the version that belongs to a form.

E

EdgeInsets
A description of space on each side of a widget, used by `Padding`. `EdgeInsets.all(16)` adds 16 on every side.
endpoint
One address on a server that answers requests, such as `/products` or `/orders`.
Expanded
A widget that makes its child take all the space left in a `Row` or `Column` after the other children. It is the usual fix for an overflow and lets long names wrap.

F

factory constructor
A constructor that builds an object some other way. `Product.fromJson` builds a `Product` from a JSON map, and `toJson` goes the other way.
FilledButton
Material buttons that take an `onPressed` function. `FilledButton` is solid for the main action, `TextButton` is flat, and `IconButton` is a tappable icon.
Flexible
A widget that lets its child take up to its share of the free space in a `Column` or `Row`, but not necessarily all of it. It is used in the keyboard-stripes fix on the cart screen.
Flutter
Google's free toolkit for building iPhone, Android, web and desktop apps from one Dart codebase. It draws every pixel itself, so apps look the same everywhere.
flutter build
Makes release files: `appbundle` for Google Play, `apk` for testers, and `ipa` for the App Store (Mac only).
flutter create
Makes a new project folder with a small working app. `--org` sets the start of the app id.
flutter doctor
Checks your Flutter setup and prints one line per part. A check mark means ready; a cross says what to install.
flutter pub add
Adds a package to `pubspec.yaml` and downloads it. `flutter pub get` re-downloads packages after you edit `pubspec.yaml` by hand.
flutter run
Builds the app and starts it on a device. `-d chrome` picks Chrome directly, and `--release` runs a release build.
flutter test
Runs every `_test.dart` file in `test/` and ends with `All tests passed!` when all pass.
flutter_secure_storage
Packages for data that `shared_preferences` shouldn't hold: `flutter_secure_storage` for passwords and tokens (the key-value store isn't encrypted), and `sqflite` or `drift` for large or searchable data in a database.
Form
A group of input fields that are checked together. Calling `validate()` runs every validator, shows red messages and returns `true` only if all pass.
Future
A value that will arrive later, such as the server's answer. Functions that return one are `async` and are awaited.
FutureProvider
A Riverpod provider whose value comes from a `Future`, such as `fetchProducts()`. It fetches once when first watched and shares the result with every screen.

G

GlobalKey
A key that lets your code reach a widget's state. Giving a `GlobalKey<FormState>` to a `Form` lets you call `_formKey.currentState!.validate()`.
go_router
A Flutter package for navigation by web-style paths, such as `/products`. It also supports deep links, which are links that open a particular screen inside an app.
golden tests
Tests that compare a screen with a saved picture to catch visual changes.

H

headers
Labeled extra details sent with a request or response, such as `Content-Type`.
hot reload
Swaps your changed code into the running app in about a second and keeps its state; press `r` in the terminal or save in VS Code.
hot restart
Starts the app again from `main` with your new code, losing its state; press `R`. Use it when hot reload doesn't show a change, such as after editing `main`, `home:` or a top-level value.
http package
The package used to call a server from Dart. `http.get(uri)` fetches data and `http.post(uri, headers:, body:)` sends it.
HTTP status codes
The number in a response that says how it went: 200 OK (it worked), 201 Created (a new thing was made, such as an order), 404 Not Found (no such path).
HTTPS
The encrypted form of `http://` web traffic. Use `https://` for the real Kettle & Crane server; plain `http` is only for the local practice server.

I

Icon
A widget that shows a picture from Flutter's built-in set, named in the `Icons` class, such as `Icon(Icons.coffee, size: 40)`.
in-memory
Kept only while the program runs. Tests use an in-memory stand-in for the phone's storage.
Info.plist
The iOS file of app settings, such as the display name, network rules and permission usage texts.
InkWell
A widget that makes its child tappable and draws the Material ripple where the finger lands. It takes an `onTap` callback.
InputDecoration
Describes how a text field or dropdown looks, such as its `labelText`. It goes in the field's `decoration` parameter.
integration test
A test that runs the whole app on a device or emulator. It is the most realistic and slowest, so keep it for a few key trips like placing an order.
iOS Simulator
A virtual iPhone that runs on a Mac as part of Xcode. It has no phone app and runs only debug builds.
IPA
The iOS app file the App Store wants, made with `flutter build ipa` on a Mac.

J

JSON
The text format the server uses to send lists and objects, such as the menu. `jsonDecode` turns text into maps and lists and `jsonEncode` turns them back into text.

K

key
An optional id Flutter can use to tell widgets apart. `super.key` in a constructor passes it up to the parent class.
key-value storage
Saving values under names (keys) and reading them back by the same name, like a `Map` that survives restarts. Kettle & Crane uses it to keep the cart.

L

launchUrl
The `url_launcher` plugin's function that opens a link in the right app: web pages in the browser, `tel:` links in the phone app. It returns `true` if something opened.
ListTile
A ready-made list row with a `title`, `subtitle` and `trailing` widget, such as a cart line.
ListView
A scrolling list. `ListView.builder` builds only the rows currently on screen, from `itemCount` and an `itemBuilder(context, index)` function, so long lists stay fast.
localhost
The name a computer uses for itself. It works for Chrome and the iOS Simulator; the Android emulator is its own virtual phone, so it reaches your computer at `10.0.2.2` instead.
logical pixels
Flutter's unit of size, roughly the same physical size on every phone, so 16 looks the same everywhere.

M

main axis
The direction a `Column` (down) or `Row` (across) lays out its children. `mainAxisAlignment` places the children along it.
Material Design
Google's design system for buttons, bars and cards, which Flutter's Material widgets follow. `MaterialApp` sets up an app that uses it.
MaterialPageRoute
The route you push onto the navigator to show a new screen. Its `builder` returns the screen, which is where you pass it data.
method (HTTP)
The kind of request: `GET` asks for data and `POST` sends some, such as an order.

N

native code
Code written for a single platform's own system, such as Swift on iOS or Kotlin on Android. Plugins contain it behind a Dart API.
navigator
The part of Flutter that keeps routes in a stack. `Navigator.push` puts a screen on top and `Navigator.pop` takes it off.
Notifier
A Riverpod class that owns one value, `state`, and the methods that change it. Replace the state instead of changing it in place so watching widgets rebuild.
null check error
The error `Null check operator used on a null value`, raised when code uses `!` on a value that is `null`. For example `currentState!` fails if the Form isn't using the key.

O

onPressed
The function a button runs on each tap; `null` disables it. `onTap` is the same idea for `InkWell`, typed as `VoidCallback` (a function taking and returning nothing).
overflow
What happens when a `Row` or `Column`'s children need more room than there is. Flutter paints yellow and black stripes and prints `A RenderFlex overflowed`; wrap the flexible child in `Expanded`.
override
In a test, giving a provider a fake value for that test only, such as a fixed product list instead of a server fetch.

P

package
A bundle of Dart code published on pub.dev that you add with `flutter pub add`.
Padding
A widget that adds empty space around its child, set with `EdgeInsets`.
PATH
The list of folders your terminal searches for commands. After adding the Flutter SDK to it, reopen the terminal so `flutter` is found.
permissions
The system asks the user before an app uses things like the camera or location. iOS needs a usage text in `Info.plist` and Android needs a `<uses-permission>` line; a phone call needs none.
platform channel
A way for Dart code to call your own Swift or Kotlin code when no plugin does what you need.
plugin
A package with Dart code plus native iOS and Android code, such as `shared_preferences` or `url_launcher`. Stop and re-run the app after adding one.
port
A number that picks one program on a computer. The practice server listens on port 8080.
provider
A Riverpod object, outside the widget tree, that holds a value any widget can read or watch.
ProviderContainer
An object that holds providers without a screen, used in unit tests such as checking `cartProvider.add`.
ProviderScope
The widget that wraps the whole app and stores every provider's value. Without it you get `Bad state: No ProviderScope found`.
pub.dev
The website where Dart and Flutter packages are published. Each plugin's page lists the setup lines it needs.
pubspec.yaml
The project file that lists the app's name, version and packages.

R

rebuild
Flutter calling `build` again to redraw a widget after its data changes.
ref.invalidate and ref.refresh
`ref.invalidate(provider)` throws away a provider's value so the next watch fetches again; `ref.refresh(provider.future)` does that and gives back the new `Future`. They power the Try again button and pull to refresh.
RefreshIndicator
A widget that reloads a list when you drag it down. Its `onRefresh` must return a `Future`; the spinner stays until it finishes.
release build
The fast, compiled build customers get, with no hot reload or DEBUG banner. `flutter run --release` runs one on a real phone.
request
A message the client sends to a server, with a method, a path, headers and sometimes a body.
response
The server's answer to a request, with a status code, headers and a body.
Riverpod
A package for sharing state between widgets and screens. It keeps shared values in providers that widgets watch.
Riverpod code generation
A Riverpod feature where annotations such as `@riverpod` make a code generator write provider code for you. It gives shorter provider definitions than writing them by hand.
route
One full screen in an app's navigation, including a dialog.
Row
A widget that lines up its children from left to right.

S

SafeArea
A widget that keeps its child clear of the phone's notch and bottom bar.
Scaffold
The frame of one screen: an `appBar` at the top and a `body` below.
ScaffoldMessenger
The part of the app that shows SnackBars. `ScaffoldMessenger.of(context).showSnackBar(...)` shows one, and it stays visible after the screen pops.
SDK
A software development kit: a folder of tools needed to build for a platform. The Flutter SDK has the `flutter` command and its own copy of Dart.
select
A provider method that watches just one piece of its value, so the widget rebuilds only when that piece changes, for example only the cart's length.
server
A program, usually on another computer, that answers requests. Here it is the Dart practice API on your computer.
setState
The `State` method that runs your change and tells Flutter to call `build` again. A field changed without it won't update the screen.
shared_preferences
The package that saves small values by key on the device. `SharedPreferencesAsync` has `setString`, `getString` (null if missing) and `remove`, all returning Futures.
signed
Stamped with a key that proves the app came from you. The stores require it before accepting an upload.
SingleChildScrollView
A widget that lets one child scroll when it is taller than the available space, such as a form above the keyboard.
SizedBox
A box of fixed size; with no child it is an empty gap, such as `SizedBox(height: 8)` in a column.
sku
The shop's product code, such as `ESP-12` for House Espresso. The order sent to the server uses it to identify each product.
SnackBar
A short message that slides up from the bottom of the screen and disappears after a few seconds.
spread operator
The `...` syntax that copies a list's items into a new list, as in `[...state, newLine]`. It is how a Notifier assigns a new list instead of changing the old one.
stack trace
The list of calls that led to an error. Look for the first line starting with `package:kc_order/`, which is your own code.
state
Any value that can change while the app runs and that the screen shows, such as the quantity, the cart, or whether something is loading.
State
The object that holds a `StatefulWidget`'s changing data and its `build` method; Flutter keeps it alive while the widget is on screen. Inside it, `widget` refers to the widget it belongs to.
StatefulWidget
A widget with state that can change while it is on screen. It is split into the widget and a separate `State` object created by `createState`.
StatelessWidget
A widget with nothing in it that changes; its fields are `final`, and it rebuilds only when its parent does.

T

tear-off
A function or constructor named without calling it, such as `CartNotifier.new`, so Riverpod can call it later.
Text and TextStyle
`Text` is the widget that shows a string. Its `style` takes a `TextStyle` to change size, weight or color, such as `TextStyle(fontSize: 18, fontWeight: FontWeight.bold)`.
TextEditingController
An object that holds a text field's text, read with `.text`. Dispose it when the screen goes away.
TextFormField
A text box that belongs to a `Form` and can have a validator.
theme
The colors and text styles the whole app uses, set in `MaterialApp` with `ThemeData`. `ThemeMode.system` follows the phone's light or dark setting, and `Theme.of(context)` reads it.
timeout
A time limit. `Future.timeout` makes a slow `Future` fail with a `TimeoutException`, so a spinner doesn't spin forever.

U

unit test
A fast test of plain Dart logic such as `money` or `cartTotalCents`, written with `test`, `group` and `expect` from `flutter_test`.

V

validator
A function that checks a field's text and returns an error message, or `null` if the text is fine.
Visual Studio Code
A free code editor, often called VS Code, that works well for Flutter development. Its Flutter extension can install the SDK, run the app on a device and show test results.

W

watch
Reading a provider so the widget rebuilds when it changes: `ref.watch` in `build`. In callbacks use `ref.read`, which reads once without watching.
widget
One piece of a Flutter screen, described by a class: text, spacing and layouts are all widgets.
widget test
A test that builds a widget without a device and checks what it shows, using a `WidgetTester` to `pumpWidget`, `tap` and `pump`, and finders like `find.text` with `findsOneWidget`.
widget tree
The widgets of a screen, each inside its parent, such as `MaterialApp` holding `Scaffold` holding `AppBar` and `Center`.

X

Xcode
Apple's development program, available only on a Mac. It is needed to run the iOS Simulator and to build and sign iPhone apps.