clone the old flutter project and it is not working, any thoughts how to fix this - flutter

I have cloned this project https://github.com/2d-inc/developer_quest
and when I try to run the project on android then get the following error
The current Dart SDK version is 2.15.0-42.0.dev.
Because test >=1.16.0-nullsafety <1.16.0-nullsafety.8 requires SDK version >=2.10.0-0 <2.12.0 and test >=1.16.0-nullsafety.8 <1.16.0-nullsafety.18 depends on typed_data >=1.3.0-nullsafety <1.3.0, test >=1.16.0-nullsafety <1.16.0-nullsafety.18 requires typed_data >=1.3.0-nullsafety <1.3.0.
And because test >=1.16.0-nullsafety.18 <1.16.0-nullsafety.19 depends on test_api 0.2.19-nullsafety.7 and test >=1.3.0 <1.12.0 depends on boolean_selector ^1.0.0, test >=1.3.0 <1.12.0-∞ or >=1.16.0-nullsafety <1.16.0-nullsafety.19 requires typed_data >=1.3.0-nullsafety <1.3.0 or test_api 0.2.19-nullsafety.7 or boolean_selector ^1.0.0.
And because test >=1.12.0 <1.13.0 depends on test_api 0.2.14 and test >=1.13.0 <1.14.5 depends on test_api 0.2.15, test >=1.3.0 <1.14.5-∞ or >=1.16.0-nullsafety <1.16.0-nullsafety.19 requires typed_data >=1.3.0-nullsafety <1.3.0 or test_api 0.2.14 or 0.2.15 or 0.2.19-nullsafety.7 or boolean_selector ^1.0.0.
And because test >=1.14.5 <1.15.0 depends on test_api 0.2.16 and test >=1.15.0 <1.15.3 depends on test_api 0.2.17, test >=1.3.0 <1.15.3-∞ or >=1.16.0-nullsafety <1.16.0-nullsafety.19 requires typed_data >=1.3.0-nullsafety <1.3.0 or test_api 0.2.14 or 0.2.15 or 0.2.16 or 0.2.17 or 0.2.19-nullsafety.7 or boolean_selector ^1.0.0.
And because test >=1.15.3 <1.15.5 depends on test_api 0.2.18 and test >=1.15.5 <1.16.0-nullsafety depends on test_api 0.2.18+1, test >=1.3.0 <1.16.0-nullsafety.19 requires typed_data >=1.3.0-nullsafety <1.3.0 or test_api 0.2.14 or 0.2.15 or 0.2.16 or 0.2.17 or 0.2.18 or 0.2.18+1 or 0.2.19-nullsafety.7 or boolean_selector ^1.0.0.
And because test >=1.16.0-nullsafety.19 <1.16.6 depends on test_api 0.2.19 and every version of flutter_driver from sdk depends on boolean_selector 2.1.0, if test >=1.3.0 <1.16.6 and flutter_driver any from sdk then test_api 0.2.14 or 0.2.15 or 0.2.16 or 0.2.17 or 0.2.18 or 0.2.18+1 or 0.2.19-nullsafety.7 or 0.2.19 or typed_data >=1.3.0-nullsafety <1.3.0.
And because every version of flutter_driver from sdk depends on test_api 0.4.3 and every version of flutter_test from sdk depends on typed_data 1.3.0, one of flutter_test any from sdk or test >=1.3.0 <1.16.6 or flutter_driver any from sdk must be false.
And because test >=1.16.6 depends on webkit_inspection_protocol ^1.0.0 which depends on logging ^1.0.0, if flutter_test any from sdk and flutter_driver any from sdk and test >=1.3.0 then logging ^1.0.0.
And because dev_rpg depends on both flutter_test any from sdk and flutter_driver any from sdk, test >=1.3.0 requires logging ^1.0.0.
So, because dev_rpg depends on both logging ^0.11.3+2 and test ^1.6.1, version solving failed.
Running "flutter pub get" in developer_quest...
pub get failed (1; So, because dev_rpg depends on both logging ^0.11.3+2 and test ^1.6.1, version solving failed.)
and here is my pubspec.yaml file code
name: dev_rpg
description: Become a tech lead, slay bugs, and don't get fired.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
# For Google I/O we are being very specific about pinning to specific branch revision.
# This is flutter commit hash b593f5167bce84fb3cad5c258477bf3abc1b14eb, tagged
# as Flutter version 1.5.4.
sdk: ">=2.3.0-dev.0.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
intl: any
provider: ^2.0.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
flare_flutter: ^1.8.3
auto_size_text: ^1.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
logging: ^0.11.3+2
git: ^0.5.1+1
t_stats: ^2.0.0
test: ^1.6.1
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/style_sphinx/
- assets/images/
- assets/images/2.0x/
- assets/images/3.0x/
- assets/flare/
- assets/docs/code_chomper_alpha.dart
- assets/docs/code_chomper_beta.dart
fonts:
- family: SpaceMonoRegular
fonts:
- asset: assets/fonts/SpaceMono-Regular.ttf
- family: SpaceMonoBold
fonts:
- asset: assets/fonts/SpaceMono-Bold.ttf
- family: RobotoCondensedBold
fonts:
- asset: assets/fonts/RobotoCondensed-Bold.ttf
- family: RobotoRegular
fonts:
- asset: assets/fonts/Roboto-Regular.ttf
- family: MontserratMedium
fonts:
- asset: assets/fonts/Montserrat-Medium.otf
- family: MontserratRegular
fonts:
- asset: assets/fonts/Montserrat-Regular.otf
- family: MontserratBold
fonts:
- asset: assets/fonts/Montserrat-Bold.otf
I have tried upgrading
flutter channel dev
flutter create . ```

Well as the errors say, the project has some dependencies that are not met by the version of flutter you have (because of the libraries that are shipped with flutter itself).
The pubspec.yaml of the project says it is supposed to work with flutter version 1.5.4. so, If you want to run that project you would need to download that compatible flutter sdk

Related

how can I use flutter_test from sdk and the package test? what version of test uses test_api 0.4.3?

I am trying to run some basic unit test for my flutter app. But when I run pub get I get the following error after including test: 1.20.0 in my pubspec:
dev_dependencies:
dependency_validator: ^3.1.0 # run flutter pub run dependency_validator
#integration_test:
# sdk: flutter
flutter_test:
sdk: flutter
test: ^1.20.0
so when I run f pub get I see:
Because test >=1.20.0 depends on test_api 0.4.9 and every version of flutter_test from sdk depends on test_api 0.4.3, test >=1.20.0 is incompatible with flutter_test from sdk.
So, because myapp depends on both flutter_test from sdk and test ^1.20.0, version solving failed.
pub get failed (1; So, because myapp depends on both flutter_test from sdk and test ^1.20.0, version solving failed.)```
What version of test uses test_api 0.4.3?
Try overriding test_api to 0.4.9 in your pubspec.yaml file:
dependency_overrides:
test_api: 0.4.9
or
dependency_overrides:
analyzer: ^3.0.0
You can probably remove this next time flutter updates.
I can just use import 'package:flutter_test/flutter_test.dart'; instead of importing directly from the test package in my test file. So I don't need to include test: 1.20.0 in my pubspec.
Add test_api in dependency_overrides
example:
dependency_overrides:
test_api: ^0.4.17
dev_dependencies:
flutter_test:
sdk: flutter
bloc_test: ^9.1.0
build_runner: ^2.3.3

