Questions tagged [dart-polymer]
polymer.dart is a Dart port of Polymer created and maintained by the Dart team.
1,025
questions
1
vote
2
answers
81
views
how to solve using dart .Given a year, return the century it is in
Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc.
Example
For ...
0
votes
0
answers
16
views
how to hide drop down list in poymer-js
I need to hide dropdown-menu. i tried .hidden property but it is not working
<paper-dropdown-menu id="firmChannelFilter" hidden="${(this._channelFilterVisibility)}"
...
0
votes
3
answers
165
views
how to make widget scale up when it selected in Flutter
I have an app that has pageView.builder and it contains 5 stack widget
how can I scale up the widget that user-selected, for example:
if the user scrolls to widget 3, widgets 1 & 2 become smaller ...
0
votes
3
answers
164
views
A value of type 'Object?' can't be assigned to a variable of type 'String'
DropdownButton(
value: dropdownvalue,
icon: Icon(Icons.keyboard_arrow_down),
items:items.map((String items) {
return DropdownMenuItem(
...
0
votes
0
answers
102
views
I want to know what is the error in this lexical analysis code
import 'dart:io';
import 'package:validated/validated.dart';
enum Token {Identifier, Constant, Operator, Keyword, Error}
void main() async {
var f = new File('data.txt');
var fdata ;
if(await ...
0
votes
1
answer
44
views
Problem when i try to get the value of a function in Flutter/dart
Hi i cant not get the value of de value that return my function postTest()
String usuario = usernameController.text;
print('Si $usuario');
...
0
votes
2
answers
650
views
how to access variables from other widgets
hello I would like to know how to access variables from other widgets. for example: I would like that when I touch the button of the widget BotonLogin, it prints the user variable of the widget ...
0
votes
1
answer
71
views
How to update dom element in certain interval of time in dart?
I want to create a text typing effect in simple web application. It's my first time using dart for web application. I did something like this.
var chars = "Hello World".split('');
var ...
0
votes
0
answers
30
views
i have an issue with progress indicator as the state not updared by the indicator while sending HTTP request
I had an issue with updating my state and show an indicator for the user while sending HTTP request the if condition in the column widget not checked
0
votes
2
answers
4k
views
set variable with conditions in dart
I have MyDateTime class and it has a variable hour. I need to set this variable with some condition when I create an object. For example, I have this object:
MyDateTime dt = MyDateTime(2020, 2, 3, 3, ...
1
vote
3
answers
10k
views
How to get user input on dartpad online?
How can I get user input in console on dartpad?
Whenever i write
import 'dart:io';
void main() {
stdout.write("What's your name? ");
var name = stdin.readLineSync();
print("Hi, $name!");
}
...
0
votes
0
answers
152
views
Dart Pub runtime error
Hi i am using the pub to install an application nuxeo. but while running i got the error like this.
Here is my Error Info:
Execute failed: java.io.IOException: Cannot run program "pub" (in ...
0
votes
0
answers
82
views
Polymer Dart Strong Mode and Mixins is forcing weird code designs
We started to use Dart's Strong mode with our polymer dart code and honestly it looks terrible. It looks so terrible that I need a second opinion on the matter. It cant be this ugly looking, it ...
1
vote
1
answer
2k
views
is there a better way to call overridden behavior functions than super.test()?
I have abstracted a bunch of code to behaviors, and now when i do:
class B extends A with behave {
B():super(){}
}
class A extends PolymerElement{
A(){}
}
abstract class behave {
test(){ ...
0
votes
1
answer
128
views
Cannot read property of '__dartClass__' of undefined even though i set to a new instance
I was walking through my code, and started getting errors in my code saying:
Uncaught TypeError: Cannot read property '__dartClass__' of undefined
and when I looked into it more, I noticed that ...
0
votes
1
answer
26
views
Issue in importing Polymer dependencies with AngularDart
Resolving dependencies...
Package polymer has no versions that match >=1.0.0 <2.0.0 derived from:
my-app depends on version ^1.0.0
Process finished with exit code 1
0
votes
1
answer
76
views
Can't build todo_ddc project
I want to try polymerize so I have found and use that post. But I met issues when try command
pub run polymerize:polymerize build
It works some time and then return bazel's error:
2017.35.08 16:35:...
7
votes
1
answer
14k
views
Is there any way to debug a TypeError: Invalid value used as weak map key?
I'm using Dart + Polymer and we were creating a new version of our app, that was going with huge refactoring, deleting some pages and so on.
Now, there is a error
TypeError: Invalid value used ...
0
votes
0
answers
53
views
Parsing URL Params into dart does type overrides if the type is unexpected
I am creating a web application which parses URLS for route parameters for client look ups.
Example: www.example.com#userId=5
Ignore security loop holes on that.
I noticed that when navigating ...
1
vote
1
answer
413
views
Using `set` doesnt apply at that point in time
I noticed over and over again that if i did something like:
@property int x = 1;
...code...
set("x", 2);
print(x);
it will show it as 1. The reason was that it doesnt necessarily execute this ...
1
vote
1
answer
666
views
Creating a listener on a list for changes
I have a dart object which contains a list. Simply put:
class Test extends PolymerElement{
List list = [];
addTask(item){
list.add(item);
}
}
and I wanted to implement a listener on that ...
1
vote
1
answer
40
views
Can I use a Template DOM repeater based on the number of child elements of <contents>
I was contemplating some code which would wrap each child of of the web component. Something like:
<dom-module id=test">
<template>
<template is="dom-repeat" items="{{contents....
2
votes
0
answers
49
views
Moving PolymerElement components around programmatically
I have been working on a component to streamline a series of other components. The reason I wanted to do this is pretty much to create 1 place where the implementations would be since the code is the ...
1
vote
2
answers
804
views
Using a Template Repeater in a Table tag
In my application I have noticed that my template repeater does not get called when inside of a table. My goal is to use the repeater to complete the data and refresh it as needed.
Markup:
<...
5
votes
1
answer
205
views
What is the purpose of putting @override in my PolymerDart methods, when it works without?
In terms of creating classes which involve inheritance, some actually need the annotation of override. When working with PolymerDart though, specifically
@override
attached(){...}
I see no reason ...
1
vote
0
answers
47
views
How do I display a Polymer webcomponent properly in an angularDart-centred app?
I have a Polymer PaperButton working in a AnguarDart app: I click it, and it calls a function. The css correctly gives it its colour. But the button is small, and does not appear as a "proper" ...
2
votes
1
answer
75
views
Dart Polymer bind property
I want to switch pages using neon-animated-pages
So my code is simple:
<dom-module id="auth-view">
<template>
<style>
</style>
<neon-animated-pages class="...
1
vote
1
answer
126
views
How do I do custom validation in Polymer Dart
Similar to javascript and the implementation of IronValidatorBehavior how do I do custom validation in Polymer Dart?
I can create a new custom-validator which implements IronValidatorBehavior e.g.
...
0
votes
0
answers
53
views
HttpRequest.open is throwing a _uri error about strings?
I end up with a function which was working until recently it seems. I have the following code:
String url = "https://this.is.a.test.com/hello?varA=false";
var request = new HttpRequest();
...
0
votes
1
answer
90
views
rerendering Template Tags in Dart
I have been all over their github, their website, as well as other sites.
The closest answer I can see is related entirely within PolymerJs, which was in another stack overflow thread.
var template =...
2
votes
1
answer
37
views
attached fires when component is on page, but i cant dom process because it isnt rendered?
I have a web component which leverages some template repeaters. I noticed that even though the item is attached to the page, it isnt rendered. Since it isnt rendered, the template repeater isnt ...
2
votes
1
answer
89
views
Equivalent to nearest in Dart, specifically DartPolymer?
I am trying to figure out a way to carry out something similar to jquery's nearest function. Ex:
$("a.test").nearest(".group-parent");
but in dart.
I was looking through the HtmlElement class to ...
1
vote
2
answers
166
views
trying to create a bounding box by click and drag in a web component
I am dealing with event handlers, and getting the start and end position of a mouse.
That way i can create a selection box.
I start by on mousedown, i store the current position: new Point(event....
0
votes
1
answer
57
views
programatically adding an on-tap attribute referencing a dart function for a HtmlElement
I have a dart function:
_addSelection(HtmlElement ele){
ele.classes.add("selection");
}
I would either want 1 or 2 things to occur, either A) execute an on-tap and on-track function given the ...
2
votes
1
answer
332
views
Dart Polymer : Type X is not a subtype of type Y
I develop my application with Dart and Polymer on PyCharm. I currently have an error :
Exception: type 'ObservableList<DrugFilterItem>' is not a subtype of type 'ObservableList<...
2
votes
1
answer
104
views
Databinding structured object does not show any change on my polymer element
I am migrating an application to Polymer 1 from 0.5 and using Dart. I was doing okay but now I am facing some data binding issues:
I have created a polymer element that programatically inserts on its ...
6
votes
1
answer
469
views
Is PolymerDart dead? An architecture issue
Given the information at both the Polymer and Dart conferences in the last week, there is no information mentioned about the intersection of polymer and dart called PolymerDart at neither of them (...
1
vote
1
answer
258
views
even though using _ denotes private, can I set it as a property?
I have 2 variables. model and _model. Essentially, model is going to be the property that people would bind to with my template. When it binds, it will set _model and then _model will be used in ...
1
vote
1
answer
405
views
using a computed property in a template dom repeat seems to not actually get data
The use case I have been working with is that i have some markup as follows.
<my-radiolist value="{{myValue}}">
<template is="dom-repeat" items="{{test}}">
<my-radiobutton value="...
3
votes
0
answers
131
views
Get row id from selected bwu_data_grid row
I subscribe on bwu click event:
grid.onBwuClick.listen((e) {
int id = grid.dataProvider.items[e.cell.row]['id'];
});
And I have pagination for table.
When clicked row on first page I get right ...
0
votes
1
answer
93
views
DirectiveProcessor failed with errors on files in PaxHeader directory on Windows
I have an application that is part Polymer Dart and part AngularDart 2, and I'm getting a large string of errors when I attempt to do a pub get. The errors I'm getting look like this:
[...
1
vote
1
answer
46
views
How do you create custom Polymer and PolymerDart annotations?
I was doing some research into PolymerDart and the various annotations which can be applied to the dart files. Be it: @Property, @property, @observe, @reflectable, @PolymerRegister, OR @HtmlImport.
...
2
votes
1
answer
274
views
Cannot get mouse pointer information from mousemove event
In normal JS Polymer, I can do something like this:
<dom-module id="my-module">
<template>
<div on-mousemove="mousemove">Text here!</div>
</...
1
vote
1
answer
139
views
Editing input field in a Polymer Dart templatizer instance throws an error
We have a polymer element written in dart (version 1.0.0-rc.18).
The <list-outer> element uses the Templatizer behavior to iterate an object list.
<list-outer>
<template> ...
1
vote
1
answer
130
views
How to Remove a Polymer paper-listbox Item in an AngularDart Component
I generate a paper-listbox as follows:
<paper-listbox class="scroll-list gutter" id="index">
<paper-item class="index-entry" *ngFor="let composition of compositions" [class.selected]="...
2
votes
1
answer
684
views
How to query for an element inside a dom-repeat
I have been scouring the web for a clear answer on how to query for an element generated by a dom-repeat element from Dart code.
sample.html
<dom-module id="so-sample>
<style>...</...
1
vote
1
answer
58
views
Getting a ScriptCompactor Error, failing to inline import a file
The application I was working on used to work find, I did a pub upgrade, it broke, so i was in the process of reverting. I wiped the cache, I reverted the application, and did a pub get.
I noticed ...
1
vote
0
answers
39
views
CSP issues with Polymer 1.0.0 rc in Chrome App
I am attempting to run a simple Dart Polymer app as a Chrome application.
My sample is based on code from https://github.com/dart-lang/polymer-dart-patterns. I extracted one of the samples, placed it ...
3
votes
1
answer
85
views
Using Polymer UI Elements in Dart
Is there a supported way to leverage polymer UI elements in dart? It appears that polymer_element is no longer supported.
0
votes
1
answer
58
views
Installing new API client library into deployed App Engine app
I'm working on an App Engine app that has both a front end (Dart/Polymer) and back end (Endpoints for Python). After developing locally, I'm expecting to do something along the following lines:
...