FAQ Database Discussion Community


Retrieving the selected item in a paper-element dropdown

dart,dart-polymer,paper-elements
I have the following code following the examples at https://github.com/dart-lang/polymer-core-and-paper-examples/blob/master/web/paper_dropdown.html and https://github.com/dart-lang/polymer-core-and-paper-examples/blob/master/web/paper_dropdown.dart EDITED .html <paper-dropdown-menu label='Click to select..' on-core-select='{{onCoreSelectCountryHandler}}'> <paper-dropdown class='dropdown'> <core-menu id='country' class='menu'> <template repeat='{{country in countries}}'>...

How to remove diacritics (accents) from a string?

string,dart,diacritics,unaccent
I'm trying to convert some strings that are in Czech, Spanish, French etc. I'd like to take out the accent marks in the letters while keeping the letter. (E.g. convert é to e, č to c, Ž to Z, ñ to n) What is the best way to achieve this?...

Setting up play framework and dart for development and debug

eclipse,playframework-2.0,dart,dart-pub,typesafe-activator
I'm developing a relatively simple web app using play framework for the server and dart for the client. I'm using eclipse. Development and debug are fine on their own but how do to get them to work together? Play has its own web server (activator) that knows how to load...

Direct access to @observable variable from other object

dart,dart-polymer
Is it ok to access @observable variable directly from other object, without making it @published and defined as polymer element attribute? For example, I have a custom element, defined without any data binding: <my-element id="my"></my-element> and, on response to some external event in it's parent element, I can do something...

How to debug a Dart client Side application using IntelliJ Idea Community Edition?

debugging,intellij-idea,dart
I would like to know if it is possible to debug a client side web application using IntelliJ Idea 14.1+. Until the moment I only have found some tutorials for Webstorm and IntelliJ Idea Ultimate Edition....

Set custom header in Dart's HttpRequest

dart,httprequest
I need to set a custom header in my HttpRequest in order to use encryption in an S3 bucket. The header which I want to set the header x-amz-server-side​-encryption​-customer-algorithm but I always get an SyntaxError: An invalid or illegal string was specified. 'x-amz-server-side​-encryption​-customer-algorithm' is not a valid HTTP header field...

Callback in Dart when the page is fully loaded

javascript,html,dart,polymer
You may know that I totally fell in love with Dart and Polymer and once again, I have a question addressing those two technologies. My application is a fairly compex polymer app written in Dart. There are some sort of "pages" whereas a page is shown once the user performed...

Is it possible to change the default build directory in Dart?

dart
When I run pub build, pub puts the compiled app into build/web. Is it possible to configure my pubspec.yaml file to change the default output directory to, say, prod? EDIT: I'm trying to avoid having to use the --output switch each time....

How can I tell the dartanalyzer what kind of Element the selected object is?

object,syntax,types,dart
I have the code if(querySelector('#username').value!="") and it is working. But Darteditor warns me, that the getter 'value' is not defined for the class 'Element'. I know, that what the querySelector returns is an InputElement and therefore, my question is only for reasons of beauty and to remove the warnings. How...

Cross-Domain issue in Chrome possibly b/c of strange Dart HttpRequest behavior

ajax,google-chrome,amazon-s3,dart,cors
I know guys, there are tons of questions about the Amazon S3 Buckets and CORS. But please, let me add mine. So I'm writing an application in Dart and I am performing an ajax request to a resource which is hosted on S3. I originally wanted to grab the first...

Polymer - paper-input floating label color

html,css,dart,dart-polymer,paper-elements
How can i change color of focused floating label in polymer? Thanks for answers....

Abstract methods in Dart

inheritance,dart,dart-editor,abstract-methods
I'm implementing an inheritance hierarchy in which derived-class construction consists only of a call to the base-class constructor. The base-class constructor then calls method(s) implemented only in the derived-class. I have a basic implementation, but DartEditor of course complains about the missing methods in the base class. How can I...

postgresql open connection and execute more then one command

postgresql,dart,dart-async
I want to do the following two insert operations using the postgresql driver for dart. The code below works! INSERT INTO posts( title, description, posted_at, last_edited, "user", editor, up_votes, down_votes, flag, links_to) VALUES ('test title', 'test description', now(), now(), 'dartUser', 'dartUser', 0, 0, 'healthy', 'http://google.com'); INSERT INTO atatched_tags( post_id, tag)...

