Is it possible to refresh appBar title after widget FutureBuilder ? I'd like to set title after FutureBuilder is done
class _SimpleBarChart extends State<SimpleBarChartPage> { String _appBarTitle = ''; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text(_appBarTitle)), body: Center(child: futureCAGraph())); } futureCAGraph() { return FutureBuilder( future: BddAMKGraphCA().getDataGraphCA(_caAnnee), builder: (context, AsyncSnapshot<List<dynamic>> snapshot) { if (snapshot.hasData) { return ListView.builder( itemCount: snapshot.data!.length, itemBuilder: (context, int currentIndex) { return affGraphCA(context); }); } else if (snapshot.hasError) { return Text('${snapshot.error}'); } //return a circular progress indicator. return new CircularProgressIndicator(); }); }