Commit 2767d37c authored by Ian Hickson's avatar Ian Hickson Committed by Michael Goderbauer

RTL caret in text fields (#33461)

parent f7bfd549
......@@ -173,7 +173,7 @@ if [[ ! -e "$FLUTTER_ROOT/.git" ]]; then
fi
# To debug the tool, you can uncomment the following lines to enable checked mode and set an observatory port:
# FLUTTER_TOOL_ARGS="--checked $FLUTTER_TOOL_ARGS"
# FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS"
# FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
(upgrade_flutter) 3< "$PROG_NAME"
......
......@@ -637,17 +637,17 @@ Future<void> _runFlutterTest(String workingDirectory, {
}
if (useFlutterTestFormatter) {
final FlutterCompactFormatter formatter = FlutterCompactFormatter();
final Stream<String> testOutput = runAndGetStdout(
flutter,
args,
workingDirectory: workingDirectory,
expectNonZeroExit: expectFailure,
timeout: timeout,
beforeExit: formatter.finish,
environment: environment,
);
await _processTestOutput(formatter, testOutput, tableData);
final FlutterCompactFormatter formatter = FlutterCompactFormatter();
final Stream<String> testOutput = runAndGetStdout(
flutter,
args,
workingDirectory: workingDirectory,
expectNonZeroExit: expectFailure,
timeout: timeout,
beforeExit: formatter.finish,
environment: environment,
);
await _processTestOutput(formatter, testOutput, tableData);
} else {
await runCommand(
flutter,
......
......@@ -19,7 +19,7 @@ void main() {
File template;
setUp(() {
tmpDir = Directory.systemTemp.createTempSync('snippets_test');
tmpDir = Directory.systemTemp.createTempSync('flutter_snippets_test.');
configuration = Configuration(flutterRoot: Directory(path.join(
tmpDir.absolute.path, 'flutter')));
configuration.createOutputDirectory();
......
......@@ -1191,7 +1191,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
if (_currentCaretRect == null || !_scrollController.hasClients) {
return;
}
final double scrollOffsetForCaret = _getScrollOffsetForCaret(_currentCaretRect);
final double scrollOffsetForCaret = _getScrollOffsetForCaret(_currentCaretRect);
_scrollController.animateTo(
scrollOffsetForCaret,
duration: _caretAnimationDuration,
......
......@@ -104,6 +104,7 @@ abstract class ScrollMetrics {
///
/// The value is always non-negative, and less than or equal to [viewportDimension].
double get extentInside {
assert(minScrollExtent <= maxScrollExtent);
return viewportDimension
// "above" overscroll value
- (minScrollExtent - pixels).clamp(0, viewportDimension)
......
......@@ -447,6 +447,8 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@override
bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) {
assert(minScrollExtent != null);
assert(maxScrollExtent != null);
if (!nearEqual(_minScrollExtent, minScrollExtent, Tolerance.defaultTolerance.distance) ||
!nearEqual(_maxScrollExtent, maxScrollExtent, Tolerance.defaultTolerance.distance) ||
_didChangeViewportDimensionOrReceiveCorrection) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment