diff --git a/example/lib/main.dart b/example/lib/main.dart index f002022a..0a6e6fba 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -39,7 +39,6 @@ class Demo extends StatelessWidget { sidebar: Center( child: Text('Sidebar'), ), - //sidebarBreakpoint: 500, body: Center( child: Container( height: 50.0, diff --git a/example/pubspec.lock b/example/pubspec.lock index b63ec9e6..05612383 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -73,7 +73,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1" + version: "0.0.2" matcher: dependency: transitive description: @@ -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: diff --git a/lib/src/layout/scaffold.dart b/lib/src/layout/scaffold.dart index 191e09bf..df5fc95f 100644 --- a/lib/src/layout/scaffold.dart +++ b/lib/src/layout/scaffold.dart @@ -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]. /// @@ -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) { @@ -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, diff --git a/pubspec.lock b/pubspec.lock index bd51fbf4..ade33a9a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index 03a7e554..892d7a9c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: