rxdart is not installing in my PC due to some issue in dart SDK version - flutter

I'm trying to install rxdart by copying it from https://pub.dev/packages/rxdart/versions/0.7.1#-installing-tab- , but its showing some error.
The current Dart SDK version is 2.3.0-dev.0.5.flutter-a1668566e5.
Because flutter_course depends on rxdart >=0.1.0+1 <0.16.0 which requires SDK version >1.12.0 <2.0.0, version solving failed.
pub get failed (1)
exit code 1
I tried using flutter upgrade.
But that doesn't change anything.
My pubsec.yaml file
version: 1.0.0+1
environment:
sdk: ">=2.1.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.
cupertino_icons: ^0.1.2
scoped_model: ^1.0.1
http: ^0.12.0+2
shared_preferences: ^0.5.3+1
rxdart: ^0.7.1
dev_dependencies:
flutter_test:
sdk: flutter

Related

Could not find package flutter_localization in the Flutter SDK

I am currently trying to implement localization in my Flutter App but whenever I try to add the dependency for flutter_localization, I get the following error Message:
Because the timer depends on flutter_localization from SDK which doesn't exist (could not find package flutter_localization in the Flutter SDK), version solving failed.
I have also correctly added the path to both my flutter and dart SDKs in Android Studio.
Here is my pubspec.yaml file:
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=2.18.2 <3.0.0'
dependencies:
flutter:
sdk: flutter
intl: ^0.17.0-nullsafety.2
cupertino_icons: ^1.0.2
sqflite: any
shared_preferences: ^2.0.15
path_provider: any
flutter_localization:
sdk: flutter
flutter_cupertino_localizations: ^1.0.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
I can't access GlobalMaterialLocalizations without flutter_localization and apparently, this is the easiest solution. I have already tried many solutions like checking version compatibilities and updating all dependencies. can you guys help me out?
Thanks in Advance!
Upgrading SDKs, Upgrading Dependencies, reinstalling flutter and Dart, and more
You misspelled the package
Replace
flutter_localization:
sdk: flutter
With
flutter_localizations:
sdk: flutter
Take note on the s on flutter_localizations

Flutter - "flutter from sdk and syncfusion_flutter_datagrid ^19.1.65-beta, version solving failed." Error

I am getting an error like this:
Because every version of flutter from sdk depends on collection 1.16.0 and syncfusion_flutter_datagrid >=19.1.54-beta <20.1.48 depends on collection >=1.9.0 <=1.15.0, flutter from sdk is incompatible with syncfusion_flutter_datagrid >=19.1.54-beta <20.1.48.
So, because datagrid_json_datasource depends on both flutter from sdk and syncfusion_flutter_datagrid ^19.1.65-beta, version solving failed.
pubspec.yaml:
name: datagrid_json_datasource
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
http: ^0.12.0
flutter:
sdk: flutter
intl: ^0.17.0
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
syncfusion_flutter_datagrid: ^19.1.65-beta
flutter:
uses-material-design: true
i try too chenge sdk version when i change to sdk version and also try flutter clean and flutter pub get.
Try updating to newer version of syncfusion_flutter_datagrid.
Add to pubspec.yaml:
dependencies:
syncfusion_flutter_datagrid: ^20.3.52
Then run flutter pub get
I tested this with multiple Flutter versions and the one you should use is the 2.2.0 because this is the version which contains the Collector 1.9.0, you cannot use another version of Collector or override it because dart:Collector contains different data structures that are used in the code base of flutter.
This is the pubspec.yaml that works for me for Flutter 2.2.0
Hope it helps you :)
name: test_datasourcee
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
syncfusion_flutter_datagrid: ^19.1.65-beta
flutter:
uses-material-design: true

Because calendar depends on table_calendar >=2.3.0 which requires Flutter SDK version >=1.17.0, version solving failed

I have this error while running pubget table_calendar (^3.0.3) in my Calendar app. Here is my pubspec file
name: calendar
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
table_calendar: ^3.0.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter:
uses-material-design: true
i am not getting any error , its work totally fine with me with the same packages and sdk
you can try changing the sdk version to sdk: ">=1.17.0 <3.0.0"
name: getx_test_1
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
get: ^4.6.1
table_calendar: ^3.0.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter:
uses-material-design: true
Seems weird that you are trying to do a pub get on table_calendar: ^3.0.3 but the error is being thrown trying to get table_calendar >= 2.3.0. I would look around that area.

Dart SDK version mismatch

version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
hive: ^1.0.0
hive_flutter: ^0.2.1
path_provider: ^1.3.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
build_runner: ^2.1.1
hive_generator: ^0.5.1
pub get failed (1; Because depends on path_provider >=2.0.0 which requires SDK version >=2.12.0-259.9.beta <3.0.0, version solving failed.)
exit code 1
how to fix it?
Hi #Sreerekha and welcome to StackOverflow!
cupertino_icons: ^1.0.2 has null-safety enabled, so you have to:
upgrade your SDK to version 2.12 (or higher) and migrate all your app to null-safety,
or you have to downgrade the version of this dependency.
Unfortunately, you can't have the best of both worlds
How_to_migrate_to_null_safety
Cupertino_icons_versions

Because flutter_tools depends on sockjs_client 0.3.5 which doesn't match any versions,

version solving failed. Error: Unable to 'pub upgrade' flutter tool.
After I forked examples from the Github. I tried to run command "get packages" on VScode. The pub upgrade --force and "flutter doctor" seems not to work anymore. I need help.
pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.1.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.
cupertino_icons: ^0.1.2
rxdart: ^0.18.0
cloud_firestore: ^0.8.2
http: ^0.12.0+1
dev_dependencies:
flutter_test:
sdk: flutter
I can't seem to run flutter command anymore.
I solved the problem by reinstalling the flutter and set the path.