Last active
February 17, 2024 04:36
-
-
Save ibhavikmakwana/20d9fc03cc7e50ef089fddd655130831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class TextWithOutline extends StatefulWidget { | |
const TextWithOutline({super.key}); | |
@override | |
State<TextWithOutline> createState() => _TextWithOutlineState(); | |
} | |
class _TextWithOutlineState extends State<TextWithOutline> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: Text( | |
'Subscribe to Codeify', | |
textAlign: TextAlign.center, | |
style: Theme.of(context).textTheme.displayLarge?.copyWith( | |
foreground: Paint() | |
..style = PaintingStyle.stroke | |
..color = Colors.red | |
..strokeWidth = 2, | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment