Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jaime Blasco
2023-11-08 18:59:40 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-11-08 18:59:40 +0100
Commit
639ccadc446486a9b39630a4e1f7e6de491dee1b
639ccadc
1 parent
62e11d6c
fix: update lints (#380)
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
95 additions
and
409 deletions
modal_bottom_sheet/lib/src/bottom_sheet.dart
modal_bottom_sheet/lib/src/bottom_sheet_route.dart
modal_bottom_sheet/lib/src/bottom_sheets/bar_bottom_sheet.dart
modal_bottom_sheet/lib/src/bottom_sheets/cupertino_bottom_sheet.dart
modal_bottom_sheet/lib/src/material_with_modal_page_route.dart
modal_bottom_sheet/lib/src/utils/modal_scroll_controller.dart
modal_bottom_sheet/lib/src/utils/scroll_to_top_status_bar.dart
modal_bottom_sheet/pubspec.lock
modal_bottom_sheet/pubspec.yaml
modal_bottom_sheet/test/bottom_sheet_test.dart
sheet/lib/src/physics.dart
sheet/lib/src/route/cupertino/sheet_route.dart
sheet/lib/src/route/sheet_route.dart
sheet/lib/src/scroll_controller.dart
sheet/lib/src/scrollable.dart
sheet/lib/src/sheet.dart
sheet/lib/src/widgets/default_sheet_controller.dart
sheet/lib/src/widgets/resizable_sheet.dart
sheet/lib/src/widgets/scroll_to_top_status_handler.dart
sheet/lib/src/widgets/sheet_media_query.dart
sheet/pubspec.lock
sheet/pubspec.yaml
sheet/test/scrollable_of_test.dart
sheet/test/src/widgets/min_interaction_test.dart
modal_bottom_sheet/lib/src/bottom_sheet.dart
View file @
639ccad
...
...
@@ -33,7 +33,7 @@ typedef WidgetWithChildBuilder = Widget Function(
class
ModalBottomSheet
extends
StatefulWidget
{
/// Creates a bottom sheet.
const
ModalBottomSheet
({
Key
?
key
,
super
.
key
,
required
this
.
animationController
,
this
.
animationCurve
,
this
.
enableDrag
=
true
,
...
...
@@ -48,8 +48,7 @@ class ModalBottomSheet extends StatefulWidget {
double
?
closeProgressThreshold
,
this
.
willPopThreshold
=
_willPopThreshold
,
})
:
closeProgressThreshold
=
closeProgressThreshold
??
_closeProgressThreshold
,
super
(
key:
key
);
closeProgressThreshold
??
_closeProgressThreshold
;
/// The closeProgressThreshold parameter
/// specifies when the bottom sheet will be dismissed when user drags it.
...
...
modal_bottom_sheet/lib/src/bottom_sheet_route.dart
View file @
639ccad
...
...
@@ -8,7 +8,7 @@ const Duration _bottomSheetDuration = Duration(milliseconds: 400);
class
_ModalBottomSheet
<
T
>
extends
StatefulWidget
{
const
_ModalBottomSheet
({
Key
?
key
,
super
.
key
,
this
.
closeProgressThreshold
,
required
this
.
route
,
this
.
secondAnimationController
,
...
...
@@ -16,7 +16,7 @@ class _ModalBottomSheet<T> extends StatefulWidget {
this
.
expanded
=
false
,
this
.
enableDrag
=
true
,
this
.
animationCurve
,
})
:
super
(
key:
key
)
;
});
final
double
?
closeProgressThreshold
;
final
ModalSheetRoute
<
T
>
route
;
...
...
@@ -137,9 +137,8 @@ class ModalSheetRoute<T> extends PageRoute<T> {
this
.
bounce
=
false
,
this
.
animationCurve
,
Duration
?
duration
,
RouteSettings
?
settings
,
})
:
duration
=
duration
??
_bottomSheetDuration
,
super
(
settings:
settings
);
super
.
settings
,
})
:
duration
=
duration
??
_bottomSheetDuration
;
final
double
?
closeProgressThreshold
;
final
WidgetWithChildBuilder
?
containerBuilder
;
...
...
modal_bottom_sheet/lib/src/bottom_sheets/bar_bottom_sheet.dart
View file @
639ccad
...
...
@@ -16,7 +16,7 @@ class BarBottomSheet extends StatelessWidget {
final
SystemUiOverlayStyle
?
overlayStyle
;
const
BarBottomSheet
({
Key
?
key
,
super
.
key
,
required
this
.
child
,
this
.
control
,
this
.
clipBehavior
,
...
...
@@ -24,7 +24,7 @@ class BarBottomSheet extends StatelessWidget {
this
.
backgroundColor
,
this
.
elevation
,
this
.
overlayStyle
,
})
:
super
(
key:
key
)
;
});
@override
Widget
build
(
BuildContext
context
)
{
...
...
modal_bottom_sheet/lib/src/bottom_sheets/cupertino_bottom_sheet.dart
View file @
639ccad
...
...
@@ -51,13 +51,12 @@ class _CupertinoBottomSheetContainer extends StatelessWidget {
final
SystemUiOverlayStyle
?
overlayStyle
;
const
_CupertinoBottomSheetContainer
({
Key
?
key
,
required
this
.
child
,
this
.
backgroundColor
,
required
this
.
topRadius
,
this
.
overlayStyle
,
this
.
shadow
,
})
:
super
(
key:
key
)
;
});
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -178,44 +177,29 @@ class CupertinoModalBottomSheetRoute<T> extends ModalSheetRoute<T> {
final
SystemUiOverlayStyle
?
overlayStyle
;
CupertinoModalBottomSheetRoute
({
required
WidgetBuilder
builder
,
WidgetWithChildBuilder
?
containerBuilder
,
double
?
closeProgressThreshold
,
String
?
barrierLabel
,
required
super
.
builder
,
super
.
containerBuilder
,
super
.
closeProgressThreshold
,
super
.
barrierLabel
,
double
?
elevation
,
ShapeBorder
?
shape
,
Clip
?
clipBehavior
,
AnimationController
?
secondAnimationController
,
Curve
?
animationCurve
,
Color
?
modalBarrierColor
,
bool
bounce
=
true
,
bool
isDismissible
=
true
,
bool
enableDrag
=
true
,
required
bool
expanded
,
Duration
?
duration
,
RouteSettings
?
settings
,
ScrollController
?
scrollController
,
super
.
secondAnimationController
,
super
.
animationCurve
,
super
.
modalBarrierColor
,
super
.
bounce
=
true
,
super
.
isDismissible
,
super
.
enableDrag
,
required
super
.
expanded
,
super
.
duration
,
super
.
settings
,
super
.
scrollController
,
this
.
boxShadow
=
_kDefaultBoxShadow
,
this
.
transitionBackgroundColor
,
this
.
topRadius
=
_kDefaultTopRadius
,
this
.
previousRouteAnimationCurve
,
this
.
overlayStyle
,
})
:
super
(
closeProgressThreshold:
closeProgressThreshold
,
scrollController:
scrollController
,
containerBuilder:
containerBuilder
,
builder:
builder
,
bounce:
bounce
,
barrierLabel:
barrierLabel
,
secondAnimationController:
secondAnimationController
,
modalBarrierColor:
modalBarrierColor
,
isDismissible:
isDismissible
,
enableDrag:
enableDrag
,
expanded:
expanded
,
settings:
settings
,
animationCurve:
animationCurve
,
duration:
duration
,
);
});
@override
Widget
buildTransitions
(
...
...
@@ -264,13 +248,12 @@ class _CupertinoModalTransition extends StatelessWidget {
final
Widget
body
;
const
_CupertinoModalTransition
({
Key
?
key
,
required
this
.
secondaryAnimation
,
required
this
.
body
,
required
this
.
topRadius
,
this
.
backgroundColor
=
Colors
.
black
,
this
.
animationCurve
,
})
:
super
(
key:
key
)
;
});
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -431,12 +414,12 @@ class CupertinoScaffold extends StatefulWidget {
final
SystemUiOverlayStyle
?
overlayStyle
;
const
CupertinoScaffold
({
Key
?
key
,
super
.
key
,
required
this
.
body
,
this
.
topRadius
=
_kDefaultTopRadius
,
this
.
transitionBackgroundColor
=
Colors
.
black
,
this
.
overlayStyle
,
})
:
super
(
key:
key
)
;
});
@override
State
<
StatefulWidget
>
createState
()
=>
_CupertinoScaffoldState
();
...
...
modal_bottom_sheet/lib/src/material_with_modal_page_route.dart
View file @
639ccad
...
...
@@ -10,15 +10,11 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> {
/// The values of [builder], [maintainState], and [fullScreenDialog] must not
/// be null.
MaterialWithModalsPageRoute
({
required
WidgetBuilder
builder
,
RouteSettings
?
settings
,
bool
maintainState
=
true
,
bool
fullscreenDialog
=
false
,
})
:
super
(
settings:
settings
,
fullscreenDialog:
fullscreenDialog
,
builder:
builder
,
maintainState:
maintainState
);
required
super
.
builder
,
super
.
settings
,
super
.
maintainState
,
super
.
fullscreenDialog
,
});
ModalSheetRoute
?
_nextModalRoute
;
...
...
modal_bottom_sheet/lib/src/utils/modal_scroll_controller.dart
View file @
639ccad
...
...
@@ -13,11 +13,10 @@ import 'package:flutter/widgets.dart';
class
ModalScrollController
extends
InheritedWidget
{
/// Creates a widget that associates a [ScrollController] with a subtree.
ModalScrollController
({
Key
?
key
,
super
.
key
,
required
this
.
controller
,
required
Widget
child
,
})
:
super
(
key:
key
,
child:
PrimaryScrollController
(
controller:
controller
,
child:
child
,
...
...
modal_bottom_sheet/lib/src/utils/scroll_to_top_status_bar.dart
View file @
639ccad
...
...
@@ -9,10 +9,10 @@ class ScrollToTopStatusBarHandler extends StatefulWidget {
final
ScrollController
scrollController
;
const
ScrollToTopStatusBarHandler
({
Key
?
key
,
super
.
key
,
required
this
.
child
,
required
this
.
scrollController
,
})
:
super
(
key:
key
)
;
});
@override
ScrollToTopStatusBarState
createState
()
=>
ScrollToTopStatusBarState
();
...
...
modal_bottom_sheet/pubspec.lock
View file @
639ccad
...
...
@@ -63,10 +63,10 @@ packages:
dependency: "direct dev"
description:
name: lints
sha256:
"0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256:
cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "
2.1.1
"
version: "
3.0.0
"
matcher:
dependency: transitive
description:
...
...
modal_bottom_sheet/pubspec.yaml
View file @
639ccad
...
...
@@ -13,4 +13,4 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
lints
:
^
2
.0.0
lints
:
^
3
.0.0
...
...
modal_bottom_sheet/test/bottom_sheet_test.dart
View file @
639ccad
...
...
@@ -90,10 +90,9 @@ Finder _textButtonWithText(String text) {
class
_TestWidget
extends
StatefulWidget
{
const
_TestWidget
({
Key
?
key
,
this
.
onInitState
,
this
.
onDispose
,
})
:
super
(
key:
key
)
;
});
final
VoidCallback
?
onInitState
;
final
VoidCallback
?
onDispose
;
...
...
sheet/lib/src/physics.dart
View file @
639ccad
...
...
@@ -17,8 +17,7 @@ mixin SheetPhysics on ScrollPhysics {
/// Sheet physics that does not allow the user to drag a sheet.
class
NeverDraggableSheetPhysics
extends
NeverScrollableScrollPhysics
with
SheetPhysics
{
const
NeverDraggableSheetPhysics
({
ScrollPhysics
?
parent
})
:
super
(
parent:
parent
);
const
NeverDraggableSheetPhysics
({
super
.
parent
});
@override
NeverDraggableSheetPhysics
applyTo
(
ScrollPhysics
?
ancestor
)
{
...
...
@@ -30,8 +29,7 @@ class NeverDraggableSheetPhysics extends NeverScrollableScrollPhysics
class
AlwaysDraggableSheetPhysics
extends
AlwaysScrollableScrollPhysics
with
SheetPhysics
{
/// Creates scroll physics that always lets the user scroll.
const
AlwaysDraggableSheetPhysics
({
ScrollPhysics
?
parent
})
:
super
(
parent:
parent
);
const
AlwaysDraggableSheetPhysics
({
super
.
parent
});
@override
AlwaysDraggableSheetPhysics
applyTo
(
ScrollPhysics
?
ancestor
)
{
...
...
@@ -43,9 +41,9 @@ class AlwaysDraggableSheetPhysics extends AlwaysScrollableScrollPhysics
class
BouncingSheetPhysics
extends
ScrollPhysics
with
SheetPhysics
{
/// Creates sheet physics that bounce back from the edge.
const
BouncingSheetPhysics
({
ScrollPhysics
?
parent
,
super
.
parent
,
this
.
overflowViewport
=
false
,
})
:
super
(
parent:
parent
)
;
});
final
bool
overflowViewport
;
...
...
@@ -169,7 +167,6 @@ class BouncingSheetPhysics extends ScrollPhysics with SheetPhysics {
@override
Simulation
?
createBallisticSimulation
(
ScrollMetrics
position
,
double
velocity
)
{
if
(
position
.
outOfRange
)
{
return
BouncingScrollSimulation
(
spring:
const
SpringDescription
(
...
...
@@ -223,8 +220,8 @@ class BouncingSheetPhysics extends ScrollPhysics with SheetPhysics {
class
NoMomentumSheetPhysics
extends
ScrollPhysics
with
SheetPhysics
{
/// Creates sheet physics that has no momentum after the user stops dragging.
const
NoMomentumSheetPhysics
({
ScrollPhysics
?
parent
,
})
:
super
(
parent:
parent
);
super
.
parent
,
});
@override
NoMomentumSheetPhysics
applyTo
(
ScrollPhysics
?
ancestor
)
{
...
...
@@ -289,8 +286,8 @@ class NoMomentumSheetPhysics extends ScrollPhysics with SheetPhysics {
class
ClampingSheetPhysics
extends
ScrollPhysics
with
SheetPhysics
{
/// Creates sheet physics that has no momentum after the user stops dragging.
const
ClampingSheetPhysics
({
ScrollPhysics
?
parent
,
})
:
super
(
parent:
parent
);
super
.
parent
,
});
@override
ClampingSheetPhysics
applyTo
(
ScrollPhysics
?
ancestor
)
{
...
...
@@ -384,10 +381,10 @@ class ClampingSheetPhysics extends ScrollPhysics with SheetPhysics {
class
SnapSheetPhysics
extends
ScrollPhysics
with
SheetPhysics
{
/// Creates snapping physics for a [Sheet].
const
SnapSheetPhysics
({
ScrollPhysics
?
parent
,
super
.
parent
,
this
.
stops
=
const
<
double
>[],
this
.
relative
=
true
,
})
:
super
(
parent:
parent
)
;
});
/// Positions where the sheet could be snapped once the user stops
/// dragging
...
...
sheet/lib/src/route/cupertino/sheet_route.dart
View file @
639ccad
...
...
@@ -222,11 +222,11 @@ class CupertinoSheetRoute<T> extends SheetRoute<T> {
@visibleForTesting
class
CupertinoSheetBottomRouteTransition
extends
StatelessWidget
{
const
CupertinoSheetBottomRouteTransition
({
Key
?
key
,
super
.
key
,
required
this
.
sheetAnimation
,
required
this
.
secondaryAnimation
,
required
this
.
body
,
})
:
super
(
key:
key
)
;
});
final
Widget
body
;
...
...
@@ -319,10 +319,10 @@ class CupertinoSheetPage<T> extends Page<T> {
const
CupertinoSheetPage
({
required
this
.
child
,
this
.
maintainState
=
true
,
LocalKey
?
key
,
String
?
name
,
Object
?
arguments
,
})
:
super
(
key:
key
,
name:
name
,
arguments:
arguments
);
super
.
key
,
super
.
name
,
super
.
arguments
,
});
/// The content to be shown in the [Route] created by this page.
final
Widget
child
;
...
...
@@ -343,17 +343,13 @@ class CupertinoSheetPage<T> extends Page<T> {
class
_PageBasedCupertinoSheetRoute
<
T
>
extends
CupertinoSheetRoute
<
T
>
{
_PageBasedCupertinoSheetRoute
({
required
CupertinoSheetPage
<
T
>
page
,
List
<
double
>?
stops
,
double
initialStop
=
1
,
Color
?
backgroundColor
,
bool
maintainState
=
true
,
super
.
stops
,
super
.
initialStop
,
super
.
backgroundColor
,
super
.
maintainState
,
})
:
super
(
settings:
page
,
builder:
(
BuildContext
context
)
=>
page
.
child
,
initialStop:
initialStop
,
backgroundColor:
backgroundColor
,
stops:
stops
,
maintainState:
maintainState
,
);
CupertinoSheetPage
<
T
>
get
_page
=>
settings
as
CupertinoSheetPage
<
T
>;
...
...
sheet/lib/src/route/sheet_route.dart
View file @
639ccad
...
...
@@ -350,8 +350,7 @@ class _PageBasedSheetRoute<T> extends SheetRoute<T> {
}
class
_SheetRouteContainer
extends
StatefulWidget
{
const
_SheetRouteContainer
({
Key
?
key
,
required
this
.
sheetRoute
})
:
super
(
key:
key
);
const
_SheetRouteContainer
({
required
this
.
sheetRoute
});
final
SheetRoute
<
dynamic
>
sheetRoute
;
@override
...
...
sheet/lib/src/scroll_controller.dart
View file @
639ccad
...
...
@@ -17,13 +17,10 @@ import 'package:sheet/sheet.dart';
/// descendants.
class
SheetPrimaryScrollController
extends
ScrollController
{
SheetPrimaryScrollController
({
double
initialScrollOffset
=
0.0
,
String
?
debugLabel
,
super
.
initialScrollOffset
,
super
.
debugLabel
,
required
this
.
sheetContext
,
})
:
super
(
debugLabel:
debugLabel
,
initialScrollOffset:
initialScrollOffset
,
);
});
final
SheetContext
sheetContext
;
...
...
@@ -43,7 +40,7 @@ class SheetPrimaryScrollController extends ScrollController {
}
class
_SheetScrollActivity
extends
ScrollActivity
{
_SheetScrollActivity
(
SheetPosition
delegate
)
:
super
(
delegate
);
_SheetScrollActivity
(
SheetPosition
super
.
delegate
);
@override
bool
get
isScrolling
=>
true
;
...
...
@@ -69,21 +66,14 @@ class _SheetScrollActivity extends ScrollActivity {
/// * [_SheetScrollController], which uses this as its [ScrollPosition].
class
SheetPrimaryScrollPosition
extends
ScrollPositionWithSingleContext
{
SheetPrimaryScrollPosition
({
required
ScrollPhysics
physics
,
required
ScrollContext
context
,
double
initialPixels
=
0.0
,
bool
keepScrollOffset
=
true
,
required
super
.
physics
,
required
super
.
context
,
double
super
.
initialPixels
,
super
.
keepScrollOffset
,
required
this
.
sheetContext
,
ScrollPosition
?
oldPosition
,
String
?
debugLabel
,
})
:
super
(
physics:
physics
,
context:
context
,
initialPixels:
initialPixels
,
keepScrollOffset:
keepScrollOffset
,
oldPosition:
oldPosition
,
debugLabel:
debugLabel
,
);
super
.
oldPosition
,
super
.
debugLabel
,
});
final
SheetContext
sheetContext
;
SheetPosition
get
sheetPosition
=>
sheetContext
.
position
;
...
...
sheet/lib/src/scrollable.dart
View file @
639ccad
...
...
@@ -43,7 +43,7 @@ class SheetScrollable extends StatefulWidget {
///
/// The [axisDirection] and [viewportBuilder] arguments must not be null.
const
SheetScrollable
({
Key
?
key
,
super
.
key
,
this
.
axisDirection
=
AxisDirection
.
down
,
this
.
controller
,
this
.
physics
,
...
...
@@ -55,8 +55,7 @@ class SheetScrollable extends StatefulWidget {
this
.
scrollBehavior
,
this
.
initialExtent
,
this
.
minInteractionExtent
=
0
,
})
:
assert
(
semanticChildCount
==
null
||
semanticChildCount
>=
0
),
super
(
key:
key
);
})
:
assert
(
semanticChildCount
==
null
||
semanticChildCount
>=
0
);
/// The direction in which this widget scrolls.
///
...
...
@@ -285,11 +284,10 @@ class SheetScrollable extends StatefulWidget {
// ScrollableState.build() always rebuilds its _ScrollableScope.
class
_ScrollableScope
extends
InheritedWidget
{
const
_ScrollableScope
({
Key
?
key
,
required
this
.
scrollable
,
required
this
.
position
,
required
Widget
child
,
})
:
super
(
key:
key
,
child:
child
);
required
super
.
child
,
});
final
SheetState
scrollable
;
final
ScrollPosition
position
;
...
...
@@ -772,13 +770,12 @@ class SheetState extends State<SheetScrollable>
/// scrollable children.
class
_ScrollSemantics
extends
SingleChildRenderObjectWidget
{
const
_ScrollSemantics
({
Key
?
key
,
super
.
key
,
required
this
.
position
,
required
this
.
allowImplicitScrolling
,
required
this
.
semanticChildCount
,
Widget
?
child
,
})
:
assert
(
semanticChildCount
==
null
||
semanticChildCount
>=
0
),
super
(
key:
key
,
child:
child
);
super
.
child
,
})
:
assert
(
semanticChildCount
==
null
||
semanticChildCount
>=
0
);
final
ScrollPosition
position
;
final
bool
allowImplicitScrolling
;
...
...
sheet/lib/src/sheet.dart
View file @
639ccad
...
...
@@ -292,8 +292,7 @@ class Sheet extends StatelessWidget {
}
class
_DefaultSheetScrollController
extends
StatelessWidget
{
const
_DefaultSheetScrollController
({
Key
?
key
,
required
this
.
child
})
:
super
(
key:
key
);
const
_DefaultSheetScrollController
({
required
this
.
child
});
final
Widget
child
;
...
...
sheet/lib/src/widgets/default_sheet_controller.dart
View file @
639ccad
...
...
@@ -14,8 +14,7 @@ typedef SheetControllerCallback = void Function(SheetController controller);
///
///
class
DefaultSheetController
extends
StatefulWidget
{
const
DefaultSheetController
({
Key
?
key
,
required
this
.
child
,
this
.
onCreated
})
:
super
(
key:
key
);
const
DefaultSheetController
({
super
.
key
,
required
this
.
child
,
this
.
onCreated
});
final
Widget
child
;
...
...
@@ -56,8 +55,7 @@ class _DefaultSheetControllerState extends State<DefaultSheetController> {
class
_InheritedSheetController
extends
InheritedWidget
{
const
_InheritedSheetController
(
{
Key
?
key
,
required
super
.
child
,
required
this
.
controller
})
:
super
(
key:
key
);
{
required
super
.
child
,
required
this
.
controller
});
final
SheetController
controller
;
...
...
sheet/lib/src/widgets/resizable_sheet.dart
View file @
639ccad
...
...
@@ -14,12 +14,12 @@ import 'package:sheet/sheet.dart';
/// * [Sheet], that uses this widget to allow resizable sheet child
class
ResizableSheetChild
extends
SingleChildRenderObjectWidget
{
const
ResizableSheetChild
({
Key
?
key
,
super
.
key
,
this
.
minExtent
=
0
,
required
this
.
offset
,
required
Widget
child
,
required
Widget
super
.
child
,
required
this
.
resizable
,
})
:
super
(
key:
key
,
child:
child
)
;
});
final
double
minExtent
;
final
bool
resizable
;
...
...
sheet/lib/src/widgets/scroll_to_top_status_handler.dart
View file @
639ccad
...
...
@@ -6,9 +6,9 @@ import 'package:flutter/widgets.dart';
/// Extracted from [Scaffold] and used in [Sheet]
class
ScrollToTopStatusBarHandler
extends
StatefulWidget
{
const
ScrollToTopStatusBarHandler
({
Key
?
key
,
super
.
key
,
required
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
Widget
child
;
...
...
sheet/lib/src/widgets/sheet_media_query.dart
View file @
639ccad
...
...
@@ -11,7 +11,7 @@ import 'dart:math' as math;
/// If the sheet is fully expanded to the top of the screen the top padding
/// will be the same as the parent top safe area.
class
SheetMediaQuery
extends
StatelessWidget
{
const
SheetMediaQuery
({
Key
?
key
,
required
this
.
child
})
:
super
(
key:
key
);
const
SheetMediaQuery
({
super
.
key
,
required
this
.
child
}
);
final
Widget
child
;
...
...
sheet/pubspec.lock
View file @
639ccad
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a
url: "https://pub.dev"
source: hosted
version: "61.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562
url: "https://pub.dev"
source: hosted
version: "5.13.0"
args:
dependency: transitive
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
url: "https://pub.dev"
source: hosted
version: "2.4.2"
async:
dependency: transitive
description:
...
...
@@ -65,30 +41,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.2"
convert:
dependency: transitive
description:
name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
coverage:
dependency: transitive
description:
name: coverage
sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb"
url: "https://pub.dev"
source: hosted
version: "1.6.4"
crypto:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.3"
fake_async:
dependency: transitive
description:
...
...
@@ -97,14 +49,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
file:
dependency: transitive
description:
name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -115,70 +59,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
glob:
dependency: transitive
description:
name: glob
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
http_multi_server:
dependency: transitive
description:
name: http_multi_server
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
io:
dependency: transitive
description:
name: io
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
lints:
dependency: "direct dev"
description:
name: lints
sha256:
"0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256:
cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "2.1.1"
logging:
dependency: transitive
description:
name: logging
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "3.0.0"
matcher:
dependency: transitive
description:
...
...
@@ -203,38 +91,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
mime:
dependency: transitive
description:
name: mime
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
url: "https://pub.dev"
source: hosted
version: "1.0.4"
mocktail:
dependency: "direct dev"
description:
name: mocktail
sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
node_preamble:
dependency: transitive
description:
name: node_preamble
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
sha256: bac151b31e4ed78bd59ab89aa4c0928f297b1180186d5daf03734519e5f596c1
url: "https://pub.dev"
source: hosted
version: "2.0.2"
package_config:
dependency: transitive
description:
name: package_config
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "1.0.1"
path:
dependency: transitive
description:
...
...
@@ -243,75 +107,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.3"
pool:
dependency: transitive
description:
name: pool
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
url: "https://pub.dev"
source: hosted
version: "1.5.1"
pub_semver:
dependency: transitive
description:
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
shelf:
dependency: transitive
description:
name: shelf
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
url: "https://pub.dev"
source: hosted
version: "1.4.1"
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
shelf_static:
dependency: transitive
description:
name: shelf_static
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
url: "https://pub.dev"
source: hosted
version: "1.1.2"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
source_maps:
dependency: transitive
description:
name: source_maps
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
url: "https://pub.dev"
source: hosted
version: "0.10.12"
source_span:
dependency: transitive
description:
...
...
@@ -352,14 +152,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test:
dependency: transitive
description:
name: test
sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46"
url: "https://pub.dev"
source: hosted
version: "1.24.3"
test_api:
dependency: transitive
description:
...
...
@@ -368,22 +160,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.0"
test_core:
dependency: transitive
description:
name: test_core
sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e"
url: "https://pub.dev"
source: hosted
version: "0.5.3"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.2"
vector_math:
dependency: transitive
description:
...
...
@@ -392,22 +168,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev"
source: hosted
version: "11.10.0"
watcher:
dependency: transitive
description:
name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
...
...
@@ -416,29 +176,5 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.dev"
source: hosted
version: "2.4.0"
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
yaml:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
...
...
sheet/pubspec.yaml
View file @
639ccad
...
...
@@ -13,7 +13,7 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
mocktail
:
^0.3.0
lints
:
^2.1.1
mocktail
:
^1.0.1
lints
:
^3.0.0
flutter
:
\ No newline at end of file
...
...
sheet/test/scrollable_of_test.dart
View file @
639ccad
...
...
@@ -8,8 +8,7 @@ import 'package:sheet/sheet.dart';
class
ScrollPositionListener
extends
StatefulWidget
{
const
ScrollPositionListener
(
{
Key
?
key
,
required
this
.
child
,
required
this
.
log
})
:
super
(
key:
key
);
{
super
.
key
,
required
this
.
child
,
required
this
.
log
});
final
Widget
child
;
final
ValueChanged
<
String
>
log
;
...
...
sheet/test/src/widgets/min_interaction_test.dart
View file @
639ccad
...
...
@@ -32,7 +32,7 @@ void main() {
late
VoidCallback
mockOnTap
;
setUp
(()
{
mockOnTap
=
MockVoidCallback
();
mockOnTap
=
MockVoidCallback
()
.
call
;
when
(
mockOnTap
).
thenAnswer
((
_
)
{});
});
...
...
Please
register
or
login
to post a comment