Flutter libraries incompatibility

I'm working on a flutter project which I'm not the one who developed it first time. After running pub get I have these massive amount of errors:
Because xdg_directories >=0.1.2 <0.2.0-nullsafety.0 depends on process >=3.0.12 <5.0.0 and xdg_directories <0.1.2 depends on process ^3.0.12, xdg_directories <0.2.0-nullsafety.0 requires process >=3.0.12 <5.0.0.
(1) So, because path_provider_linux <0.2.0-nullsafety depends on xdg_directories ^0.1.0, path_provider_linux <0.2.0-nullsafety requires process >=3.0.12 <5.0.0.
Because process >=4.0.0-nullsafety.1 <4.0.0-nullsafety.4 requires SDK version >=2.10.0-0.0 <2.12.0 and process >=4.0.0-nullsafety.4 <4.0.0 depends on platform ^3.0.0-nullsafety.4, process >=4.0.0-nullsafety.1 <4.0.0 requires platform ^3.0.0-nullsafety.4.
And because process >=3.0.12 <4.0.0-nullsafety.1 depends on intl >=0.14.0 <0.17.0 and process >=4.0.0 depends on platform ^3.0.0, process >=3.0.12 requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0.
(2) So, because path_provider_linux <0.2.0-nullsafety requires process >=3.0.12 <5.0.0 (1), path_provider_linux <0.2.0-nullsafety requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0.
Because shared_preferences_linux <=0.0.2 depends on path_provider ^1.6.11 and shared_preferences_linux >=0.0.4-nullsafety <2.0.0 depends on shared_preferences_platform_interface ^2.0.0-nullsafety, shared_preferences_linux <0.0.2+1 or >=0.0.4-nullsafety <2.0.0-∞ requires path_provider ^1.6.11 or shared_preferences_platform_interface ^2.0.0-nullsafety.
And because shared_preferences_linux >=0.0.2+1 <0.0.4-nullsafety depends on path_provider_linux ^0.0.1 and path_provider >=1.6.10 <2.0.0-nullsafety depends on path_provider_linux ^0.0.1, shared_preferences_linux <2.0.0 requires shared_preferences_platform_interface ^2.0.0-nullsafety or path_provider_linux ^0.0.1.
And because path_provider_linux <0.2.0-nullsafety requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0 (2), shared_preferences_linux <2.0.0 requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0 or shared_preferences_platform_interface ^2.0.0-nullsafety.
And because every version of flutter_localizations from sdk depends on intl 0.17.0 and shared_preferences >=0.5.8 <2.0.0-nullsafety depends on shared_preferences_linux ^0.0.2, if flutter_localizations any from sdk and shared_preferences >=0.5.8 <2.0.0-nullsafety then platform ^3.0.0-nullsafety.4 or shared_preferences_platform_interface ^2.0.0-nullsafety.
And because shared_preferences >=0.5.4+8 <2.0.0-nullsafety depends on shared_preferences_platform_interface ^1.0.0 and every version of localize_and_translate depends on flutter_localizations any from sdk, if shared_preferences >=0.5.8 <2.0.0-nullsafety and localize_and_translate any then platform ^3.0.0-nullsafety.4.
And because localize_and_translate ^3.0.3 depends on shared_preferences ^0.5.12+4 and firebase_messaging >=0.2.0 <7.0.2 depends on platform ^2.0.0, localize_and_translate ^3.0.3 is incompatible with firebase_messaging >=0.2.0 <7.0.2.
So, because educationtqnia depends on both firebase_messaging ^6.0.13 and localize_and_translate ^3.0.3, version solving failed.
pub get failed (1; So, because educationtqnia depends on both firebase_messaging ^6.0.13 and localize_and_translate ^3.0.3, version solving failed.)
Process finished with exit code 1
This is my pubspec-yaml file:
name: educationtqnia
description: education_tqnia
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+7
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
permission_handler: ^5.0.0+hotfix.4
dio: ^3.0.8
firebase_messaging: ^6.0.13
flutter_local_notifications: ^1.1.3
connectivity: ^0.4.8+2
video_player: ^0.10.9+1
image_picker: ^0.6.5+3
cupertino_icons: ^0.1.3
http: ^0.12.0+2
flutter_launcher_icons: ^0.7.2+1
flutter_rounded_date_picker: 0.3.0
rflutter_alert: ^1.0.2
intro_slider: ^2.2.9
font_awesome_flutter: ^8.8.1
shared_preferences: ^0.5.6+3
fluttertoast: ^4.0.0
percent_indicator: ^2.1.1+1
responsive_builder: ^0.1.5
chewie: ^0.9.10
wc_flutter_share: ^0.2.0
flutter_record: ^0.4.3+1
cached_network_image: ^2.2.0
gradient_text: ^1.0.2
flutter_youtube: "^2.0.0"
flutter_pdfview: ^1.0.3+2
url_launcher: ^5.5.0
webview_flutter: ^1.0.7
full_screen_image: any
dev_dependencies:
flutter_test:
sdk: flutter
localize_and_translate: ^3.0.3
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
flutter_zoom_plugin:
git:
url: git://github.com/decodedhealth/flutter_zoom_plugin.git
ref: 0.0.8
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- langs/ar.json
- langs/en.json
- assets/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: Cairo
fonts:
- asset: assets/fonts/Cairo-Black.ttf
- asset: assets/fonts/Cairo-Bold.ttf
- asset: assets/fonts/Cairo-ExtraLight.ttf
- asset: assets/fonts/Cairo-Light.ttf
- asset: assets/fonts/Cairo-Regular.ttf
- asset: assets/fonts/Cairo-SemiBold.ttf
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
I tried downgrading the flutter SDK, switching between channels and running changing the libraries version to solve the problem but nothing work. Any ideas how to solve this problem?
Thanks.
This problem is very common when Flutter or some plugins have been updated. The only thing that works for me is to update everything, both flutter and the plugins to their latest version and if one is incompatible because it has no maintenance, try to change it for another.
Adding to Miguels answers - you could file issues on the relevant libraries GitHub pages if you need them to be usable on the newest flutter version aswell as compatible with other libraries.

