小编Avi*_*Das的帖子

参数类型“ RevealedOffset”不能分配给参数类型“ num”

使用我定义如下的类确保VisibleWhenFocused时出现此错误。我已经导入了正确的文件,标题中指出了我得到的错误!

错误位于viewport.getOffsetToReveal(object, 0.0)viewport.getOffsetToReveal(object, 1.0)。我试图找到解决方案,但在任何地方都找不到。

class EnsureVisibleWhenFocused extends StatefulWidget {
const EnsureVisibleWhenFocused({
Key key,
@required this.child,
@required this.focusNode,
this.curve: Curves.ease,
this.duration: const Duration(milliseconds: 100),
}) : super(key: key);

/// The node we will monitor to determine if the child is focused
final FocusNode focusNode;

/// The child widget that we are wrapping
final Widget child;

/// The curve we will use to scroll ourselves into view.
///
/// Defaults to Curves.ease.
final Curve curve;

/// The duration …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout

2
推荐指数
1
解决办法
526
查看次数

标签 统计

flutter ×1

flutter-layout ×1