When I want to call a widget within a container like this:
child: printer(text: 'test'),
How do I have to design the printer class to accept the text property. I'm new to Dart and didn't found anything on google.
class printer extends StatefulWidget {
const printer({Key? key}) : super(key: key);
@override
State<printer> createState() => _printerState();
}
class _printerState extends State<printer> {
@override
Widget build(BuildContext context) {
return Text(text);
}
}