I am not able to get dependencies for my flutter project - Flutter pub get issues

How can i resolve this error, please I need help to get this resolved.
I am using the flutter dev channel
How can I resolve this error, please I need help to get this resolved.
Tried flutter channel dev also tried to flutter upgrade but nothing worked.
Please help me with it thanks
Because every version of flutter_test from sdk depends on async 2.6.1 and fstore depends on async 2.5.0, flutter_test from sdk is forbidden.
So, because fstore depends on flutter_test any from sdk, version solving failed.
pub finished with exit code 1
My pubspec.yaml
name: fstore
publish_to: "none"
description: Mobile commerce app by Flutter
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.1.0+3018
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# Base
pedantic: ^1.11.0
intl: 0.17.0
# COMMON
inspireui:
path: ./modules/common_library
rubber:
git:
url: git://github.com/inspireui/rubber
country_pickers:
git:
url: git://github.com/inspireui/country_pickers.git
# FIREBASE PACKAGES
firebase_core: 1.1.0
firebase_analytics: 8.0.2
firebase_auth: 1.1.2
cloud_firestore: 1.0.7
firebase_remote_config: 0.9.0-dev.0
firebase_dynamic_links: 2.0.2
firestore_ui:
git:
url: git://github.com/inspireui/firestore_ui.git
# STATE MANAGEMENT
provider: 5.0.0
get_it: 6.1.1
event_bus: 2.0.0
# SPLASH SCREEN, ONBOARDING
animated_splash: 1.0.0
custom_splash: 0.0.2
flare_splash_screen: 4.0.0
rive: 0.7.3
liquid_swipe: 2.1.0
# UI
animated_text_kit: 4.2.1
animations: 2.0.0
awesome_card: 1.1.5
carousel_pro: 1.0.0
configurable_expansion_tile: 1.0.0
country_code_picker: 2.0.1
flash: 1.5.2
flutter_spinkit: 5.0.0
flutter_staggered_grid_view: 0.4.0
flutter_statusbarcolor: 0.2.3
flutter_swiper: 1.1.6
visibility_detector: 0.2.0
font_awesome_flutter: 9.0.0
file_picker: 3.0.1
page_indicator: 0.4.1
percent_indicator: 3.0.1
pull_to_refresh: 1.6.5
rate_my_app: ^1.1.0+1
cupertino_icons: any
implicitly_animated_reorderable_list: 0.4.0
pin_code_fields: 7.0.0
# WEB TOOLS
html_unescape: 2.0.0
webview_flutter: 2.0.4
flutter_widget_from_html: 0.6.0
flutter_webview_plugin: 0.3.11
responsive_builder: 0.4.1
# MAP
google_maps_flutter: 2.0.3
location: 2.3.5
# STORAGE
localstorage: ^4.0.0+1
# CONNECTIVITY
http: 0.13.2
http_auth: 1.0.0
uni_links: 0.4.0
share: 2.0.1
# AUTHENTICATION
apple_sign_in: 0.1.0
flutter_facebook_login: 3.0.0
google_sign_in: 5.0.2
sms_autofill: 2.0.0
# PUSH NOTIFICATION
firebase_messaging: 9.1.3
notification_permissions: 0.5.0
onesignal_flutter: 2.6.3
# PAYMENTS
stripe_sdk:
git:
url: git://github.com/inspireui/stripe-sdk.git
razorpay_flutter: 1.2.5
# IMAGES
transparent_image: 2.0.0
extended_image: 4.0.1
fwfh_cached_network_image: 0.6.0
image_picker: 0.7.4
multi_image_picker: 4.8.0
flutter_image_compress: 1.0.0
# VIDEOS
video_player: 2.1.1
youtube_player_iframe:
git:
url: git://github.com/inspireui/youtube_player_flutter.git
path: packages/youtube_player_iframe
# ADS
facebook_audience_network: 0.7.1
google_mobile_ads: 0.12.1+1
# TOOLS
auto_size_text: 2.1.0
google_fonts: 2.0.0
random_string: 2.1.0
json_annotation: 4.0.1
timeago: 3.0.2
universal_platform: ^1.0.0-nullsafety
uuid: 3.0.4
validate: 1.7.0
vector_math: any
async: 2.5.0
easy_debounce: 2.0.0
charts_flutter: 0.10.0
devicelocale: ^0.4.1
dev_dependencies:
flutter_driver:
sdk: flutter
flutter_test:
sdk: flutter
version: any
flutter_localizations:
sdk: flutter
test: any
flutter_launcher_icons: 0.8.1
mockito: ^4.1.1 # Testing
# vm_service: 5.5.0
## Enable To run json serializer, run:
## flutter pub run build_runner build --build-filter="lib/models/serializers/*.dart" --delete-conflicting-outputs
## flutter pub run build_runner serve --build-filter="lib/models/serializers/*.dart"
# build_runner: 1.12.2
# json_serializable: 4.1.0
### Override the library to support Flutter 2.0
### Note: This will show the warning but will not impact to the app features 👍
dependency_overrides:
intl: 0.17.0
http: 0.13.2
crypto: 3.0.1
path_provider: 2.0.1
uuid: 3.0.4
http_parser: 4.0.0
pedantic: 1.11.0
flutter_svg: 0.19.3
url_launcher: 6.0.1
cached_network_image: 2.5.1
modal_bottom_sheet: 2.0.0
args: 2.1.0
# Run this script to generate the app icon: flutter pub run flutter_launcher_icons:main
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/app_icon.png"
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
assets:
- lib/config/
- lib/config/mocks/
- lib/config/states/
- lib/config/stories/
- assets/icons/categories/
- assets/icons/credit_cards/
- assets/icons/tabs/
- assets/icons/payment/
- assets/images/
- assets/images/country/
- assets/images/favicon/
- assets/html/
- assets/google_fonts/
fonts:
- family: Feather
fonts:
- asset: assets/fonts/Feather.ttf
- family: SF Pro Display
fonts:
- asset: assets/fonts/SF-Pro-Display-Semibold.otf
weight: 700
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
flutter_intl:
enabled: true
Flutter Doctor Results
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 2.3.0-12.1.pre, on Microsoft Windows [Version 10.0.18363.1440], locale en-PK)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 3.6)
[√] Connected device (1 available)
• No issues found!

