There are many packages to make screenshot tests in Flutter. I've been using the first-party Flutter tool. See https://api.flutter.dev/flutter/flutter_test/matchesGoldenFile.html. Basic usage As explained, it's pretty straightforward. You write your expectation as: await expectLater(find.byType(MyWidget), matchesGoldenFile('goldens/my_widget.png')); Then
Mocking http.Client is well documented, yet it didn't go as smoothly as expected. I'm following the guide at https://docs.flutter.dev/cookbook/testing/unit/mocking#3-create-a-test-file-with-a-mock-httpclient. My first change compared to the doc is that I did not import http as http, because I don't have any conflict.
Today my Flutter project started refusing to compile for iOS with the following errors: Error (Xcode): Signing for "GoogleSignIn-GoogleSignIn" requires a development team. Select a development team in the Signing & Capabilities editor. [project]/ios/Pods/Pods.xcodeproj Error (Xcode): Signing for "gRPC-C++-gRPCCertificates-Cpp" requires a development team. Select a development
I recently started using flutterfire_ui's SignInScreen, and it was working great for Android and Web, but not iOS. For some reason, when I clicked on "Sign in with Google", it would crash the app, and throw this debug info: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception
Today I tried to recompile a very old Flutter project. Besides migrating to Android 1.12, I had to upgrade the Kotlin library and Gradle like in https://www.wafrat.com/fixing-module-was-compiled-with-an-incompatible-version-of-kotlin/. But then I got a new error: Some problems were found with the configuration of task ':app:
Today Flutter failed to compile my app to iOS with the following error: % pod install Analyzing dependencies cloud_firestore: Using Firebase SDK version '8.14.0' defined in 'firebase_core' firebase_analytics: Using Firebase SDK version '8.14.0' defined in 'firebase_core' firebase_auth: Using Firebase SDK version '8.
This morning, when I did a flutter pub upgrade, GitHub returned the following error: Git error. Command: `git fetch`) stdout: stderr: fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. exit code: 128 A quick search
On the blog post describing the release of Flutter 2.8 (see https://medium.com/flutter/whats-new-in-flutter-2-8-d085b763d181), they introduced flutterfire_ui. This library provides standard UI for signing in with Firebase Auth. The post is a bit long cause I ran into a few issues. If you are not interested
I usually debug my Flutter apps using the Android Emulator. This time, I used the iOS Simulator. Except it threw this error: note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order /my_project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment
Today I upgraded Flutter from version 2.7 to 2.9, and my app compilation started failing with this error: ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.31/43331609c7de811fed085e0dfd150874b157c32/kotlin-stdlib-common-1.5.31.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin.
My app suddenly refused to run on my Android Emulator. The error was: Launching lib/main.dart on sdk gphone64 arm64 in debug mode... WARNING: [Processor] Library '~/.gradle/caches/modules-2/files-2.1/com.github.canardoux/flutter_sound_core/8.4.2/d794510c32a335c61b742367e24e84ea0b0995c8/flutter_sound_core-8.4.2.aar' contains
Today I tried to run a Desktop (macOS) Flutter app that used to run perfectly. This time, instead of launching, it threw this error: Launching lib/main.dart on macOS in debug mode... lib/main.dart:1ProcessException: Process exited abnormally: xcrun: error: unable to find utility "xcodebuild", not a developer
I wanted to convert a ListView into a GridView so that it would show more information on a large screen such as Web. My ListView code looked like this: return ListView.builder( physics: scrollable ? null : NeverScrollableScrollPhysics(), shrinkWrap: shrinkWrap, padding: EdgeInsets.only(top: 16.0), itemCount: words.length, itemBuilder: (context, index)
According to the guide at https://dart.dev/null-safety/migration-guide, migrating to null safety is straightforward. Let's try it on a large project. So today I switched the sdk version to 2.12 in my pubspec.yaml, and 300+ compilation errors appeared. I tried the migration tool: % dart migrate Migrating
Yesterday I made a quick update to my app. All the code compiled and all the tests succeeded, so I published an update. This morning, I wake up to a half broken app. What happened? The simplified snippet was: await Firebase.initializeApp(); final instance = FirebaseFirestore.instance; final transformer = StreamTransformer.fromHandlers(