localized_rich_text_plus 0.0.2 copy "localized_rich_text_plus: ^0.0.2" to clipboard
localized_rich_text_plus: ^0.0.2 copied to clipboard

This package allows you to localize your RichText widget as using translateble keys

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:localized_rich_text_plus/localized_rich_text_plus.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo app',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Demo App"),
        ),
        body: Center(
          child: 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")},
              ),
            ],
          ),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      ),
    );
  }
}
2
likes
150
points
799
downloads

Publisher

verified publisherrahimli.live

Weekly Downloads

This package allows you to localize your RichText widget as using translateble keys

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on localized_rich_text_plus