Skip to content

Commit 92f0b00

Browse files
authored
Tab view padding (#285)
1 parent 085c44c commit 92f0b00

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [1.7.2]
2+
* Add padding as parameter to MacosTabView constructor.
3+
14
## [1.7.1]
25
* Fixed an issue where end sidebar window breakpoints were not respected
36

lib/src/layout/tab_view/tab_view.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class MacosTabView extends StatefulWidget {
4343
required this.tabs,
4444
required this.children,
4545
this.position = MacosTabPosition.top,
46+
this.padding = const EdgeInsets.all(12.0),
4647
}) : assert(controller.length == children.length &&
4748
controller.length == tabs.length);
4849

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

64+
/// The padding of the tab view widget.
65+
///
66+
/// Defaults to `EdgeInsets.all(12.0)`.
67+
final EdgeInsetsGeometry padding;
68+
6369
@override
6470
State<MacosTabView> createState() => _MacosTabViewState();
6571
}
@@ -153,7 +159,7 @@ class _MacosTabViewState extends State<MacosTabView> {
153159
alignment: Alignment.center,
154160
children: [
155161
Padding(
156-
padding: const EdgeInsets.all(12.0),
162+
padding: widget.padding,
157163
child: DecoratedBox(
158164
decoration: BoxDecoration(
159165
color: brightness.resolve(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: macos_ui
22
description: Flutter widgets and themes implementing the current macOS design language.
3-
version: 1.7.1
3+
version: 1.7.2
44
homepage: "https://macosui.dev"
55
repository: "https://github.com/GroovinChip/macos_ui"
66

0 commit comments

Comments
 (0)