Questions tagged [flutter-dependencies]

For questions relating to the use of and issues with any use of flutter-specific dependencies in dart's pubspec.yaml

Dependencies are one of the core concepts of the pub package manager. A dependency is another package that your package needs in order to work. Dependencies are specified in your pubspec. You list only immediate dependencies — the software that your package uses directly. Pub handles transitive dependencies for you.

For each dependency, you specify the name of the package you depend on and the range of versions of that package that you allow. You can also specify the source, which tells pub how to locate the package, and any additional description that the source needs to find the package.

Here is an example of specifying a dependency:

dependencies:
  transmogrify: ^1.0.0

This YAML code creates a dependency on the transmogrify package using the default source (pub.dev) and allowing any version from 1.0.0 to 2.0.0 (but not including 2.0.0). See the version constraints section of this page for syntax details.

If you want to specify a source, the syntax looks a bit different:

dependencies:
  transmogrify:
    hosted:
      name: transmogrify
      url: http://some-package-server.com
    version: ^1.0.0

This YAML code creates a dependency on the transmogrify package using the hosted source. Everything under the source key (here, just a map with a url: key) is the description that gets passed to the source. Each source has its own description format, which is described in the dependency sources section of this page. The version constraint is optional but recommended.

Use this long form when you don’t use the default source or when you have a complex description that you need to specify. But in most cases, you’ll just use the simple packagename: version form.

Dependency sources

Pub can use the following sources to locate packages:

SDK
Hosted packages
Git packages
Path packages
6510 questions
1
vote
1 answer

Reading an image in flutter

I'm trying to read an image in flutter into a Uint8List but it keeps returning file not found even after ive added the asset path in pubspec file Future pick_default_image() async { Uint8List img = (await…
1
vote
0 answers

local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found - flutter

my error i'm trying to setup firebase (firestore) and i try to install google play service in emulator but does't work - and i try to https://github.com/firebase/flutterfire/issues/10031 but doesn't work Local module descriptor class for…
1
vote
1 answer

Error when running Integration test in Flutter using patrol

I'm trying to run an integration test in flutter using the patrol 1.0.8 package. Then I got an error when running the test with commanded patrol test integration_test/classic_process_test.dart --verbose on ios physical device. Error is Error: No…
1
vote
1 answer

where can I found app:checkDebugManifest ?I'm trying to integrate zoom into my flutter app?

FAILURE: Build failed with an exception. * What went wrong: A problem was found with the configuration of task ':app:checkDebugManifest' (type 'CheckManifest'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type…
1
vote
2 answers

Error after used pub upgrade and the error show RC2Parameters that never heard

After I used pub upgrade I got this error and I don't know why. Although I comment on the crypto package(I see the crypto is a path in the error) this error still appears. Launching lib\main.dart on Chrome in debug mode... Waiting for connection…
1
vote
2 answers

Issue when adding cart items to cart List in provider

I'm using provider to add items to my cart, but when I add items to the cart and print the cart List, it appears as the following Here is my function class CartList extends ChangeNotifier { Map _cart = {}; Map get cart =>…
1
vote
0 answers

Dependabot version fails due to outdated flutter version

I am working on an open-source flutter project it uses Github's dependabot to manage its dependency versions. But recently we upgraded our flutter to the latest version Flutter: 3.7.3 and after that all of the Dependabot PRs are failing…
1
vote
0 answers

How can I normalize audio track in flutter?

I am using Just Audio Player. I want to normalize song while playing. I tried using setVolume function but its only change the volume of the player. It does not normalize the song. What I want is a package that support audio normalizeation while…
1
vote
1 answer

I can't pass the variable why?flutter

I have tried in many ways to pass the variable points but I can not use it in another class below I leave the basic code.the variable in question is points which is located in the pointspage and I would like to use it in cartpage CartPage class…
sams
  • 43
  • 6
1
vote
0 answers

How can we navigate seperate screen using CarouselSlider flutter?

I'm using go router package for routing.And trying to open seperate pages with the id when clicking on the page my function inside my homepage.dart Widget buildImage(String urlImage, String title, int price, double padding, int index, String…
1
vote
2 answers

How to use pushReplacment method using go-router package?

How can we use pushReplacment using go-router package I tried this but didn't work context.pushReplacement("register"); To use the Navigator API with named routes (pushNamed, pushReplacementNamed, or pushNamedAndRemoveUntil), the Navigator must…
1
vote
0 answers

Error while trying run flutter at xcode for the first time

I'm trying to run my flutter app for the first time in xcode in M1 mac and there are issues that i can't resolve. Issues: https://i.stack.imgur.com/9EYvZ.png My app works normally in androidStudio, including with the ios emulator. I've already…
1
vote
0 answers

Implemention Ironsource to Flitter

I am using Ironsource in flutter Here ironsource_mediation: 1.1.0 google_mobile_ads: 2.3.0 buld.gradle(app): implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' implementation…
1
vote
1 answer

How do I open a Discord direct chat to user and spesific channel from my flutter app?

I am working on a flutter app. I have already provided a direct WA link in the app using the url_launcher plugin. Now I plan to open a Discord with my discord server and direct message to other user in the user's phone. How do I do it?
Afdal
  • 501
  • 9
  • 19
1
vote
2 answers

add Code Style inside normal text flutter

I wonder if there is a way in flutter how to do this style to separate code from normal text