dart-pub

Error: No named parameter with the name 'onRatingChanged'

♀尐吖头ヾ 提交于 2020-06-14 07:55:13
问题 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'. onRatingChanged: (rating) { ^^^^^^^^^^^^^^^ ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/smooth_star_rating-1.1.0+1/lib/smooth_star_rating.dart:23:3: Context: Found this candidate, but the arguments don't match. SmoothStarRating({ ^^^^^^^^^^^

How do I run a private pub server while still referencing packages from pub.dartlang.org?

混江龙づ霸主 提交于 2020-01-12 15:30:09
问题 Assuming that I'm running my own instance of pub-dartlang for a private pub feed; how do I indicate in pubspec.yaml which packages come from the private feed vs pub.dartlang.org? 回答1: You can set the environment variable PUB_HOSTED_URL so it points to your custom pub repo server. This way pub loads all packages which don't have a server specified from this server. You can define exceptions in pubspec.yaml like dependencies: transmogrify: hosted: name: transmogrify url: http://some-package

How do I run a private pub server while still referencing packages from pub.dartlang.org?

柔情痞子 提交于 2020-01-12 15:28:31
问题 Assuming that I'm running my own instance of pub-dartlang for a private pub feed; how do I indicate in pubspec.yaml which packages come from the private feed vs pub.dartlang.org? 回答1: You can set the environment variable PUB_HOSTED_URL so it points to your custom pub repo server. This way pub loads all packages which don't have a server specified from this server. You can define exceptions in pubspec.yaml like dependencies: transmogrify: hosted: name: transmogrify url: http://some-package

How to add a neon glow effect to an widget border / shadow?

孤者浪人 提交于 2020-01-04 04:56:08
问题 Is there any way to create effects like these using flutter (a CustomPaint with a special shadder or something like this)? For example. I have this container and I drew some lines on it using a CustomPainter. Could I draw these lines using a neon effect just like the pictures? The Paint class has a shader property that I thought I could set up to achieve this goal, but I don't realize how. Container( color: Colors.white, width: 300, height: 300, child: CustomPaint( painter: NeonPainter(), ),

What's the difference between pub dependencies and dev_dependencies?

大城市里の小女人 提交于 2019-12-30 09:30:15
问题 What is the difference in dependencies and dev_dependencies in a pubspec.yaml ? It seems that when I run pub get the dev_dependencies aren't downloaded. 回答1: dev_dependencies are only used when you run pub get / pub upgrade for the package directly where they are in the pubspec.yaml . dev_dependencies of dependent packages ( dependencies or dev_dependencies ) are always ignored. Hence dev_dependencies are only relevant to tasks relevant to development (test, tool, example,... ) of your

After running CDE I can't build sample polymer app in dart editor

左心房为你撑大大i 提交于 2019-12-25 14:07:50
问题 file:/C:/Users/Dave/dart/td2/build.dart build.dart returned error code 255 Unhandled exception: Uncaught Error: FileSystemException: Cannot open file, path = 'C:\Users\Dave\dart\td2\packages\args\args.dart' (OS Error: The system cannot find the file specified., errno = 2) Stack Trace: #0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349) #1 _RootZone.runUnary (dart:async/zone.dart:1151) Dart editor was working fine with a polymer app that I was developing previously. I have rebooted,

How to test dart pub lib package before deploy?

戏子无情 提交于 2019-12-25 01:44:46
问题 what is the best way to test a pub lib package before deploy, as if I had downloaded it via pub install? (not talking about unit tests) 回答1: You can use path packages. Instead of going through a pub server this will fetch the package from the local filesystem. 回答2: It very much depends on the type of package you are looking to use. If the pub package is primarily a non-UI library then you should be able to exercise its API via a UnitTest script, a small script that has a main to kick off a

dart error - could not start pub serve or connect to pub

穿精又带淫゛_ 提交于 2019-12-24 10:35:31
问题 I'm trying to run this drag and drop API. When I try to run the dart file (with the dart editor) I get the following error: could not start pub serve or connect to pub . I'm not very familiar with dart. Where's my error? 回答1: Either you have another service listening on port 8080 (there is an open issue to make the port pub serve is using configurable) or there is already a pub serve instance running (I had this occassionally, that pub serve kept running after DartEditor crashed). If it is

What are the return codes for the Dart pub tool

六眼飞鱼酱① 提交于 2019-12-24 04:55:08
问题 I'm going to be launching "pub get" and "pub build" iteratively in a batch file, and I need to test the return codes for errors. The return codes don't seem to be documented in the Dart docs. Does anyone know what they are, or where they're documented? 回答1: I found these: search in pub.dart for 'exit_codes' to see which constants are used the constant values are defined here: (copied from exit_codes.dart) // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for

Dart import packages not working

强颜欢笑 提交于 2019-12-24 01:59:08
问题 Having an issue with importing packages in Dart now, the project was working yesterday but has stopped today and I have no clue why, the code hasn't changed all weekend and I don't recall running any updates. The problem exists with anything with the "package:" url. For example both of these are broken in my project: import 'package:args/args.dart'; import 'package:crypto/crypto.dart'; The error message for these is: Unhandled exception: Uncaught Error: FileSystemException: Cannot open file,