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
b6234414
Commit
b6234414
authored
Nov 13, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #363 from abarth/empty_cursor
Cursor is tiny when there's no text in an input
parents
71578c8b
69e511d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
editable_paragraph.dart
packages/flutter/lib/src/rendering/editable_paragraph.dart
+3
-4
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+4
-1
No files found.
packages/flutter/lib/src/rendering/editable_paragraph.dart
View file @
b6234414
...
...
@@ -29,14 +29,11 @@ class RenderEditableParagraph extends RenderParagraph {
_scrollOffset
=
scrollOffset
,
super
(
text
);
Color
_cursorColor
;
bool
_showCursor
;
SizeChangedCallback
onContentSizeChanged
;
Offset
_scrollOffset
;
Size
_contentSize
;
Color
get
cursorColor
=>
_cursorColor
;
Color
_cursorColor
;
void
set
cursorColor
(
Color
value
)
{
if
(
_cursorColor
==
value
)
return
;
...
...
@@ -45,6 +42,7 @@ class RenderEditableParagraph extends RenderParagraph {
}
bool
get
showCursor
=>
_showCursor
;
bool
_showCursor
;
void
set
showCursor
(
bool
value
)
{
if
(
_showCursor
==
value
)
return
;
...
...
@@ -53,6 +51,7 @@ class RenderEditableParagraph extends RenderParagraph {
}
Offset
get
scrollOffset
=>
_scrollOffset
;
Offset
_scrollOffset
;
void
set
scrollOffset
(
Offset
value
)
{
if
(
_scrollOffset
==
value
)
return
;
...
...
packages/flutter/lib/src/widgets/editable_text.dart
View file @
b6234414
...
...
@@ -222,6 +222,8 @@ class EditableTextState extends State<EditableText> {
}
}
final
String
_kZeroWidthSpace
=
new
String
.
fromCharCode
(
0x200B
);
class
_EditableTextWidget
extends
LeafRenderObjectWidget
{
_EditableTextWidget
({
Key
key
,
...
...
@@ -275,8 +277,9 @@ class _EditableTextWidget extends LeafRenderObjectWidget {
]);
}
String
text
=
value
.
text
;
return
new
StyledTextSpan
(
style
,
<
TextSpan
>[
new
PlainTextSpan
(
value
.
text
)
new
PlainTextSpan
(
text
.
isEmpty
?
_kZeroWidthSpace
:
text
)
]);
}
}
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