As I understand it, the Package integration_test package is not null type safe. Can the package be used for the current Flutter version (version> 2.0)? If not, are there any alternatives?
as montionned in Readme file, the package is **DEPRECATED
This package has been moved to the Flutter SDK. Starting with Flutter 2.0.
it should be included as:
dev_dependencies:
integration_test:
sdk: flutter
Related
I am getting error while compiling flutter app
Anyone can help?
Here is full error :
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/carousel_slider-4.2.0/lib/carousel_slider.dart:311:29: Error: Member not found: 'trackpad'.
PointerDeviceKind.trackpad
Here are dependencies from yaml file
`
version: 1.0.0+1
environment:
sdk: ">=2.16.2 <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: ^1.0.2
carousel_slider: ^4.2.0
video_player:
`
Welcome Rohan!
This issue is because of the introduction of the new trackpad gestures in version 3.3.0-0.0.pre of flutter as documented here: https://docs.flutter.dev/release/breaking-changes/trackpad-gestures looks like carousel_slider has been update to use it.
You have two options:
Upgrade your flutter SDK to 3.3.0-0.0.pre or greater
Or downgrade carousel_slider: 4.1.0
Clean pub cache folder by command bellow
flutter pub cache repair
And download all dependencies by following command in your project directory
flutter pub cache repair
IMPORTANT
All libraries will be downloaded from the internet from the scratch and this will take some time depends how many libraries are you using
you should declare carousel_slider: 4.1.1 in pubspec.yaml
instead of carousel_slider: ^4.1.1 because with ^ sign flutter will try to use latest version in pub.dev
Can someone help me? Why can't I add this package to my pubspec.yaml?
I assume your project name is also integration_test
, change the name of your project as when running the pub get command, flutter reads the project name instead of the library name.
Add the dependencies to the dev_dependencies section of the app’s pubspec.yaml file, specifying the Flutter SDK as the location of the package.
dev_dependencies:
integration_test:
sdk: flutter
flutter_test:
sdk: flutter
More documentation on here with example.
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: ^1.0.2
sqflite: ^2.0.1
intl: ^0.17.0
bloc: ^8.0.2
flutter_bloc: ^8.0.1
conditional_builder_null_safety: ^0.0.6
dio: ^4.0.4
shared_preferences: ^2.0.5
webview_flutter: ^3.0.0
I get this error:
The current Dart SDK version is 2.13.4
Because todo depends on webview_flutter >=2.0.14 which requires SDK version >=2.14.0 <3.0.0, version solving failed.
pub get failed (1; Because todo depends on webview_flutter >=2.0.14 which requires SDK version >=2.14.0 <3.0.0, version solving failed.)
Your current dart sdk version is 2.13.4, 2.0.14 is webview_flutter version, and in error message it asks you so dart sdk version is above 2.14.
Since one of the releases( do not remember which one :(, proof is here ) Dart is bundled with flutter sdk so if you installed dart on your system separately versions might mismatch because flutter uses bundled one and in shell you see system one. try upgrading flutter sdk constraints.
i need some help because im going crazy. I just want to format date to my locale (should be it-IT).
In flutter app i putted in pubspec.yaml the intl package with the new nullsafety feature:
flutter:
sdk: flutter
intl: ^0.17.0-nullsafety.2
looking into the documentation it says:
<< Note that before doing any DateTime formatting for a particular locale, you must load the appropriate data by calling: >>
import 'package:intl/date_symbol_data_local.dart';
...
initializeDateFormatting('de_DE', null).then(formatDates);
(https://pub.dev/packages/intl/versions/0.17.0-nullsafety.2)
so, just to try, i did:
initializeDateFormatting('it-IT', null).then((value) => {print('intl ok')});
but the dart nullsafety doesnt want a null parameter, and it says "The argument type 'Null' can't be assigned to the parameter type 'String'."
Any suggestion?
Thread: flutter intl 0.17.0 package initializeDateFormatting.
Same problem here, did you solve the issue?
I tried upgrading intl to ^0.18.0, but in my pubspec.yaml I am using
flutter_localizations: # Add this line
sdk: flutter
so, my project is coupled with intl 0.17.0. I realize this when I tried the [flutter pub get] command and got this message:
Running "flutter pub get" in expenses...
**Because expenses depends on flutter_localizations from sdk which depends on intl 0.17.0, intl 0.17.0 is required.**
So, because expenses depends on intl ^0.18.0, version solving failed.
pub get failed (1; So, because expenses depends on intl ^0.18.0, version solving failed.)
I also made a lab with only dart and not flutter, and intl works as expected:
https://gist.github.com/ejyanezp/994c49f15bb2ce3fd4c3d84ed37ca198
So is a compatibility issue between flutter_localizations and intl.
Conclusion: i will go for a workaround and wait the final solution from the authors of both libraries.
i am trying to use flutter SVG the latest version, but i faced a problem with my SDK version.
i changed it to what the error message said,But i still faces the same problem!
the error message is:
pub get failed (1; Because flutter_app depends on flutter_svg >=0.18.0 which requires Flutter SDK version >=1.18.0-6.0.pre <2.0.0, version solving failed.)
environment:
sdk: ">=1.18.0-6.0.pre <2.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.3
flutter_svg: ^0.19.1
Probably your project is created flutter beta channel or any downgrade channel. So First run:
flutter doctor -v
If your current flutter channel is beta ? then run command below:
flutter channel stable
flutter upgrade
flutter pub get
I hope solve your problem.
to upgrade your SDK do this in terminal:
flutter channel master
flutter upgrade
The channel master has the most recent build but it's not stable.
So I advise you to try flutter channel stable first.
Probably your project is created years ago.
First run flutter upgrade, then update SDK to sdk: ">=2.7.0 <3.0.0", and then pub get
I had a similar issue with a different package.
Seems like flutter_svg moved to a new flutter beta version and you are on the stable channel.
You need to use an older version of the flutter_svg package which uses an older version of flutter