Flutter text background with figure

Stack Overflow Asked by talisman7525 on December 1, 2020

            color: const Color(0xFF202020),
            child: Column(
              children: [
                    title: const DecoratedBox(
                      const BoxDecoration(color: const Color(0xFF141414)),
                  child: const Text(
                    style: TextStyle(color: const Color(0xFFE7E7E7)),
                  alignment: MainAxisAlignment.start,
                  children: [
                        textColor: const Color(0xFFE7E7E7),
                        onPressed: () {},
                        child: const Text('Contact'))

This is my code for Card.

the result of upper code

this is how upper code executed.

text style what I want

I want the background of the letter not to be connected to the end of the card, but to enter a square with a round end.

One Answer

Hope this helps you.

        child: Container(
          margin: const EdgeInsets.all(10),
          height: 65,
          decoration: BoxDecoration(
              color: Color(0xFF202020),
              shape: BoxShape.rectangle,
              borderRadius: BorderRadius.circular(10)),
          child: Text(
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: 22,
              letterSpacing: 0.5,
              color: const Color(0xFFE7E7E7),

Answered by codevk on December 1, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP