Issue I am trying to use mockito to return a fake response in the http.Client call and be able to test the service. I have followed the documentation. It tells me that I should use annotate to generate a fake
Continue readingTag: null-safety
Null Safety Error: Unconditionally accessing 'state' property in Flutter Riverpod
Issue I’m encountering a null safety error in my Flutter Riverpod code when trying to access the ‘state’ property. The error message says: "The property ‘state’ can’t be unconditionally accessed because the receiver can be ‘null’. Try making the access
Continue readingGetX page routing returns "Null check operator used on a null value" error
Issue I am trying to do a very simple page routing with GetX using the latest version of Flutter which includes null safety. It keeps returning the error "Null check operator used on a null value" even when I am
Continue readinghow to migrate flutter mid-level existing project null safety?
Issue I am trying to upgrade my existing Flutter project to null-safety. When I upgrade the Flutter version to the latest one, as expected it gives thousands of errors due to null safety. What is the best approach to resolve
Continue readingFlutter error – Invalid argument(s): No host specified in URI nullapi/auth/login/
Issue Fairly new to Flutter and have encountered an issue. I am trying to get the emulator (for both iOS and Android) of my app to connect to an API that is running on my local machine. I had it
Continue readingHow to make a generic functions in List<T> to get a Non-Optional type in Dart – Null Safety
Issue We are migrating our Flutter app into null safety and I’ve encountered a bunch of missing helpers in order to get rid easily of an optional into a non-optional of the same type. To get you in the context,
Continue readingFlutter/Dart – Difference between obj!.property and obj?.property
Issue In Flutter/Dart their is the null safety feature. In my scenario, I have null safety ON and I am trying to get the property ‘myDateTime’ of my object MyDateTime . But the compiler produce the error: The property ‘myDateTime’
Continue readingStateless widget to Stateful widget convert Dart Flutter
Issue This is my code : class StocksDetailScreen extends StatelessWidget { final String degisimoran; final String? sondeger; final String? hacim; final String? mindeger; final String maxdeger; final String? zaman; final String? hisseismi; final String? hissekodu; const StocksDetailScreen({ Key? key, required
Continue readingStateless widget to Stateful widget convert Dart Flutter
Issue This is my code : class StocksDetailScreen extends StatelessWidget { final String degisimoran; final String? sondeger; final String? hacim; final String? mindeger; final String maxdeger; final String? zaman; final String? hisseismi; final String? hissekodu; const StocksDetailScreen({ Key? key, required
Continue readingtype 'String' is not a subtype of type 'Map<String, dynamic>' flutter
Issue this is my model file: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import ‘dart:convert’; EconomylistXml economylistXmlFromJson(String str) => EconomylistXml.fromJson(json.decode(str)); String economylistXmlToJson(EconomylistXml data) => json.encode(data.toJson()); class EconomylistXml { EconomylistXml({ required this.rss, }); Rss rss;
Continue reading