When i try to implement scoped model, i get this error message:
[flutter_course] flutter packages get
Running "flutter packages get" in flutter_course...
Creation of temporary directory failed, path = 'C:\Program Files\flutter.pub-cache_temp\dir' (OS Error: Access is denied.
, errno = 5)
name: flutter_course
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
scoped_model: ^1.0.1
dev_dependencies:
flutter_test:
sdk: flutter
Get is one of the commands of the pub tool. $ dart pub get [options] This command gets all the dependencies listed in the pubspec. yaml file in the current working directory, as well as their transitive dependencies.
FYI: You can delete the pub cache manually. Pub will redownload the needed packages on the next pub get.
Enable in your windows settings the Developer Mode.
Turning on developer mode solved my issue on Windows 10.
flutter pub cache repair
.flutter pub get
.This worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With