croupier: Upgrade to Flutter 21

This involves switching SlideTransition to my own custom Transition.
Grid was renamed.

A small bugfix with drag and drop during the Play phase too.

Change-Id: Ia871c77a971057683182979f4069f5afa6218386
diff --git a/lib/components/card.dart b/lib/components/card.dart
index 9a15f75..bdd8ae5 100644
--- a/lib/components/card.dart
+++ b/lib/components/card.dart
@@ -263,12 +263,15 @@
         transform: new vector_math.Matrix4.identity().rotateZ(config.rotation),
         alignment: new FractionalOffset(0.5, 0.5));
 
-    // Set up the slide transition.
-    // During animation, we must ignore all events.
-    widgets.Widget retWidget = new widgets.SlideTransition(
-        performance: _performance.view,
-        position: _performance.variable,
-        child: image);
+    // Prepare the transition, which is a fixed pixel translation.
+    widgets.Widget retWidget = new widgets.BuilderTransition(
+        variables: <AnimatedValue>[_performance.variable],
+        builder: (widgets.BuildContext c) {
+      Matrix4 transform = new Matrix4.identity()
+        ..translate(
+            _performance.variable.value.x, _performance.variable.value.y);
+      return new widgets.Transform(transform: transform, child: image);
+    }, performance: _performance.view);
 
     return retWidget;
   }
diff --git a/lib/components/croupier.dart b/lib/components/croupier.dart
index de92aa7..89d146d 100644
--- a/lib/components/croupier.dart
+++ b/lib/components/croupier.dart
@@ -173,7 +173,7 @@
           child: new Row(profileWidgets),
           scrollDirection: ScrollDirection.horizontal);
     }
-    return new Grid(profileWidgets, maxChildExtent: size);
+    return new MaxTileWidthGrid(profileWidgets, maxTileWidth: size);
   }
 
   Widget _buildArrangePlayers() {
diff --git a/lib/components/croupier_settings.dart b/lib/components/croupier_settings.dart
index 1a7b78f..b169bec 100644
--- a/lib/components/croupier_settings.dart
+++ b/lib/components/croupier_settings.dart
@@ -150,7 +150,7 @@
 
         dialog = new Dialog(
             title: new Text(capType),
-            content: new Grid(flexColors, maxChildExtent: 75.0),
+            content: new MaxTileWidthGrid(flexColors, maxTileWidth: 75.0),
             actions: [
               new FlatButton(child: new Text('CANCEL'), onPressed: () {
                 Navigator.pop(context);
@@ -168,7 +168,7 @@
 
         dialog = new Dialog(
             title: new Text(capType),
-            content: new Grid(flexAvatars, maxChildExtent: 75.0),
+            content: new MaxTileWidthGrid(flexAvatars, maxTileWidth: 75.0),
             actions: [
               new FlatButton(child: new Text('CANCEL'), onPressed: () {
                 Navigator.pop(context);
diff --git a/lib/components/game.dart b/lib/components/game.dart
index 32d9085..677a9c8 100644
--- a/lib/components/game.dart
+++ b/lib/components/game.dart
@@ -143,7 +143,7 @@
   Widget buildCardAnimationLayer(List<int> visibleCardCollectionIndexes) {
     // It's possible that some cards need to be moved after this build.
     // If so, we can catch it in the next frame.
-    scheduler.addPostFrameCallback((Duration d) {
+    Scheduler.instance.addPostFrameCallback((Duration d) {
       _cardLevelMapProcessAllVisible(visibleCardCollectionIndexes);
     });
 
diff --git a/lib/components/hearts/hearts.part.dart b/lib/components/hearts/hearts.part.dart
index 29fff21..319c87c 100644
--- a/lib/components/hearts/hearts.part.dart
+++ b/lib/components/hearts/hearts.part.dart
@@ -547,7 +547,9 @@
                   playOrBuffer, true, CardCollectionOrientation.show1,
                   useKeys: true,
                   acceptCallback: _makeGameMoveCallback,
-                  acceptType: this._canBuffer ? DropType.card : DropType.none,
+                  acceptType: p == game.whoseTurn || this._canBuffer
+                      ? DropType.card
+                      : DropType.none,
                   backgroundColor:
                       p == game.whoseTurn ? Colors.white : Colors.grey[500],
                   altColor: p == game.whoseTurn
diff --git a/pubspec.lock b/pubspec.lock
index 7491335..eda60cd 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -4,7 +4,7 @@
   analyzer:
     description: analyzer
     source: hosted
-    version: "0.27.1"
+    version: "0.27.1+2"
   archive:
     description: archive
     source: hosted
@@ -47,6 +47,10 @@
     description: collection
     source: hosted
     version: "1.2.0"
+  contrast:
+    description: contrast
+    source: hosted
+    version: "0.1.1"
   convert:
     description: convert
     source: hosted
@@ -59,6 +63,10 @@
     description: csslib
     source: hosted
     version: "0.12.2"
+  den_api:
+    description: den_api
+    source: hosted
+    version: "0.1.0"
   fixnum:
     description: fixnum
     source: hosted
@@ -81,6 +89,10 @@
       relative: true
     source: path
     version: "0.0.10"
+  github:
+    description: github
+    source: hosted
+    version: "2.3.1"
   glob:
     description: glob
     source: hosted
@@ -89,6 +101,10 @@
     description: html
     source: hosted
     version: "0.12.2+1"
+  http:
+    description: http
+    source: hosted
+    version: "0.11.3+3"
   http_multi_server:
     description: http_multi_server
     source: hosted
@@ -167,10 +183,18 @@
     description: pool
     source: hosted
     version: "1.2.1"
+  pub_package_data:
+    description: pub_package_data
+    source: hosted
+    version: "0.0.1"
   pub_semver:
     description: pub_semver
     source: hosted
     version: "1.2.3"
+  quiver:
+    description: quiver
+    source: hosted
+    version: "0.21.4"
   shelf:
     description: shelf
     source: hosted
@@ -186,11 +210,11 @@
   sky_engine:
     description: sky_engine
     source: hosted
-    version: "0.0.71"
+    version: "0.0.75"
   sky_services:
     description: sky_services
     source: hosted
-    version: "0.0.71"
+    version: "0.0.75"
   source_map_stack_trace:
     description: source_map_stack_trace
     source: hosted
@@ -234,11 +258,23 @@
   vector_math:
     description: vector_math
     source: hosted
-    version: "1.4.3"
+    version: "1.4.4"
   watcher:
     description: watcher
     source: hosted
     version: "0.9.7"
+  when:
+    description: when
+    source: hosted
+    version: "0.2.0"
+  which:
+    description: which
+    source: hosted
+    version: "0.1.3"
+  xml:
+    description: xml
+    source: hosted
+    version: "2.4.0"
   yaml:
     description: yaml
     source: hosted