This repository has been archived on 2026-10-23. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
halkyon_shared/packages/halkyon_ui/test/support/test_app.dart

19 lines
597 B
Dart
Raw Permalink Normal View History

import 'package:halkyon_ui/halkyon_ui.dart';
import 'package:material_ui/material_ui.dart';
/// [home] in an app as a Halkyon app builds one: the theme, and the
/// package's texts beside Material's, in [locale].
Widget testApp(
Widget home, {
Locale locale = const Locale('en'),
Brightness brightness = Brightness.light,
}) => MaterialApp(
theme: appTheme(brightness),
locale: locale,
localizationsDelegates: const [
HalkyonUiLocalizations.delegate,
...GlobalMaterialLocalizations.delegates,
],
supportedLocales: HalkyonUiLocalizations.supportedLocales,
home: home,
);