My Main.Dart File:
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
home: QuoteList() ,
));
class QuoteList extends StatefulWidget {
List<String> quotes = [
"Hello World"
"Its never possible until its done"
];
@override
_QuoteListState createState() => _QuoteListState();
}
class _QuoteListState extends State<QuoteList> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Awesome Quotes "),
backgroundColor: Colors.redAccent[400],
centerTitle: true,
),
body: Column(
children: Q.map()
),
);
}
}
My Error:
Performing hot reload...
Syncing files to device AOSP on IA Emulator...
lib/main.dart:27:19: Error: The getter 'quotes' isn't defined for the class '_QuoteListState'.
- '_QuoteListState' is from 'package:flutter_app3/main.dart' ('lib/main.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'quotes'.
children: quotes.map()
^^^^^^
Please help me with this I followed Net Ninja Videos
I tried and tried fix it but I couldn't fix it. Plus I am new to flutter.