enable always_put_control_body_on_new_line lint (#9950)
This commit is contained in:
committed by
GitHub
parent
e4546584d1
commit
9b56c1c58c
@@ -206,19 +206,23 @@ class _UsNumberTextInputFormatter extends TextInputFormatter {
|
||||
final StringBuffer newText = new StringBuffer();
|
||||
if (newTextLength >= 1) {
|
||||
newText.write('(');
|
||||
if (newValue.selection.end >= 1) selectionIndex++;
|
||||
if (newValue.selection.end >= 1)
|
||||
selectionIndex++;
|
||||
}
|
||||
if (newTextLength >= 4) {
|
||||
newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') ');
|
||||
if (newValue.selection.end >= 3) selectionIndex += 2;
|
||||
if (newValue.selection.end >= 3)
|
||||
selectionIndex += 2;
|
||||
}
|
||||
if (newTextLength >= 7) {
|
||||
newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-');
|
||||
if (newValue.selection.end >= 6) selectionIndex++;
|
||||
if (newValue.selection.end >= 6)
|
||||
selectionIndex++;
|
||||
}
|
||||
if (newTextLength >= 11) {
|
||||
newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' ');
|
||||
if (newValue.selection.end >= 10) selectionIndex++;
|
||||
if (newValue.selection.end >= 10)
|
||||
selectionIndex++;
|
||||
}
|
||||
// Dump the rest.
|
||||
if (newTextLength >= usedSubstringIndex)
|
||||
|
||||
@@ -14,7 +14,8 @@ void main() {
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null) driver.close();
|
||||
if (driver != null)
|
||||
driver.close();
|
||||
});
|
||||
|
||||
test('tap on the button, verify result', () async {
|
||||
|
||||
Reference in New Issue
Block a user