parse_text 0.0.8 parse_text: ^0.0.8 copied to clipboard
A Package to Detect different pattern in text and display it in Text Widget.
import 'package:flutter/material.dart';
import 'package:parse_text/parse_text.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'ParseText Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Home(),
);
}
}
class Home extends StatelessWidget {
String text = '''
It is an Example text!!
+919999999990
*_9999999999_*
email@email.com
_https://www.google.com/_
*_This portion of Text will be Bold_*
_This portion of Text will be Italic_
~This portion of Text will be Crossed~
''';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('ParseText Example'),
),
body: Padding(
padding: const EdgeInsets.all(20.0),
child: Center(
child: ParseText(
size: 16,
text: text,
),
),
),
);
}
}
// _https://www.google.com/