From 99113e8a7966f2e6f66f99a0ee09ff3785408a32 Mon Sep 17 00:00:00 2001 From: Jens Horstmann Date: Mon, 16 Sep 2024 11:29:22 -0400 Subject: [PATCH] feat: add addon-config --- pubspec.lock | 2 +- widgetbook/lib/main.dart | 21 ++++++++++++++++++++- widgetbook/pubspec.lock | 20 ++++++++++---------- widgetbook/pubspec.yaml | 6 +++--- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index c8859c4..5599ab1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -302,4 +302,4 @@ packages: version: "1.0.4" sdks: dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + flutter: ">=3.24.0" diff --git a/widgetbook/lib/main.dart b/widgetbook/lib/main.dart index 489068c..8ca4ba9 100644 --- a/widgetbook/lib/main.dart +++ b/widgetbook/lib/main.dart @@ -10,7 +10,26 @@ void main() { runApp(const WidgetbookApp()); } -@App() +@App( + cloudAddonsConfigs: { + 'German Light': [ + LocalizationAddonConfig('de'), + ThemeAddonConfig('Light'), + ], + 'German Dark': [ + LocalizationAddonConfig('de'), + ThemeAddonConfig('Dark'), + ], + 'English Light': [ + LocalizationAddonConfig('en'), + ThemeAddonConfig('Light'), + ], + 'English Dark': [ + LocalizationAddonConfig('en'), + ThemeAddonConfig('Dark'), + ], + }, +) class WidgetbookApp extends StatelessWidget { const WidgetbookApp({super.key}); diff --git a/widgetbook/pubspec.lock b/widgetbook/pubspec.lock index 4c5c9dd..344bd17 100644 --- a/widgetbook/pubspec.lock +++ b/widgetbook/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: accessibility_tools - sha256: "0a16adc8dfa3a7ebd38775135d86443011a65d4ecbb438913e4992b5d29135fe" + sha256: "7c0b5ac466ea8b971c1b081f3ade0979e6563e8926da62c3b90def78c44dd96b" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.2.2" analyzer: dependency: transitive description: @@ -684,10 +684,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: transitive description: @@ -724,26 +724,26 @@ packages: dependency: "direct main" description: name: widgetbook - sha256: de5b9887f9ad663bdcc1f957bc22aa0eb4dd7b406ac0142158bf35c0fad4a4f2 + sha256: "4db3ab02c3159dd898b362c8681b9cdabda33caae3a9d13e3fc71231a485ad33" url: "https://pub.dev" source: hosted - version: "3.8.1" + version: "3.9.0" widgetbook_annotation: dependency: "direct main" description: name: widgetbook_annotation - sha256: c2d881d0241525b36aa3777d0ac406d198528ed28b84ca73b7dd9f59189d6bb0 + sha256: "08570e3568275c4c283cdf78409c125f86c96c9b4f94f0a390d6a163349e9934" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" widgetbook_generator: dependency: "direct dev" description: name: widgetbook_generator - sha256: "7a5baf68bb76cbd8aeb093050172f99bb83b44360bf2a72c2b19b3785e3d29d0" + sha256: "5967de405c3e7e3d4ef56239c7b23f0affd69b181f7d041f8101f0fbdb9d4e2c" url: "https://pub.dev" source: hosted - version: "3.8.0" + version: "3.9.0" xdg_directories: dependency: transitive description: diff --git a/widgetbook/pubspec.yaml b/widgetbook/pubspec.yaml index 861c695..34516a4 100644 --- a/widgetbook/pubspec.yaml +++ b/widgetbook/pubspec.yaml @@ -14,13 +14,13 @@ dependencies: font_awesome_flutter: ^10.7.0 groceries_app: path: ../ - widgetbook: ^3.8.0 - widgetbook_annotation: ^3.1.0 + widgetbook: ^3.9.0 + widgetbook_annotation: ^3.2.0 dev_dependencies: build_runner: ^2.4.6 very_good_analysis: ^5.1.0 - widgetbook_generator: ^3.8.0 + widgetbook_generator: ^3.9.0 flutter: uses-material-design: true