I have no idea why I'm getting an error
It will return null if the condition is not fulfilled. You need to return something outside of your conditional statement or in a else condition
FutureBuilder<List<Mesajlar>>(
future: mesajlarifetir),
builder: (context ‚snapshot) {
if (snapshot.hasData) {
var mesailistesi = snapshot. data;
return ListView.builder (
);}
return CircularProgressIndicator(); //Add this line
})