croupier: Upgrade Flutter to the git repo (alpha branch)

This involves a bunch of upgrades:
- 0.0.14 to the equivalent of the Flutter alpha branch (0.0.18+)
- v23discovery instead of discovery
- Fixing the ZCards. It was working around a bug in Flutter, so after
  their fix all animations were wrong. I fixed it by making sure I only
  used local positions for my ZCards and nothing else.

- Also in patchset 2 there is dartfmt.
  You can review patchset 1 if you prefer to see the version without it.

Change-Id: Id51b9803d229fe78210203d4dedf90011909864b
diff --git a/Makefile b/Makefile
index 8f7d25e..b2f8cfa 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,12 @@
 	SYNCBASE_FLAGS += --name=$(NAME)
 endif
 
+# If this is not the first mojo shell, then you must reuse the devservers
+# to avoid a "port in use" error.
+ifneq ($(shell fuser 31841/tcp),)
+	REUSE_FLAG := --reuse-servers
+endif
+
 else
 	SYNCBASE_MOJO_BIN_DIR := packages/syncbase/mojo_services/linux_amd64
 	DISCOVERY_MOJO_BIN_DIR := $(DISCOVERY_DIR)/gen/mojo/linux_amd64
@@ -71,8 +77,8 @@
 	--checked \
 	--mojo-debug \
 	-- $(MOJO_SHELL_FLAGS) \
-	--no-config-file \
-	--free-host-ports
+	$(REUSE_FLAG) \
+	--no-config-file
 endef
 
 .DELETE_ON_ERROR:
diff --git a/lib/components/board.dart b/lib/components/board.dart
index 5614354..174a157 100644
--- a/lib/components/board.dart
+++ b/lib/components/board.dart
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-import 'card_collection.dart' show CardCollectionComponent, CardCollectionOrientation;
+import 'card_collection.dart'
+    show CardCollectionComponent, CardCollectionOrientation;
 import '../logic/card.dart' as logic_card;
 import '../logic/game/game.dart' show Game, GameType;
 import '../logic/hearts/hearts.dart' show HeartsGame;
@@ -69,7 +70,9 @@
     for (int i = 0; i < 4; i++) {
       List<logic_card.Card> cards =
           game.cardCollections[i + HeartsGame.OFFSET_HAND];
-      CardCollectionOrientation ori = i % 2 == 0 ? CardCollectionOrientation.horz : CardCollectionOrientation.vert;
+      CardCollectionOrientation ori = i % 2 == 0
+          ? CardCollectionOrientation.horz
+          : CardCollectionOrientation.vert;
 
       bool wide = (this.width >= this.height);
       double smallerSide = wide ? this.height : this.width;
diff --git a/lib/components/card.dart b/lib/components/card.dart
index de932aa..795a198 100644
--- a/lib/components/card.dart
+++ b/lib/components/card.dart
@@ -11,19 +11,15 @@
 import 'package:flutter/rendering.dart';
 import 'package:vector_math/vector_math_64.dart' as vector_math;
 
-enum CardAnimationType {
-  NONE, OLD_TO_NEW, IN_TOP
-}
+enum CardAnimationType { NONE, OLD_TO_NEW, IN_TOP }
 
-enum CardUIType {
-  CARD, ZCARD
-}
+enum CardUIType { CARD, ZCARD }
 
 class GlobalCardKey extends widgets.GlobalKey {
   logic_card.Card card;
   CardUIType type;
 
-  GlobalCardKey(this.card, this.type): super.constructor();
+  GlobalCardKey(this.card, this.type) : super.constructor();
 
   bool operator ==(Object other) {
     if (other is! GlobalCardKey) {
@@ -47,18 +43,19 @@
   final bool animateEntrance;
   final double z;
 
+  // These points are in local coordinates.
   final Point startingPosition;
   final Point endingPosition;
 
-  ZCard(Card dataComponent, this.startingPosition, this.endingPosition) :
-    super(key: new GlobalCardKey(dataComponent.card, CardUIType.ZCARD)),
-    card = dataComponent.card,
-    faceUp = dataComponent.faceUp,
-    width = dataComponent.width ?? 40.0,
-    height = dataComponent.height ?? 40.0,
-    rotation = dataComponent.rotation,
-    animateEntrance = dataComponent.animateEntrance,
-    z = dataComponent.z;
+  ZCard(Card dataComponent, this.startingPosition, this.endingPosition)
+      : super(key: new GlobalCardKey(dataComponent.card, CardUIType.ZCARD)),
+        card = dataComponent.card,
+        faceUp = dataComponent.faceUp,
+        width = dataComponent.width ?? 40.0,
+        height = dataComponent.height ?? 40.0,
+        rotation = dataComponent.rotation,
+        animateEntrance = dataComponent.animateEntrance,
+        z = dataComponent.z;
 
   _ZCardState createState() => new _ZCardState();
 }
@@ -75,7 +72,13 @@
   final double z;
 
   Card(logic_card.Card card, this.faceUp,
-      {double width, double height, this.rotation: 0.0, bool useKey: false, this.visible: true, this.animateEntrance: true, this.z})
+      {double width,
+      double height,
+      this.rotation: 0.0,
+      bool useKey: false,
+      this.visible: true,
+      this.animateEntrance: true,
+      this.z})
       : card = card,
         width = width ?? 40.0,
         height = height ?? 40.0,
@@ -86,9 +89,13 @@
   // Used by the drag and drop layer.
   Card clone({bool visible}) {
     return new Card(this.card, this.faceUp,
-      width: width, height: height, rotation: rotation,
-      useKey: false, visible: visible ?? this.visible, animateEntrance: false,
-      z: z);
+        width: width,
+        height: height,
+        rotation: rotation,
+        useKey: false,
+        visible: visible ?? this.visible,
+        animateEntrance: false,
+        z: z);
   }
 
   CardState createState() => new CardState();
@@ -103,19 +110,16 @@
   }
 
   widgets.Widget build(widgets.BuildContext context) {
-    widgets.Widget image = null;
-    if (config.visible) {
-      image = new widgets.Transform(
-                child: _imageFromCard(config.card, config.faceUp),
-                transform: new vector_math.Matrix4.identity()
-                    .rotateZ(config.rotation),
-                alignment: new FractionalOffset(0.5, 0.5));
-    }
+    widgets.Widget image = new widgets.Opacity(
+        opacity: config.visible ? 1.0 : 0.0,
+        child: new widgets.Transform(
+            child: _imageFromCard(config.card, config.faceUp),
+            transform:
+                new vector_math.Matrix4.identity().rotateZ(config.rotation),
+            alignment: new FractionalOffset(0.5, 0.5)));
 
     return new widgets.Container(
-            width: config.width,
-            height: config.height,
-            child: image);
+        width: config.width, height: config.height, child: image);
   }
 }
 
