customizable_text

Creator: coderz1093

Last updated:

0 purchases

customizable_text Image
customizable_text Images

Languages

Categories

Add to Cart

Description:

customizable text

Customizable Text #
Customize a style of random words based on RichText.
Installation #
dependencies:
customizable_text: ^0.1.0
copied to clipboard
Usage #
Basic usage #

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Customizable Text Sample"),
),
body: Padding(
padding: const EdgeInsets.all(24),
child: CustomizableText(
originalText,
style: const TextStyle(
color: Colors.grey,
),
customStyle: const TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w500,
),
customizes: const [
CustomText('Terms of Service'),
CustomText('Privacy Policy'),
CustomText('Cookie Use'),
CustomText('Privacy Policy'),
CustomText('Learn more'),
CustomText('here'),
],
),
),
);
}
copied to clipboard
Dynamic customizing #

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Customizable Text Sample"),
),
body: Padding(
padding: const EdgeInsets.all(24),
child: CustomizableText(
originalText,
style: const TextStyle(
color: Colors.grey,
),
customStyle: const TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w500,
),
customizes: [
const CustomText(
'Terms of Service',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.w600,
),
),
CustomText(
'Privacy Policy',
style: const TextStyle(
color: Colors.green,
fontSize: 18,
),
onTap: (text) => print(text),
),
CustomText(
'Cookie Use',
style: const TextStyle(
color: Colors.orange,
fontSize: 20,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic,
decoration: TextDecoration.underline,
decorationColor: Colors.orange,
),
onTap: (text) => print(text),
),
const CustomText(
'Privacy Policy',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
decoration: TextDecoration.lineThrough,
decorationColor: Colors.red,
decorationThickness: 2,
),
),
const CustomText('Learn more'),
const CustomText('here'),
],
),
),
);
}
copied to clipboard
Customize just for the second span word #

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Customizable Text Sample"),
),
body: Padding(
padding: const EdgeInsets.all(24),
child: CustomizableText(
originalText,
style: const TextStyle(
color: Colors.grey,
),
customStyle: const TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w500,
),
customizes: const [
CustomText(
'Privacy Policy',
span: 1,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
decoration: TextDecoration.lineThrough,
decorationColor: Colors.red,
decorationThickness: 2,
),
),
],
),
),
);
}
copied to clipboard
License #
MIT

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.