DiscoverModule/lib/custom_widget/text.dart

33 lines
648 B
Dart
Raw Normal View History

2024-05-20 10:29:02 +00:00
import 'package:flutter/material.dart';
// ignore: must_be_immutable
class Text1 extends StatefulWidget {
Text1({
super.key,
required this.title,
this.txtcolor,
this.txtfont,
this.fontweight,
});
final String title;
Color? txtcolor;
double? txtfont;
FontWeight? fontweight;
@override
State<Text1> createState() => _Text1State();
}
class _Text1State extends State<Text1> {
@override
Widget build(BuildContext context) {
return Text(
widget.title,
style: TextStyle(
color: widget.txtcolor,
fontSize: widget.txtfont,
fontWeight: widget.fontweight),
);
}
}