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

45 行
1.6 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;
}
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 =
(PrimaryScrollController) context.inheritFromWidgetOfExactType(typeof(PrimaryScrollController));
return result == null ? null : 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));
}
}
}