bindDisplayText method
Implementation
Widget bindDisplayText() {
return Container(
padding: EdgeInsets.symmetric(horizontal: 20),
height: displayTextHeight,
child: type == VirtualKeyboardType.Numeric
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: textController.text.isEmpty
? Container()
: Center(
child: Card(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(
textController.text,
textAlign: TextAlign.center,
),
)),
)),
if (type == VirtualKeyboardType.Numeric)
IconButton(
icon: Icon(
Icons.arrow_circle_right_rounded,
color: textColor,
size: 30,
),
onPressed: () {
widget.onReturn!.call(textController.text);
onSend = true;
textController.clear();
},
)
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
textController.text.isEmpty
? Container()
: Card(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(
textController.text,
textAlign: TextAlign.center,
),
)),
],
),
);
}