Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] flutter – Target of URI doesn’t exist: ‘package:flutter_bloc/flutter_bloc.dart’. Android Studio

Posted on November 11, 2022 By

Solution 1 :

You should also add flutter_bloc package to the pubspec.yaml file which makes it easy to use blocs and cubits.
and then run flutter pub get to get the package.

Problem :

I created a brand new flutter project, I added bloc: ^8.0.3 and equatable: ^2.0.3 to pubspec.yaml file, I just imported import 'package:flutter_bloc/flutter_bloc.dart'; in the main file, and it gives me the above error Target of URI doesn't exist: 'package:flutter_bloc/flutter_bloc.dart'.

I added a cubit file and imported import 'package:bloc/bloc.dart'; and no problem happened after importing, I can summarize that 'package:bloc' and 'flutter' exist, but the 'flutter_bloc' not exist, and don’t know why, even I tried a lot of solutions like deleting pubspec.lock and .packages and run command flutter pub get, and disable include: package:flutter_lints/flutter.yaml, but the problem not solved

Comments

Comment posted by mohamed.oussous

you need to add flutter_bloc, in terminal run flutter pub add flutter_bloc

READ  [FIXED] Error XF001: Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s)
Powered by Inline Related Posts
Android Tags:android-studio, bloc, flutter, flutter-bloc

Post navigation

Previous Post: [FIXED] android – How to detect when third party app’s dialog box appears in React native?
Next Post: [FIXED] android – Get the list of user SIM cards and select it – flutter

Related Posts

[FIXED] Xamarin Android take a photo with an intent without the Retry OK Android
[FIXED] android – How to remove padding for the bottom line of the TextInputEditText Android
[FIXED] java – RxJava execute Completable after Single asynchronously Android
[FIXED] Need help parsing this type of json in Android using retrofit for API response handling Android
[FIXED] in app billing – Android – proper way to create paid version of currently free app Android
[FIXED] How to do Android application testing on Slow Internet on a real Device? Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What are the main features of Islamic education?
  • Is the Jeep 4xe worth it?
  • How does the ringer work on cast iron?
  • What is the biggest size interior door?
  • Is blue raspberry an original Jolly Rancher flavor?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme