buildWidget method
Compose Flutter widget with child widgets already built
Subclasses should override this method. This method provides a general description of the layout of this math node. The child nodes are built in prior. This method is only responsible for the placement of those child widgets accroding to the layout & other interactions.
Please ensure children works in the same order as updateChildren, computeChildOptions, and buildWidget.
Implementation
@override
BuildResult buildWidget(
MathOptions options, List<BuildResult?> childBuildResults) =>
BuildResult(
options: options,
widget: CustomLayout(
delegate: FracLayoutDelegate(
barSize: barSize,
options: options,
),
children: <Widget>[
CustomLayoutId(
id: _FracPos.numer,
child: childBuildResults[0]!.widget,
),
CustomLayoutId(
id: _FracPos.denom,
child: childBuildResults[1]!.widget,
),
],
),
);