That's the error:
lib/main.dart:728:16: Error: Unexpected token 'return'. return Text('Passt!');
lib/main.dart:728:37: Error: Expected '}' before this. return Text('Passt!');
class Screen2 extends StatelessWidget {
final String title;
const Screen2(this.title);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Warum du das noch erledigen solltest?'),
backgroundColor: Colors.transparent),
body: Stack(
children: <Widget>[
if(title == 'Milchprodukt') {
return Text('Passt!')
},
Align(
alignment: Alignment.center,
child: Text('\nClick here',
style: TextStyle(color: Colors.blue[700], fontSize: 30))),
Align(
alignment: Alignment(0, 0.1),
child: Text(
'\n(Wenn du die genauen Zusammenhänge verstehen willst)',
style: TextStyle(fontSize: 15),
textAlign: TextAlign.center,
))
],
),
backgroundColor: Colors.orange[200]);
}
}