You may get the below error if you upgraded Flutter. The getter accentColor is not defined for ThemeData. To overcome this problem change accent color to anything you like Color myColor = Theme.of(context).colorScheme.secondary;
flutter_localizations from sdk which depends on intl 0.18.0, intl 0.18.0 is required
This warning get it more like below flutter_localizations from sdk which depends on intl 0.18.0, intl 0.18.0 is required or depends on intl ^0.17.0, version solving failed or Because flutter_cupertino_localizations >=1.0.1 doesn’t support null safety and no versions of flutter_cupertino_localizations match >=1.0.1-nullsafety.0 <1.0.1, flutter_cupertino_localizations >=1.0.1-nullsafety.0 is forbidden. So, because chatty depends on flutter_cupertino_localizations ^1.0.1-nullsafety.0, version…
What is call() function in Dart?
It’s very innate in Dart’s core how the call() function works. It’s very interesting. You may create a class and this class may have a function name call(). If there’s a function name call(), then you may call it from the object. Yes by using object or instance of this class. If you create an…
Riverpod Safe Loading
Here in this article we see how to show loading data icon with properly. We would be using StateNotifier, StateNotifierProvider with AutoDispose. We would also be using future type for state management. Since we are going to simulate data loading from the server, we would need to be dealing with success and failure status. We…
Riverpod Listen and Listener
Flutter Riverpod Listener plays an important role when it comes to detecting state that are available. It’s more like BLocConsumer listener. Based on this listener object we will be able to trigger new routes or screen pop or push. This could be use for showing snackBar. Riverpod Listener stores the earlier states. Of course, It’s…
Riverpod Auto Dispose Notifier Provider
Riverpod comes with a lot of terms and options and latest Riverpod has introduced a new term called AutoDisposeNotifierProvider. And what is this AutoDisposeNotifierProvider. In general if you mark your code as @riverpod when generating code of Riverpod using code generation tool, then you can AutoDisposeNotifierProvider. And let’s see an example of a code snippet…
flutter [!] CocoaPods could not find compatible versions for pod “firebase_core”:
The above error happens due iOS swift version and firebase_core version mismatch. To solve this make sure you do the below things See from the above photo that, I have upgrade the platform :ios, ‘13.0’ previously it was ‘11.0’ Use the version as high as possible. After that run flutter pub get Then go to…
Flutter BLoC/Cubit Provider Not Found
As you try to inject Bloc or Cubit to your app, sometimes it maybe that you have the below error In general you get the error due to incorrect place bloc or provider injection. Your MultiProvider or MultiBlocProvider should be at the very top and MaterialApp should be the child of MultiProvider or MultiBlocProvider That’s…
Flutter Cubit or BLoC
First thing you need to know about BLoC, it’s a state management system that works with states and events. With BLoC you need to trigger an event and for that related event you should emit a state. In general events pass data from UI to the shared memory of BLoC or Flutter. Then using state…
Cubit and MultiBlocProvider
If you just use BLoC, you may MultiBlocProvider to inject your blocs at one time. What if you use Cubit? We know Cubit is sub set of BLoC and it works the same as BLoC provider injection. There’s nothing called MultiCubitProvider. From the picture, you see that we have injected all the Cubits using MultiBlocProvider….