Here’s the code that shows chat messages on certain flutter screen. This I have used in the audio and video chat app. It also detects if you are passing image or text. Every time a message is sent or user types in, and clicks on the send button, ChatRightList is get called, of course, this…
Flutter BLoC Custom Tab Bar | Load Network Data
Here we will see how to create a custom tab bar and load network data using RepositoryProvider and how tabs loads data on button click. Our tab bar would be responsive to click which means we will maintain state of the tabs. Certain tab will load certain data from the network. Network data loader functions…
Flutter Getx Custom Tab Bar | Load Data
Here we will learn how to load network data using custom tab bar and getx package during on toggle method. Here we will see how create a custom tab bar and toggle values and load data from network at the same time. So If you want to load data from network and toggle tabs and…
Camera Permission for iOS Flutter
You need to allow camera permission for ios device. Without this you won’t be to access gallery and camera resources. Put the above info in your info.plist file.
Firebase Data & ListView
Here we will see how to load data from Firebase Firestore and show the data in a ListView. We will use ListView.builder to do. We will have a list name items and a temporary list tempList. items would be accessed from the UI. Once we load the data then we will assign data from tempList…
Flutter Firestore add data
Here, we will see how to add data to firestore collection. We have to do the below things First we get collection reference like below Then we add the add() to it. Inside this we need to map or json format data. Let’s take a look at our function that will add data to the…
Firestore set data
Make sure you have you firebase project set up. We will use firestore collection() and set() to set data to firestore collection. Since we need to use the set(), we need document ID. For document ID, we need to get all the documents. First we get all the documents using get() and then we access…
Flutter Getx Find Current Route or Path
If you use Getx, it’s easy to find current route or path in Flutter. Flutter Getx provides one of the best solution for finding your current route in Flutter app. First make sure you installed Getx package and you are wrapping your MaterialApp() using GetMaterialApp(). I use the below syntax to do it Here I…
How do I get collection data in firebase?
It’s easy to get collection data in Firebase. Just use the get() function with your collection name. Let’s take a look at the code below Here we need to use FirebaseFirestore.instance to get a reference of the Firestore instance. Then we mention the collection name. With the collection name we use the get() function. get()…
Error: Error when reading ‘../../.pub-cache/hosted/pub.dev/get-4.6.1/lib/get.dart/’: Not a directory
If you import a library or package and you may get Error: Error when reading ‘../../.pub-cache/hosted/pub.dev/get-4.6.1/lib/get.dart/’: Not a directory. It happens because your path is not a directory. In flutter, if you import a package or a file it must end with .dart. But from the error you see there’s an extra slash. After slash…