| Index: lib/components/carousel.dart
|
| diff --git a/lib/components/carousel.dart b/lib/components/carousel.dart
|
| index c07a12b0595d19a796f4266f2bb7955705c2a396..bf31358013831090cc84e96ec47758b32050be95 100644
|
| --- a/lib/components/carousel.dart
|
| +++ b/lib/components/carousel.dart
|
| @@ -25,20 +25,21 @@ class Carousel extends WebComponent {
|
|
|
| Future<bool> previous() => _moveDelta(false);
|
|
|
| - SwapComponent get _swap => this.query('x-carousel > .carousel > x-swap').xtag;
|
| + SwapComponent get _swap =>
|
| + this.query('[is=x-carousel] > .carousel > [is=x-swap]').xtag;
|
|
|
| Future<bool> _moveDelta(bool doNext) {
|
| final swap = _swap;
|
| assert(swap != null);
|
| - if(swap.items.length == 0) {
|
| - return new Future.immediate(false);
|
| + if (swap.items.length == 0) {
|
| + return new Future.value(false);
|
| }
|
|
|
| assert(doNext != null);
|
| final delta = doNext ? 1 : -1;
|
|
|
| ShowHideEffect showEffect, hideEffect;
|
| - if(doNext) {
|
| + if (doNext) {
|
| showEffect = _fromTheRight;
|
| hideEffect = _fromTheLeft;
|
| } else {
|
| @@ -50,6 +51,7 @@ class Carousel extends WebComponent {
|
|
|
| final newIndex = (activeIndex + delta) % _swap.items.length;
|
|
|
| - return _swap.showItemAtIndex(newIndex, effect: showEffect, hideEffect: hideEffect, duration: _duration);
|
| + return _swap.showItemAtIndex(newIndex, effect: showEffect,
|
| + hideEffect: hideEffect, duration: _duration);
|
| }
|
| }
|
|
|