Questions tagged [pubspec.yaml]
46 questions
2
votes
2 answers
Error 'Undefined name View' and 'No named parameter with the name view' when building project with Screenshot 2.0.0
I'm using screenshot: 2.0.0 and I'm getting this error when I try to build my project.
: Error: Undefined name 'View'.
screenshot.dart:154
context == null ? fallBackView : View.maybeOf(context) ?? fallBackView;
…

PeeyushKulgude
- 21
- 1
2
votes
1 answer
What is the best way to add flutter dependencies?
We can add flutter dependencies by the following ways. I want to know which one is efficient and also the differences between the following ways
'cupertino_icons: ^1.0.2' // What's the use if we use version number
'cupertino_icons: ' //…

Anand
- 4,355
- 2
- 35
- 45
2
votes
1 answer
Using preview package of hydrated_bloc
I want to use the 9.0.0-dev version of the hydrated_bloc package.
If I run pub get on my pubspec.yaml:
dependencies:
flutter:
sdk: flutter
hydrated_bloc: ^9.0.0-dev.3
I get the message Latest available version is: 8.1.0
How can I get the…

Talionderhobbit
- 43
- 6
1
vote
0 answers
In flutter having this problem "A problem occurred configuring project ':video_player_android'. "
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':video_player_android'.
Could not load compiled classes for build file…

Ibrahim Tinku
- 141
- 1
- 1
- 10
1
vote
1 answer
Flutter - How to check if a package in pubspec.yaml is in use?
I have imported different packages during the development process to pubspec.yaml's dependencies section. Currently I am not using some of them, but not sure which ones. Is there an easy way to check if a package is used in any of the files?
Should…

yavuzyal
- 13
- 4
0
votes
1 answer
flutter pub get command get dependencies I didn't put it in pubspec.yaml
i try to delete the cache of dependencies and i get same problem and some time call dependencies which i use it in another project like firebase or another dependencie. i notied that happen after the update of flutter sdk.
this image what i have in…

Yous y
- 41
- 6
0
votes
1 answer
Reference package via git in pubspec.yaml does not work in Azure build pipeline
I have two flutter projects. A package and an executable. Each of them is in a different git repository on different projects (within the same organization) on Azure DevOps.
I reference the package from the executable in the pubspec.yaml file like…

Andi
- 169
- 1
- 9
0
votes
1 answer
Firebase Classes Not found
In my flutter project, I have added the firebase_core and firebase_messaging packages to pubspec.yaml but the import statement
import 'package:firebase_core/firebase_core.dart'
throws the error below:
Target of URI doesn't…

Joseph Ofem
- 304
- 2
- 15
0
votes
0 answers
The argument type 'QrImage' can't be assigned to the parameter type 'Widget?'
The argument type 'QrImage' can't be assigned to the parameter type 'Widget?'.
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('QR Code Generator'),
),
body: Center(
child:…
0
votes
1 answer
Flutter error on custom font : 'Error on line 78, column 4: Expected a key while parsing a block mapping.' in pubspec.yaml
i'm new to flutter and I face a new error when i was trying use a custome font. I see the official docs and even try to copy the codes structure from there, but it doesn't work either.
here is the error : "Error on line 78, column 4: Expected a key…

Rezam
- 7
- 3
0
votes
0 answers
i can not add flutterfire_ui Because every version of flutterfire_ui depends from sdk which depends on intl 0.18.0
when i try to add flutterfire_ui i get this massage
Because every version of flutterfire_ui depends on flutter_localizations from sdk which depends on intl 0.18.0, every version of flutterfire_ui requires intl 0.18.0.
So, because fresume_app…

Alzubair Faiz
- 13
- 4
0
votes
0 answers
Error: The lower bound of "sdk: '>=2.7.0 <3.0.0'" must be 2.12.0' or higher to enable null safety
Help please.
I get the error in the title when trying to run the app.
My dart version is 3.0.3 and here is the content of the pubspec.yaml file:
version: 1.15.1+1
environment:
sdk: ">=2.12.0"
dependencies:
flutter:
sdk: flutter
…

cresentlove222
- 11
- 4
0
votes
0 answers
how to update pubspec.yml file
name: foodie_driver
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.2.2+10
environment:
sdk: ">=2.13.4 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase_messaging:…
0
votes
0 answers
Using path parameter under another dependency in pubspec.yaml
In one of the projects, I found a path in pubspec.yaml that refers to another dependency. What in this case defines this parameter (obviously the path) and how to read this pattern ../../../ ?
dependencies:
flutter:
sdk: flutter
rxdart:
…

rozerro
- 5,787
- 9
- 46
- 94
0
votes
0 answers
How can I resolve the camera_avfoundation not found error when building a Flutter camera app with Xcode?
When I build a camera app made with Flutter in Xcode, it keeps saying that camera_avfoundation cannot be found. So, as shown below, I installed the dependency in pubspec.yaml and performed flutter pub get, and when I applied the same dependency to…

kmsong
- 1
- 1