WIP: feat(ui): Migrate to new UI implementation
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moonwell_launcher/app/theme/moonwell_design_system.dart';
|
||||
import 'package:widgetbook/widgetbook.dart';
|
||||
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;
|
||||
|
||||
import 'main.directories.g.dart';
|
||||
|
||||
void main() => runApp(const MoonWellWidgetbook());
|
||||
|
||||
@widgetbook.App()
|
||||
class MoonWellWidgetbook extends StatelessWidget {
|
||||
const MoonWellWidgetbook({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Widgetbook.material(
|
||||
initialRoute: '/?path=compositions/mwlaunchershell/ready',
|
||||
directories: directories,
|
||||
addons: [
|
||||
MaterialThemeAddon(
|
||||
themes: [
|
||||
WidgetbookTheme(
|
||||
name: 'Forest',
|
||||
data: MoonWellTheme.create(
|
||||
MoonWellThemeVariant.forest,
|
||||
fontPackage: 'moonwell_launcher',
|
||||
),
|
||||
),
|
||||
WidgetbookTheme(
|
||||
name: 'Temple',
|
||||
data: MoonWellTheme.create(
|
||||
MoonWellThemeVariant.temple,
|
||||
fontPackage: 'moonwell_launcher',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
ViewportAddon(const [
|
||||
ViewportData(
|
||||
name: 'Minimum desktop · 1024×640',
|
||||
width: 1024,
|
||||
height: 640,
|
||||
pixelRatio: 1,
|
||||
platform: TargetPlatform.windows,
|
||||
),
|
||||
ViewportData(
|
||||
name: 'Target desktop · 1280×720',
|
||||
width: 1280,
|
||||
height: 720,
|
||||
pixelRatio: 1,
|
||||
platform: TargetPlatform.windows,
|
||||
),
|
||||
ViewportData(
|
||||
name: 'Large desktop · 1600×900',
|
||||
width: 1600,
|
||||
height: 900,
|
||||
pixelRatio: 1,
|
||||
platform: TargetPlatform.windows,
|
||||
),
|
||||
]),
|
||||
TextScaleAddon(min: 1, max: 2, divisions: 4, initialScale: 1),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user