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 ...@@ -173,7 +173,7 @@ if [[ ! -e "$FLUTTER_ROOT/.git" ]]; then
fi fi
# To debug the tool, you can uncomment the following lines to enable checked mode and set an observatory port: # 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" # FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
(upgrade_flutter) 3< "$PROG_NAME" (upgrade_flutter) 3< "$PROG_NAME"
......
...@@ -19,7 +19,7 @@ void main() { ...@@ -19,7 +19,7 @@ void main() {
File template; File template;
setUp(() { setUp(() {
tmpDir = Directory.systemTemp.createTempSync('snippets_test'); tmpDir = Directory.systemTemp.createTempSync('flutter_snippets_test.');
configuration = Configuration(flutterRoot: Directory(path.join( configuration = Configuration(flutterRoot: Directory(path.join(
tmpDir.absolute.path, 'flutter'))); tmpDir.absolute.path, 'flutter')));
configuration.createOutputDirectory(); configuration.createOutputDirectory();
......
...@@ -104,6 +104,7 @@ abstract class ScrollMetrics { ...@@ -104,6 +104,7 @@ abstract class ScrollMetrics {
/// ///
/// The value is always non-negative, and less than or equal to [viewportDimension]. /// The value is always non-negative, and less than or equal to [viewportDimension].
double get extentInside { double get extentInside {
assert(minScrollExtent <= maxScrollExtent);
return viewportDimension return viewportDimension
// "above" overscroll value // "above" overscroll value
- (minScrollExtent - pixels).clamp(0, viewportDimension) - (minScrollExtent - pixels).clamp(0, viewportDimension)
......
...@@ -447,6 +447,8 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics { ...@@ -447,6 +447,8 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@override @override
bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) { bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) {
assert(minScrollExtent != null);
assert(maxScrollExtent != null);
if (!nearEqual(_minScrollExtent, minScrollExtent, Tolerance.defaultTolerance.distance) || if (!nearEqual(_minScrollExtent, minScrollExtent, Tolerance.defaultTolerance.distance) ||
!nearEqual(_maxScrollExtent, maxScrollExtent, Tolerance.defaultTolerance.distance) || !nearEqual(_maxScrollExtent, maxScrollExtent, Tolerance.defaultTolerance.distance) ||
_didChangeViewportDimensionOrReceiveCorrection) { _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