1
votes

Widget texte avec fond circulaire flottant

 entrez la description de l'image ici

Comment puis-je obtenir ce type d'arrière-plan arrondi dans le widget Texte ?


0 commentaires

3 Réponses :


4
votes

Vous pouvez y parvenir en

      CircleAvatar(
          backgroundColor: Colors.grey,
          child: Center(
            child: Text(
              "B",
              style: TextStyle(color: Colors.black),
            ),
          ),
        )


0 commentaires

2
votes

Screenshot:

 entrez la description de l'image ici


Vous pouvez également utiliser ClipOval

ClipOval(
  child: Container(
    color: Colors.grey,
    padding: EdgeInsets.symmetric(horizontal: 30),
    child: Text(
      "B",
      style: TextStyle(color: Colors.black, fontSize: 90),
    ),
  ),
)


0 commentaires

0
votes

Utilisez simplement un FAB:

 floatingActionButton: FloatingActionButton(
    backgroundColor: Colors.grey,
    child: Text(
      "A",
      style: TextStyle(
        fontSize: 20,
        fontStyle: FontStyle.italic,
      ),
    ),
  )


0 commentaires