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

Vertical viewport was given unbounded height using Single-Child-Scroll-View

When try to wrap "list view builder" with single-child-scroll-view it shows the given error. Error : Vertical viewport was given unbounded height. Also if I try to give a specific height of the list view wrapping with a container the single child…
1
vote
1 answer

Map is not a subtype of type 'Map after updating to flutter3

I updated flutter3 after that I get an error "type '_Map' is not a subtype of type 'Map' in type cast" printed on the console in this line: itemId = (event.snapshot.value as Chat).itemId; this is Chat Class: …
1
vote
1 answer

【Flutter】Error: No named parameter with the name 'kind'

This is a Flutter project. I have tried the following $Flutter clean $Flutter pub cache repair photo_view: ^0.14.0 use the version of document_scanner_flutter in the pull request However, none of these had any effect. Error message Error…
Tdayo
  • 269
  • 4
  • 11
1
vote
2 answers

How to implement TreeView with three-state CheckBoxes featuring select all and unselected all functionality

I want to achieve a tree hierarchy list view. I have tried a few references that I found on pub.dev: links to packages: https://pub.dev/packages/parent_child_checkbox https://pub.dev/packages/list_treeview I have tested them, but they do not meet my…
Akash
  • 461
  • 2
  • 14
1
vote
1 answer

Error: The getter 'textTheme' isn't defined for the class 'AppBarTheme'. and No named parameter with the name 'accentColor'

Running Gradle task 'assembleDebug'... ../../../.pub-cache/hosted/pub.dev/flutter_neumorphic-3.2.0/lib/src/widget/app_bar.dart:183:29: Error: The getter 'textTheme' isn't defined for the class 'AppBarTheme'. - 'AppBarTheme' is from…
rocerBob
  • 11
  • 1
1
vote
1 answer

How to do a customise discrete slider like below one in flutter?

I have tried to achieve using slider and slider theme flutter lib. even i went through property and functions of slider but i am not able get idea how to achieve this one, can anyone help or any idea please to share or guide me.
Akash
  • 461
  • 2
  • 14
1
vote
0 answers

throw MissingPluginException No implementation found for method $method on channel $name

Anyone How To fix This Error when I try to click Login button on my app show this error import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; …
1
vote
0 answers

How do I fix this flutter app build error?

Error that I am facing whenever I try to build my app: `: Error: Type 'DragSelectionUpdateCallback' not found. text_selection.dart:716 final DragSelectionUpdateCallback? onDragSelectionUpdate; ^^^^^^^^^^^^^^^^^^^^^^^^^^^ : Error:…
1
vote
2 answers

having difficulties setting up firebase with my flutter project

i have tried following a tutorial for setting up firebase for my flutter project but after setting everything up which worked perfectly now when i imported the firebase packages from pub.dev i started getting error when i try to run my code on an…
1
vote
2 answers

How to create like that type dashed border line in flutter?

How achieve this type ui in flutter. I was tryed dotted package But I can't get that curved Dotted
1
vote
1 answer

Not updating state of SpeedDialChild (flutter_speed_dial: ^7.0.0)

I'm trying to update SpeedDialChild icon value based on a boolean value. final showCriticalPoint = useState(false); SpeedDial( isOpenOnStart: true, closeManually: true, …
1
vote
1 answer

Bug , Cannot select current date without changing to a different date first in flutter

date picker field date picker In the current implementation, the default date displayed is today's date. However, if a user wishes to select the current date, they must first change the date and then reselect today's date. I would like to address…
Dasun Dola
  • 541
  • 2
  • 16
1
vote
1 answer

Pagination and Searching with FutureProvider (infinite_scroll_pagination+Riverpod)

infinite_scroll_pagination with FutureProvider (Riverpod) usually i create a FutureProvider which is dependent on search query(StateProvider). final allAgentSearchQueryProvider = StateProvider((ref) { return ''; }); final allAgentProvider…
1
vote
1 answer

Build a Android app using Flutter to change DNS

I want to build a android app using flutter to change dns of the wifi that the device connected to so does flutter have any library to do that or do you guys have any suggestion for me. I really appreciated and thank you for your time. I have tried…
1
vote
2 answers

Navigator.of(context).pushAndRemoveUntil() doesn't work

bool isChecked = false; void isValidate() { if (_formKey.currentState != null) { if (_formKey.currentState!.validate()) { print("is valid"); Navigator.of(context).pushAndRemoveUntil( MaterialPageRoute( …