Skip to content

Commit

Permalink
Add spellCheckConfiguration to DialogTextField (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 authored Feb 21, 2024
2 parents 60b6aaa + a767a95 commit 7dbc929
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.0

- Add `spellCheckConfiguration` to `DialogTextField`

## 2.0.0

- Support Flutter 3.16
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
mono_kit: 67c15c1486e232d7f44ac47286933e80aa02f7a3
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.14.2
COCOAPODS: 1.15.2
8 changes: 4 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -351,7 +351,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -433,7 +433,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -482,7 +482,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
16 changes: 16 additions & 0 deletions example/lib/pages/text_input_dialog_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ class TextInputDialogPage extends ConsumerWidget {
logger.info(text);
},
),
ListTile(
title: const Text(
'No Title/Message(spellCheckConfiguration disabled)'),
onTap: () async {
final text = await showTextInputDialog(
context: context,
textFields: const [
DialogTextField(
spellCheckConfiguration: SpellCheckConfiguration.disabled(),
autocorrect: false,
),
],
);
logger.info(text);
},
),
ListTile(
title: const Text('No Message'),
onTap: () async {
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.0"
version: "2.1.0"
analyzer:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions lib/src/text_input_dialog/ios_text_input_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class _IOSTextInputDialogState extends State<IOSTextInputDialog> {
onSubmitted: isLast && widget.autoSubmit
? (_) => submitIfValid()
: null,
spellCheckConfiguration: field.spellCheckConfiguration,
);
},
),
Expand Down
1 change: 1 addition & 0 deletions lib/src/text_input_dialog/macos_text_input_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class _MacOSTextInputDialogState extends State<MacOSTextInputDialog> {
onSubmitted: isLast && widget.autoSubmit
? (_) => submitIfValid()
: null,
// No spellCheckConfiguration for macos_ui
),
),
);
Expand Down
1 change: 1 addition & 0 deletions lib/src/text_input_dialog/material_text_input_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class _MaterialTextInputDialogState extends State<MaterialTextInputDialog> {
onFieldSubmitted: isLast && widget.autoSubmit
? (_) => submitIfValid()
: null,
spellCheckConfiguration: field.spellCheckConfiguration,
);
}),
],
Expand Down
2 changes: 2 additions & 0 deletions lib/src/text_input_dialog/show_text_input_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class DialogTextField {
this.maxLines = 1,
this.maxLength,
this.autocorrect = true,
this.spellCheckConfiguration,
});
final String? initialText;
final String? hintText;
Expand All @@ -144,4 +145,5 @@ class DialogTextField {
final int maxLines;
final int? maxLength;
final bool autocorrect;
final SpellCheckConfiguration? spellCheckConfiguration;
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: adaptive_dialog
description: Show alert dialog or modal action sheet adaptively according to platform.
version: 2.0.0
version: 2.1.0
repository: https://github.com/mono0926/adaptive_dialog
funding:
- https://github.com/sponsors/mono0926
Expand Down

0 comments on commit 7dbc929

Please sign in to comment.