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

Unified Diff: sky/sdk/lib/framework/components2/popup_menu.dart

Issue 1158813004: Style guide says enum values should be lowerCamelCase. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/sdk/lib/framework/components2/menu_item.dart ('k') | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/popup_menu.dart
diff --git a/sky/sdk/lib/framework/components2/popup_menu.dart b/sky/sdk/lib/framework/components2/popup_menu.dart
index 6ca3c44fb15a7412370fb09d5f300b139dceff72..cc32e73e49cc6e9b1c4c65044c77687d462b1361 100644
--- a/sky/sdk/lib/framework/components2/popup_menu.dart
+++ b/sky/sdk/lib/framework/components2/popup_menu.dart
@@ -15,31 +15,31 @@ const double _kMenuOpenDuration = 300.0;
const double _kMenuCloseDuration = 200.0;
const double _kMenuCloseDelay = 100.0;
-enum MenuState { Hidden, Opening, Open, Closing }
+enum MenuState { hidden, opening, open, closing }
class PopupMenuController {
AnimatedValue position = new AnimatedValue(0.0);
- MenuState _state = MenuState.Hidden;
+ MenuState _state = MenuState.hidden;
MenuState get state => _state;
- bool get canReact => (_state == MenuState.Opening) || (_state == MenuState.Open);
+ bool get canReact => (_state == MenuState.opening) || (_state == MenuState.open);
open() async {
- if (_state != MenuState.Hidden)
+ if (_state != MenuState.hidden)
return;
- _state = MenuState.Opening;
+ _state = MenuState.opening;
if (await position.animateTo(1.0, _kMenuOpenDuration) == 1.0)
- _state = MenuState.Open;
+ _state = MenuState.open;
}
Future _closeState;
close() async {
var result = new Completer();
_closeState = result.future;
- if ((_state == MenuState.Opening) || (_state == MenuState.Open)) {
- _state = MenuState.Closing;
+ if ((_state == MenuState.opening) || (_state == MenuState.open)) {
+ _state = MenuState.closing;
await position.animateTo(0.0, _kMenuCloseDuration, initialDelay: _kMenuCloseDelay);
- _state = MenuState.Hidden;
+ _state = MenuState.hidden;
_closeState = null;
result.complete();
return result.future;
« no previous file with comments | « sky/sdk/lib/framework/components2/menu_item.dart ('k') | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698