Questions tagged [pubspec]

A pubspec file represents the dependency metadata for a Dart package.

For more information, see Dart documentation.

191 questions
4
votes
2 answers

hydrated_bloc: The parameter 'storageDirectory' is required

I updated hydrated_bloc from 6.1.0 to the latest 7.0.1 and I got a warning in: HydratedBloc.storage = await HydratedStorage.build(); The parameter 'storageDirectory' is required. When I changed to what the new documentation…
Abdullah Hamadi
  • 161
  • 3
  • 10
4
votes
0 answers

What is the use of weight and style property when declaring custom fonts in pubspec?

To understand my question, we need to follow the example below which from the official flutter documentation: flutter: fonts: - family: Raleway fonts: - asset: fonts/Raleway-Regular.ttf - asset: fonts/Raleway-Italic.ttf …
The Chinky Sight
  • 349
  • 4
  • 19
4
votes
1 answer

How to set version constraints when depending on git packages using Flutter/Dart with versions below 1.0.0?

I am trying to set constraints for git package dependencies with versions below 1.0.0; however, it might also be versions above, but not sure. Flutter project depends on two packages that we're hosting on git repositories. We're referencing them in…
4
votes
1 answer

How to init a pubspec.yaml?

Just like: cargo init in rust go mod init in go yarn init in javascript.
clearloop
  • 671
  • 5
  • 15
3
votes
2 answers

Conflicting ffi version between packages & failed to get dependencies in pubspec.yaml

Because tflite_flutter >=0.6.0 depends on ffi ^1.0.0 and file_picker 5.2.1 depends on ffi ^2.0.1, tflite_flutter >=0.6.0 is incompatible with file_picker 5.2.1. And because no versions of file_picker match >5.2.1 <6.0.0, tflite_flutter >=0.6.0 is…
1988
  • 309
  • 2
  • 15
3
votes
1 answer

Is it possible to have a condition which branch to get in pubspec.yaml?

I created a library which I used on a project, I want to use a branch of the library depending of what branch the project is. For example, if the project branch is development, I want the library's branch to be get by pubspec is to be development as…
Kokuou
  • 129
  • 2
  • 9
3
votes
1 answer

Using a custom icon font in a Flutter package displays Question marks instead of custom icons

I have an application composed of a number of different Dart and Flutter packages. This has proven useful in that I've been able to move things like fonts, colours and Widgets into an independent style guide package which we can then use across all…
HBG
  • 1,731
  • 2
  • 23
  • 35
3
votes
1 answer

How to set a custom property for conditional import in Dart?

Dart allows to use the standard library names for conditional import/export, like this: export 'src/hw_none.dart' // Stub implementation if (dart.library.io) 'src/hw_io.dart' // dart:io implementation if (dart.library.html)…
proninyaroslav
  • 720
  • 2
  • 7
  • 19
3
votes
1 answer

Flutter integration_test package conflict with my code and cannot be resolved by tweaking package versions - so the whole app cannot run

I have an app (with null-safety), and want to use integration_test package to do some testing. The pubspec.yaml looks like: dependencies: archive: ^3.1.2 ... dev_dependencies: build_resolvers: ^2.0.0 build_runner: ^1.11.5 flutter_test: …
ch271828n
  • 15,854
  • 5
  • 53
  • 88
2
votes
3 answers

Error: The getter 'accentColor' isn't defined for the class 'ThemeData' after updating to Flutter 3.10

I'm getting this error after updating to 3.10, and I don't reference accentColor in code. I assume it's one of the libraries that use this line. How do I check which one it is? Error: : Error: The getter 'accentColor' isn't defined for the class…
Yaros
  • 27
  • 5
2
votes
1 answer

Flutter - firebase_auth_web 5.4.0 depends on intl ^0.17.0 but I must use higher version (intl ^0.18.0)

Flutter Dependencies error: Because firebase_auth_web 5.4.0 depends on intl ^0.17.0 and no versions of firebase_auth_web match >5.4.0 <6.0.0, firebase_auth_web ^5.4.0 requires intl ^0.17.0. So, because ventus depends on both intl ^0.18.0 and…
TomasF
  • 23
  • 3
2
votes
3 answers

errors when I try to add google sign in to my project

Because google_sign_in >=5.4.0 depends on google_sign_in_platform_interface ^2.2.0 which depends on quiver ^3.0.0, google_sign_in >=5.4.0 requires quiver ^3.0.0. And because every version of dependencies depends on quiver ^2.0.1,…
2
votes
1 answer

Registrar is deprecated. Deprecated in Java

I'm getting this warning: 'Registrar' is deprecated. Deprecated in Java' any time I run flutter build apk. This is the error dialogue in android…
2
votes
1 answer

Execution failed for task ':app:checkDevDebugDuplicateClasses'

I am using the following libraries idenfy_sdk_flutter: 2.0.0 flutterpluginfidologinapi: hosted: name: flutterpluginfidologinapi url: https://flutter.dev.loginid.io version: 0.61.33 and getting the following errors after adding…
CoinBeam
  • 23
  • 4
2
votes
0 answers

Flutter iOS app not running after updating Firebase to latest versions - Terminating with uncaught exception of type NSException

After updating Firebase versions, iOS Flutter app does not run (even after building successfully). The error I'm getting is: libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception…
Carlos Daniel
  • 2,459
  • 25
  • 30
1
2
3
12 13