How to decorate text stroke in Flutter

PHOTO EMBED

Thu Dec 26 2019 18:27:15 GMT+0000 (Coordinated Universal Time)

Saved by @sher93oz #dart #flutter #howto

Text("Border test",
    style: TextStyle(
      inherit: true,
      fontSize: 48.0,
      color: Colors.pink,
      shadows: [
        Shadow( // bottomLeft
          offset: Offset(-1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // bottomRight
          offset: Offset(1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // topRight
          offset: Offset(1.5, 1.5),
          color: Colors.white
        ),
        Shadow( // topLeft
          offset: Offset(-1.5, 1.5),
          color: Colors.white
        ),
      ]
    ),
);
content_copyCOPY

This is a workaround using 4 shadows in the TextStyle

https://stackoverflow.com/questions/52146269/how-to-decorate-text-stroke-in-flutter