Please be kind and tell me where do I add the line of code and what logic to follow?
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final alreadySaved = _savedQuotes.contains(context);
return MaterialApp(
theme: ThemeData(primaryColor: Colors.blue[600]),
home: Scaffold(
appBar: AppBar(title: Text('Quotes')),
body: ListView(
padding: const EdgeInsets.all(8),
children: <Widget>[
),
Container(
height: 50,
color: Colors.blue[200],
child: const Center(
child: Text(
'You only live once, but if you do it right, once is enough.')),
)
],
)));
}
}
I am very poor at Dart ,And just starting Here is the Scrrenshot of the app
I want to add like icon on the left for each of the quotes that will toggle the Favorite on and off