ashlar_ui 0.1.2
ashlar_ui: ^0.1.2 copied to clipboard
Ashlar UI for Flutter: components built on the widgets layer alone, copied into your app by the ashlar command, yours to change.
Using the ashlar command #
Install it, then run it in the root of a Flutter app:
dart pub global activate ashlar_ui
ashlar init --base stone --accent teal # the theme, AshlarApp and ashlar.yaml
ashlar add button dialog # components, with what they need and their tests
Give AshlarApp the theme ashlar init wrote, then use a component as any widget:
import 'package:flutter/widgets.dart';
import 'ui/app.dart';
import 'ui/app_theme.dart';
import 'ui/button.dart';
void main() => runApp(
AshlarApp(
theme: appTheme,
darkTheme: appDarkTheme,
home: Center(child: Button(onPressed: () {}, child: const Text('Save'))),
),
);
Later:
ashlar update --preview # what a newer version would change, drawn before and after
ashlar update # take it, keeping your changes
ashlar check # contrast, labels, right to left and touch targets
ashlar book # a catalog of your components, to run as an app
Every component and its options: https://ui.ashlar.ke