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 – The named parameter 'value' isn't defined?

import 'package:flutter/material.dart'; import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_dropdown/flutter_dropdown.dart'; class Language { final String code; final String name; Language({required this.code, required this.name}); } void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Text-to-Speech Example',…

VIEW QUESTION

this.theme = theme ?? DatePickerTheme() – How do I resolve this error in flutter?

Launching libmain.dart on sdk gphone64 x86 64 in debug mode... : Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'. import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; ^^^^^^^^^^^^^^^ : Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'. this.theme = theme ?? DatePickerTheme(), ^^^^^^^^^^^^^^^ Target…

VIEW QUESTION
Back To Top
Search