Here we will a function as parameter in Flutter to another function or widget. To pass a function, first of course you need to write your function. Actually you need two things to do You may write the function anywhere inside the StatefulWidget class. And then you should also write a class or widget that…
Month: November 2023
Riverpod 2.0 Counter App
Here is the Riverpod 2.0 Counter app example. Here we covered how to do both increment and decrement. We have done it using two floating action buttons. Let’s see the Riverpod 2.0 provider both for increment and decrement. Here we used Riverpod code generation tool to create or generate Riverpod provider. Here we actually created…
Flutter app theme global theme settings
Here we will see how to set app theme globally so that you can access from anywhere from your app. With this you are also able set them in the MaterialApp(). Here we will call a class name AppTheme and put the code below Here you see the variable appThemeData is an object of ThemeData()….
[!] Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.
Unable to find a target named RunnerTests in project Runner xcodeproj did find Runner So solve this comment out the below lines in your podfile
Unhandled Exception: ‘package:flutter_easyloading/src/easy_loading.dart’: Failed assertion
Flutter easyloading package throws the below error Unhandled Exception: ‘package:flutter_easyloading/src/easy_loading.dart’: Failed assertion That simply means you are not initializing the init() method of the package. We should do it inside MaterialApp(). Here you see the builder:EasyLoading.init() method. Here we have used GetMaterialApp() instead of MaterialApp() since we are using GetX package.
Futter Dio HandshakeException: Connection terminated during handshake
There could be many reasons why this error happens. One of the error is due to wrong SSL which means https or no http. If you are on local host in that case if you use https with base url, the you will get Futter Dio HandshakeException: Connection terminated during handshake You see, locally I…
ITMS-90683: Missing Purpose String in Info.plist NSCameraUsageDescription Flutter app
If you are trying to submit your app to iOS store, then you may get a response from the apple store, that ITMS-90683: Missing Purpose String in Info.plist NSCameraUsageDescription For NSCameraUsageDescription, we need to add the exact purpose of using camera in the Value column. For example, You may also add it other way, directly…
Flutter Future or Stream?
Which one to use Stream or Future when you get data from the network? because we want to get any updates to the user data, see, we have an edit profile feature, after the user edits their profile, we want every screen that uses the user data for displays to update automatically, that’s why. Learn…
Video Player Controller network method is deprecated
If you work with Flutter video_player plugin, you will see the below We need to pass url as String to network() method. Here we see a crossed line through, which shows that this api is deprecated. To solve this issue we need to use networkUrl() and Uri.parse() together. So use networkUrl(Uri.parse(“stringUrl”));