Facing the issue in pubspec.yaml

When i integrate the library new_version: ^0.2.0 in the project after pub get i get this error -
Because new_version >=0.0.7 depends on package_info_plus ^1.0.0 which depends on package_info_plus_platform_interface ^1.0.0, new_version >=0.0.7 requires package_info_plus_platform_interface ^1.0.0.
And because package_info_plus_platform_interface >=1.0.0-nullsafety.1 depends on plugin_platform_interface ^2.0.0 and file_picker 2.1.6 depends on plugin_platform_interface ^1.0.1, new_version >=0.0.7 is incompatible with file_picker 2.1.6.
So, because fstore depends on both file_picker 2.1.6 and new_version ^0.2.0, version solving failed.
pub get failed (1; So, because fstore depends on both file_picker 2.1.6 and new_version ^0.2.0, version solving failed.)
I don't understand what does it mean is this flutter version issue or sdk issue???
Here is the pubspec.yaml file where all the library has been integrate for the project, if i remove the new_version library project will work perfectly fine.
name: fstore
publish_to: "none"
description: Mobile commerce app by Flutter
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.0.0+3001
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# COMMON
inspireui:
path: ./modules/common_library
pedantic: 1.9.2
rubber:
git:
url: git://github.com/inspireui/rubber
country_pickers:
git:
url: git://github.com/inspireui/country_pickers.git
# FIREBASE PACKAGES
cloud_firestore: 0.14.4
firebase_analytics: 6.3.0
firebase_auth: 0.18.4+1
firebase_core: 0.5.3
firebase_database: 4.4.0
firestore_ui: 1.12.0
firebase_remote_config: ^0.4.3
# STATE MANAGEMENT
provider: 4.3.3
# UI
animated_splash: 1.0.0
animated_text_kit: 3.1.2
animations: 1.1.2
awesome_card: 1.1.0
carousel_pro: 1.0.0
configurable_expansion_tile: 1.0.0
country_code_picker: 1.7.0
custom_splash: 0.0.2
flare_splash_screen: 3.0.1
rive: 0.6.8
flash: 1.3.2
flutter_spinkit: 4.1.2+1
flutter_staggered_grid_view: 0.3.4
flutter_statusbarcolor: 0.2.3
flutter_swiper: 1.1.6
visibility_detector: 0.1.5
font_awesome_flutter: 8.11.0
image_picker: 0.6.7+15
file_picker: 2.1.6
multi_image_picker: 4.7.15
intro_slider: 2.3.4
liquid_swipe: 1.5.0
page_indicator: 0.3.0
percent_indicator: 2.1.9+1
pin_code_fields: 6.1.0
pull_to_refresh: 1.6.4
rate_my_app: 0.7.2
sticky_headers: 0.1.8+1
zoom_widget: 0.1.3
cupertino_icons: any
# WEB TOOLS
video_player: 2.0.0
html_unescape: 1.0.2
webview_flutter: 2.0.1
flutter_widget_from_html: 0.6.0-rc.2021030401
flutter_webview_plugin: 0.3.11
responsive_builder: 0.3.0
# MAP
google_maps_flutter: 1.2.0
location: 2.3.5 # use this version to compatible with fluxbuilder
# STORAGE
localstorage: 3.0.6+9 # depend on google font
shared_preferences: 2.0.3
# CONNECTIVITY
connectivity: 2.0.2
http: 0.13.0
http_auth: 0.3.1
uni_links: 0.4.0
firebase_dynamic_links: 0.6.3
# AUTHENTICATION
apple_sign_in: 0.1.0
flutter_facebook_login: 3.0.0
google_sign_in: 4.5.6
# PUSH NOTIFICATION
firebase_messaging: 7.0.3
notification_permissions: 0.4.8
onesignal_flutter: 2.6.2
# PAYMENTS
stripe_sdk:
git:
url: git://github.com/inspireui/stripe-sdk.git
razorpay_flutter: 1.2.3
# IMAGES
extended_image:
git:
url: git://github.com/inspireui/extended_image.git
transparent_image: 1.0.0
# ADS
facebook_audience_network: 0.7.1
firebase_admob: 0.10.3
# IN APP
new_version: ^0.2.0
# TOOLS
auto_size_text: 2.1.0
event_bus: 1.1.1
google_fonts: 2.0.0
random_string: 2.1.0
share: 0.6.5+4
sms_autofill: 1.3.1
json_annotation: 3.1.1
timeago: 3.0.1
universal_platform: ^0.1.3
uuid: 3.0.1
validate: 1.7.0
vector_math: any
async: 2.5.0
easy_debounce: 1.0.2
jwt_decoder: 1.0.4
charts_flutter: 0.9.0
flutter_image_compress: ^0.7.0
encrypt: 4.1.0
adaptive_breakpoints: 0.0.3
intl: 0.17.0
# For Shopify GraphQL
graphql: 3.1.0
flutter_localizations:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
version: any
flutter_launcher_icons: 0.8.1
mockito: ^4.1.1 # Testing
#To run json serializer, run:
# flutter pub run build_runner build --build-filter="lib/models/serializers/*.dart" --delete-conflicting-outputs
# flutter pub run build_runner serve --build-filter="lib/models/serializers/*.dart"
build_runner: 1.11.1
json_serializable: 3.5.1
### Override the library to support Flutter 2.0
### Note: This will show the warning but will not impact to the app features 👍
dependency_overrides:
intl: 0.17.0
http: 0.13.0
crypto: 3.0.0
path_provider: 2.0.1
uuid: 3.0.1
http_parser: 4.0.0
shared_preferences: 2.0.3
pedantic: 1.9.2
flutter_svg: 0.19.3
extended_image:
git:
url: git://github.com/inspireui/extended_image.git
url_launcher: 6.0.1
cached_network_image: 2.5.0
fwfh_cached_network_image: ^0.6.0-rc.2021030401
modal_bottom_sheet: 2.0.0-nullsafety.1
# Run this script to generate the app icon: flutter pub run flutter_launcher_icons:main
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/app_icon.png"
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
assets:
- lib/config/
- lib/config/mocks/
- lib/config/states/
- lib/config/stories/
- assets/icons/categories/
- assets/icons/tabs/
- assets/icons/payment/
- assets/images/
- assets/images/country/
- assets/images/favicon/
- assets/html/
- assets/google_fonts/
fonts:
- family: Feather
fonts:
- asset: assets/fonts/Feather.ttf
- family: SF Pro Display
fonts:
- asset: assets/fonts/SF-Pro-Display-Semibold.otf
weight: 700
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
flutter_intl:
enabled: true
You can do sth like this to force using a specific version
dependency_overrides:
package_info_plus_platform_interface: ^1.0.0
or
dependency_overrides:
plugin_platform_interface: ^2.0.0
Just write new_version: any, and get the pub. After that, get the suitable version from pubspec.lock. You will get the solusion.

