v2.0.1flutter_fader
一个 Flutter 小部件,可让您淡入和淡出子小部件。当子小部件淡出时,它将从树中移除(无法与之交互)
一个简单的 Flutter 小部件,可使其中的子组件淡出,使其既不可见也不可用,直到您再次将其淡入。
以下为英文项目原文快照,最新内容请访问 GitHub。
A widget for Flutter that allows you to fade in and out a child widget.
When a widget is faded out it is no longer in the view tree. Meaning that it can't be used or interacted with. Handy for hiding buttons.

In your Flutter project, add the package to your dependencies
dependencies:
...
flutter_fader: ^2.0.0
Examples of how to use the widget, and that can also be ran on your device, can be found in the example directory
Import the fader package
import 'package:flutter_fader/flutter_fader.dart';
Create a fader controller, this allows you to control when the Fader fades in or out
FaderController faderController = new FaderController();
Create a fader widget, and pass it the fader controller
Fader(
controller: faderController,
duration: const Duration(milliseconds: 50),
child: Text("Hello, world!"),
)
Now you can fade the child widget in and out at will
faderController.fadeOut();
faderController.fadeIn();
依赖清单 3 项
{"sdk":"flutter"}^2.0.1{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