Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit d1f8e81

Browse files
committed
Rename constants to lower camel case per effective dart.
https://www.dartlang.org/guides/language/effective-dart/style#prefer-using-lowercamelcase-for-constant-names PiperOrigin-RevId: 200730251
1 parent 825d755 commit d1f8e81

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

lib/material_stepper/common.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
const String HORIZONTAL = 'horizontal';
6-
const String VERTICAL = 'vertical';
7-
const String SIZE_DEFAULT = 'default';
8-
const String SIZE_MINI = 'mini';
9-
const String ALL = 'all';
10-
const String BACKWARDS = 'backwards';
11-
const String NONE = 'none';
5+
const horizontal = 'horizontal';
6+
const vertical = 'vertical';
7+
const sizeDefault = 'default';
8+
const sizeMini = 'mini';
9+
const all = 'all';
10+
const backwards = 'backwards';
11+
const none = 'none';
1212

13-
const Orientations = const <String>[HORIZONTAL, VERTICAL];
13+
const orientations = const [horizontal, vertical];
1414

15-
const Sizes = const <String>[SIZE_DEFAULT, SIZE_MINI];
15+
const sizes = const [sizeDefault, sizeMini];
1616

17-
const Jumps = const <String>[ALL, BACKWARDS, NONE];
17+
const jumps = const [all, backwards, none];

lib/material_stepper/material_stepper.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ class MaterialStepperComponent {
6060
@HostBinding('class')
6161
static const hostClass = 'themeable';
6262

63-
static const DEFAULT_ORIENTATION = HORIZONTAL;
64-
static const DEFAULT_SIZE = SIZE_DEFAULT;
63+
static const defaultOrientation = horizontal;
64+
static const defaultSize = sizeDefault;
6565
List<StepDirective> steps = [];
6666

6767
int activeStepIndex;
6868
bool stepperDone = false;
6969

7070
String _noText = _cancelMsg;
7171

72-
var _orientation = DEFAULT_ORIENTATION;
73-
var _size = DEFAULT_SIZE;
72+
var _orientation = defaultOrientation;
73+
var _size = defaultSize;
7474
var _legalJumps;
7575

7676
HtmlElement _stepperNativeElement;
@@ -154,7 +154,7 @@ class MaterialStepperComponent {
154154
/// 'horizontal' and 'vertical' (default).
155155
@Input()
156156
set orientation(String s) {
157-
assert(Orientations.contains(s));
157+
assert(orientations.contains(s));
158158
_orientation = s;
159159
}
160160

@@ -163,7 +163,7 @@ class MaterialStepperComponent {
163163
/// 'default' (default) and 'mini'.
164164
@Input()
165165
set size(String s) {
166-
assert(Sizes.contains(s));
166+
assert(sizes.contains(s));
167167
_size = s;
168168
}
169169

@@ -172,7 +172,7 @@ class MaterialStepperComponent {
172172
/// while for others, it is more natural if the step content is laid out
173173
/// together with its other DOM elements (vertical, default-size).
174174
bool get shouldInlineContent =>
175-
orientation == VERTICAL && size == SIZE_DEFAULT;
175+
orientation == vertical && size == sizeDefault;
176176

177177
String get noText => _noText;
178178

@@ -198,7 +198,7 @@ class MaterialStepperComponent {
198198
/// 'all' (any jump allowed, regardless of the step state).
199199
@Input()
200200
set legalJumps(String s) {
201-
assert(Jumps.contains(s));
201+
assert(jumps.contains(s));
202202
_legalJumps = s;
203203
_recalculatePropertiesOfSteps();
204204
}
@@ -267,13 +267,13 @@ class MaterialStepperComponent {
267267
}
268268

269269
switch (_legalJumps) {
270-
case ALL:
270+
case all:
271271
s.isSelectable = !s.active;
272272
break;
273-
case NONE:
273+
case none:
274274
s.isSelectable = false;
275275
break;
276-
case BACKWARDS:
276+
case backwards:
277277
s.isSelectable = i < activeStepIndex;
278278
}
279279
i++;

0 commit comments

Comments
 (0)