examples

package
v1.17.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: BSD-3-Clause Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package examples is the parent of the runnable examples. Each example is a main package in its own directory, for instance examples/counter, and uses only the public packages. Early development examples live in examples/dev.

Flutter: the examples in the Flutter repository (examples/).

Directories

Path Synopsis
Command animations shows four animations in four labelled tiles: an AnimatedContainer that changes size, color and corner radius when tapped, a Pulse (a ScaleTransition driven by a repeating controller), an AnimatedSwitcher that cycles a counter, and a TweenAnimationBuilder that turns a plus sign.
Command animations shows four animations in four labelled tiles: an AnimatedContainer that changes size, color and corner radius when tapped, a Pulse (a ScaleTransition driven by a repeating controller), an AnimatedSwitcher that cycles a counter, and a TweenAnimationBuilder that turns a plus sign.
Command cad shows the 3D work of Glutter 1.10 together (SPEC §27): a part in a viewport3d.View that the mouse and the touch orbit, pan and zoom, with a grid, the axes and the view cube; the four display modes (shaded, shaded with edges, wireframe and hidden line); a section plane that a slider moves, with its cap and the outline of the cut; a pick that shows the item, the triangle, the point of the world and the normal in a side panel; and a distance measured between two picks, drawn as a dimension line with an Anchored label.
Command cad shows the 3D work of Glutter 1.10 together (SPEC §27): a part in a viewport3d.View that the mouse and the touch orbit, pan and zoom, with a grid, the axes and the view cube; the four display modes (shaded, shaded with edges, wireframe and hidden line); a section plane that a slider moves, with its cap and the outline of the cut; a pick that shows the item, the triangle, the point of the world and the normal in a side panel; and a distance measured between two picks, drawn as a dimension line with an Anchored label.
Command counter is the reference example of the SPEC (§12.12): a Material 3 app with an app bar, a counter and a floating action button that adds one.
Command counter is the reference example of the SPEC (§12.12): a Material 3 app with an app bar, a counter and a floating action button that adds one.
Command cupertino is the example of the Cupertino library (SPEC §31): an iOS styled app with a list of pages that push a page (with the parallax slide and the back swipe of iOS), present a sheet (that is dragged down to dismiss it) and show a modal popup.
Command cupertino is the example of the Cupertino library (SPEC §31): an iOS styled app with a list of pages that push a page (with the parallax slide and the back swipe of iOS), present a sheet (that is dragged down to dismiss it) and show a modal popup.
Command custompaint shows CustomPaint with a custom painter: an analog clock with a gradient face, a shadow, minute and hour ticks and three hands.
Command custompaint shows CustomPaint with a custom painter: an analog clock with a gradient face, a shadow, minute and hour ticks and three hands.
dev
android-a11y command
Command android-a11y is a development example (step 25.11): a Material page with a button, a text field, a list and a live region, which logs what happens to each (the button's count, the list's scroll offset, the text field's text), so that the device tests can drive it with accessibility actions as TalkBack does (the dev events script's a11y: events), read the nodes the system sees (uiautomator) and check the events that are sent.
Command android-a11y is a development example (step 25.11): a Material page with a button, a text field, a list and a live region, which logs what happens to each (the button's count, the list's scroll offset, the text field's text), so that the device tests can drive it with accessibility actions as TalkBack does (the dev events script's a11y: events), read the nodes the system sees (uiautomator) and check the events that are sent.
android-audio command
Command android-audio is a development example (step 31.6): a Material page that plays a 440 Hz tone through the public audio package and, besides, through a device of the platform's own (to read the AAudio stream's timestamp, which the public package does not show), and logs what the audio does twice a second.
Command android-audio is a development example (step 31.6): a Material page that plays a 440 Hz tone through the public audio package and, besides, through a device of the platform's own (to read the AAudio stream's timestamp, which the public package does not show), and logs what the audio does twice a second.
android-back command
Command android-back is a development example (step 25.9): an app of three pages that logs what the framework hears of the activity's life and of the back button and the back gesture, so that the device tests can send the app Home, press Back and swipe back, and read what happened.
Command android-back is a development example (step 25.9): an app of three pages that logs what the framework hears of the activity's life and of the back button and the back gesture, so that the device tests can send the app Home, press Back and swipe back, and read what happened.
android-fonts command
Command android-fonts is a development example (step 25.10): a Material page with a line of text in each of several scripts (Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari, Thai, Chinese, Japanese, Korean and emoji) in the system's fonts.
Command android-fonts is a development example (step 25.10): a Material page with a line of text in each of several scripts (Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari, Thai, Chinese, Japanese, Korean and emoji) in the system's fonts.
android-gamepad command
Command android-gamepad is a development example (step 31.2): a Material page with two buttons, the first one focused, that log each time they are activated, and a listener for the gamepads that logs each pad's buttons.
Command android-gamepad is a development example (step 31.2): a Material page with two buttons, the first one focused, that log each time they are activated, and a listener for the gamepads that logs each pad's buttons.
android-hello command
Command android-hello is a development example (step 25.2): it shows that a Glutter program starts on Android.
Command android-hello is a development example (step 25.2): it shows that a Glutter program starts on Android.
android-input command
Command android-input is a development example (step 25.6): a Material page whose Shortcuts handle the keys Back and K, so that the device tests can tell a key that a widget handled (it is taken, and logs "shortcut ran") from one that nothing handled (Android gets it again, and Back closes the activity).
Command android-input is a development example (step 25.6): a Material page whose Shortcuts handle the keys Back and K, so that the device tests can tell a key that a widget handled (it is taken, and logs "shortcut ran") from one that nothing handled (Android gets it again, and Back closes the activity).
android-parity command
Command android-parity is the parity program of the Android device tests (step 25.4); see main.go.
Command android-parity is the parity program of the Android device tests (step 25.4); see main.go.
android-scenes command
Command android-scenes is the program of the Android device test of the explicit device (step 30.1); see main.go.
Command android-scenes is the program of the Android device test of the explicit device (step 30.1); see main.go.
android-sensors command
Command android-sensors is a development example (step 31.7): a Material page that opens the accelerometer and the gyroscope through package sensors, shows their latest readings, and logs them twice a second.
Command android-sensors is a development example (step 31.7): a Material page that opens the accelerometer and the gyroscope through package sensors, shows their latest readings, and logs them twice a second.
android-services command
Command android-services is a development example (step 25.12): a Material page with buttons that open a URI and post a notification with an action button, and log what the desktop services answer, so that the device tests can start the actions without taps, read the results and check the notification in dumpsys.
Command android-services is a development example (step 25.12): a Material page with buttons that open a URI and post a notification with an action button, and log what the desktop services answer, so that the device tests can start the actions without taps, read the results and check the notification in dumpsys.
android-spell command
Command android-spell is a development example (step 26.4): a Material page with one text field whose spell check is on, and that logs what the spell checker answers, so that the device tests can type a misspelled word with the dev events and read the result.
Command android-spell is a development example (step 26.4): a Material page with one text field whose spell check is on, and that logs what the spell checker answers, so that the device tests can type a misspelled word with the dev events and read the result.
android-system command
Command android-system is a development example (step 25.7): a Material page that logs what the framework knows of the system on every build (the insets, the brightness, the text scale, the clock, the animations, the accessibility settings), and does what the variable GLUTTER_DEMO asks of the system's interface once it has started, so that the device tests can see the effect.
Command android-system is a development example (step 25.7): a Material page that logs what the framework knows of the system on every build (the insets, the brightness, the text scale, the clock, the animations, the accessibility settings), and does what the variable GLUTTER_DEMO asks of the system's interface once it has started, so that the device tests can see the effect.
android-text command
Command android-text is a development example (step 25.8): a Material page with a single line text field, a password field and a multiline field, which logs what the framework hears of each (the changes, the action of the keyboard, the keyboard's height) so that the device tests can type into them with the dev events, read the clipboard and check the keyboard.
Command android-text is a development example (step 25.8): a Material page with a single line text field, a password field and a multiline field, which logs what the framework hears of each (the changes, the action of the keyboard, the keyboard's height) so that the device tests can type into them with the dev events, read the clipboard and check the keyboard.
android-viewport3d command
Command android-viewport3d is the program of the Android device test of the 3D view (step 30.9); see main.go.
Command android-viewport3d is the program of the Android device test of the 3D view (step 30.9); see main.go.
canvas-tour command
Command canvas-tour opens a 640x480 window that shows the proof scenes of milestones 2 to 4 (shapes, gradients, blend modes, effects, text), one per page, drawn by the GPU renderer, and a last page, size-grid, that depends on the size of the window: a grid of lines one pixel wide, which shows whether the buffer is as sharp as the screen (on a display with a fractional scale it must be, step 3.7).
Command canvas-tour opens a 640x480 window that shows the proof scenes of milestones 2 to 4 (shapes, gradients, blend modes, effects, text), one per page, drawn by the GPU renderer, and a last page, size-grid, that depends on the size of the window: a grid of lines one pixel wide, which shows whether the buffer is as sharp as the screen (on a display with a fractional scale it must be, step 3.7).
input command
Command input opens a 640x400 window that logs every key and pointer event (with slog) and changes the mouse cursor: a text cursor over the left half of the window, a pointing hand over the right half.
Command input opens a 640x400 window that logs every key and pointer event (with slog) and changes the mouse cursor: a text cursor over the left half of the window, a pointing hand over the right half.
macos-open command
Command macos-open shows what the system asks the app to open (step 56.1): the links of a URL scheme the app handles and the files of a type it opens, which macOS sends to the app as events and not as arguments (ui.OpenRequest, PlatformDispatcher.AddOpenRequestListener).
Command macos-open shows what the system asks the app to open (step 56.1): the links of a URL scheme the app handles and the files of a type it opens, which macOS sends to the app as events and not as arguments (ui.OpenRequest, PlatformDispatcher.AddOpenRequestListener).
pad-hid command
Command pad-hid is a development example (step 31.3) for the HID drivers of the gamepads: for each pad it shows the name, the kind, the battery, the touchpad fingers and the gyroscope and accelerometer, and it has buttons for the light bar, the motors and the motors of the triggers.
Command pad-hid is a development example (step 31.3) for the HID drivers of the gamepads: for each pad it shows the name, the kind, the battery, the touchpad fingers and the gyroscope and accelerometer, and it has buttons for the light bar, the motors and the motors of the triggers.
runapp command
Command runapp is a development example (step 7.4): it runs the widgets binding with widgets.RunApp and shows a render tree made of widgets, to check the whole path from RunApp to the window.
Command runapp is a development example (step 7.4): it runs the widgets binding with widgets.RunApp and shows a render tree made of widgets, to check the whole path from RunApp to the window.
sash command
Command sash is the manual check of step 27.7 (the cursor of a pressed pointer): a split view whose sash keeps the resize cursor while the mouse button is held, whatever the mouse moves over.
Command sash is the manual check of step 27.7 (the cursor of a pressed pointer): a split view whose sash keeps the resize cursor while the mouse button is held, whatever the mouse moves over.
text-tour command
Command text-tour opens a 640x480 window that shows the text proof (the text-tour scene of internal/proof) drawn by the GPU renderer: Latin text in several sizes, weights and styles, Arabic and Hebrew, CJK, color emoji, every decoration style, shadows, an ellipsized paragraph and a justified one.
Command text-tour opens a 640x480 window that shows the text proof (the text-tour scene of internal/proof) drawn by the GPU renderer: Latin text in several sizes, weights and styles, Arabic and Hebrew, CJK, color emoji, every decoration style, shadows, an ellipsized paragraph and a justified one.
viewport3d-modes command
Command viewport3d-modes is a development example (step 30.9): one part (a box, a cylinder and a sphere) in the four display modes of package viewport3d (shaded, shaded with edges, wireframe and hidden line), side by side, each in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
Command viewport3d-modes is a development example (step 30.9): one part (a box, a cylinder and a sphere) in the four display modes of package viewport3d (shaded, shaded with edges, wireframe and hidden line), side by side, each in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
viewport3d-section command
Command viewport3d-section is a development example (step 30.10): a part (a box, a cylinder and a sphere) cut by a section plane, with its cap and the outline of the cut, in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
Command viewport3d-section is a development example (step 30.10): a part (a box, a cylinder and a sphere) cut by a section plane, with its cap and the outline of the cut, in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
window command
Command window opens a 640x400 window (Wayland or X11) titled "Glutter dev window" and fills it with #6750A4 using OpenGL ES, drawing a new frame each time the compositor asks for one.
Command window opens a 640x400 window (Wayland or X11) titled "Glutter dev window" and fills it with #6750A4 using OpenGL ES, drawing a new frame each time the compositor asks for one.
Command editor is a small text editor on a WidgetsApp, without Material.
Command editor is a small text editor on a WidgetsApp, without Material.
Command gallery shows the Material components of Glutter, one page for each group of them, with a side list to choose the page and a toggle between the light and the dark theme.
Command gallery shows the Material components of Glutter, one page for each group of them, with a side list to choose the page and a toggle between the light and the dark theme.
Command game3d is a small 3D game that uses the games work of Glutter 1.10 and 1.11 together (SPEC §27, §28): Coin Run.
Command game3d is a small 3D game that uses the games work of Glutter 1.10 and 1.11 together (SPEC §27, §28): Coin Run.
internal/genassets command
Command genassets writes the assets of examples/game3d: the character and the level as glTF binary files (.glb) and the music and the sound effects as WAV files.
Command genassets writes the assets of examples/game3d: the character and the level as glTF binary files (.glb) and the music and the sound effects as WAV files.
Command gpu-triangle shows package gpu: a lit cube that turns, drawn by the program's own shader into a gpu.View with a depth buffer and 4x multisampling, inside a Material page.
Command gpu-triangle shows package gpu: a lit cube that turns, drawn by the program's own shader into a gpu.View with a depth buffer and 4x multisampling, inside a Material page.
Command layout shows the layout widgets of Glutter in five labelled sections: a Row with Expanded and Flexible children, a Column for each MainAxisAlignment, a Stack with a Positioned badge, a Wrap of twelve colored tags and a Table.
Command layout shows the layout widgets of Glutter in five labelled sections: a Row with Expanded and Flexible children, a Column for each MainAxisAlignment, a Stack with a Positioned badge, a Wrap of twelve colored tags and a Table.
Command multiwindow shows several windows.
Command multiwindow shows several windows.
Command navigation shows the navigation of Glutter on a WidgetsApp, without Material.
Command navigation shows the navigation of Glutter on a WidgetsApp, without Material.
Command scrolling shows the scroll views of Glutter in seven tabs: a ListView with 10,000 rows, a GridView of colored tiles, a CustomScrollView with a pinned header, a list and a grid, a PageView of three pages, a ReorderableList, a TreeSliver (a file tree whose folders expand and collapse) and a Material ReorderableListView (with its drag handles).
Command scrolling shows the scroll views of Glutter in seven tabs: a ListView with 10,000 rows, a GridView of colored tiles, a CustomScrollView with a pinned header, a list and a grid, a PageView of three pages, a ReorderableList, a TreeSliver (a file tree whose folders expand and collapse) and a Material ReorderableListView (with its drag handles).
Command svg shows the SVG pictures of package svg (the widgets of flutter_svg).
Command svg shows the SVG pictures of package svg (the widgets of flutter_svg).
Command todo is a to-do list in a table.
Command todo is a to-do list in a table.
Command tray is a small note-taking window that lives in the system tray.
Command tray is a small note-taking window that lives in the system tray.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL