0

I have seen a font called poppins extra bold:

enter image description here

I added it to my project but I don't know how to add black border.

luc
  • 1,301
  • 2
  • 14
  • 30

1 Answers1

0

please check below answer :

Widget textWithStroke({String text, String fontFamily, double fontSize: 12, double strokeWidth: 1, Color textColor: Colors.white, Color strokeColor: Colors.black}) {
        return Stack(
          children: <Widget>[
            Text(
              text,
              style: TextStyle(
                fontSize: fontSize,
                fontFamily: fontFamily,
                foreground: Paint()
                  ..style = PaintingStyle.stroke
                  ..strokeWidth = strokeWidth
                  ..color = strokeColor,
              ),
            ),
            Text(text, style: TextStyle(fontFamily: fontFamily, fontSize: fontSize, color: textColor)),
          ],
        );
      }
AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57
  • 1. it's link only answer ...2. it's link to another question here on SO ....3. you have enough reputation to mark question as duplicate – Selvin Sep 15 '20 at 10:27
  • ... and now after edit, it is a copy of [this answer](https://stackoverflow.com/questions/52146269/how-to-decorate-text-stroke-in-flutter#answer-59759359) ... posting someone else answer as your is basically stealing – Selvin Sep 15 '20 at 10:34