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 createState() => _Text1State(); } class _Text1State extends State { @override Widget build(BuildContext context) { return Text( widget.title, style: TextStyle( color: widget.txtcolor, fontSize: widget.txtfont, fontWeight: widget.fontweight), ); } }