Skip to content

Commit ce48a18

Browse files
committed
update stream_transform example to package:web
1 parent b412ba4 commit ce48a18

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pkgs/stream_transform/example/main.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'dart:html';
6-
75
import 'package:stream_transform/stream_transform.dart';
6+
import 'package:web/web.dart';
7+
88

99
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;
1212
var output = document.querySelector('#output')!;
1313

1414
_inputValues(firstInput)
@@ -21,6 +21,6 @@ void main() {
2121
});
2222
}
2323

24-
Stream<String?> _inputValues(InputElement element) => element.onKeyUp
24+
Stream<String?> _inputValues(HTMLInputElement element) => element.onKeyUp
2525
.debounce(const Duration(milliseconds: 100))
2626
.map((_) => element.value);

pkgs/stream_transform/pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ dev_dependencies:
1111
dart_flutter_team_lints: ^3.0.0
1212
fake_async: ^1.3.0
1313
test: ^1.16.0
14+
web: ^1.1.0

0 commit comments

Comments
 (0)