Skip to content

Commit

Permalink
Make FTheme inherit from InheritedTheme internally
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Nov 24, 2024
1 parent d472f35 commit cd85c1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions forui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

### Changes

* **Breaking** Change `Popover.ignoreDirectionalPadding` to `Popover.directionPadding` - the value should be inverted.
* Change `FTheme` to internally extend `InheritedTheme`.

* **Breaking** Change `PopoverMenu.ignoreDirectionalPadding` to `PopoverMenu.directionPadding` - the value should be inverted.
* **Breaking** Change `FPopover.ignoreDirectionalPadding` to `FPopover.directionPadding` - the value should be inverted.

* **Breaking** Change `SelectMenuTile.ignoreDirectionalPadding` to `SelectMenuTile.directionPadding` - the value should be inverted.
* **Breaking** Change `FPopoverMenu.ignoreDirectionalPadding` to `FPopoverMenu.directionPadding` - the value should be inverted.

* **Breaking** Change `FSelectMenuTile.ignoreDirectionalPadding` to `FSelectMenuTile.directionPadding` - the value should be inverted.


## 0.7.0
Expand Down
5 changes: 4 additions & 1 deletion forui/lib/src/theme/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,14 @@ class FTheme extends StatelessWidget {
}
}

class _InheritedTheme extends InheritedWidget {
class _InheritedTheme extends InheritedTheme {
final FThemeData data;

const _InheritedTheme({required this.data, required super.child});

@override
Widget wrap(BuildContext context, Widget child) => _InheritedTheme(data: data, child: child);

@override
bool updateShouldNotify(covariant _InheritedTheme old) => data != old.data;

Expand Down

0 comments on commit cd85c1f

Please sign in to comment.