auto_text_resizer 1.0.1 copy "auto_text_resizer: ^1.0.1" to clipboard
auto_text_resizer: ^1.0.1 copied to clipboard

A lightweight Flutter widget that automatically adjusts and resizes text to perfectly fit within its container. Ideal for dynamic layouts, buttons, cards, and titles where text size must adapt to avai [...]

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Auto Text Resizer Demo")),
        body: Center(
          child: Container(
            color: Colors.yellow[100],
            width: 250,
            height: 150,
            padding: const EdgeInsets.all(8),
            child: const AutoText(
              "This is a very long title that should shrink to fit.",
              style: TextStyle(fontWeight: FontWeight.bold),
              maxLines: 2,
              minFontSize: 8,
              maxFontSize: 30,
            ),
          ),
        ),
      ),
    );
  }
}
2
likes
130
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter widget that automatically adjusts and resizes text to perfectly fit within its container. Ideal for dynamic layouts, buttons, cards, and titles where text size must adapt to available space.

Repository (GitHub)
View/report issues

Topics

#text #typography #auto-resize #responsive #layout

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on auto_text_resizer