0 purchases
text auto direction
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
copied to clipboard
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!"),
),
),
),
);
}
}
copied to clipboard
Additional information #
To contribute, report issues, or find more about the package, visit the GitHub repository.
This package is maintained by Chiedu Egbumokei.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.