finnow/flutter_app/lib/components/form_label.dart

16 lines
441 B
Dart
Raw Permalink Normal View History

import 'package:flutter/material.dart';
/// A simple left-aligned, bold text widget intended to be placed above form
/// input widgets.
class FormLabel extends StatelessWidget {
final String text;
const FormLabel(this.text, {super.key});
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.centerLeft,
child: Text(text, style: const TextStyle(fontWeight: FontWeight.bold)));
}
}