Skip to content

Commit b0f6974

Browse files
[Spellcheck] - Created super_editor_spellcheck plugin to integrate Mac spellcheck (#2186)
1 parent 9bf2d84 commit b0f6974

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2481
-0
lines changed

super_editor_spellcheck/.gitignore

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Golden failures
2+
**/failures/
3+
4+
# Miscellaneous
5+
*.class
6+
*.log
7+
*.pyc
8+
*.swp
9+
.DS_Store
10+
.atom/
11+
.buildlog/
12+
.history
13+
.svn/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# rbenv related
22+
**/.ruby-version
23+
24+
# The .vscode folder contains launch configuration and tasks you configure in
25+
# VS Code which you may wish to be included in version control, so this line
26+
# is commented out by default.
27+
#.vscode/
28+
29+
# Flutter/Dart/Pub related
30+
**/doc/api/
31+
.dart_tool/
32+
.flutter-plugins
33+
.flutter-plugins-dependencies
34+
.packages
35+
.pub-cache/
36+
.pub/
37+
build/
38+
39+
# Ignore the pubspec.lock file for the super_editor library, but not the example app.
40+
/pubspec.lock
41+
42+
# Android related
43+
**/android/**/gradle-wrapper.jar
44+
**/android/.gradle
45+
**/android/captures/
46+
**/android/gradlew
47+
**/android/gradlew.bat
48+
**/android/local.properties
49+
**/android/**/GeneratedPluginRegistrant.java
50+
51+
# iOS/XCode related
52+
**/ios/**/*.mode1v3
53+
**/ios/**/*.mode2v3
54+
**/ios/**/*.moved-aside
55+
**/ios/**/*.pbxuser
56+
**/ios/**/*.perspectivev3
57+
**/ios/**/*sync/
58+
**/ios/**/.sconsign.dblite
59+
**/ios/**/.tags*
60+
**/ios/**/.vagrant/
61+
**/ios/**/DerivedData/
62+
**/ios/**/Icon?
63+
**/ios/**/Pods/
64+
**/ios/**/.symlinks/
65+
**/ios/**/profile
66+
**/ios/**/xcuserdata
67+
**/ios/.generated/
68+
**/ios/Flutter/App.framework
69+
**/ios/Flutter/Flutter.framework
70+
**/ios/Flutter/Flutter.podspec
71+
**/ios/Flutter/Generated.xcconfig
72+
**/ios/Flutter/app.flx
73+
**/ios/Flutter/app.zip
74+
**/ios/Flutter/flutter_assets/
75+
**/ios/Flutter/flutter_export_environment.sh
76+
**/ios/ServiceDefinitions.json
77+
**/ios/Runner/GeneratedPluginRegistrant.*
78+
79+
# Exceptions to above rules.
80+
!**/ios/**/default.mode1v3
81+
!**/ios/**/default.mode2v3
82+
!**/ios/**/default.pbxuser
83+
!**/ios/**/default.perspectivev3

super_editor_spellcheck/.metadata

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "af84f6b8471c761d61332dc499880cd4e486799d"
8+
channel: "master"
9+
10+
project_type: plugin
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: af84f6b8471c761d61332dc499880cd4e486799d
17+
base_revision: af84f6b8471c761d61332dc499880cd4e486799d
18+
- platform: macos
19+
create_revision: af84f6b8471c761d61332dc499880cd4e486799d
20+
base_revision: af84f6b8471c761d61332dc499880cd4e486799d
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1
2+
3+
* TODO: Describe initial release.

super_editor_spellcheck/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2021 Superlist, SuperDeclarative! and the contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

super_editor_spellcheck/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# super_editor_spellcheck
2+
3+
A plugin for running spellcheck against arbitrary text.
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Symbolication related
35+
app.*.symbols
36+
37+
# Obfuscation related
38+
app.*.map.json
39+
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# super_editor_spellcheck_example
2+
3+
Demonstrates how to use the super_editor_spellcheck plugin.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13+
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// This is a basic Flutter integration test.
2+
//
3+
// Since integration tests run in a full Flutter application, they can interact
4+
// with the host side of a plugin implementation, unlike Dart unit tests.
5+
//
6+
// For more information about Flutter integration tests, please see
7+
// https://docs.flutter.dev/cookbook/testing/integration/introduction
8+
9+
10+
import 'package:flutter_test/flutter_test.dart';
11+
import 'package:integration_test/integration_test.dart';
12+
13+
import 'package:super_editor_spellcheck/super_editor_spellcheck.dart';
14+
15+
void main() {
16+
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
17+
18+
testWidgets('getPlatformVersion test', (WidgetTester tester) async {
19+
final SuperEditorSpellcheck plugin = SuperEditorSpellcheck();
20+
final String? version = await plugin.getPlatformVersion();
21+
// The version string depends on the host platform running the test, so
22+
// just assert that some non-empty string is returned.
23+
expect(version?.isNotEmpty, true);
24+
});
25+
}

0 commit comments

Comments
 (0)