text_justify_rtl 0.6.0 copy "text_justify_rtl: ^0.6.0" to clipboard
text_justify_rtl: ^0.6.0 copied to clipboard

Temporary solution for Text widget not supporting TextAlign.JustifyRTL ( flutter issue

example/lib/main.dart

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

void main() => runApp(MyApp());

var para = """
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها و شرایط\n\n سخت تایپ به پایان رسد\n و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی و جوابگوی nturies , but also the leap into  سوالات پیوسته اهل  اساسا مورد استفاده قرار گیرد. 
"""
    .trim();

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Container(
          width: 200,
          child: TextJustifyRTL(
            para,
            boxConstraints: BoxConstraints(minHeight: double.infinity, maxWidth: 200),
            textDirection: TextDirection.rtl,
            style: Theme.of(context).textTheme.subtitle,
          ),
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Temporary solution for Text widget not supporting TextAlign.JustifyRTL ( flutter issue

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on text_justify_rtl