appliance_ui

Appliance is a Flutter widget library with moulded keys, indicator lamps and recessed displays. It includes forms, navigation, dialogs, pickers and interactive charts in light and dark themes.

Larder, Appliance's example shop, by day: its home page at 1440 px beside the same page on a 390 px phone

Live gallery · API reference · All the looks

Getting started

Add the packages for the Material example below.

flutter pub add appliance_ui material_ui

Load the bundled Barlow font before calling runApp. Place ApplianceHost in the application builder so pages and overlays share the same theme. The host also works with CupertinoApp and WidgetsApp.

import 'package:appliance_ui/appliance_ui.dart';
import 'package:material_ui/material_ui.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await applianceLoadFonts();
  runApp(
    MaterialApp(
      theme: ThemeData(
        pageTransitionsTheme: const PageTransitionsTheme(builders: appliancePageTransitions),
      ),
      builder: (context, child) => ApplianceHost(child: child!),
      home: ApplianceScreen(
        topBar: const ApplianceAppBar(title: 'Basket'),
        body: Center(child: ApplianceButton.filled('Checkout', onPressed: () {})),
      ),
    ),
  );
}

ApplianceScaffold shows a bottom bar below 600 logical pixels, a navigation rail from 600 pixels, and a side panel from 1024 pixels. Pass the current destination in selectedIndex and update it in onSelected. The bottom bar can use a second row when destination names need more space.

By night: Larder's orders at 1440 px, the open order with its lamp-lit progress, beside the basket on a 390 px phone

Theming

ApplianceHost follows the platform brightness. For a custom palette, wrap the app in an ApplianceTheme and pass the result of ApplianceThemeData.from to its data property.

final theme = ApplianceThemeData.from(
  brightness: Brightness.light,
  finish: const Color(0xFFDDE7E1),
  signal: const Color(0xFF1F7A5C),
);

Use theme.copyWith(texture: false) for smooth housing. High-contrast mode also removes the grain. Set component defaults on the theme or pass an ApplianceStyle to an individual control.

Accessibility

Navigation follows the app’s text direction. Tab moves between controls, arrow keys move between tabs and rail destinations, and Escape dismisses open menus and dialogs. Slider thumbs support keyboard input and screen readers. For values with units, pass valueText to ApplianceSlider or semanticFormatterCallback to ApplianceRangeSlider.

Platforms and localization

Appliance supports Android, iOS, macOS, Windows, Linux and the web. Its menus, dialogs, charts and keyboard navigation use ui_core. Register DesignLocalizations.delegate with your app’s localization delegates to translate the built-in control labels. Your app supplies its own destination names, button labels and messages.

License

The package uses the MIT license. Barlow uses the SIL Open Font License 1.1. See THIRD_PARTY_NOTICES for the font and icon licenses.

Libraries

appliance_host
Appliance's host layer, for an app that shows the look's screens in a shell of its own: the scaffold every look shares (package:ui_core/host.dart: its tabs, its main action, its background and insets, the preview frame and platform) and Appliance's own part of it. An app that draws its screens from package:appliance_ui/appliance_ui.dart does not need this library; the look's own chrome, gallery and tests import it beside that one.
appliance_parts
Helpers for customizing components copied from appliance_ui.
appliance_ui
Appliance: a calm household device. Matte warm-white moulded plastic (a warm grey by night) in three depths under one light from the top, crisp parting lines, one signal orange, lamps that say what is on, and mechanical selectors: keys that latch, slide switches, a slide selector.