One seed, no network
This is the whole setup. The icons, the
illustrations and the fonts ship inside the package, so it runs on the
first flutter run.
import 'package:flocks/flocks.dart';
import 'package:flutter/widgets.dart';
final myBrand = AppBrandConfig(
clientSlug: 'acme',
primaryColor: swatchFromSeed(const Color(0xFF4F46E5)),
);
void main() => runApp(
AppTheme(
data: AppThemeData.forBrand(myBrand, dark: false),
child: Directionality(
textDirection: TextDirection.ltr,
child: Overlay(
initialEntries: <OverlayEntry>[
OverlayEntry(
builder: (BuildContext context) => const MyApp(),
),
],
),
),
),
);
The Overlay there is required, not
decoration: the dropdowns, AppTooltip,
AppPopover and the anchored pickers insert into it, and the
package mounts none for you. After that, every component reads the theme
by itself — a button is AppButton(icon: AppIconToken.add, label:
'New vehicle', onPressed: _create), and the brand, the style
axis and the radius mode are already in it.