We are also able to see notifier object with the latest Riverpod. Notifier object works with ref.read() method. Of course inside ref.read() we need to pass a provider. From the provider object we can notifier The purpose of using notifier object with provider is to invoke a method of the provider and set changes. See…
What does the Riverpod build() method do?
With Riverpod 2.0 or above, it has introduced a new method called build() method. This method is referred inside a class. It’s actually returned as a type. See that we override, the build() method, which means that we can do any operation inside the build() method and return a type. This return type defines the…
Flutter Android image does not show Error: SocketException: Connection refused
Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 52958 If you are using Flutter android and if you have a backend as localhost host, then you might not doing it right when to display the image. In general if you have image loading or api, then in…
Flutter Video Player does not play
I was trying to use flutter video_player and it’s not playing or loading. One of the reasons where the url. My url of the video from the network contained empty spaces, looks like video_player does not recognize this kind of link. There should not be any empty space in url like below You may replace…
Firestore Database and permission
Here we will see about firestore database and it’s permission for read and write. From the above picture, you see there’s a Firestore Database on the left, if it’s not there, you need to select it from build menu of your console, see at the bottom of the picture on the left, you will see,…
Failed to precompile build script…This is likely caused by a misconfigured builder definition
You may get the error if you run riverpod code generation tools riverpod Failed to precompile build script .dart_tool/build/entrypoint/build.dart.This is likely caused by a misconfigured builder definition. The other day, I was using Riverpod 2.0 for code generation and state management using Flutter Riverpod Task management app. But I got the above error. There could…
Flutter Todo Model Class
This is a very common Todo model class, here is the code. It’s used throughout many applications. So it’s better you save. I have used them in many applications on Flutter. Here I have created all the fields as optional which means some fields you may, some fields you skip. This class also comes with…
Unhandled Exception: type ‘_Map‘ is not a subtype of type ‘String?’
Unhandled Exception: type ‘_Map<String, dynamic>’ is not a subtype of type ‘String?’ The other day I was working with restful api call in my flutter app and I got the above error. We often get this error, and how to solve this error? Before solving you need to understand why you have this error at…
Flutter WebView is not recognized or defined
If you webview_flutter plugin, you may get error saying, it’s not recognized. It may happen because of version problem. With me the lower version of webview_flutter works with latest version of flutter. With me the below version worked I have tried to use ^4.2.0, but that’s not recognized by the sdk and editor. If you…
Flutter Agora Voice Call
Here, I am going to share the code of Agora voice call and Flutter integration. Here we need to make sure you have agora sdk installed using the plugin. In this flutter application I have used Getx for state management. It’s a complete about audio and video voice call. Make sure you installed the plugin….