-
Notifications
You must be signed in to change notification settings - Fork 10
Description
A theme is a directory of data, pages, assets, layouts, and components. Let users load a theme by specifying a git repository. Use the same syntax as pubspec.yaml
to work with what developers know.
In main.dart
:
StaticShock(
themes: [
Theme.fromGit(
url: ...,
path: ...,
ref: ...,
),
],
);
Update
Previously I said we should be able to configure themes from _data.yaml
. I've changed my mind on that, at least for now. Themes, themselves, can contribute data. To implement support in _data.yaml
, we'd need to load all local data first, to determine what themes we want, then load the themes, then load local data again in the regular data loading step. This is because themes need to be loaded before doing anything else, including picking files or loading data.
To reduce excess processing, and reduce implementation complexity, I'm removing _data.yaml
support from the desired behavior. Users must list themes in their Dart configuration.
In root _data.yaml
:
theme:
git:
url: ...
path: ...
ref: ...