Skip to content

Commit

Permalink
Tab view padding (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
stMerlHin authored Aug 14, 2022
1 parent 085c44c commit 92f0b00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.7.2]
* Add padding as parameter to MacosTabView constructor.

## [1.7.1]
* Fixed an issue where end sidebar window breakpoints were not respected

Expand Down
8 changes: 7 additions & 1 deletion lib/src/layout/tab_view/tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MacosTabView extends StatefulWidget {
required this.tabs,
required this.children,
this.position = MacosTabPosition.top,
this.padding = const EdgeInsets.all(12.0),
}) : assert(controller.length == children.length &&
controller.length == tabs.length);

Expand All @@ -60,6 +61,11 @@ class MacosTabView extends StatefulWidget {
/// The placement of the [tabs], typically [MacosTabPosition.top].
final MacosTabPosition position;

/// The padding of the tab view widget.
///
/// Defaults to `EdgeInsets.all(12.0)`.
final EdgeInsetsGeometry padding;

@override
State<MacosTabView> createState() => _MacosTabViewState();
}
Expand Down Expand Up @@ -153,7 +159,7 @@ class _MacosTabViewState extends State<MacosTabView> {
alignment: Alignment.center,
children: [
Padding(
padding: const EdgeInsets.all(12.0),
padding: widget.padding,
child: DecoratedBox(
decoration: BoxDecoration(
color: brightness.resolve(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macos_ui
description: Flutter widgets and themes implementing the current macOS design language.
version: 1.7.1
version: 1.7.2
homepage: "https://macosui.dev"
repository: "https://github.com/GroovinChip/macos_ui"

Expand Down

0 comments on commit 92f0b00

Please sign in to comment.