GridContext class

Inheritance

Constructors

GridContext()

Properties

currentRatio double?
getter/setter pairinherited
currentSize Size?
no setterinherited
currentSizeRect Rect?
getter/setter pairinherited
excludes List<String>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
horizontalLines Map<String, List<NamedLine>>
getter/setter pair
includes List<String>
getter/setter pair
isIncludeMode bool
no setter
nameDifferences List<String>
no setter
nameIntersections List<String>
no setter
nameUnions List<String>
no setter
quickCheck Map<String, NamedLine>
快表
getter/setter pair
ratioList List<RatioChangeListener>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeList List<SizeChangeListener>
no setterinherited
verticalLines Map<String, List<NamedLine>>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addRatioChangeListener(RatioChangeListener listener, {Size? initSize, String tag = DEFAULT_TAGNAME}) → void
inherited
addSizeChangeListener(SizeChangeListener listener, {Size? initSize, String tag = DEFAULT_TAGNAME}) → void
inherited
containsRatioChangeListener(String tag) bool
inherited
containsSizeChangeListener(String tag) bool
inherited
createAddtoHorizontal(String name, List<NamedLine> ifAbsent()) List<NamedLine>
createAddtoVertical(String name, List<NamedLine> ifAbsent()) List<NamedLine>
createRectGetterMatrix({bool reverseX = false, bool reverseY = false, bool equalIgnoreCompare(NamedLine more, NamedLine less)?, List<String> includes = const [], List<String> excludes = const [], required Size sampleSortSize}) List<List<RectGetter>>
createUpdateAddHorizontal(String name, List<NamedLine> updateAdd()) List<NamedLine>
createUpdateAddVertical(String name, List<NamedLine> updateAdd()) List<NamedLine>
createUpdateHorizontal(String name, List<NamedLine> update()) List<NamedLine>
createUpdateVertical(String name, List<NamedLine> update()) List<NamedLine>
directionLines(DIRECTION_ENUM direction) Map<String, List<NamedLine>>
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
isEmpty(String tagName) bool
isNotEmpty(String tagName) bool
lines(DIRECTION direction, {List<String> includes = const [], List<String> excludes = const []}) List<NamedLine>
linesDo(DIRECTION direction, LinesDoAction doAction, {List<String> includes = const [], List<String> excludes = const []}) List<NamedLine>
linesDoPaint(DIRECTION direction, Paint paint, {List<String> includes = const [], List<String> excludes = const []}) List<NamedLine>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
notifyRatioChange(Size size, double newRatio, double? oldRatio) → void
inherited
notifySizeChange(Rect newSize, Rect? oldSize) → void
inherited
queryFirst(String queryString, DIRECTION_ENUM direction) NamedLine
queryLast(String queryString, DIRECTION_ENUM direction) NamedLine
queryLines(String queryString, [DIRECTION_ENUM direction = DIRECTION_ENUM.vertical]) List<NamedLine>
模糊查询(默认查询全部轴向)
qureyFirstCouple(String queryString, DIRECTION_ENUM direction) List<NamedLine>
qureySecondCouple(String queryString, DIRECTION_ENUM direction) List<NamedLine>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeRatioChangeListener(RatioChangeListener listener, {String name = DEFAULT_TAGNAME}) bool
inherited
removeRatioChangeTag(String tag) → void
inherited
removeSizeChangeListener(SizeChangeListener listener, {String tag = DEFAULT_TAGNAME}) bool
inherited
removeSizeChangeTag(String tag) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

gridNeedPaintSplitLine bool
是否绘制拼缝
getter/setter pair

Static Methods

createCustomDivides(List<double> customs, {NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建自定义线(占首尾线区间比值 < 1)
createCustomSeperateSpaces(List<int> weights, {NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建黄金分割线 not support expression 创建自定义线(分段占比重权值,加和占首尾线区间=1)
createExpressionStaticDivides(Expression static, double count, {(DIRECTION_ENUM, Size)? infinitySample, NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
createInnerMarginDivides(Expression divide, {NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建内双边距线
createLiteralInnerMarginDivides((double, PxUnit) literal, {NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建内双边距线 https://immvpc32u2.feishu.cn/docx/ZMTVd0gWkoRVRBxmXtIcRyVPnhd?from=from_copylink
createPercentDivides(int count, {NamedLine? fromStartLine, NamedLine? toEndLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建百分比等分线(含首尾线) 二等分,三条线 三等分,四条线 四等分,五条线
createRectGetterMatrixFromLines({bool reverseX = false, bool reverseY = false, bool equalIgnoreCompare(NamedLine more, NamedLine less)?, required List<NamedLine> vLines, required List<NamedLine> hLines}) List<List<RectGetter>>
createReverseExpressionStaticDivides(Expression static, double count, {(DIRECTION_ENUM, Size)? infinitySample, NamedLine? fromEndLine, NamedLine? toStartLine, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建定宽等分线(start end可以颠倒) 注意只从start开始定宽 Size大小会改变数量,无法使用 PercentGetter 创建,需要在外部根据Size变化每次重新 createStaticDivides
createSingleLineMargin(List<NamedLine> singleLines, {Expression? plus, Expression? minus, END_POINT endPoint = END_POINT.exclude_start_end}) List<NamedLine>
创建单条线两侧边距 支持多条辅助线一同创建
useSampleHeightSorted(Size sample, List<NamedLine> chaos) List<NamedLine>
useSampleWidthSorted(Size sample, List<NamedLine> chaos) List<NamedLine>