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

Unified Diff: lib/src/effects/show_hide.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/modal_manager.dart ('k') | lib/src/effects/swapper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/effects/show_hide.dart
diff --git a/lib/src/effects/show_hide.dart b/lib/src/effects/show_hide.dart
index b5f779136c4d3e71d39f34b26f1d866b5e65caad..dd146af91a839f43573f564601f579c6f97d8ea5 100644
--- a/lib/src/effects/show_hide.dart
+++ b/lib/src/effects/show_hide.dart
@@ -153,11 +153,11 @@ class ShowHide {
case ShowHideState.SHOWING:
// no op - let the current animation finish
assert(_AnimatingValues.isAnimating(element));
- return new Future.immediate(ShowHideResult.NOOP);
+ return new Future.value(ShowHideResult.NOOP);
case ShowHideState.SHOWN:
// no op. If shown leave it.
assert(!_AnimatingValues.isAnimating(element));
- return new Future.immediate(ShowHideResult.NOOP);
+ return new Future.value(ShowHideResult.NOOP);
case ShowHideState.HIDING:
_AnimatingValues.cancelAnimation(element);
break;
@@ -179,7 +179,7 @@ class ShowHide {
return _AnimatingValues.scheduleCleanup(durationMS, element, effect.clearAnimation, _finishShow);
} else {
assert(values.currentState == ShowHideState.SHOWN);
- return new Future.immediate(ShowHideResult.IMMEDIATE);
+ return new Future.value(ShowHideResult.IMMEDIATE);
}
}
@@ -202,12 +202,12 @@ class ShowHide {
case ShowHideState.HIDING:
// no op - let the current animation finish
assert(_AnimatingValues.isAnimating(element));
- return new Future.immediate(ShowHideResult.NOOP);
+ return new Future.value(ShowHideResult.NOOP);
case ShowHideState.HIDDEN:
// it's possible we're here because the inferred calculated value is 'none'
// this hard-wires the local display value to 'none'...just to be clear
_finishHide(element);
- return new Future.immediate(ShowHideResult.NOOP);
+ return new Future.value(ShowHideResult.NOOP);
case ShowHideState.SHOWING:
_AnimatingValues.cancelAnimation(element);
break;
@@ -226,7 +226,7 @@ class ShowHide {
} else {
_finishHide(element);
assert(values.currentState == ShowHideState.HIDDEN);
- return new Future.immediate(ShowHideResult.IMMEDIATE);
+ return new Future.value(ShowHideResult.IMMEDIATE);
}
}
« no previous file with comments | « lib/src/effects/modal_manager.dart ('k') | lib/src/effects/swapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698