Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: lib/src/effects/swapper.dart

Issue 14295009: Fix widget.dart to work with the latest web_ui library. Specifically, query selectors need to use "… (Closed) Base URL: https://github.com/kevmoo/widget.dart.git@master
Patch Set: ptal Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/effects/show_hide.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/effects/swapper.dart
diff --git a/lib/src/effects/swapper.dart b/lib/src/effects/swapper.dart
index 6f39716c5597c4f44b3e25eb5220e7e66811a031..92f090785fb3601b73e6358b0f8796420c69735e 100644
--- a/lib/src/effects/swapper.dart
+++ b/lib/src/effects/swapper.dart
@@ -39,10 +39,10 @@ class Swapper {
return _ensureOneShown(host)
.then((Element currentlyVisible) {
if(currentlyVisible == null) {
- return new Future.immediate(false);
+ return new Future.value(false);
} else if(currentlyVisible == child) {
// target element is already shown
- return new Future.immediate(true);
+ return new Future.value(true);
}
child.style.zIndex = '2';
@@ -71,7 +71,7 @@ class Swapper {
assert(host != null);
if(host.children.length == 0) {
// no elements to show
- return new Future.immediate(null);
+ return new Future.value(null);
} else if(host.children.length == 1) {
final child = host.children[0];
return ShowHide.show(child)
@@ -90,7 +90,7 @@ class Swapper {
int shownIndex = null;
- return new Future.immediate(theStates)
+ return new Future.value(theStates)
.then((List<ShowHideState> states) {
// paranoid sanity check that at lesat the count of items
// before and after haven't changed
« no previous file with comments | « lib/src/effects/show_hide.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698