8000 Remove the AnimatedSize vsync parameter by jason-simmons · Pull Request #480 · flutter/gallery · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Remove the AnimatedSize vsync parameter #480

Merged
merged 1 commit into from
Apr 22, 2021
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 lib/pages/demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ class _GalleryDemoPageState extends State<GalleryDemoPage>
);
} else {
section = AnimatedSize(
vsync: this,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this class still need to be a TickerProviderStateMixin?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still needed because _GalleryDemoPageState is also creating an AnimationController that uses a TickerProvider

duration: const Duration(milliseconds: 200),
alignment: Alignment.topCenter,
curve: Curves.easeIn,
Expand Down
4 changes: 1 addition & 3 deletions lib/studies/shrine/expanding_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ double _getPeakPoint({double begin, double end}) {
return begin + (end - begin) * _peakVelocityProgress;
}

class _ExpandingBottomSheetState extends State<ExpandingBottomSheet>
with TickerProviderStateMixin {
class _ExpandingBottomSheetState extends State<ExpandingBottomSheet> {
final GlobalKey _expandingBottomSheetKey =
GlobalKey(debugLabel: 'Expanding bottom sheet');

Expand Down Expand Up @@ -556,7 +555,6 @@ class _ExpandingBottomSheetState extends State<ExpandingBottomSheet>
key: _expandingBottomSheetKey,
duration: const Duration(milliseconds: 225),
curve: Curves.easeInOut,
vsync: this,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this class still need to be a TickerProviderStateMixin

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the TickerProviderStateMixin

alignment: AlignmentDirectional.topStart,
child: AnimatedBuilder(
animation: widget.hideController,
Expand Down
0