28 lines
715 B
Dart
28 lines
715 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LabelTextField extends StatelessWidget {
|
|
final String label;
|
|
final double fontSize;
|
|
final FontWeight fontWeight;
|
|
final Alignment alignment;
|
|
const LabelTextField(
|
|
{super.key, required, required this.label, this.fontSize = 16, this.alignment = Alignment.centerLeft, this.fontWeight = FontWeight.bold});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Align(
|
|
alignment: alignment,
|
|
child: Padding(
|
|
padding: EdgeInsets.fromLTRB(10, 5, 0, 5),
|
|
child: Text(
|
|
label,
|
|
style: TextStyle(
|
|
fontSize: fontSize,
|
|
fontWeight: fontWeight,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|