Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

flutter_hello (package name: hello)

Reference page pulled from app-context-kit at commit 4797e81. Edit it in the Kit, not here.

A small Flutter desktop app on the App Context Kit: a button that counts taps, saves the count as a setting and writes it to a file under the data directory. It is the app built step by step in Getting started.

This directory holds the Dart code, the manifest and a widget test. It has no platform runner folders (macos/, linux/, windows/). The test needs none:

flutter pub get
flutter test

Expected: All tests passed! (one test).

To run it as a desktop app, generate the runners once, then run:

flutter create --platforms=macos,linux,windows --project-name hello --org dev.example .
flutter run -d macos     # or -d linux, -d windows

flutter create . leaves lib/main.dart, pubspec.yaml and test/hello_test.dart as they are, but it adds the template’s test/widget_test.dart, which does not fit this app: delete it. On macOS the generated runner is sandboxed; see the macOS note in the guide before pointing APP_CONTEXT_SCRATCH anywhere.