ashlarui

Installation

Set up a Flutter app for Ashlar UI, then add the components you need.

1. Install the CLI

$ dart pub global activate ashlar_ui

2. Set up your app

In your Flutter project's root:

$ ashlar init

This writes the theme and AshlarApp into lib/ui, and ashlar.yaml, which remembers the folder. Pass --path to use another.

3. Use AshlarApp

In place of MaterialApp:

import 'package:flutter/widgets.dart';

import 'ui/app.dart';

void main() => runApp(
  const AshlarApp(
    title: 'My app',
    home: HomePage(),
  ),
);

4. Add components

$ ashlar add button dialog

Each comes with the components it needs, and any package it needs is added to pubspec.yaml. Then import it from your ui folder:

import 'ui/button.dart';

Button(onPressed: save, child: const Text('Save'))

Their tests come too, in test/ashlar, so after you change a component, flutter test tells you whether it still does what it promised.

Tested on Flutter 3.47.