File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- import 'dart:html' ;
6
-
7
5
import 'package:stream_transform/stream_transform.dart' ;
6
+ import 'package:web/web.dart' ;
7
+
8
8
9
9
void main () {
10
- var firstInput = document.querySelector ('#first_input' ) as InputElement ;
11
- var secondInput = document.querySelector ('#second_input' ) as InputElement ;
10
+ var firstInput = document.querySelector ('#first_input' ) as HTMLInputElement ;
11
+ var secondInput = document.querySelector ('#second_input' ) as HTMLInputElement ;
12
12
var output = document.querySelector ('#output' )! ;
13
13
14
14
_inputValues (firstInput)
@@ -21,6 +21,6 @@ void main() {
21
21
});
22
22
}
23
23
24
- Stream <String ?> _inputValues (InputElement element) => element.onKeyUp
24
+ Stream <String ?> _inputValues (HTMLInputElement element) => element.onKeyUp
25
25
.debounce (const Duration (milliseconds: 100 ))
26
26
.map ((_) => element.value);
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ dev_dependencies:
11
11
dart_flutter_team_lints : ^3.0.0
12
12
fake_async : ^1.3.0
13
13
test : ^1.16.0
14
+ web : ^1.1.0
You can’t perform that action at this time.
0 commit comments