skip to Main Content

Unhandled Exception: Bad state: Cannot use "ref" after the widget was disposed : flutter riverpod

`my problem is when i pop this screen then come back , i can't access to ref.read and and exception Bad state: Cannot use "ref" after the widget was disposed import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:learn_with_lina/providers/messages_provider.dart'; class _CallScreenState extends ConsumerState<CallScreen> { void…

VIEW QUESTION

Flutter – How can I use in method as a property class Object and use it. DART

class Hotel { static final Map<String, List<String>> mapInformation = { 'Americana Hotel': [ '4.3*', '$4000 / Night', ], }; String getPrice(String favouriteElementsName) { return mapInformation[favouriteElementsName]?.elementAt(1) ?? 'It may need fixes'; } String getRating(String favouriteElementsName) { return mapInformation[favouriteElementsName]?.elementAt(0) ?? 'It may…

VIEW QUESTION
Back To Top
Search