common_rich_text 0.0.1
common_rich_text: ^0.0.1 copied to clipboard
This flutter widget is created for commonly used rich text widget.
import 'package:common_rich_text/common_rich_text.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Common Rich text Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const DemoScreen(),
);
}
}
class DemoScreen extends StatelessWidget {
const DemoScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Common Rich text Demo"),),
body: Center(
child: RichTextWidget(
text: "Title",
requiredText: "*",
fontWeight: FontWeight.bold,
),
),
);
}
}