I want to show an AlertDialog when a http get fails. The function showDialog (https://api.flutter.dev/flutter/material/showDialog.html) has the parameter \"@required BuildContex
Catch the exception where you make the getNews call if you use await, else use the catchError property of the Future.