您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

44 行
1.5 KiB

using Unity.UIWidgets.foundation;
namespace Unity.UIWidgets.widgets {
public class PrimaryScrollController : InheritedWidget {
public PrimaryScrollController(
Key key = null,
ScrollController controller = null,
Widget child = null
) : base(key: key, child: child) {
D.assert(controller != null);
this.controller = controller;
}
public PrimaryScrollController(
Key key = null,
Widget child = null
) : base(key: key, child: child) {
}
public static PrimaryScrollController none(
Key key = null,
Widget child = null
) {
return new PrimaryScrollController(key, child);
}
public readonly ScrollController controller;
public static ScrollController of(BuildContext context) {
PrimaryScrollController result = context.dependOnInheritedWidgetOfExactType<PrimaryScrollController>();
return result?.controller;
}
public override bool updateShouldNotify(InheritedWidget oldWidget) {
return controller != ((PrimaryScrollController) oldWidget).controller;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<ScrollController>("controller", controller,
ifNull: "no controller", showName: false));
}
}
}