Window Frame
Frame Flutter content with macOS or browser-style decorative chrome.
Frame application content with macOS or browser-style decorative chrome.
Contract
| Axis | Contract |
|---|---|
| Variant | macos, browser |
| Body padding | none, md, lg |
Install
Add the package, then import its public library.
flutter pub add tinyrack_uiimport 'package:tinyrack_ui/tinyrack_ui.dart';Playground
Usage
import 'package:material_ui/material_ui.dart';
import 'package:tinyrack_ui/tinyrack_ui.dart';
TRWindowFrame(
variant: TRWindowFrameVariant.macos,
title: const Text('Tinyrack'),
body: const Text('Rack overview'),
)Examples
Application window chrome permalink
Place application menus and window commands around a draggable center region. The slots take any widget, so compose the commands from TRIconButton and pick the glyphs and intent your chrome needs.
Browser chrome permalink
Use the browser variant and address bar for web-content previews.
API
TRWindowFrame properties
| Prop | Type / default | Purpose |
|---|---|---|
body | Widget · required | Provides framed content. |
variant | TRWindowFrameVariant · macos | Chooses app or browser chrome. |
TRWindowFrameTitleBar.leading / actions | Widget? | Places any widget on opposite edges of the drag region. Compose window commands from TRIconButton and choose the glyphs and intent your chrome needs. |
padding | TRWindowFramePadding · md | Sets the body inset. |
title / address | Widget? | Labels the selected title bar. |