Questions tagged [dart-pub]

Pub is a package manager for Dart applications and libraries.

Pub is a package manager for Dart applications and libraries. You can find packages to use in a project or publish packages to the package repository. Pub automatically keeps track of dependencies to other packages and makes sure that the dependencies use the right version of a package.

Basics:

  • Use pub get to get dependencies
  • Use pub upgrade to upgrade a dependency
  • Use pub publish to make your library available for others

Resources:

1128 questions
5
votes
6 answers

Flutter: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null

Recently, my Debug Console was showing something that wasn't showing before. This happens when I use package flutter_typeahead. I don't know if this is an error or a warning. Below is my Debug Console: Launching lib\main.dart on Chrome in debug…
My Car
  • 4,198
  • 5
  • 17
  • 50
5
votes
1 answer

Because project requires SDK version >=2.14.0 <3.0.0, version solving failed even though Dart SDK version is 2.14.0-350.0.dev

I want to make use of typedefs for variables in Dart thus I am trying to update minimum dart version to 2.14.0. When I change environment to environment: sdk: ">=2.14.0 <3.0.0" I get the following error [project] flutter pub get Running "flutter…
Chris
  • 839
  • 1
  • 12
  • 30
5
votes
2 answers

Every version of integration_test depends on flutter_driver any from sdk which depends on crypto 2.1.5

I've been getting an error ever since I tried adding integration_test package along with get_test and it's primarily due to the fact that just_audio depends on crypto: ^3.0.0 while integration_test depends on crypto: ^2.1.5. I tried to look online…
Andrew Gabriel
  • 102
  • 2
  • 6
5
votes
1 answer

How to install something that requires pub install using Flutter SDK?

I'm trying to compile https://github.com/dart-lang/protobuf/tree/master/protoc_plugin According o the ReadMe, I should just run pub install. I have the flutter SDK that should include the Dart SDK. I tried: flutter pub install Could not find a…
Guerlando OCs
  • 1,886
  • 9
  • 61
  • 150
5
votes
2 answers

How to compare timestamp to current time in flutter

This is my timestamp = "2020-05-29T17:43:39.622832+05:30". How can I pass it to a function readTimeStamp (it will give me error of not type of int)? date = DateTime.parse(bookDetails.timestamp); print(readTimestamp(date)); String…
krushi21
  • 75
  • 2
  • 8
5
votes
5 answers

type 'int' is not a subtype of type 'double' (flutter)

I am using CoinMarketCap API to fetch coin's data from server ,so i have a problem ! Android studio give me this message: type 'int' is not a subtype of type 'double' My problem almost from my model ,so this my models: Coin class import…
ABDULKARIM ALBAIK
  • 91
  • 1
  • 2
  • 11
5
votes
3 answers

Were can I find "flutter pub list" or "flutter pub search" command line tools?

Where can I find a command line tool for searching and listing installed packaged versions and available upgrade versions? I can't think of any other package management tool that doesn't include commands to list installed versions or find available…
Brendon Whateley
  • 1,302
  • 13
  • 22
5
votes
2 answers

Error: No named parameter with the name 'onRatingChanged'

I try to run the app but I receive these errors : Compiler message: ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/rate_my_app-0.6.0+2/lib/src/dialogs.dart:272:17: Error: No named parameter with the name 'onRatingChanged'. …
Alex Ali
  • 1,339
  • 5
  • 23
  • 34
5
votes
4 answers

How to fix - Name non-constant identifiers using lowerCamelCase

I have created a flutter application and added a custom theme data (themes.dart) Now everything works fine when I run it but I keep getting the error (Name non-constant identifiers using lowerCamelCase.) I'm not really sure why it is complaining…
Jaser
  • 245
  • 1
  • 7
  • 21
5
votes
2 answers

Dart pub.dev published plugin, broken images in README.md

I published a plugin on pub.dev and also on GitHub, I have 2 screenshots displaying in README.md from Github link. These are fine on Github but are broken on pub.dev. I tried all approaches but still the same. Screenshot# 01 | …
Shahzad Akram
  • 4,586
  • 6
  • 32
  • 65
5
votes
0 answers

Firebase Authentication error in Flutter Web

I am getting the error Expected a value of type 'String', but got one of type 'AssertionErrorImpl' while attempting to sign in using the FirebaseAuth. Below is my code: AuthResult result = await…
5
votes
2 answers

How to parse ICalendar format in Dart?

I need to parse iCal format in Flutter and I don't find any package for do it. Someone can tell me if it exist any solution for solve my problem?
5
votes
1 answer

NoSuchMethod in dart?

Getting warning while trying to use noSuchMethod(). The method missing isn't defined for the class Person. But according to the docs and other examples, whenever we call a non-existing member then, noSuchMethod() should be called. Whose default…
Shubhamhackz
  • 7,333
  • 7
  • 50
  • 71
5
votes
1 answer

Dart - getting start - missing step - how to install pub

I'm trying to get started and setup to develop Dart. I'm following the instructions on https://webdev.dartlang.org/guides/get-started to install on Linux. However there seems to be an essential step missing. On the above link, step 2 is about…
Magick
  • 4,603
  • 22
  • 66
  • 103
5
votes
2 answers

How can I logout of Dart Pub CLI?

I published a package and logged into the wrong account. I corrected the uploaders by using flutter packages pub uploader add flutter packages pub uploader remove But now when I try to push an update I am…
Jacob Phillips
  • 8,841
  • 3
  • 51
  • 66