Reputation: 1533
I am trying to compile my app with Codemagic for iOS. Locally, my environment is:
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.5)
I have no issue to compile to Android app. However, when I switch to Codemagic, and I setup my config to:
Flutter 1.9.1+hotfix.6
Xcode 11.1
I have the following error reported:
Compiler message:
lib/app/ui/widgets/color_theme_picker_widget.dart:2:8: Error: Error when reading '../programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_colorpicker-0.3.2/lib/block_picker.dart': No such file or directory
import 'package:flutter_colorpicker/block_picker.dart';
^
lib/app/ui/widgets/color_theme_picker_widget.dart:35:28: Error: Method not found: 'BlockPicker'.
child: BlockPicker(
^^^^^^^^^^^
lib/app/ui/widgets/color_theme_picker_widget.dart:35:28: Error: The method 'BlockPicker' isn't defined for the class 'ColorThemePicker'.
- 'ColorThemePicker' is from 'package:biorhythms/app/ui/widgets/color_theme_picker_widget.dart' ('lib/app/ui/widgets/color_theme_picker_widget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'BlockPicker'.
I would appreciate any feedback, Thanks!
Upvotes: 2
Views: 472
Reputation: 1533
In case someone came across a similar issue - in my case, it was caused by the following line in my pubspec.yaml
file - flutter_colorpicker: any
, since it loads the most recent flutter_colorpicker
version, where the above file has been removed. SO basically, I had to adjust the code to the most recent version. Also as a general thumb rule - just set your plugin / package version to a specific one e.g. flutter_colorpicker: ^0.3.2
.
Upvotes: 1