Polymer Dart, global variables and data bindings (observable)

dart,dart-polymer,shadow-dom
I read Polymer API developer guide, but unfortunately it has examples only for JavaScript developers. Some examples I try to port into Dart, but in this case I get fail. Please, go to https://www.polymer-project.org/0.5/docs/polymer/polymer.html#global (Section Supporting global variables). Here is a clip from the documentation: elements.html <polymer-element name="app-globals"> <script> (function()...

Can I have two apps in one webpage in Dart + polymer?

dart,dart-polymer
I have a dart + polymer app, which I have uploaded to my home page. The entry point is not index.html. It works fine. I have now developed a home page, index.html, again in polymer and dart. Essentially, it's another app of course. It's n the same top level folder...

Dart Polymer: Creating PaperDialog with CoreAnimatedPages displayed incorrectly in Firefox

firefox,dart,polymer
I use Dart Polymer PaperDialogs containing CoreAnimatedPages. The idea is to have popups in which you can click through multiple option views. Example repository available at: https://bitbucket.org/neogucky/polymer-dialog-problem/ DialogView: view.html <link rel="import" href="packages/polymer/polymer.html"> <link rel="import" href="packages/paper_elements/paper_button.html"> <link rel="import" href="packages/paper_elements/paper_dialog.html"> <link rel="import"...

Failed to load dartium when running test

dart,dart-html,dart-unittest
I'm running dart test using test library. pub run test -p dartium When this command is executed I'm getting below error, I have dartium and dart sdk downloaded and in system path. Failed to start Dartium: No such file or directory Command: dartium --user-data-dir=/tmp/dart_test_cwDGGO ...

Order by query using dart and postresql

postgresql,dart
When running this query using dart and the postresql driver getPost(int limit, int offset, String order_by){ connect(uri).then((conn){ conn.query('''select * from posts order by @order_by limit @limit offset @offset''', {'limit': limit, 'offset': offset, 'order_by': order_by}) .toList() .then((rows){ print(rows); }) .whenComplete(() => conn.close()); }) .catchError((err) => print('Error in getPost: $err')); } I...

Using dart discoveryapis_generator on webapp?

dart,google-cloud-endpoints
Can't use my model file generated with the discoveryapis_generator. It ask for a http.client to be used, but it's from dart:io, and i m trying to use it in a web app static YoupipeApi api = new YoupipeApi(new http.Client()); //cant work on webapp Failed to invoke tokenLoaded callback: Unsupported operation:...

Error 42703 when connecting to postgresql database with dart

postgresql,dart
To test my connection to the database I wanted to simply add some hard coded data to one table. Here is my approach. In the main.dart file there are only 2 problem related rows DatabaseUtility dbUtil = new DatabaseUtility('postgres', 'kewoziwa', 'auctionDB'); dbUtil.insertIntoUsers({'login': 'dartUser', 'password': 'passMePlease'}); In the first row I...

Does the dart VM impose restrictions on the stack memory size of a native extension?

c,memory,dart,dart-native-extension
I'm learning to write a native extension and I noticed an odd occurrence. When I allocate a multidimensional array and access it like so: (excuse any messy C code and bad practices I might be using unless they're likely the cause of my error. My C is not-so-great) int table[rows][cols];...

Block until field is initalized

