I'm trying to set quotes from list to Text widget but i am facing this problem
The argument type 'List<Iterable>' can't be assigned to the parameter type 'List'.
this is my code
import 'package:flutter/material.dart';
void main() {
runApp(myApp());
}
class myApp extends StatefulWidget {
@override
_myAppState createState() => _myAppState();
}
class _myAppState extends State<myApp> {
List<String> quotesList = [
"The secret of getting ahead is getting started",
"Only the paranoid survive",
"It’s hard to beat a person who never gives up.",
"Never Had luck never needed it"
];
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Colors.black38,
title: Text("Quotes"),
),
body: Column(
children: [quotesList.map((e) => Text(e))].toList(),
),
),
);
}
}