Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
527fddc6
Commit
527fddc6
authored
Feb 16, 2017
by
Adam Barth
Committed by
GitHub
Feb 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port EditableText to Scrollable2 (#8167)
parent
3985ddbc
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
169 additions
and
163 deletions
+169
-163
rendering.dart
packages/flutter/lib/rendering.dart
+1
-1
input.dart
packages/flutter/lib/src/material/input.dart
+0
-1
editable.dart
packages/flutter/lib/src/rendering/editable.dart
+106
-58
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+57
-98
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+4
-4
input_test.dart
packages/flutter/test/widgets/input_test.dart
+1
-1
No files found.
packages/flutter/lib/rendering.dart
View file @
527fddc6
...
...
@@ -28,7 +28,7 @@ export 'src/rendering/block.dart';
export
'src/rendering/box.dart'
;
export
'src/rendering/custom_layout.dart'
;
export
'src/rendering/debug.dart'
;
export
'src/rendering/editable
_line
.dart'
;
export
'src/rendering/editable.dart'
;
export
'src/rendering/error.dart'
;
export
'src/rendering/flex.dart'
;
export
'src/rendering/flow.dart'
;
...
...
packages/flutter/lib/src/material/input.dart
View file @
527fddc6
...
...
@@ -147,7 +147,6 @@ class _InputFieldState extends State<InputField> {
cursorColor:
themeData
.
textSelectionColor
,
selectionColor:
themeData
.
textSelectionColor
,
selectionControls:
materialTextSelectionControls
,
platform:
Theme
.
of
(
context
).
platform
,
keyboardType:
config
.
keyboardType
,
onChanged:
config
.
onChanged
,
onSubmitted:
config
.
onSubmitted
,
...
...
packages/flutter/lib/src/rendering/editable
_line
.dart
→
packages/flutter/lib/src/rendering/editable.dart
View file @
527fddc6
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/editable_text.dart
View file @
527fddc6
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
527fddc6
...
...
@@ -184,13 +184,13 @@ class _RenderSingleChildViewport extends RenderBox with RenderObjectWithChildMix
@override
bool
get
isRepaintBoundary
=>
true
;
double
get
_
effective
Extent
{
double
get
_
viewport
Extent
{
assert
(
hasSize
);
switch
(
axis
)
{
case
Axis
.
vertical
:
return
size
.
height
;
case
Axis
.
horizontal
:
return
size
.
width
;
case
Axis
.
vertical
:
return
size
.
height
;
}
return
null
;
}
...
...
@@ -265,7 +265,7 @@ class _RenderSingleChildViewport extends RenderBox with RenderObjectWithChildMix
size
=
constraints
.
constrain
(
child
.
size
);
}
offset
.
applyViewportDimension
(
_
effective
Extent
);
offset
.
applyViewportDimension
(
_
viewport
Extent
);
offset
.
applyContentDimensions
(
_minScrollExtent
,
_maxScrollExtent
);
}
...
...
packages/flutter/test/widgets/input_test.dart
View file @
527fddc6
...
...
@@ -581,7 +581,6 @@ void main() {
expect
(
inputValue
.
text
,
cutValue
);
},
skip:
Platform
.
isMacOS
);
// Skip due to https://github.com/flutter/flutter/issues/6961
testWidgets
(
'Can scroll multiline input'
,
(
WidgetTester
tester
)
async
{
GlobalKey
inputKey
=
new
GlobalKey
();
InputValue
inputValue
=
InputValue
.
empty
;
...
...
@@ -640,6 +639,7 @@ void main() {
// Now the first line is scrolled up, and the fourth line is visible.
Point
newFirstPos
=
textOffsetToPosition
(
tester
,
kFourLines
.
indexOf
(
'First'
));
Point
newFourthPos
=
textOffsetToPosition
(
tester
,
kFourLines
.
indexOf
(
'Fourth'
));
expect
(
newFirstPos
.
y
,
lessThan
(
firstPos
.
y
));
expect
(
inputBox
.
hitTest
(
new
HitTestResult
(),
position:
inputBox
.
globalToLocal
(
newFirstPos
)),
isFalse
);
expect
(
inputBox
.
hitTest
(
new
HitTestResult
(),
position:
inputBox
.
globalToLocal
(
newFourthPos
)),
isTrue
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment