main
1import 'package:flutter/material.dart';
2
3/// A text widget that shows a placeholder('-') when no text is present.
4class NullableText extends StatelessWidget {
5 /// Show text or a placeholder
6 const NullableText(this.text, {super.key});
7
8 /// Text to display.
9 final String? text;
10
11 @override
12 Widget build(BuildContext context) => Text(text ?? '-');
13}