mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 16:25:17 +00:00
Include BBcode parser
This commit is contained in:
21
lib/ui/widgets/text_widget.dart
Normal file
21
lib/ui/widgets/text_widget.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:comunic/utils/bbcode_parser.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Text widget
|
||||
///
|
||||
/// The content passed to this widget is automatically parsed
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
class TextWidget extends StatelessWidget {
|
||||
final String content;
|
||||
|
||||
const TextWidget({Key key, @required this.content})
|
||||
: assert(content != null),
|
||||
super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BBCodeParsedWidget(text: content);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user