Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 14 additions & 7 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -120,14 +120,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -188,7 +195,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -244,7 +251,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.26.0"
10 changes: 8 additions & 2 deletions lib/src/code_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import 'dart:async';
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:linked_scroll_controller/linked_scroll_controller.dart';

import './code_controller.dart';

class LineNumberController extends TextEditingController {
Expand Down Expand Up @@ -56,6 +55,9 @@ class LineNumberStyle {
}

class CodeField extends StatefulWidget {
/// {@macro flutter.widgets.textField.minLines}
final SmartQuotesType smartQuotesType;

/// {@macro flutter.widgets.textField.minLines}
final int? minLines;

Expand Down Expand Up @@ -117,6 +119,7 @@ class CodeField extends StatefulWidget {
this.lineNumberBuilder,
this.focusNode,
this.onChanged,
this.smartQuotesType = SmartQuotesType.enabled,
}) : super(key: key);

@override
Expand Down Expand Up @@ -248,6 +251,7 @@ class CodeFieldState extends State<CodeField> {
widget.cursorColor ?? theme?[ROOT_KEY]?.color ?? defaultText;

final lineNumberCol = TextField(
smartQuotesType: widget.smartQuotesType,
scrollPadding: widget.padding,
style: numberTextStyle,
controller: _numberController,
Expand All @@ -273,6 +277,8 @@ class CodeFieldState extends State<CodeField> {
);

final codeField = TextField(
keyboardType: TextInputType.visiblePassword,
smartQuotesType: widget.smartQuotesType,
focusNode: _focusNode,
scrollPadding: widget.padding,
style: textStyle,
Expand Down
21 changes: 14 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -87,14 +87,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -148,7 +155,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand All @@ -162,7 +169,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.26.0"