Skip to content

Commit

Permalink
feat: add addon-config
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshor committed Sep 16, 2024
1 parent fb7be8f commit 99113e8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
21 changes: 20 additions & 1 deletion widgetbook/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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});

Expand Down
20 changes: 10 additions & 10 deletions widgetbook/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions widgetbook/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 99113e8

Please sign in to comment.