Skip to content

Commit

Permalink
fix(widgetbook): 🐛 properties resetting when changing locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshor committed Dec 28, 2022
1 parent 1a439f6 commit bf9eebf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/widgetbook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.0-beta.5

- fix: properties are resetting when changing locale

## 3.0.0-beta.4

- fix: properties not changing `onNavigate` via the browser's URL bar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/material.dart';
import 'package:nested/nested.dart';
import 'package:widgetbook/src/addons/addon.dart';

Expand All @@ -17,6 +17,7 @@ class AddonInjectorWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Nested(
key: ValueKey(routerData),
children: addons
.map(
(e) => SingleChildBuilder(
Expand Down
4 changes: 1 addition & 3 deletions packages/widgetbook/lib/src/widgetbook_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ class WidgetbookPage extends StatelessWidget {
appInfo: appInfo,
categories: state.filteredCategories,
),
centerChild: Workbench(
routerData: routerData,
),
centerChild: const Workbench(),
rightChild: const SettingsPanel(),
),
);
Expand Down
3 changes: 0 additions & 3 deletions packages/widgetbook/lib/src/workbench/workbench.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ import 'package:widgetbook/src/workbench/workbench_controls.dart';
class Workbench extends StatefulWidget {
const Workbench({
super.key,
required this.routerData,
});

final Map<String, dynamic> routerData;

@override
State<Workbench> createState() => _WorkbenchState();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/widgetbook/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: widgetbook
description: A flutter storybook that helps professionals and teams to catalogue their widgets.
version: 3.0.0-beta.4
version: 3.0.0-beta.5
homepage: https://www.widgetbook.io?utm_source=youtube&utm_medium=link&utm_campaign=widgetbook
repository: https://github.com/widgetbook/widgetbook
issue_tracker: https://github.com/widgetbook/widgetbook/issues
Expand Down

0 comments on commit bf9eebf

Please sign in to comment.