Skip to content

Instantly share code, notes, and snippets.

@ibhavikmakwana
Last active February 17, 2024 04:36
Show Gist options
  • Save ibhavikmakwana/20d9fc03cc7e50ef089fddd655130831 to your computer and use it in GitHub Desktop.
Save ibhavikmakwana/20d9fc03cc7e50ef089fddd655130831 to your computer and use it in GitHub Desktop.
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