I am trying to use a list in a Listview widget in flutter but I keep getting an error saying that I need a List[Widget]. All the answers online make use of maps and I am still a beginner to Flutter. Can anyone show me how to use the map function for this or a way to convert List [Dynamic] to List [Widget]?
Here is my code:
import 'package:flutter/material.dart';
class NextPage extends StatefulWidget {
final List value;
NextPage({Key key, this.value}) : super(key: key);
@override
_NextPageState createState() => new _NextPageState();
}
class _NextPageState extends State<NextPage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Reminders"),
),
body: ListView(
children: widget.value,
),
);
}
}
children: widget.value as List<Widget>