Exercise 3 – Auto generate widgets
Imagine you are trying to build an FAQ page in Flutter. You can make individual list objects with the questions and answers. However, updating and maintaining a page like this can become cumbersome and unwieldy very quickly. Not to mention the amounts of duplicate code you may have to type.
A better idea would be to store both the questions and answers in a separate file and have a function to generates a widget for each question and answer pair to be displayed on your page.
Excercise:
Generate an FAQ page that takes its entries from a separately saved .json file and generate/display a widget for each entry.
