skip to Main Content

Flutter – How to change the child of a listtile when tapped

searchResult = ['john','doe','smith']; Expanded( child: Container( width: ScreenSize.screenWidth, child: Center( child:searchResult.isEmpty? Text("Oops! Looks like you have no friends at the moment.") : ListView.builder(itemCount: searchResult.length,itemBuilder: (context , index){ return ListTile( title: Text(searchResult[index]['username']), subtitle: Text(searchResult[index]['email']), trailing: GestureDetector( onTap: () { }, child:…

VIEW QUESTION
Back To Top
Search