-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create initial design for TextField #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @Luxorum. I've added a coupple of suggestions here - please, take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, @Luxorum! I've added a few more suggestions here - please, take a look an let me know what do you think.
lib/presentation/widgets/language_tool_text_editing_controller.dart
Outdated
Show resolved
Hide resolved
lib/presentation/widgets/language_tool_text_editing_controller.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, @Luxorum! I've added few more minor suggestions here - please, take a look.
lib/presentation/widgets/language_tool_text_editing_controller.dart
Outdated
Show resolved
Hide resolved
} | ||
|
||
children.add( | ||
TextSpan(text: text.substring(previousMistakePosition, mistakeStart)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if mistakeStart
is our of range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be no errors anyways, cause if statement checks mistake.start + mistake.length
lib/presentation/widgets/language_tool_text_editing_controller.dart
Outdated
Show resolved
Hide resolved
WidgetSpan( | ||
child: Text( | ||
mistakeCharacter, | ||
style: style, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need it here? I think the TextSpan sets the proper TextStyle for all of its children.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, seems that Text
overrides style by it's own
No description provided.