19 lines
411 B
Dart
19 lines
411 B
Dart
import 'package:flutter/cupertino.dart';
|
|
|
|
class NormalTextOnly extends StatelessWidget {
|
|
final String text;
|
|
|
|
NormalTextOnly({super.key, required this.text});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text(
|
|
_extractNormalText(text),
|
|
);
|
|
}
|
|
|
|
String _extractNormalText(String text) {
|
|
final RegExp regExp = RegExp(r'\*[^*]+\*');
|
|
return text.replaceAll(regExp, '');
|
|
}
|
|
} |