DiscoverModule/lib/contacts_module/custom_widget/text.dart

34 lines
670 B
Dart

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,
softWrap: true,
style: TextStyle(
color: widget.txtcolor,
fontSize: widget.txtfont,
fontWeight: widget.fontweight),
);
}
}