simc / auto_size_text

Flutter widget that automatically resizes text to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text
MIT License
2.06k stars 240 forks source link

Does not work as expected #109

Open Terranic opened 2 years ago

Terranic commented 2 years ago

Steps to Reproduce Autotext does not use the amount of space available.

Code sample

 return Scaffold(
      appBar: AppBar(
          elevation: 0,
          title: Text(
            "Wählen Sie ein Ziel",
            style: Theme.of(context)
                .textTheme
                .headline5
                ?.copyWith(color: Colors.white),
          ),
          backgroundColor: Colors.green,
          leading: IconButton(
            icon: const Icon(Icons.arrow_back),
            onPressed: () => Navigator.pop(context),
          )),
      body: Column(
        children: [
          Container(
            child: Padding(
              padding: const EdgeInsets.symmetric(horizontal: 20.0),
              child: AutoSizeText(
                "Wählen Sie hier ein Ziel, für das Sie eines erfassen wollen. "
              ),
            ),
            width: size.width,
            height: size.height * 0.16,
            decoration: const BoxDecoration(
                gradient: LinearGradient(
                  begin: Alignment.bottomCenter,
                  end: Alignment.topCenter,
                  colors: [Colors.lightGreen, Colors.green],
                ),
                color: Colors.green,
                borderRadius: BorderRadius.only(
                    bottomLeft: Radius.circular(30),
                    bottomRight: Radius.circular(30))),
          ),
          Expanded(....

Screenshots image

Version