Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add padding as parameter to the MacosTabView widget
  • Loading branch information
stMerlHin committed Jul 22, 2022
commit 5b7bd6f03285dfaa6eb079894ebbcf89dcf012af
6 changes: 5 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,9 @@ class MacosTabView extends StatefulWidget {
/// The placement of the [tabs], typically [MacosTabPosition.top].
final MacosTabPosition position;

///The padding of the tab view widget
final EdgeInsetsGeometry padding;

@override
State<MacosTabView> createState() => _MacosTabViewState();
}
Expand Down Expand Up @@ -153,7 +157,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