Last updated:
0 purchases
localized rich text plus
Localized RichText Plus #
Localized RichText package lets you localize your RichText.
Installation #
Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
localized_rich_text_plus: ^0.0.1
copied to clipboard
Import the package and use it in your Flutter App.
import 'package:localized_rich_text_plus/localized_rich_text_plus.dart';
copied to clipboard
Examples of How To Use the package #
default parameter - You pass your full text here
originalText - specific word or phrase will be changed
localizedText - specific word or phrase will be localized to
style - Custom TextStyle if necessary to add
import 'package:flutter/material.dart';
import 'package:localized_rich_text_plus/localized_rich_text_plus.dart';
class LocalizedWidget extends StatelessWidget {
const LocalizedWidget({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return LocalizedRichText(
const Text(
'I have read paymentRulesText and paymentContractText, I agree.',
style: TextStyle(
fontSize: 18,
),
),
richTexts: [
LocalRichText(
originalText: 'paymentRulesText',
localizedText: 'the user agreement, the rules of the site',
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
),
onTap: () => {print("clicked")},
),
LocalRichText(
originalText: 'paymentContractText',
localizedText: 'the general offer agreement',
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
),
onTap: () => {print("clicked")},
),
],
);
}
}
copied to clipboard
Screenshot #
Referenced from these packages
Easy Rich Text
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.