buildModel method
Implementation
FloatTextModel buildModel() {
RenderObject? ro = filedKey.currentContext?.findRenderObject();
Offset offset = Offset(100, 200);
if (ro is RenderBox) {
//adjust text's dy value
offset = ro.localToGlobal(Offset.zero).translate(0, -(44 + windowStatusBarHeight));
}
return FloatTextModel(text: _controller.text, top: offset.dy, left: offset.dx, style: TextStyle(fontSize: _size, color: _textColor));
}