DiscoverModule/lib/custom_widget/text.dart

34 lines
670 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,
2024-07-05 08:48:29 +00:00
softWrap: true,
2024-05-20 10:29:02 +00:00
style: TextStyle(
color: widget.txtcolor,
fontSize: widget.txtfont,
fontWeight: widget.fontweight),
);
}
}