[flutter]: fix scrollbar does't have default animation for styleed_widget

This commit is contained in:
appflowy
2021-10-28 13:56:12 +08:00
parent 818aff46d4
commit 3bd147a058
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"[dart]": { "[dart]": {
"editor.formatOnSave": false, "editor.formatOnSave": true,
"editor.formatOnType": true, "editor.formatOnType": true,
"editor.rulers": [ "editor.rulers": [
120 120

View File

@ -173,7 +173,7 @@ class ScrollbarState extends State<StyledScrollbar> {
), ),
), ),
) )
]).opacity(showHandle ? 1.0 : 0.0, animate: false); ]).opacity(showHandle ? 1.0 : 0.0, animate: true);
}, },
); );
} }
@ -237,7 +237,9 @@ class ScrollbarListStack extends StatelessWidget {
trackColor: trackColor, trackColor: trackColor,
handleColor: handleColor, handleColor: handleColor,
), ),
), )
// The animate will be used by the children that using styled_widget.
.animate(const Duration(milliseconds: 250), Curves.easeOut),
], ],
); );
} }