Diagnosing Flutter version solving issue

While following the instructions to add integration tests to my Flutter app, I get the following error running packages get:
Because test <1.3.0 requires SDK version >=1.8.0 <2.0.0-∞ and test >=1.3.0 <1.6.1 depends on stream_channel ^1.6.0, test <1.6.1 requires stream_channel ^1.6.0.
And because test >=1.6.0 <1.6.5 depends on analyzer >=0.26.4 <0.37.0 and test >=1.6.4 <1.6.8 depends on test_api 0.2.6, test <1.6.8 requires stream_channel ^1.6.0 or analyzer >=0.26.4 <0.37.0 or test_api 0.2.6.
And because test >=1.6.8 <1.6.11 depends on test_api 0.2.7 and test >=1.6.11 depends on test_api 0.2.8, every version of test requires test_api 0.2.6 or 0.2.7 or 0.2.8 or stream_channel ^1.6.0 or analyzer >=0.26.4 <0.37.0.
And because every version of flutter_test from sdk depends on both stream_channel 2.0.0 and test_api 0.2.5, if flutter_test any from sdk and test any then analyzer >=0.26.4 <0.37.0.
And because json_serializable 3.2.3 depends on analyzer >=0.37.1 <0.39.0 and my_app depends on test any, flutter_test from sdk is incompatible with json_serializable 3.2.3.
So, because my_app depends on both json_serializable 3.2.3 and flutter_test any from sdk, version solving failed.
That presumably indicates some sort of version conflict through the dependency graph, but I'm at a bit of a loss to work out quite what exactly the issue is or what I could do about it. My pubspec.yaml looks like:
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
flutter_svg: 0.14.2
email_validator: 1.0.0
dio: 3.0.2
dio_cookie_manager: 1.0.0
cookie_jar: 1.0.1
provider: 3.1.0
path_provider: 1.3.0
json_annotation: 3.0.0
timeago: 2.0.19
flutter_launcher_icons: 0.7.3
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: 1.7.1
json_serializable: 3.2.3
mockito: 4.1.1
flutter_driver:
sdk: flutter
test: any
Hoping someone can give me a pointer in the right direction.
did you try to remove the test dependency from the pubsec.yaml?
Looks like that the flutter_test package is already present on the flutter SDK.