Documentation
¶
Overview ¶
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. It uses only package cupertino, imported as c.
Run it with: go run ./examples/cupertino
On macOS: go run ./cmd/glutter-macos run ./examples/cupertino
Environment: GLUTTER_SCREENSHOT=<file.png>, GLUTTER_SCREENSHOT_AFTER=<duration>; in debug builds GLUTTER_DEV_EVENTS=<script> replays input after the first frame (SPEC §29.6).
The app is a CupertinoTabScaffold with five tabs, each a CupertinoTabView with its own history. The first tab (step 34.8) is a settings page: a pull to refresh control and inset grouped sections of list tiles, an expansion tile and a form section with text rows, under a CupertinoSliverNavigationBar whose large title collapses into the middle as the page scrolls; a pushed page flies its bar from the large title to the back label. The second tab shows the controls of step 34.4: a switch, a checkbox, radios, a slider, activity indicators and the two segmented controls. As the other controls of the library (M34) come with the later steps, the rows of the lists are text under a GestureDetector. The fourth tab, Popups (step 34.6), shows an alert dialog, an action sheet, a context menu that opens when its card is pressed and held, and a menu that grows from a button (and from a long press that swipes over its items).