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
0 answers

How can i detect bad word in any languages

I am making a social media application and I need to detect bad words if anyone type in message and give him warning. I did not try to make it, but there are some condition for detecting bad words : Lets suppose abcd is a bad word If user type…
1
vote
0 answers

WebView overlays are enabled?

When I click on contact with seller button then it open webpage and it display **Web page not available The web page at…
1
vote
0 answers

I can not fixed this problem I Create Navbar and Create Account design in Navbar but I can See only blank page

RenderBox was not laid out: _RenderListTile#934f1 relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE 'package:flutter/src/rendering/box.dart': Failed assertion: line 2001 pos 12: 'hasSize' I meet this problem !! import…
1
vote
2 answers

How to play MPEG audio in flutter after requesting it from ElevenLabs API?

After pressing a floating action button, I am trying to play audio from the Eleven Labs voice API in flutter using the AudioPlayer library. I am getting a request back but I don't know how to save the audio temporarily and play it. Below is what I…
1
vote
0 answers

Adding reward ads in flutter

I am adding reward ads to my flutter app but I am getting this error. I also want to ad score once rewarded ads get viewed. I/Choreographer(30860): Skipped 21 frames! The application may be doing too much work on its main thread. W/Ads (30860):…
1
vote
1 answer

Failing to show second popup to ask for always allow Location permission on iOS Flutter

I've implemented a progressive Location permission request using Geolocator as I need background location for my app and both Android and iOS platforms require it to be asked only after being granted the while in use permission. The problem is that…
Vincenzo
  • 5,304
  • 5
  • 38
  • 96
1
vote
1 answer

Flutter SnackBar is being Shown over Expandable Widget

i'm using expandable_bottom_bar dependency to create that expanded behaviour in my AppBottomBar. But for some reason, whenever I show a SnackBar it's rendering above the AppBottomBar... Any thoughts? Its a simple Scaffold where I only use the…
rafaelpadu
  • 1,134
  • 2
  • 6
  • 20
1
vote
2 answers

Firebase auth email/password signin not working in release mode with flutter

WEB:- I am using firebase authentication for my flutter app with normal email/password sign-in. The login is working fine when I run the web app in debug mode. I am able to log in with my credentials but when I try to run it in release mode I am…
1
vote
1 answer

Accesing a BLoC using getit instead of context not working

I am trying to access a BLoC instance without actually using the context, but getIt instead. The versions I have are: flutter_bloc: ^8.1.1 injectable: ^2.1.0 get_it: ^7.2.0 injectable_generator: ^2.1.3 I have the BLoC registered in getit…
1
vote
0 answers

not able to change item of carousel scroller with button in flutter

i have done carousel scrollbar for items array but when i am pressing icon button left or right then i am not able to change item i can change the animated dots with button but the items is not changing with that Stack( …
1
vote
0 answers

Swipe and change list items like tab view

I'll have an activity list for each month and I wanna show them like this. And also want to have the ability to change the month via a swipe. Does flutter have any package for that?
1
vote
1 answer

array value getting inherited/copied

I have 2 arrays cart and cartCopy, inside that array I have an object. Data is inserted in cart and cartCopy. When updating the variant or extras in cart I first create a separate list for them variantList=[] and extrasList=[], now when updating…
VDTe
  • 438
  • 1
  • 4
  • 17
1
vote
1 answer

how to parse data from json file in flutter?

Error on line 60, column 2 of pubspec.yaml: Expected a key while parsing a block mapping. ╷ 60 │ assets: │ ^ ╵ Process finished with exit code 65 i need to show data from json file
1
vote
0 answers

Flutter pushed value in array still updating

I have a shopping cart project using provider. When changing variant(array of object) the already pushed value inside the cart also changes. How do I prevent the value from changing when it is already inserted. Adding items to cart addProduct()…
VDTe
  • 438
  • 1
  • 4
  • 17
1
vote
0 answers

Flutter Pub Cache Error build gradle error

^^^^^^^^^^^^^^^^^^^^ /D:/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.4.1/lib/src/firebase_app.dart:18:25: Error: Member not found:…
Aravinth S
  • 11
  • 1