getView function
Implementation
Widget getView(dynamic child, Color? textColor) {
if (child is String) {
if (textColor == null) {
return Text(child);
} else {
return Text(child, style: TextStyle(color: textColor));
}
} else if (child is Widget) {
return child;
}
return const SizedBox.shrink();
}