addUserResponseBubble method

void addUserResponseBubble(
  1. dynamic value
)

Implementation

void addUserResponseBubble(dynamic value) {
  if (value == null) return;
  String displayText = '';
  if (value is Map && value.length == 1) {
    displayText = value.values.first?.toString() ?? '';
  } else {
    displayText = value.toString();
  }

  final bubble = Padding(
    padding: EdgeInsets.only(
      top: 12.0,
      bottom: 12.00,
      right: 24.0,
      left: 50.0,
    ),
    child: Align(
      alignment: Alignment.centerRight,
      child: Container(
        padding: EdgeInsets.all(12.0),
        decoration: BoxDecoration(
          color: getAppTheme()?.colorScheme.tertiary,
          borderRadius: BorderRadius.circular(10.0),
        ),
        child: Text(displayText, style: getAppTheme()?.textTheme.bodyMedium),
      ),
    ),
  );
  // WidgetsBinding.instance.addPostFrameCallback((_) {
  //   if (mounted) {
  pageState?.showStep(bubble);
  //   }
  // });
}