dart
trying to block the execution within a setter until the filed value changes and i know that it will change within a few microseconds, to demonstrate the problem i wrote: import 'dart:async'; void main() { new Timer.periodic(new Duration(seconds:1),(t)=>print(Store.x)); new Timer.periodic(new Duration(seconds:3),(t)=>Store.x='initalized'); } class Store{ static String _x = null; static...

How to use multiple isolates to serve requests

dart,dart-io,dart-isolates
How can a Dart server be set up to use all available cores for in coming requests (e.g. by using multiple isolates to serve requests)?

convert HttpHeader to Map

http,http-headers,dart
When using dart on the browser (no dart:io) is there a ready to use way, to convert the string returned by req.getAllResponseHeaders(), where req is a HttpRequest, into a dart Map. I was a bit surprised by the fact that there is no ready method here, since all http related...

dart wait for inner Future

mysql,dart
I'm trying to execute some queries which have a reference as foreign keys on each other, so I have to wait until the outer future is finished. This algorithm is placed inside a function which returns a future. Future<List<int>> newEntry(Session session) { bool success = true; List<int> error = Helpers.formatJsonAndEncodeUtf8(...

Dart Mirrors in JS: type '_ListConstructorSentinel' is not a subtype of type 'int'

dart,dart-mirrors,dart2js,dart-sdk
The following code executes fine on the VM, but fails with "'_ListConstructorSentinel' is not a subtype of type 'int'" when converted to javascript via Dart2JS. I'm using "pub run test -p chrome " to run the code. import "dart:mirrors"; main() { TypeMirror tm = new TypeToken<List<String>>().typeMirror; (tm as ClassMirror).newInstance(const Symbol(""),...

How to access detail from core-signal event in polymer.dart?

dart,dart-polymer
I am working on a web app in polymer.dart. When I use core-signal, I am unable to access the detail. Here's some of the code that I'm using... main_app.dart class MainApp extends PolymerElement { onClick(Event event, var detail, Node sender) { print('button clicked'); fire("core-signal", detail:{'name':'button-click', 'data':0}); } ready() { super.ready();...

Add extra headers to websocket connection from browser in Dart

security,authentication,websocket,dart,dart-html
I'm trying to establish an authenticated websocket connection, and this question is a sibling to similar question for server part. How I can add extra headers when I establish a websocket connection from browser? I'm trying to use dart:html's WebSocket object to connect to server requiring a header authentication: containing...

Resize when selecting inside the dialog

dart,polymer,paper-elements
resizeable_dialog.html <link rel="import" href="../../packages/polymer/polymer.html"> <link rel="import" href="../../packages/paper_elements/paper_dialog.html"> <link rel="import" href="../../packages/paper_elements/paper_button.html"> <link rel="import" href="../../packages/paper_elements/paper_tabs.html"> <link rel="import" href="../../packages/paper_elements/paper_tab.html"> <link rel="import" href="../../packages/paper_elements/paper_icon_button.html"> <link rel="import"...

Refuse to load JS in Dart

javascript,dart,google-chrome-app,content-security-policy
In my web page for Dart amount this script: <script src="https://test.net/test/test.js"></script> but when you launch the application it gives me the following error: Refused to load the script 'https://test.net/test/test.js' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src'...

How to develop a Dart library locally?

dart,dart-pub
I might be having a mental eclipse, but it's hard for me to do the simplest thing: write a simple library and use it. (I want to do this all locally, without publishing the library, etc.) I've browsed through the list of pub commands and none seems to install a...

What is the best way to set the default instance for a final private field with optional parameter?

dart
Given a class with final private field _bar: class Foo() { final Bar _bar; Foo({Bar bar}) : _bar = bar { //error: list cannot be used as setter, it is final _bar = new Bar(); } } Attempting to set it in the parameter list results in this error //error:...

Dart: Create method from string

javascript,dart
I've been trying to create methods dynamically from strings using Dart to no avail. String example: "(String str) => return str.length;". The idea is to allow users to create their own functions to apply to a given string. The only thing I've found is NoSuchMethod which does not seem to...

Make function to return custom stream

dart,dart-async
Is it possible to create a function that returns a custom stream and handles it like this? user.logIn('owner', '1234') .listen( success (Object user) { print(user); }, error: (Object user, Object error) { print(error); } ); ...

incompatibility when running dart rpc and shelf (with shelf_rpc) related to headers which are lists (and not Strings)

dart,dart-shelf
incompatibility when running dart rpc and shelf (with shelf_rpc) related to headers which are lists (and not Strings). It seems that there is an incompatibility when running dart rpc and shelf (with shelf_rpc) related to headers which are lists (and not Strings). Error thrown is ( for shelf[0.5.7], shelf_rpc[0.0.3], rpc[0.4.2]:...

Stuck with initialize package (Dart)

dart
I have been trying this the whole day: I use initialize in several places in my library and then I have some example code in several HTML+Dart files. For one set of html+dart it works for another it does not - it simply never calls the init methods even when...

How to run a Dart Console Application?

dart
I just follow https://www.dartlang.org/docs/dart-up-and-running/ch01.html to run a Dart console application,but the result is ‘HTML file could not be found’.

Sum of integer values of a Future

dart,future,dart-async
I'm trying to parse a HTML document, get all the image-sources and then add the size of all pictures together. Parsing the document works fine, so does getting the image-sources and getting their size. main(){ print("Please input an URL"); var url = stdin.readLineSync(); getImageUrls(url).then((list) { list.forEach((imageUrl) { getImageSize(imageUrl).then((r) { print("$imageUrl,...

In the dart:io library, why would one want to set runInShell: true when calling Process.run?

shell,process,io,dart
What functionality does this offer? Furthermore, how does the process get called when runInShell is set to false? What's the difference?

Can I force unoptimal logical condition checking?

dart
Is it possble to change the whay the logical or || statement is executed in dart. For example. I have the functions foo() and boo() which have a return type of bool. If i write (foo() || boo()) ? /* A */ : /* B */; and foo() returns true...

Using resumable.js from Dart

dart,dart-js-interop,resumablejs
I am trying to use resumable.js from Dart with this code: var rs = new JS.JsObject(JS.context['Resumable'], [new JS.JsObject.jsify({ 'target':context.server+'/upload' })]); files.forEach((file) { rs.callMethod("addFile",[file]); }); files variable is defined as List<File> (dart.html.File). When I check properties of rs object with these two lines: JS.context["console"].callMethod("log",[rs['opts']]); JS.context["console"].callMethod("log",[rs['files']]); I find that rs.opts are initialized...

using dart route package url got error 404

routes,dart
Here's my main.dart: import 'dart:html'; import 'package:route/client.dart'; import 'urls.dart'; void main() { var router = new Router() ..addHandler(homeUrl, showHome) ..addHandler(galleryurl, showGallery) ..listen(); HttpRequest.getString("home.html").then((html){ querySelector("#container").innerHtml = html; }); } void showHome(String path){ HttpRequest.getString("home.html").then((html){ querySelector("#container").innerHtml = html; }); } void showGallery(String path){ HttpRequest.getString("gallery.html").then((html){...

Determine browser's default text highlight color using JavaScript or Dart

javascript,html,css,browser,dart
The browser's default text highlight (selection) background color can be overridden, e.g.: ::selection { background: #ffb7b7; } And the color is browser/OS specific. Is there a way to read the browser's default value using JavaScript or Dart?...

Error 42601 using postgresql and dart

postgresql,dart
I get the error 42601 when using postgresql I created the table using pgAdmin. The autogenerated code looks as follows. -- Table: posts -- DROP TABLE posts; CREATE TABLE posts ( post_id bigserial NOT NULL, title character varying(150) NOT NULL, description character varying(500), posted_at timestamp with time zone, last_edited timestamp...

Dart Pirate Tutorial Doesn't Download JSON after build (step 7)

asynchronous,dart
I did the Google Dart tutorial (pirate name badge: https://www.dartlang.org/codelabs/darrrt/) all the way through and it ran exactly as expected until I hit step 7 where I run the build on my normal browser. What happens is the page loads, but it never seems to complete the async download of...

Dart equivalent of Array.prototype.map()?

javascript,arrays,dart
I try to get the id's from List of Maps in Dart. In JavaScript it would be something like this: var list = [{id:3, name:'third'}, {id:4, name:'fourth'}]; var result = list.map(function(x){return x.id;}); This should give the result [3, 4] Is there a simple way of doing this in Dart? So...

How to test Dart Polymer elements using the new Test library?

unit-testing,testing,dart,dart-polymer
How do you test Polymer elements using the new test library? Using the new test library to test a Dart Polymer element, I build my_element_test.html as prescribed. Please see my repo: polymer-dart-testing. No Polymer Initiation Passes my_element_test.html and my_element_test.dart (commenting out Polymer initiation) passes tests as expected: my_element_test.html <!doctype html>...

How to create json encodable classes in dart

json,dart,to-json
This question is related to this post. I tried the following code: import 'dart:convert'; /*server side Post class */ class Post { int post_id; String title; String description; DateTime posted_at; DateTime last_edited; String user; String editor; int up_votes; int down_votes; int total_votes; String links_to; List<String> tags = new List(); Post.fromSQL(List...

Listening for event in Dart via JQuery “on” with dart:js

jquery,dart,bootstrap
I use dart call bootstrap modal window,and I want register a callback function ,but found the same problem other person mentioned before. here is jQuery code: $('#myModal').on('hidden.bs.modal',function (e) {....}) How can I write the same code in dart with dart:js, because package:js is deprecated; so I can't use callback function...

does exist a Dart plugin for Netbeans?

netbeans,dart,netbeans-8
The only information about creating a dart plugin from netbeans is this one: https://blogs.oracle.com/geertjan/entry/dart_and_netbeans_ide_7 Was this plugin ever created? where is the Soruce Code? Is there any other plan to integrate Dart to Netbeans?...

On which version is based Polymer Dart?

dart,polymer,dart-polymer
What the version Dart Polymer use (of the original Polymer project, eg 0.5 or 0.8 etc)? And where can I see it? I mean on which version Polymer.dart is based concerning the mainstream Polymer.js. For example recently Polymer (JS version) released 0.8 version with some breaking changes and features. I...

Type Error when using JwtSessionHandler - dart

types,dart,jwt
I have a problem with the dart types when using the JwtSessionHandler. I wanted to integrate user authentication and sessions using this example application from the shelf_auth git repository as a guide. Unfortunately I get an error when running the application (no syntax errors are detected before running the application)...

Dart - Polymer Unit Testing. Not able to reference dom elements after click event

dart,polymer,dart-polymer
Not able to reference dom elements. Most of the test case works except for the last expectation in ClickSignInButton when I want to make sure I can evaluate error message div when form is submitted without any data. expect(document.querySelector('qme-header').shadowRoot .querySelector('#headerErrorDiv'), isNotNull); always fails and headerErrorDiv is null even though its...

JsFunction.apply doesn't work while JsObject.callMethod does work (dart)

javascript,dart,dart-js-interop
I have this often, that JsFunction.apply doesn't work like I would expect. Consider this example: import "dart:js"; import "dart:html"; void main() { var div = querySelector('div'); var span = new SpanElement()..text = "hello world"; var js = new JsObject.fromBrowserObject(div); js["appendChild"].apply([span]); // this one does work: // js.callMethod("appendChild", [span]); } I...

Add delete item button - ToDo App - Dart

dart
I'm very new to dart, so don't judge me. :)) I just started to write a simple ToDo App in Dart. I want to add a button to the item, so i can delete it from the list. I add the button successfully, but don't get the click event working....

Questions about using Futures and Completers

dart,dart-async
Hey have I read all I can find about futures, but I would like some more advice on proper usage. I am writing an API library, that bridges the gap between HTTP Requests and the app. So I use the future returned by HTTP in most cases, however sometimes the...

Why doesn't the dart2js compiler convert 64-bit integers to IEEE 754 FP numbers?

javascript,integer,dart,precision
I've been reading that the dart2js compiler doesn't support 64 bit integers. Is this because javascript doesn't have a representation for 64-bit integers and stores all numbers as 64-bit double precision values? If so, couldn't integer values simply be converted to the representation? If that is not the case, why...

Dart Polymer: Removing element from List

data-binding,dart,polymer,dart-polymer
I have a custom element with some models. Here is the code for custom element. message-element.html <polymer-element name="message-element" attributes="message"> <template> <table class="table"> <tr template repeat="{{attrib in attribs}}"> <td><paper-input name="message-attrib-name" label="New Attribute" value="{{attrib.name}}"></paper-input></td> <td> <paper-input name="message-attrib-value" label="" value="{{attrib.value}}"></paper-input> <core-icon-button...

Dart data binding from a parent custom element to attributes of a child custom element

dart,dart-polymer
Here is a problem that cropped up today when I updated to the latest Dart libs. The child custom element is a combo box. The parent custom element fills it with a varying list of strings. // child HTML <polymer-element name="bx-icombo" attributes="aLabel aList aSelected"> <template> <div class='outr' flex layout horizontal...

Dart: pub build minified dart.js missing

dart,dart-pub
I am very new to Dart so bear with me. I completed the sample pirate badge project and did Pub Build - Minified as instructed. The generated build folder does not contain the packages/browser/dart.js and priatebadge.dart files that are referenced by piratebadge.html. When I view in the browser there are...

Incompatibility between the Dart shelf and rpc packages? ('access-control-request-method' header)

dart,dart-shelf
There seems to be an incompatibility between the shelf and rpc packages. In rpc [0.4.1] config/api.dart: The handleHttpOptionsRequest expects the 'access-control-request-method' header to be a List: Future<HttpApiResponse> handleHttpOptionsRequest( ParsedHttpApiRequest request) async { var requestedHttpMethods = request.headers['access-control-request-method']; List<String> allowed = []; assert('OPTIONS'.allMatches(request.methodKey).length == 1); if (requestedHttpMethods != null) { requestedHttpMethods.forEach((httpMethod) {...

compiled dart code not running in IE 10 and IE 11

dart,internet-explorer-10,internet-explorer-11,dart2js
I am having trouble with a small dart app which runs perfectly fine in Chrome and Firefox and... guess what.... not in IE 10 and 11 (Project Spartan in Win10 Preview works!). It is a simple UI controll logic like so: ... //init elements SelectElement studyList = querySelector('#studies'); SelectElement roleList...

Set selected of Paper-Tabs

dart,dart-polymer,paper-elements
I am trying to select a paper-tab based on it's data-id attribute. I have the element but I cannot changed to selected property of the inner_tabview. I have a Polymer: <paper-tabs id="inner_tabview" noink="true"> <template repeat="{{item in tabNames}}"> <paper-tab data-id="{{item['id']}}"><h3>{{item['name']}}</h3></paper-tab> </template> </paper-tabs> And some Dart code behind it: selectTab(itemId) { PaperTab...

Dart pub get generates link to packages in each folder and subfolders

dart,dart-pub
I try to avoid Dart to generate symbolic links (to packages) in each folder/sub-folder. For example, in pubspec.yaml I add polymer package and run pub get. After that I got: Now each folder has packages symbolic link! As I understand it's because to ensure that we can use package:.. statement...

How to receive data from an Iframe in Dart?

iframe,dart,postmessage
I know that the only way to communicate with an iframe is using the postMessage method as follow: iframe.contentWindow.postMessage("my message", window.location.href); but I would like to know how to receive data from the iframe after any change on it....

Dart, NoSuchMethodError: method not found: 'options' when using CommandRunner

dart,command
Using the example here: http://www.dartdocs.org/documentation/args/0.13.0/index.html I'm trying to write a command line app, but I get NoSuchMethodError: method not found: 'options' when I try to use this example code. Why isn't options defined for the Command subclass instance? If I'm not supposed to use options then what am I supposed...

How convert Dart to JS?

javascript,dart
The dart app run fine in Dartium, but I would like to convert it to JS. C:\dart-sdk\bin\dart2js --out=test.js main.dart generates JS from: import 'dart:html'; void main() { querySelector('#myid').text = 'Wake up, sleepy head!'; } Then I add it to the : <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="test.js"></script> </head>...

Dart import package:polymer/polymer.dart error

dart,dart-polymer,dart-pub
I'm trying to create my own element with Polymer, but i can't import polymer package. Why it throws error: "Target of URI doesn't exist"? In Tools Output window I found 404 error. And my pubspec.yaml: name: polymer1 description: A sample web application dependencies: browser: any polymer: ">=0.15.1 < 0.17.0" ...

Why Dart Polymer inlines/vulcanize main css file into tag?

dart,dart-polymer,dart-pub
web/templates/ui-elements.html <polymer-element name="app-element"> <template> <link rel="stylesheet" href="/main.css"/> <div class="classes from main-css file"></div> <content></content> </template> <script type="application/dart" src="ui-elements.dart"></script> </polymer-element> <polymer-element name="ui-icon" attributes="name" noscript> <template> <link rel="stylesheet" href="/main.css"/> <span class="fa...

Weird DartEditor behavior / bug?

dart,dart-editor
I'm working on a little website using dart. I have one project for the server, and another for the client app (see picture below) In the server app I serve the client app from the client project like this runServer() { var staticHandler = createStaticHandler(r"C:\Users\Lukasz\dart\linkShepherdClient\web\", defaultDocument: 'linkShepherd.html',serveFilesOutsidePath: true); var handler...

Google Cloud Messaging in dart

dart,google-chrome-app,chromium,chrome-gcm
I'm trying to connect to the Google Cloud Messaging with this code in dart senderIds.add("api-project-testid"); chrome.gcm.register(senderIds).then(registerCallback); but I have this error: Exception: Uncaught Error: Profile was not signed in. I think that the error arises from the fact that chromium is not connected with any account. Does anyone know how...

How to set callback when