From e854d7457dc9fb5d73e530fda74cf574d532d49b Mon Sep 17 00:00:00 2001 From: James Robinson Date: Wed, 23 Sep 2015 16:28:20 -0700 Subject: [PATCH] Update to Mojo 4e4d51ce28a8edcb32b9c7f555e38e2ae84a825e, update deps This updates to mojo 4e4d51ce28a and mojo sdk 711a0bcfb141b4 and updates the sky package's pubspec.yaml dependency to '>=0.1.0 <0.2.0' to be compatible with the current mojo package. This includes an update to the Mojo Dart generator to produce real classes for enums and the corresponding updates for users of the KeyboardType enum in Sky as well as one scoped_ptr->std::unique_ptr in shell corresponding to a change in the Mojo EDK. When a new version of the sky and sky_services package are pushed this will fix domokit/mojo#440. --- examples/fitness/lib/measurement.dart | 2 +- examples/fitness/lib/settings.dart | 2 +- packages/flutter/lib/src/services/keyboard.dart | 4 ++-- packages/flutter/lib/src/widgets/input.dart | 6 +++--- packages/flutter/pubspec.yaml | 4 ++-- packages/unit/test/widget/input_test.dart | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/fitness/lib/measurement.dart b/examples/fitness/lib/measurement.dart index 63dcbf8a83..ebea00bc33 100644 --- a/examples/fitness/lib/measurement.dart +++ b/examples/fitness/lib/measurement.dart @@ -189,7 +189,7 @@ class MeasurementFragment extends StatefulComponent { new Input( key: weightKey, placeholder: 'Enter weight', - keyboardType: KeyboardType_NUMBER, + keyboardType: KeyboardType.NUMBER, onChanged: _handleWeightChanged ), ], alignItems: FlexAlignItems.stretch) diff --git a/examples/fitness/lib/settings.dart b/examples/fitness/lib/settings.dart index 66887b83ba..584338022e 100644 --- a/examples/fitness/lib/settings.dart +++ b/examples/fitness/lib/settings.dart @@ -70,7 +70,7 @@ class SettingsFragment extends StatefulComponent { content: new Input( key: weightGoalKey, placeholder: 'Goal weight in lbs', - keyboardType: KeyboardType_NUMBER, + keyboardType: KeyboardType.NUMBER, onChanged: _handleGoalWeightChanged ), onDismiss: () { diff --git a/packages/flutter/lib/src/services/keyboard.dart b/packages/flutter/lib/src/services/keyboard.dart index 49d2ebe47b..d5bcd97014 100644 --- a/packages/flutter/lib/src/services/keyboard.dart +++ b/packages/flutter/lib/src/services/keyboard.dart @@ -31,7 +31,7 @@ class Keyboard { KeyboardHandle _currentHandle; - KeyboardHandle show(KeyboardClientStub stub, int keyboardType) { + KeyboardHandle show(KeyboardClientStub stub, KeyboardType keyboardType) { assert(stub != null); if (_currentHandle != null) { if (_currentHandle.stub == stub) @@ -46,7 +46,7 @@ class Keyboard { class KeyboardHandle { - KeyboardHandle._show(Keyboard keyboard, this.stub, int keyboardType) : _keyboard = keyboard { + KeyboardHandle._show(Keyboard keyboard, this.stub, KeyboardType keyboardType) : _keyboard = keyboard { _keyboard.service.show(stub, keyboardType); _attached = true; } diff --git a/packages/flutter/lib/src/widgets/input.dart b/packages/flutter/lib/src/widgets/input.dart index 69399c3706..67d4581d1a 100644 --- a/packages/flutter/lib/src/widgets/input.dart +++ b/packages/flutter/lib/src/widgets/input.dart @@ -10,7 +10,7 @@ import 'package:sky/src/widgets/focus.dart'; import 'package:sky/src/widgets/framework.dart'; import 'package:sky/src/widgets/theme.dart'; -export 'package:sky/services.dart' show KeyboardType_TEXT, KeyboardType_NUMBER, KeyboardType_PHONE, KeyboardType_DATETIME; +export 'package:sky/services.dart' show KeyboardType; typedef void StringValueChanged(String value); @@ -25,10 +25,10 @@ class Input extends StatefulComponent { String initialValue: '', this.placeholder, this.onChanged, - this.keyboardType : KeyboardType_TEXT + this.keyboardType : KeyboardType.TEXT }): _value = initialValue, super(key: key); - int keyboardType; + KeyboardType keyboardType; String placeholder; StringValueChanged onChanged; diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 0437b63f55..3ae5e5fbb3 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -6,8 +6,8 @@ homepage: http://flutter.io dependencies: cassowary: ^0.1.7 material_design_icons: ^0.0.3 - mojo_services: 0.0.23 - mojo: 0.0.23 + mojo_services: '>=0.1.0 <0.2.0' + mojo: '>=0.1.0 <0.2.0' newton: ^0.1.3 sky_engine: ^0.0.25 sky_services: ^0.0.25 diff --git a/packages/unit/test/widget/input_test.dart b/packages/unit/test/widget/input_test.dart index e0379a916b..14aa708dac 100644 --- a/packages/unit/test/widget/input_test.dart +++ b/packages/unit/test/widget/input_test.dart @@ -11,7 +11,7 @@ import '../services/mock_services.dart'; class MockKeyboard implements KeyboardService { KeyboardClient client; - void show(KeyboardClientStub client, int type) { + void show(KeyboardClientStub client, KeyboardType type) { this.client = client.impl; }