dvorapa / dialog-dart

Modern alert, confirm and prompt dialog implementation
https://pub.dev/packages/dialog
BSD 2-Clause "Simplified" License
9 stars 2 forks source link

NoSuchMethodError using alert #7

Closed mbenatti closed 9 years ago

mbenatti commented 9 years ago

NoSuchMethodError: method not found: 'DialogElement' Receiver: Type: class 'DialogElement' Arguments: ...

Code:

import 'dart:html'; import 'package:dialog/dialog.dart';

void main() { querySelector("#sample_text_id") ..text = "Click me!" ..onClick.listen(reverseText); }

void reverseText(MouseEvent event) { alert("teste"); }

dvorapa commented 9 years ago

The package is not working yet. It waits for resolving several bugs listed in the Dart issue tracker. This is one of them. DialogElement class from the Dart spec hasn't got default constructor and therefore can't be called. (see #21181 in the Dart issue tracker)

dvorapa commented 9 years ago

Should be fully resolved in the new release 0.4.0