Skip to content
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

Disable smart quotes and smart dashes on iOS #278

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/src/code_field/code_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ class CodeField extends StatefulWidget {
/// {@macro flutter.widgets.textField.textStyle}
final TextStyle? textStyle;

/// {@macro flutter.widgets.textField.smartDashesType}
final SmartDashesType smartDashesType;

/// {@macro flutter.widgets.textField.smartQuotesType}
final SmartQuotesType smartQuotesType;

/// A way to replace specific line numbers by a custom TextSpan
final TextSpan Function(int, TextStyle?)? lineNumberBuilder;

Expand Down Expand Up @@ -175,6 +181,8 @@ class CodeField extends StatefulWidget {
this.background,
this.decoration,
this.textStyle,
this.smartDashesType = SmartDashesType.disabled,
this.smartQuotesType = SmartQuotesType.disabled,
this.padding = EdgeInsets.zero,
GutterStyle? gutterStyle,
this.enabled,
Expand Down Expand Up @@ -400,6 +408,8 @@ class _CodeFieldState extends State<CodeField> {
focusNode: _focusNode,
scrollPadding: widget.padding,
style: textStyle,
smartDashesType: widget.smartDashesType,
smartQuotesType: widget.smartQuotesType,
controller: widget.controller,
minLines: widget.minLines,
maxLines: widget.maxLines,
Expand Down