@@ -128,7 +132,8 @@
 
 class _ZCardState extends widgets.State<ZCard> {
   ValuePerformance<Point> _performance;
-  List<Point> _pointQueue; // at least 1 longer than the current animation index.
+  List<
+      Point> _pointQueue; // at least 1 longer than the current animation index.
   int _animationIndex;
   bool _cardUpdateScheduled = false;
 
@@ -147,9 +152,8 @@
     }
     _pointQueue.add(config.endingPosition);
     _performance = new ValuePerformance<Point>(
-      variable: new AnimatedValue<Point>(Point.origin, curve: Curves.ease),
-      duration: const Duration(milliseconds: 250)
-    );
+        variable: new AnimatedValue<Point>(Point.origin, curve: Curves.ease),
+        duration: const Duration(milliseconds: 250));
     _performance.addStatusListener((PerformanceStatus status) {
       if (status == PerformanceStatus.completed) {
         _animationIndex++;
@@ -185,10 +189,10 @@
 
   // A callback that sets up the animation from point a to point b.
   void _updatePosition() {
-    _cardUpdateScheduled = false; // allow the next attempt to schedule _updatePosition to succeed.
+    _cardUpdateScheduled =
+        false; // allow the next attempt to schedule _updatePosition to succeed.
     if (!config.animateEntrance || _pointQueue.length == 1) {
-      RenderBox box = context.findRenderObject();
-      Point endingLocation = box.globalToLocal(config.endingPosition);
+      Point endingLocation = config.endingPosition;
       _performance.variable
         ..begin = endingLocation
         ..value = endingLocation
@@ -207,11 +211,8 @@
   void _tryAnimate() {
     // Let animations finish... (Is this a good idea?)
     if (!_performance.isAnimating && _needsAnimation()) {
-      RenderBox box = context.findRenderObject();
-      Point globalStart = _pointQueue[_animationIndex];
-      Point globalEnd = _pointQueue[_animationIndex + 1];
-      Point startingLocation = box.globalToLocal(globalStart);
-      Point endingLocation = box.globalToLocal(globalEnd);
+      Point startingLocation = _pointQueue[_animationIndex];
+      Point endingLocation = _pointQueue[_animationIndex + 1];
       _performance.variable
         ..begin = startingLocation
         ..value = startingLocation
@@ -223,28 +224,20 @@
 
   widgets.Widget build(widgets.BuildContext context) {
     widgets.Widget image = new widgets.Transform(
-      child: _imageFromCard(config.card, config.faceUp),
-      transform: new vector_math.Matrix4.identity()
-          .rotateZ(config.rotation),
-      alignment: new FractionalOffset(0.5, 0.5));
+        child: _imageFromCard(config.card, config.faceUp),
+        transform: new vector_math.Matrix4.identity().rotateZ(config.rotation),
+        alignment: new FractionalOffset(0.5, 0.5));
 
-    // Set up the drag listener.
-    widgets.Widget listeningCard = new widgets.Listener(
-        child: new widgets.Container(
-            width: config.width,
-            height: config.height,
-            child: image));
+    // Size the card appropriately.
+    widgets.Widget containedCard = new widgets.Container(
+        width: config.width, height: config.height, child: image);
 
     // Set up the slide transition.
     // During animation, we must ignore all events.
-    widgets.Widget retWidget = new widgets.IgnorePointer(
-      ignoring: _performance.isAnimating,
-      child: new widgets.SlideTransition(
+    widgets.Widget retWidget = new widgets.SlideTransition(
         performance: _performance.view,
         position: _performance.variable,
-        child: listeningCard
-      )
-    );
+        child: containedCard);
 
     return retWidget;
   }
diff --git a/lib/components/card_collection.dart b/lib/components/card_collection.dart
index 363a269..480aa3d 100644
--- a/lib/components/card_collection.dart
+++ b/lib/components/card_collection.dart
@@ -49,8 +49,7 @@
   Color get backgroundColor => _backgroundColor ?? Colors.grey[500];
   Color get altColor => _altColor ?? Colors.grey[500];
 
-  CardCollectionComponent(
-      this.cards, this.faceUp, this.orientation,
+  CardCollectionComponent(this.cards, this.faceUp, this.orientation,
       {this.dragChildren: false,
       DropType acceptType,
       this.acceptCallback: null,
@@ -137,7 +136,10 @@
     }
   }
 
-  List<Widget> _makeDraggableAndPositioned(List<component_card.Card> cardWidgets, PosComputer topComputer, PosComputer leftComputer) {
+  List<Widget> _makeDraggableAndPositioned(
+      List<component_card.Card> cardWidgets,
+      PosComputer topComputer,
+      PosComputer leftComputer) {
     List<Widget> ret = new List<Widget>();
     for (int i = 0; i < cardWidgets.length; i++) {
       Point p = new Point(leftComputer(i), topComputer(i));
@@ -146,15 +148,11 @@
       Widget widgetToAdd = w;
       if (config.dragChildren) {
         widgetToAdd = new Draggable(
-          child: w,
-          data: w,
-          feedback: new Opacity(child: w.clone(visible: true), opacity: 0.5));
+            child: w,
+            data: w,
+            feedback: new Opacity(child: w.clone(visible: true), opacity: 0.5));
       }
-      widgetToAdd = new Positioned(
-        left: p.x,
-        top: p.y,
-        child: widgetToAdd
-      );
+      widgetToAdd = new Positioned(left: p.x, top: p.y, child: widgetToAdd);
 
       ret.add(widgetToAdd);
     }
@@ -170,7 +168,8 @@
     PosComputer topComputer = (int i) => CARD_MARGIN + spacing * i;
     PosComputer leftComputer = (int i) => CARD_MARGIN;
 
-    List<Widget> draggableKids = _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
+    List<Widget> draggableKids =
+        _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
     return new Container(
         decoration: new BoxDecoration(backgroundColor: config.backgroundColor),
         height: config.height,
@@ -179,7 +178,8 @@
   }
 
   double get _produceRowHeight => config.heightCard + CARD_MARGIN * 2;
-  Widget _produceRow(List<component_card.Card> cardWidgets, {emptyBackgroundImage: ""}) {
+  Widget _produceRow(List<component_card.Card> cardWidgets,
+      {emptyBackgroundImage: ""}) {
     if (cardWidgets.length == 0) {
       // Just return a centered background image.
       return new Container(
@@ -204,7 +204,8 @@
     PosComputer topComputer = (int i) => CARD_MARGIN;
     PosComputer leftComputer = (int i) => CARD_MARGIN + spacing * i;
 
-    List<Widget> draggableKids = _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
+    List<Widget> draggableKids =
+        _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
     return new Container(
         decoration: new BoxDecoration(backgroundColor: config.backgroundColor),
         height: _produceRowHeight,
@@ -216,7 +217,8 @@
     PosComputer topComputer = (int i) => CARD_MARGIN;
     PosComputer leftComputer = (int i) => CARD_MARGIN;
 
-    List<Widget> draggableKids = _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
+    List<Widget> draggableKids =
+        _makeDraggableAndPositioned(cardWidgets, topComputer, leftComputer);
     return new Container(
         decoration: new BoxDecoration(backgroundColor: config.backgroundColor),
         height: _produceRowHeight,
@@ -266,8 +268,7 @@
           }
         }
         return new Container(
-            decoration:
-                new BoxDecoration(backgroundColor: Colors.white),
+            decoration: new BoxDecoration(backgroundColor: Colors.white),
             child: new Stack(<Widget>[
               new Positioned(
                   top: 0.0,
@@ -306,7 +307,8 @@
           width: config.widthCard,
           height: config.heightCard,
           rotation: config.rotation,
-          visible: !config.useKeys, // TODO(alexfandrianto): Is there a case where you want an invisible card and a key?
+          visible:
+              !config.useKeys, // TODO(alexfandrianto): Is there a case where you want an invisible card and a key?
           useKey: config.useKeys,
           z: 0.0 + i);
 
diff --git a/lib/components/croupier.dart b/lib/components/croupier.dart
index a139efe..4ae72a6 100644
--- a/lib/components/croupier.dart
+++ b/lib/components/croupier.dart
@@ -113,15 +113,15 @@
       case logic_croupier.CroupierState.JoinGame:
         // A stateful view, first showing the players that can be seen creating a game.
         List<Widget> profileWidgets = new List<Widget>();
-        config.croupier.games_found.forEach((String _, logic_game.GameStartData gsd) {
+        config.croupier.games_found
+            .forEach((String _, logic_game.GameStartData gsd) {
           CroupierSettings cs = config.croupier.settings_everyone[gsd.ownerID];
           // cs could be null if this settings data hasn't synced yet.
           if (cs != null) {
             profileWidgets.add(new FlatButton(
-              child: new CroupierProfileComponent(cs),
-              onPressed: makeSetStateCallback(
-                logic_croupier.CroupierState.ArrangePlayers, gsd)
-            ));
+                child: new CroupierProfileComponent(cs),
+                onPressed: makeSetStateCallback(
+                    logic_croupier.CroupierState.ArrangePlayers, gsd)));
           }
         });
         // in which players wait for game invitations to arrive.
@@ -162,11 +162,12 @@
       case logic_croupier.CroupierState.PlayGame:
         return new Container(
             padding: new EdgeDims.only(top: ui.window.padding.top),
-            child: component_game.createGameComponent(
-                config.croupier.game, () {
+            child: component_game.createGameComponent(config.croupier.game, () {
               config.croupier.game.quit();
               makeSetStateCallback(logic_croupier.CroupierState.Welcome)();
-            }, width: screenSize.width, height: screenSize.height - ui.window.padding.top));
+            },
+                width: screenSize.width,
+                height: screenSize.height - ui.window.padding.top));
       default:
         assert(false);
         return null;
diff --git a/lib/components/croupier_settings.dart b/lib/components/croupier_settings.dart
index cd2a98a..73f6922 100644
--- a/lib/components/croupier_settings.dart
+++ b/lib/components/croupier_settings.dart
@@ -33,8 +33,7 @@
   final SaveDataCb saveDataCb;
   final NoArgCb backCb;
 
-  CroupierSettingsComponent(
-      this.settings, this.saveDataCb, this.backCb);
+  CroupierSettingsComponent(this.settings, this.saveDataCb, this.backCb);
 
   CroupierSettingsComponentState createState() =>
       new CroupierSettingsComponentState();
@@ -58,13 +57,11 @@
   Widget _makeColoredRectangle(int colorInfo, String text, NoArgCb cb) {
     return new Container(
         decoration: new BoxDecoration(backgroundColor: new Color(colorInfo)),
-        child: new FlatButton(
-            child: new Text(""), onPressed: cb));
+        child: new FlatButton(child: new Text(""), onPressed: cb));
   }
 
   Widget _makeImageButton(String url, NoArgCb cb) {
-    return new FlatButton(
-        child: new NetworkImage(src: url), onPressed: cb);
+    return new FlatButton(child: new NetworkImage(src: url), onPressed: cb);
   }
 
   Widget build(BuildContext context) {
@@ -106,16 +103,15 @@
                 placeholder: capType,
                 initialValue: config.settings.getStringValue(type),
                 keyboardType: KeyboardType.TEXT,
-                onChanged: _makeHandleChanged(type)), onDismiss: () {
-          navigator.pop();
-        }, actions: [
-          new FlatButton(child: new Text('CANCEL'), onPressed: () {
-            navigator.pop();
-          }),
-          new FlatButton(child: new Text('SAVE'), onPressed: () {
-            navigator.pop(_tempData[type]);
-          }),
-        ]);
+                onChanged: _makeHandleChanged(type)),
+            actions: [
+              new FlatButton(child: new Text('CANCEL'), onPressed: () {
+                navigator.pop();
+              }),
+              new FlatButton(child: new Text('SAVE'), onPressed: () {
+                navigator.pop(_tempData[type]);
+              }),
+            ]);
         break;
       case DialogType.ColorPicker:
         List<Widget> flexColors = new List<Widget>();
@@ -140,13 +136,12 @@
 
         dialog = new Dialog(
             title: new Text(capType),
-            content: new Grid(flexColors, maxChildExtent: 75.0), onDismiss: () {
-          navigator.pop();
-        }, actions: [
-          new FlatButton(child: new Text('CANCEL'), onPressed: () {
-            navigator.pop();
-          })
-        ]);
+            content: new Grid(flexColors, maxChildExtent: 75.0),
+            actions: [
+              new FlatButton(child: new Text('CANCEL'), onPressed: () {
+                navigator.pop();
+              })
+            ]);
         break;
       case DialogType.ImagePicker:
         List<Widget> flexAvatars = new List<Widget>();
@@ -160,13 +155,11 @@
         dialog = new Dialog(
             title: new Text(capType),
             content: new Grid(flexAvatars, maxChildExtent: 75.0),
-            onDismiss: () {
-          navigator.pop();
-        }, actions: [
-          new FlatButton(child: new Text('CANCEL'), onPressed: () {
-            navigator.pop();
-          })
-        ]);
+            actions: [
+              new FlatButton(child: new Text('CANCEL'), onPressed: () {
+                navigator.pop();
+              })
+            ]);
         break;
       default:
         assert(false);
diff --git a/lib/components/game.dart b/lib/components/game.dart
index fb376d8..6752ab9 100644
--- a/lib/components/game.dart
+++ b/lib/components/game.dart
@@ -29,8 +29,7 @@
   final double width;
   final double height;
 
-  GameComponent(this.game, this.gameEndCallback,
-      {this.width, this.height});
+  GameComponent(this.game, this.gameEndCallback, {this.width, this.height});
 }
 
 abstract class GameComponentState<T extends GameComponent> extends State<T> {
@@ -68,7 +67,6 @@
   @override
   Widget build(BuildContext context); // still UNIMPLEMENTED
 
-
   void _cardLevelMapProcessAllVisible(List<int> visibleCardCollections) {
     Game game = config.game;
 
@@ -81,7 +79,8 @@
   }
 
   void _cardLevelMapProcess(logic_card.Card logicCard) {
-    component_card.GlobalCardKey key = new component_card.GlobalCardKey(logicCard, component_card.CardUIType.CARD);
+    component_card.GlobalCardKey key = new component_card.GlobalCardKey(
+        logicCard, component_card.CardUIType.CARD);
     component_card.CardState cardState = key.currentState;
     if (cardState == null) {
       return; // There's nothing we can really do about this card since it hasn't drawn yet.
@@ -112,10 +111,11 @@
     List<Widget> positionedCards = new List<Widget>();
 
     // Sort the cards by z-index.
-    List<logic_card.Card> orderedKeys = cardLevelMap.keys.toList()..sort((logic_card.Card a, logic_card.Card b) {
-      double diff = cardLevelMap[a].z - cardLevelMap[b].z;
-      return diff.sign.toInt();
-    });
+    List<logic_card.Card> orderedKeys = cardLevelMap.keys.toList()
+      ..sort((logic_card.Card a, logic_card.Card b) {
+        double diff = cardLevelMap[a].z - cardLevelMap[b].z;
+        return diff.sign.toInt();
+      });
 
     orderedKeys.forEach((logic_card.Card c) {
       // Don't show a card if it isn't part of a visible collection.
@@ -126,29 +126,30 @@
 
       CardAnimationData data = cardLevelMap[c];
       RenderBox box = context.findRenderObject();
-      Point p = data.newPoint;
-      Point trueP = box.globalToLocal(p);
+      Point localOld =
+          data.oldPoint != null ? box.globalToLocal(data.oldPoint) : null;
+      Point localNew = box.globalToLocal(data.newPoint);
 
       positionedCards.add(new Positioned(
-        key: new GlobalObjectKey(c.toString()), //needed, or else the Positioned wrapper may be traded out and animations fail.
-        top: trueP.y, // must pass x and y or else it expands to the maximum Stack size.
-        left: trueP.x, // must pass x and y or else it expands to the maximum Stack size.
-        child: new component_card.ZCard(data.comp_card, data.oldPoint, data.newPoint)));
+          key: new GlobalObjectKey(c
+              .toString()), //needed, or else the Positioned wrapper may be traded out and animations fail.
+          top:
+              0.0, // must pass x and y or else it expands to the maximum Stack size.
+          left:
+              0.0, // must pass x and y or else it expands to the maximum Stack size.
+          child: new component_card.ZCard(data.comp_card, localOld, localNew)));
     });
 
     return new IgnorePointer(
-      ignoring: true,
-      child: new Container(
-        width: config.width,
-        height: config.height,
-        child: new Stack(positionedCards)
-      )
-    );
+        ignoring: true,
+        child: new Container(
+            width: config.width,
+            height: config.height,
+            child: new Stack(positionedCards)));
   }
 }
 
-GameComponent createGameComponent(
-    Game game, NoArgCb gameEndCallback,
+GameComponent createGameComponent(Game game, NoArgCb gameEndCallback,
     {double width, double height}) {
   switch (game.gameType) {
     case GameType.Proto:
@@ -177,4 +178,4 @@
   double z;
 
   CardAnimationData(this.comp_card, this.oldPoint, this.newPoint, this.z);
-}
\ No newline at end of file
+}
diff --git a/lib/components/hearts/hearts.part.dart b/lib/components/hearts/hearts.part.dart
index c4ed7d2..1fcd74c 100644
--- a/lib/components/hearts/hearts.part.dart
+++ b/lib/components/hearts/hearts.part.dart
@@ -5,8 +5,7 @@
 part of game_component;
 
 class HeartsGameComponent extends GameComponent {
-  HeartsGameComponent(Game game, NoArgCb cb,
-      {double width, double height})
+  HeartsGameComponent(Game game, NoArgCb cb, {double width, double height})
       : super(game, cb, width: width, height: height);
 
   HeartsGameComponentState createState() => new HeartsGameComponentState();
@@ -43,28 +42,27 @@
 
     // Hearts Widget
     Widget heartsWidget = new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.grey[300]),
+        decoration: new BoxDecoration(backgroundColor: Colors.grey[300]),
         child: buildHearts());
 
     List<Widget> children = new List<Widget>();
     children.add(new Container(
-          decoration:
-              new BoxDecoration(backgroundColor: Colors.grey[300]),
-          width: config.width,
-          height: config.height,
-          child: heartsWidget));
+        decoration: new BoxDecoration(backgroundColor: Colors.grey[300]),
+        width: config.width,
+        height: config.height,
+        child: heartsWidget));
     if (game.phase != HeartsPhase.Deal && game.phase != HeartsPhase.Score) {
       List<int> visibleCardCollections = new List<int>();
       int playerNum = game.playerNumber;
       if (game.viewType == HeartsType.Player) {
-        switch(game.phase) {
+        switch (game.phase) {
           case HeartsPhase.Pass:
             visibleCardCollections.add(HeartsGame.OFFSET_PASS + playerNum);
             visibleCardCollections.add(HeartsGame.OFFSET_HAND + playerNum);
             break;
           case HeartsPhase.Take:
-            visibleCardCollections.add(HeartsGame.OFFSET_PASS + game.takeTarget);
+            visibleCardCollections
+                .add(HeartsGame.OFFSET_PASS + game.takeTarget);
             visibleCardCollections.add(HeartsGame.OFFSET_HAND + playerNum);
             break;
           case HeartsPhase.Play:
@@ -86,10 +84,7 @@
     }
 
     return new Container(
-      width: config.width,
-      height: config.height,
-      child: new Stack(children)
-    );
+        width: config.width, height: config.height, child: new Stack(children));
   }
 
   void _switchViewCallback() {
@@ -226,8 +221,7 @@
 
   @override
   Widget _makeButton(String text, NoArgCb callback, {bool inactive: false}) {
-    var borderColor =
-        inactive ? Colors.grey[500] : Colors.white;
+    var borderColor = inactive ? Colors.grey[500] : Colors.white;
     var backgroundColor = inactive ? Colors.grey[500] : null;
     return new FlatButton(
         child: new Container(
@@ -316,8 +310,7 @@
           width: config.width));
     }
     cardCollections.add(new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.teal[600]),
+        decoration: new BoxDecoration(backgroundColor: Colors.teal[600]),
         width: config.width,
         child:
             new Flex(plays, justifyContent: FlexJustifyContent.spaceAround)));
@@ -325,8 +318,7 @@
     int p = game.playerNumber;
 
     Widget playArea = new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.teal[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.teal[500]),
         width: config.width,
         child: new Center(
             child: new CardCollectionComponent(
@@ -337,9 +329,8 @@
                 acceptCallback: _makeGameMoveCallback,
                 acceptType: p == game.whoseTurn ? DropType.card : DropType.none,
                 width: config.width,
-                backgroundColor: p == game.whoseTurn
-                    ? Colors.white
-                    : Colors.grey[500],
+                backgroundColor:
+                    p == game.whoseTurn ? Colors.white : Colors.grey[500],
                 altColor: p == game.whoseTurn
                     ? Colors.grey[200]
                     : Colors.grey[600])));
@@ -375,8 +366,7 @@
     }
 
     return new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.pink[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
         child: new Flex([
           new Text('Player ${game.playerNumber}'),
           // TODO(alexfandrianto): we want to show round by round, deltas too, don't we?
@@ -391,8 +381,7 @@
     HeartsGame game = config.game as HeartsGame;
 
     return new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.pink[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
         child: new Flex([
           new Text('Player ${game.playerNumber}'),
           _makeButton('Deal', game.dealCards),
@@ -421,8 +410,7 @@
     topCardWidgets.add(_topCardWidget(c3, cb));
     topCardWidgets.add(_makeButton(name, buttoncb, inactive: completed));
 
-    Color bgColor =
-        completed ? Colors.teal[600] : Colors.teal[500];
+    Color bgColor = completed ? Colors.teal[600] : Colors.teal[500];
 
     Widget topArea = new Container(
         decoration: new BoxDecoration(backgroundColor: bgColor),
diff --git a/lib/components/proto/proto.part.dart b/lib/components/proto/proto.part.dart
index 7711ba0..d6b9873 100644
--- a/lib/components/proto/proto.part.dart
+++ b/lib/components/proto/proto.part.dart
@@ -5,8 +5,7 @@
 part of game_component;
 
 class ProtoGameComponent extends GameComponent {
-  ProtoGameComponent(Game game, NoArgCb cb,
-      {double width, double height})
+  ProtoGameComponent(Game game, NoArgCb cb, {double width, double height})
       : super(game, cb, width: width, height: height);
 
   ProtoGameComponentState createState() => new ProtoGameComponentState();
@@ -33,8 +32,8 @@
     cardCollections.add(new Container(
         decoration: new BoxDecoration(
             backgroundColor: Colors.green[500], borderRadius: 5.0),
-        child: new CardCollectionComponent(
-            config.game.cardCollections[4], true, CardCollectionOrientation.show1,
+        child: new CardCollectionComponent(config.game.cardCollections[4], true,
+            CardCollectionOrientation.show1,
             dragChildren: true,
             acceptType: DropType.card,
             acceptCallback: _makeGameMoveCallback,
@@ -43,8 +42,7 @@
     cardCollections.add(_makeDebugButtons());
 
     return new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.pink[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
         child: new Flex(cardCollections, direction: FlexDirection.vertical));
   }
 
diff --git a/lib/components/solitaire/solitaire.part.dart b/lib/components/solitaire/solitaire.part.dart
index a1fde84..44661ec 100644
--- a/lib/components/solitaire/solitaire.part.dart
+++ b/lib/components/solitaire/solitaire.part.dart
@@ -5,8 +5,7 @@
 part of game_component;
 
 class SolitaireGameComponent extends GameComponent {
-  SolitaireGameComponent(Game game, NoArgCb cb,
-      {double width, double height})
+  SolitaireGameComponent(Game game, NoArgCb cb, {double width, double height})
       : super(game, cb, width: width, height: height);
 
   SolitaireGameComponentState createState() =>
@@ -15,7 +14,6 @@
 
 class SolitaireGameComponentState
     extends GameComponentState<SolitaireGameComponent> {
-
   @override
   Widget build(BuildContext context) {
     SolitaireGame game = config.game as SolitaireGame;
@@ -29,23 +27,20 @@
 
     List<Widget> children = new List<Widget>();
     children.add(new Container(
-          decoration:
-              new BoxDecoration(backgroundColor: Colors.grey[300]),
-          width: config.width,
-          height: config.height,
-          child: solitaireWidget));
+        decoration: new BoxDecoration(backgroundColor: Colors.grey[300]),
+        width: config.width,
+        height: config.height,
+        child: solitaireWidget));
     if (game.phase == SolitairePhase.Play) {
       // All cards are visible.
-      List<int> visibleCardCollections = game.cardCollections.asMap().keys.toList();
+      List<int> visibleCardCollections =
+          game.cardCollections.asMap().keys.toList();
 
       children.add(this.buildCardAnimationLayer(visibleCardCollections));
     }
 
     return new Container(
-      width: config.width,
-      height: config.height,
-      child: new Stack(children)
-    );
+        width: config.width, height: config.height, child: new Stack(children));
   }
 
   void _cheatCallback() {
@@ -74,8 +69,7 @@
 
   @override
   Widget _makeButton(String text, NoArgCb callback, {bool inactive: false}) {
-    var borderColor =
-        inactive ? Colors.grey[500] : Colors.white;
+    var borderColor = inactive ? Colors.grey[500] : Colors.white;
     var backgroundColor = inactive ? Colors.grey[500] : null;
     return new FlatButton(
         child: new Container(
@@ -204,8 +198,7 @@
     SolitaireGame game = config.game as SolitaireGame;
 
     return new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.pink[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
         child: new Flex([
           new Text('Player ${game.playerNumber}'),
           _makeButton("Return to Lobby", _quitGameCallback),
@@ -217,8 +210,7 @@
     SolitaireGame game = config.game as SolitaireGame;
 
     return new Container(
-        decoration:
-            new BoxDecoration(backgroundColor: Colors.pink[500]),
+        decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
         child: new Flex([
           new Text('Player ${game.playerNumber}'),
           _makeButton('Deal', game.dealCardsUI),
diff --git a/lib/logic/croupier.dart b/lib/logic/croupier.dart
index 47357cc..5cb2eb4 100644
--- a/lib/logic/croupier.dart
+++ b/lib/logic/croupier.dart
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-import 'game/game.dart' show Game, GameType, GameStartData, stringToGameType, gameTypeToString;
+import 'game/game.dart'
+    show Game, GameType, GameStartData, stringToGameType, gameTypeToString;
 import 'create_game.dart' as cg;
 import 'croupier_settings.dart' show CroupierSettings;
 import '../src/syncbase/settings_manager.dart' show SettingsManager;
@@ -34,7 +35,8 @@
     settings_everyone = new Map<int, CroupierSettings>();
     games_found = new Map<String, GameStartData>();
     players_found = new Map<int, int>();
-    settings_manager = new SettingsManager(_updateSettingsEveryoneCb, _updateGamesFoundCb, _updatePlayerFoundCb);
+    settings_manager = new SettingsManager(
+        _updateSettingsEveryoneCb, _updateGamesFoundCb, _updatePlayerFoundCb);
 
     settings_manager.load().then((String csString) {
       settings = new CroupierSettings.fromJSONString(csString);
@@ -45,7 +47,8 @@
   // Updates the settings_everyone map as people join the main Croupier syncgroup
   // and change their settings.
   void _updateSettingsEveryoneCb(String key, String json) {
-    settings_everyone[int.parse(key)] = new CroupierSettings.fromJSONString(json);
+    settings_everyone[int.parse(key)] =
+        new CroupierSettings.fromJSONString(json);
     if (this.informUICb != null) {
       this.informUICb();
     }
@@ -111,9 +114,12 @@
         GameType gt = data as GameType;
         game = cg.createGame(gt, 0); // Start as player 0 of whatever game type.
 
-        settings_manager.createGameSyncgroup(gameTypeToString(gt), game.gameID).then((GameStartData gsd) {
+        settings_manager
+            .createGameSyncgroup(gameTypeToString(gt), game.gameID)
+            .then((GameStartData gsd) {
           // Only the game chooser should be advertising the game.
-          settings_manager.advertiseSettings(gsd); // don't wait for this future.
+          settings_manager
+              .advertiseSettings(gsd); // don't wait for this future.
         });
 
         break;
@@ -128,7 +134,8 @@
 
         // data would probably be the game id again.
         GameStartData gsd = data as GameStartData;
-        game = cg.createGame(stringToGameType(gsd.type), gsd.playerNumber, gameID: gsd.gameID); // Start as player 0 of whatever game type.
+        game = cg.createGame(stringToGameType(gsd.type), gsd.playerNumber,
+            gameID: gsd.gameID); // Start as player 0 of whatever game type.
         String sgName;
         games_found.forEach((String name, GameStartData g) {
           if (g == gsd) {
@@ -170,4 +177,4 @@
 
     state = nextState;
   }
-}
\ No newline at end of file
+}
diff --git a/lib/logic/game/game_def.part.dart b/lib/logic/game/game_def.part.dart
index ebf206d..886fb35 100644
--- a/lib/logic/game/game_def.part.dart
+++ b/lib/logic/game/game_def.part.dart
@@ -47,8 +47,12 @@
   }
 
   String toJSONString() {
-    return JSON.encode(
-        {"type": type, "playerNumber": playerNumber, "gameID": gameID, "ownerID": ownerID});
+    return JSON.encode({
+      "type": type,
+      "playerNumber": playerNumber,
+      "gameID": gameID,
+      "ownerID": ownerID
+    });
   }
 
   GameType get gameType => stringToGameType(type);
@@ -58,7 +62,10 @@
       return false;
     }
     GameStartData gsd = other;
-    return gsd.type == type && gsd.playerNumber == playerNumber && gsd.gameID == gameID && gsd.ownerID == ownerID;
+    return gsd.type == type &&
+        gsd.playerNumber == playerNumber &&
+        gsd.gameID == gameID &&
+        gsd.ownerID == ownerID;
   }
 }
 
@@ -89,9 +96,9 @@
 
   // A super constructor, don't call this unless you're a subclass.
   Game.create(
-      this.gameType, this.gamelog, this._playerNumber, int numCollections, {
-        int gameID
-      }) : gameID = gameID ?? new math.Random().nextInt(0x00FFFFFF) {
+      this.gameType, this.gamelog, this._playerNumber, int numCollections,
+      {int gameID})
+      : gameID = gameID ?? new math.Random().nextInt(0x00FFFFFF) {
     print("The gameID is ${gameID}");
     gamelog.setGame(this);
     for (int i = 0; i < numCollections; i++) {
diff --git a/lib/logic/hearts/hearts_game.part.dart b/lib/logic/hearts/hearts_game.part.dart
index 7174f35..8b6535e 100644
--- a/lib/logic/hearts/hearts_game.part.dart
+++ b/lib/logic/hearts/hearts_game.part.dart
@@ -66,7 +66,8 @@
   List<bool> ready;
 
   HeartsGame(int playerNumber, {int gameID})
-      : super.create(GameType.Hearts, new HeartsLog(), playerNumber, 16, gameID: gameID) {
+      : super.create(GameType.Hearts, new HeartsLog(), playerNumber, 16,
+            gameID: gameID) {
     resetGame();
   }
 
diff --git a/lib/logic/proto/proto_game.part.dart b/lib/logic/proto/proto_game.part.dart
index d3ad7ff..28ace55 100644
--- a/lib/logic/proto/proto_game.part.dart
+++ b/lib/logic/proto/proto_game.part.dart
@@ -9,7 +9,8 @@
   String get gameTypeName => "Proto";
 
   ProtoGame(int playerNumber, {int gameID})
-      : super.create(GameType.Proto, new ProtoLog(), playerNumber, 6, gameID: gameID) {
+      : super.create(GameType.Proto, new ProtoLog(), playerNumber, 6,
+            gameID: gameID) {
     // playerNumber would be used in a real game, but I have to ignore it for debugging.
     // It would determine faceUp/faceDown status.faceDown
 
diff --git a/lib/logic/solitaire/solitaire_game.part.dart b/lib/logic/solitaire/solitaire_game.part.dart
index 9427250..e84f04c 100644
--- a/lib/logic/solitaire/solitaire_game.part.dart
+++ b/lib/logic/solitaire/solitaire_game.part.dart
@@ -28,7 +28,8 @@
 
   SolitaireGame(int playerNumber, {int gameID})
       : super.create(
-            GameType.Solitaire, new SolitaireLog(), playerNumber, NUM_PILES, gameID: gameID) {
+            GameType.Solitaire, new SolitaireLog(), playerNumber, NUM_PILES,
+            gameID: gameID) {
     resetGame();
   }
 
diff --git a/lib/src/mocks/settings_manager.dart b/lib/src/mocks/settings_manager.dart
index 63c9acc..f6aac0a 100644
--- a/lib/src/mocks/settings_manager.dart
+++ b/lib/src/mocks/settings_manager.dart
@@ -6,18 +6,25 @@
 
 import 'util.dart' as util;
 import '../../logic/game/game.dart' as logic_game;
+import '../../logic/croupier_settings.dart' show CroupierSettings;
 
 class SettingsManager {
   final util.updateCallbackT updateCallback;
   final util.updateCallbackT updateGamesCallback;
   final util.updateCallbackT updatePlayerFoundCallback;
 
-  SettingsManager(this.updateCallback, this.updateGamesCallback, this.updatePlayerFoundCallback);
+  SettingsManager(this.updateCallback, this.updateGamesCallback,
+      this.updatePlayerFoundCallback);
 
   Map<String, String> _data = new Map<String, String>();
 
   Future<String> load([int userID]) {
     if (userID == null) {
+      if (_data["settings"] == null) {
+        CroupierSettings settings = new CroupierSettings.random();
+        String jsonStr = settings.toJSONString();
+        _data["settings"] = jsonStr;
+      }
       return new Future<String>(() => _data["settings"]);
     }
     return new Future<String>(() => _data["${userID}"]);
diff --git a/lib/src/syncbase/croupier_client.dart b/lib/src/syncbase/croupier_client.dart
index 3fddb72..9e1d0a0 100644
--- a/lib/src/syncbase/croupier_client.dart
+++ b/lib/src/syncbase/croupier_client.dart
@@ -8,8 +8,8 @@
 import 'dart:async';
 import 'dart:io' show Platform;
 
-import 'package:discovery/discovery.dart' as discovery;
-import 'package:flutter/services.dart' show embedder;
+import 'package:v23discovery/discovery.dart' as discovery;
+import 'package:flutter/services.dart' show shell;
 import 'package:syncbase/src/naming/util.dart' as naming;
 import 'package:syncbase/syncbase_client.dart' as sc;
 
@@ -31,7 +31,7 @@
 
   CroupierClient._internal()
       : _syncbaseClient =
-            new sc.SyncbaseClient(embedder.connectToService, syncbaseServerUrl),
+            new sc.SyncbaseClient(shell.connectToService, syncbaseServerUrl),
         _discoveryClient = new DiscoveryClient() {
     print('Fetching syncbase_server.mojo from $syncbaseServerUrl');
 
diff --git a/lib/src/syncbase/discovery_client.dart b/lib/src/syncbase/discovery_client.dart
index 450545d..cb35617 100644
--- a/lib/src/syncbase/discovery_client.dart
+++ b/lib/src/syncbase/discovery_client.dart
@@ -4,8 +4,8 @@
 
 import 'dart:async';
 
-import 'package:discovery/discovery.dart' as discovery;
-import 'package:flutter/services.dart' show embedder;
+import 'package:v23discovery/discovery.dart' as discovery;
+import 'package:flutter/services.dart' show shell;
 
 class ProxyHandlePair<T> {
   final T proxy;
@@ -53,7 +53,7 @@
 
     print('Starting up discovery scanner ${key}. Looking for ${query}');
 
-    embedder.connectToService(discoveryUrl, s);
+    shell.connectToService(discoveryUrl, s);
 
     // Use a ScanHandlerStub (Mojo-encodable interface) to wrap the scan handler.
     discovery.ScanHandlerStub shs = new discovery.ScanHandlerStub.unbound();
@@ -95,7 +95,7 @@
     print(
         'Starting up discovery advertiser ${key}. Broadcasting for ${serviceInfo.instanceName}');
 
-    embedder.connectToService(discoveryUrl, a);
+    shell.connectToService(discoveryUrl, a);
 
     return a.ptr
         .advertise(serviceInfo, visibility ?? <String>[])
diff --git a/lib/src/syncbase/log_writer.dart b/lib/src/syncbase/log_writer.dart
index f1760bd..ca6b0ee 100644
--- a/lib/src/syncbase/log_writer.dart
+++ b/lib/src/syncbase/log_writer.dart
@@ -49,7 +49,8 @@
   // Once a consensus has been reached, this is set to false again.
   bool inProposalMode = false;
   Map<String, String> proposalsKnown; // Only updated via watch.
-  Set<String> _acceptedProposals = new Set<String>(); // Add accepted proposals so that we can ignore them.
+  Set<String> _acceptedProposals =
+      new Set<String>(); // Add accepted proposals so that we can ignore them.
 
   // The associated user helps in the production of unique keys.
   int _associatedUser;
@@ -66,8 +67,7 @@
 
   // The LogWriter takes a callback for watch updates, the list of users, and
   // the logPrefix to write at on table.
-  LogWriter(this.updateCallback, this.users)
-      : _cc = new CroupierClient() {
+  LogWriter(this.updateCallback, this.users) : _cc = new CroupierClient() {
     _prepareLog();
   }
 
@@ -196,9 +196,11 @@
   bool _ownsProposal(String key, String proposalData) {
     return _proposalSayer(key) == _proposalOwner(proposalData);
   }
+
   int _proposalSayer(String key) {
     return int.parse(key.split("/").last);
   }
+
   int _proposalOwner(String proposalData) {
     Map<String, String> pp = JSON.decode(proposalData);
     String keyP = pp["key"];
diff --git a/lib/src/syncbase/settings_manager.dart b/lib/src/syncbase/settings_manager.dart
index e12994b..be8e6a5 100644
--- a/lib/src/syncbase/settings_manager.dart
+++ b/lib/src/syncbase/settings_manager.dart
@@ -23,7 +23,7 @@
 import 'dart:async';
 import 'dart:convert' show UTF8, JSON;
 
-import 'package:discovery/discovery.dart' as discovery;
+import 'package:v23discovery/discovery.dart' as discovery;
 import 'package:syncbase/syncbase_client.dart' as sc;
 
 class SettingsManager {
@@ -37,11 +37,14 @@
   static const String _personalKey = "personal";
   static const String _settingsWatchSyncPrefix = "users";
 
-  SettingsManager(this.updateSettingsCallback, this.updateGamesCallback, this.updatePlayerFoundCallback) : _cc = new CroupierClient();
+  SettingsManager(this.updateSettingsCallback, this.updateGamesCallback,
+      this.updatePlayerFoundCallback)
+      : _cc = new CroupierClient();
 
   String _settingsDataKey(int userID) {
     return "${_settingsWatchSyncPrefix}/${userID}/settings";
   }
+
   String _settingsDataKeyUserID(String dataKey) {
     List<String> parts = dataKey.split("/");
     return parts[parts.length - 2];
@@ -137,7 +140,6 @@
         prefix: this._settingsDataKey(id));
   }
 
-
   // This watch method ensures that any changes are propagated to the caller.
   // In this case, we're forwarding any player changes to the Croupier logic.
   Future _startWatchPlayers(Stream<sc.WatchChange> watchStream) async {
@@ -165,12 +167,14 @@
         this.updatePlayerFoundCallback(playerID, value);
 
         // Also, you should be sure to join this person's syncgroup.
-        _cc.joinSyncgroup(_cc.makeSyncgroupName(await _syncSuffix(int.parse(playerID))));
+        _cc.joinSyncgroup(
+            _cc.makeSyncgroupName(await _syncSuffix(int.parse(playerID))));
       }
     }
   }
 
-  Future<logic_game.GameStartData> createGameSyncgroup(String type, int gameID) async {
+  Future<logic_game.GameStartData> createGameSyncgroup(
+      String type, int gameID) async {
     print("Creating game syncgroup for ${type} and ${gameID}");
     sc.SyncbaseNoSqlDatabase db = await _cc.createDatabase();
     sc.SyncbaseTable gameTable = await _cc.createTable(db, util.tableNameGames);
@@ -186,12 +190,16 @@
 
     int id = await _getUserID();
     await gameTable.row("${gameID}/owner").put(UTF8.encode("${id}"));
-    await gameTable.row("${gameID}/players/${id}/player_number").put(UTF8.encode("0"));
+    await gameTable
+        .row("${gameID}/players/${id}/player_number")
+        .put(UTF8.encode("0"));
 
-    logic_game.GameStartData gsd = new logic_game.GameStartData(type, 0, gameID, id);
+    logic_game.GameStartData gsd =
+        new logic_game.GameStartData(type, 0, gameID, id);
 
     await _cc.createSyncgroup(
-        _cc.makeSyncgroupName(util.syncgameSuffix(gsd.toJSONString())), util.tableNameGames,
+        _cc.makeSyncgroupName(util.syncgameSuffix(gsd.toJSONString())),
+        util.tableNameGames,
         prefix: util.syncgamePrefix(gameID));
 
     return gsd;
@@ -215,7 +223,9 @@
 
     int id = await _getUserID();
     int playerNumber = fellowPlayers.length - 1;
-    gameTable.row("${gameID}/players/${id}/player_number").put(UTF8.encode("${playerNumber}"));
+    gameTable
+        .row("${gameID}/players/${id}/player_number")
+        .put(UTF8.encode("${playerNumber}"));
   }
 
   // When starting the settings manager, there may be settings already in the
@@ -226,7 +236,8 @@
         .forEach((sc.KeyValue kv) {
       if (kv.key.endsWith("/settings")) {
         // Then we can process the value as if it were settings data.
-        this.updateSettingsCallback(_settingsDataKeyUserID(kv.key), UTF8.decode(kv.value));
+        this.updateSettingsCallback(
+            _settingsDataKeyUserID(kv.key), UTF8.decode(kv.value));
       }
     });
   }
@@ -237,8 +248,10 @@
 
   // Someone who is creating a game should scan for players who wish to join.
   Future scanSettings() async {
-    SettingsScanHandler ssh = new SettingsScanHandler(_cc, this.updateGamesCallback);
-    _cc.discoveryClient.scan(_discoverySettingsKey, "CroupierSettingsAndGame", ssh);
+    SettingsScanHandler ssh =
+        new SettingsScanHandler(_cc, this.updateGamesCallback);
+    _cc.discoveryClient
+        .scan(_discoverySettingsKey, "CroupierSettingsAndGame", ssh);
   }
 
   void stopScanSettings() {
@@ -255,7 +268,8 @@
             interfaceName: "CroupierSettingsAndGame",
             addrs: <String>[
               _cc.makeSyncgroupName(suffix),
-              _cc.makeSyncgroupName(gameSuffix)]));
+              _cc.makeSyncgroupName(gameSuffix)
+            ]));
   }
 
   void stopAdvertiseSettings() {
@@ -311,7 +325,6 @@
       String json = _getPartFromBack(s.addrs[1], "-", 0);
       updateGamesCallback(s.addrs[1], json);
 
-
       _cc.joinSyncgroup(s.addrs[0]);
     } else {
       // An unexpected service was found. Who is advertising it?
diff --git a/lib/src/syncbase/util.dart b/lib/src/syncbase/util.dart
index 595c6fd..a6ff117 100644
--- a/lib/src/syncbase/util.dart
+++ b/lib/src/syncbase/util.dart
@@ -29,11 +29,11 @@
   print('$now $msg');
 }
 
-
 // data should contain a JSON-encoded logic_game.GameStartData
 String syncgameSuffix(String data) {
   return "${sgSuffixGame}-${data}";
 }
+
 String syncgamePrefix(int gameID) {
   return "${gameID}";
-}
\ No newline at end of file
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index 3da9478..08e678e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,13 @@
 name: croupier
 dependencies:
-  discovery: ">=0.0.0 <0.1.0"
+  v23discovery: ">=0.0.0 <0.1.0"
   syncbase: ">=0.0.0 <0.1.0"
-  flutter: "0.0.14"
-  sky_tools: any
+  flutter:
+    path: ../../../../../flutter/packages/flutter
+  sky_tools:
+    path: ../../../../../flutter/packages/flutter_tools
   test: any
 
 dependency_overrides:
-  discovery:
+  v23discovery:
     path: ../../mojo/discovery
\ No newline at end of file