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

A Flutter package that provides the AutoDirection widget for automatic text direction detection.

Auto Direction Package #

A Flutter package that provides the AutoDirection widget for automatic text direction detection.

Features #

  • Automatically sets text direction based on content.
  • Supports dynamic detection of left-to-right (LTR) and right-to-left (RTL) direction.

Getting Started #

Add the following dependency to your pubspec.yaml:

dependencies:
  auto_direction_package: ^0.0.2

Usage #

Wrap your widget that contains text with the AutoDirection widget:

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: AutoDirection(
            text: "مرحبًا بك في Flutter!",
            child: Text("مرحبًا بك في Flutter!"),
          ),
        ),
      ),
    );
  }
}

Additional information #

To contribute, report issues, or find more about the package, visit the GitHub repository.

This package is maintained by Chiedu Egbumokei.

2
likes
150
points
81
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides the AutoDirection widget for automatic text direction detection.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, intl

More

Packages that depend on text_auto_direction