optimal_wrap_text 1.0.5 copy "optimal_wrap_text: ^1.0.5" to clipboard
optimal_wrap_text: ^1.0.5 copied to clipboard

A Flutter Text replacement that wraps short multi-line text over similarly sized lines for better visual balance.

example/lib/main.dart

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

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

final class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('OptimalWrapText Example')),
        body: Center(
          child: OptimalWrapText(
            'My slightly longer text that will span 2 or 3 lines',
            textAlign: TextAlign.center,
            style: TextStyle(fontSize: 18),
          ),
        ),
      ),
    );
  }
}
20
likes
160
points
342
downloads

Publisher

verified publishercommingle.app

Weekly Downloads

A Flutter Text replacement that wraps short multi-line text over similarly sized lines for better visual balance.

Homepage
Repository (GitHub)
View/report issues

Topics

#text #wrapping #ui #readability #responsive

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on optimal_wrap_text