skip to Main Content

Flutter – when i go to alert screen notification read and press back button then screen will not refresh and not update a notification

final alertsScreen = AlertsScreen(userId: loginController.currentUser.value?.id ?? ''); Navigator.push(context, MaterialPageRoute(builder: (context) => alertsScreen)); Future<bool> _onWillPop() async { // Reload data when the user presses the back button await fetchNotifications; await markNotificationAsRead; await _showNotificationDetails; print("hello"); Navigator.pop(context, alerts.length); return true; // Allow the…

VIEW QUESTION

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

GraphQL and Bloc in Flutter

So im trying to implement graphql in flutter, using bloc too. I think i already did all the necessary part, but when i try to hit the graphql, it return response like this HttpLinkParserException (ResponseFormatException(originalException: FormatException: Unexpected character (at character…

VIEW QUESTION

Flutter – Function returns null

var result; void searching() async{ var searchData = await FirebaseFirestore.instance.collection('users').where('email',isEqualTo: userEmail).get(); setState(() { result = searchData.docs.first; }); } void addFollowing(var username , var email , var phoneNumber) async{ searching(); await FirebaseFirestore.instance.collection('users').doc(result).collection('following').doc().set({ 'username':username, 'email':email, 'phoneNumber':phoneNumber }); print(result); } I have two…

VIEW QUESTION
Back To Top
Search