Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class Demo extends StatelessWidget {
sidebar: Center(
child: Text('Sidebar'),
),
//sidebarBreakpoint: 500,
body: Center(
child: Container(
height: 50.0,
Expand Down
12 changes: 7 additions & 5 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "0.0.2"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -124,10 +124,12 @@ packages:
split_view:
dependency: transitive
description:
name: split_view
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
path: "."
ref: null_safety
resolved-ref: e9b5f42d8072e3a5f91d3abbd6df902560d79703
url: "https://github.com/GroovinChip/split_view.git"
source: git
version: "2.0.0+2"
stack_trace:
dependency: transitive
description:
Expand Down
9 changes: 4 additions & 5 deletions lib/src/layout/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class Scaffold extends StatelessWidget {
///
/// Defaults to 0.80, which seems to be the default in Apple's macOS apps
/// (I eyeballed this so it's not perfect but it's very close).
final double? sidebarGripSize;
final double sidebarGripSize;

/// Defines an area to which [sidebar] cannot be expanded or shrunk past on
/// the left and right.
final double? resizeBoundary;
final double resizeBoundary;

/// Defines a breakpoint for showing and hiding the [sidebar].
///
Expand All @@ -60,7 +60,7 @@ class Scaffold extends StatelessWidget {
/// will be shown again.
///
/// Defaults to `0.0`, which means the sidebar will always be shown.
final double? sidebarBreakpoint;
final double sidebarBreakpoint;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -91,8 +91,7 @@ class Scaffold extends StatelessWidget {
child: sidebar != null
? LayoutBuilder(
builder: (context, constraints) {
print(constraints.maxWidth);
if (constraints.maxWidth > sidebarBreakpoint!) {
if (constraints.maxWidth > sidebarBreakpoint) {
return SplitView(
positionLimit: resizeBoundary,
initialWeight: splitOffset,
Expand Down
10 changes: 6 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ packages:
split_view:
dependency: "direct main"
description:
name: split_view
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
path: "."
ref: null_safety
resolved-ref: e9b5f42d8072e3a5f91d3abbd6df902560d79703
url: "https://github.com/GroovinChip/split_view.git"
source: git
version: "2.0.0+2"
stack_trace:
dependency: transitive
description:
Expand Down
6 changes: 5 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ dependencies:
flutter:
sdk: flutter

split_view: ^1.0.4
#split_view: ^1.0.4
split_view:
git:
url: https://github.com/GroovinChip/split_view.git
ref: null_safety

dev_dependencies:
flutter_test:
Expand Down