Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
suxoikorm committed Nov 20, 2023
1 parent 4accf51 commit c59a400
Show file tree
Hide file tree
Showing 42 changed files with 42 additions and 6,571 deletions.
26 changes: 13 additions & 13 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -195,10 +195,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -312,18 +312,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -344,10 +344,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -432,10 +432,10 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
win32:
dependency: transitive
description:
Expand All @@ -453,5 +453,5 @@ packages:
source: hosted
version: "1.0.0"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.0"
25 changes: 12 additions & 13 deletions lib/src/layout/resizable_pane.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class ResizablePane extends StatefulWidget {
required this.resizableSide,
this.windowBreakpoint,
required this.startSize,
this.onSizeChanged,
}) : child = null,
useScrollBar = true,
assert(
Expand Down Expand Up @@ -143,6 +144,8 @@ class ResizablePane extends StatefulWidget {
/// Specifies the width of the window at which this [ResizablePane] will be hidden.
final double? windowBreakpoint;

final Function(double size)? onSizeChanged;

@override
State<ResizablePane> createState() => _ResizablePaneState();
}
Expand Down Expand Up @@ -206,8 +209,7 @@ class _ResizablePaneState extends State<ResizablePane> {
},
onVerticalDragUpdate: (details) {
setState(() {
final newHeight = _dragStartSize +
(_dragStartPosition - details.globalPosition.dy);
final newHeight = _dragStartSize + (_dragStartPosition - details.globalPosition.dy);
_size = math.max(
widget.minSize,
math.min(
Expand Down Expand Up @@ -238,17 +240,18 @@ class _ResizablePaneState extends State<ResizablePane> {
onHorizontalDragUpdate: (details) {
setState(() {
final newWidth = _resizeOnRight
? _dragStartSize -
(_dragStartPosition - details.globalPosition.dx)
: _dragStartSize +
(_dragStartPosition - details.globalPosition.dx);
? _dragStartSize - (_dragStartPosition - details.globalPosition.dx)
: _dragStartSize + (_dragStartPosition - details.globalPosition.dx);
_size = math.max(
widget.minSize,
math.min(
widget.maxSize,
newWidth,
),
);

widget.onSizeChanged?.call(_size);

if (_size == widget.minSize) {
_cursor = _resizeOnRight
? SystemMouseCursors.resizeRight
Expand All @@ -268,9 +271,7 @@ class _ResizablePaneState extends State<ResizablePane> {
@override
void initState() {
super.initState();
_cursor = _resizeOnTop
? SystemMouseCursors.resizeRow
: SystemMouseCursors.resizeColumn;
_cursor = _resizeOnTop ? SystemMouseCursors.resizeRow : SystemMouseCursors.resizeColumn;
_size = widget.startSize;
_scrollController.addListener(() => setState(() {}));
}
Expand Down Expand Up @@ -300,13 +301,11 @@ class _ResizablePaneState extends State<ResizablePane> {
final maxWidth = media.size.width;

if (_resizeOnTop) {
if (widget.windowBreakpoint != null &&
maxHeight <= widget.windowBreakpoint!) {
if (widget.windowBreakpoint != null && maxHeight <= widget.windowBreakpoint!) {
return const SizedBox.shrink();
}
} else {
if (widget.windowBreakpoint != null &&
maxWidth <= widget.windowBreakpoint!) {
if (widget.windowBreakpoint != null && maxWidth <= widget.windowBreakpoint!) {
return const SizedBox.shrink();
}
}
Expand Down
34 changes: 17 additions & 17 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -239,10 +239,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -372,18 +372,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -404,26 +404,26 @@ packages:
dependency: transitive
description:
name: test
sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46"
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
url: "https://pub.dev"
source: hosted
version: "1.24.3"
version: "1.24.9"
test_api:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
test_core:
dependency: transitive
description:
name: test_core
sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e"
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
url: "https://pub.dev"
source: hosted
version: "0.5.3"
version: "0.5.9"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -460,10 +460,10 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -489,5 +489,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.0"
93 changes: 0 additions & 93 deletions test/buttons/back_button_test.dart

This file was deleted.

Loading

0 comments on commit c59a400

Please sign in to comment.