File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class SizeC with SerializableMixin, EquatableMixin {
2727 final double height;
2828
2929 /// An empty size, one with a zero width and a zero height.
30- static SizeC zero = const SizeC (0 , 0 );
30+ static const SizeC zero = SizeC (0 , 0 );
3131
3232 /// Creates a [SizeC] with the given [width] and [height] .
3333 const SizeC (this .width, this .height);
Original file line number Diff line number Diff line change @@ -131,34 +131,6 @@ class ButtonNode extends SceneNode with CustomPropertiesMixin {
131131 super .multipleVariables,
132132 });
133133
134- @override
135- BoxConstraintsModel internalConstraints ({
136- required SizeFit horizontalFit,
137- required SizeFit verticalFit,
138- }) {
139- final double iconSize =
140- properties.icon.show ? (properties.icon.size ?? 24 ) : 0 ;
141- final double gap =
142- ! properties.buttonType.isIconButton && properties.icon.show
143- ? properties.gap
144- : 0 ;
145- // 8 - padding.vertical is used for compact visual density.
146- final SizeC minSize =
147- SizeC (iconSize + gap, iconSize + (8 - padding.vertical));
148-
149- return super
150- .internalConstraints (
151- horizontalFit: horizontalFit,
152- verticalFit: verticalFit,
153- )
154- .union (
155- BoxConstraintsModel (
156- minWidth: minSize.width,
157- minHeight: minSize.height,
158- ),
159- );
160- }
161-
162134 @override
163135 List <TriggerType > get triggerTypes =>
164136 [TriggerType .click, TriggerType .longPress];
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ abstract class ITextSizeCalculator {
3131 /// Returns the smallest possible width a [TextNode] can have given the
3232 /// constraints of its current [NodeBox] .
3333 /// The details are dependant on the implementation.
34- double getBestTextWidthAtCurrentNodeBox ();
34+ double getBestTextWidthAtCurrentNodeBox (double internalBoxWidth );
3535
3636 /// Returns The minimum height of a defined [TextNode] .
3737 /// The details are dependant on the implementation.
You can’t perform that action at this time.
0 commit comments