diff --git a/README.md b/README.md
index a11a815f..9aad0a05 100644
--- a/README.md
+++ b/README.md
@@ -65,10 +65,10 @@ it in GitHub repo instead.
-
-
-
-
+
+
+
+
diff --git a/example/.gitignore b/example/.gitignore
index 15e3a7c7..24476c5d 100644
--- a/example/.gitignore
+++ b/example/.gitignore
@@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
+migrate_working_dir/
# IntelliJ related
*.iml
@@ -31,12 +32,13 @@
.pub/
/build/
-# Web related
-lib/generated_plugin_registrant.dart
-
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
-pubspec.lock
\ No newline at end of file
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/example/README.md b/example/README.md
index 08534b51..c727691c 100644
--- a/example/README.md
+++ b/example/README.md
@@ -5,7 +5,14 @@ This is just a demo of Flutter Quill
## Screenshots
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+## Development notes
+
+- When changing the `assets` please run:
+```
+dart run build_runner build --delete-conflicting-outputs
+```
\ No newline at end of file
diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml
index b553997f..d8d4bb89 100644
--- a/example/analysis_options.yaml
+++ b/example/analysis_options.yaml
@@ -1,9 +1,5 @@
include: package:flutter_lints/flutter.yaml
-analyzer:
- errors:
- undefined_prefixed_name: ignore
- unsafe_html: ignore
linter:
rules:
always_declare_return_types: true
@@ -12,7 +8,7 @@ linter:
avoid_empty_else: true
avoid_escaping_inner_quotes: true
avoid_print: false
- avoid_redundant_argument_values: true
+ avoid_redundant_argument_values: false
avoid_types_on_closure_parameters: true
avoid_void_async: true
cascade_invocations: true
@@ -34,4 +30,4 @@ linter:
unnecessary_lambdas: true
unnecessary_parenthesis: true
unnecessary_string_interpolations: true
- library_private_types_in_public_api: false
+ library_private_types_in_public_api: false
\ No newline at end of file
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index e574d1e8..d2bb9117 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -27,15 +27,13 @@ android {
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
- def javaVersion = JavaVersion.VERSION_17
-
compileOptions {
- sourceCompatibility javaVersion
- targetCompatibility javaVersion
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
- jvmTarget = javaVersion.toString()
+ jvmTarget = '1.8'
}
sourceSets {
@@ -44,7 +42,7 @@ android {
defaultConfig {
applicationId "com.example.example"
- minSdkVersion 24
+ minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index 6176738c..cda92b86 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,15 +1,13 @@
-
+
-
+
-
+
@@ -21,7 +19,7 @@
+ android:label="@string/app_name">
-
-
-
+
+ Flutter Quill Demo
+
\ No newline at end of file
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 10bc7da8..d73bed24 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -8,7 +8,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.1.2'
+ classpath 'com.android.tools.build:gradle:8.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
diff --git a/example/assets/images/1.png b/example/assets/images/screenshot_1.png
similarity index 100%
rename from example/assets/images/1.png
rename to example/assets/images/screenshot_1.png
diff --git a/example/assets/images/2.png b/example/assets/images/screenshot_2.png
similarity index 100%
rename from example/assets/images/2.png
rename to example/assets/images/screenshot_2.png
diff --git a/example/assets/images/3.png b/example/assets/images/screenshot_3.png
similarity index 100%
rename from example/assets/images/3.png
rename to example/assets/images/screenshot_3.png
diff --git a/example/assets/images/4.png b/example/assets/images/screenshot_4.png
similarity index 100%
rename from example/assets/images/4.png
rename to example/assets/images/screenshot_4.png
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index bcaa8216..75c0e507 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -7,15 +7,13 @@
objects = {
/* Begin PBXBuildFile section */
- 110D5FB266DE0C87D485C5A1 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA159BA3A0CB20166BDC7649 /* Pods_RunnerTests.framework */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
- E0CFF8B0B56159E612BD1BF1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56338E24E520D8744CFF5FE2 /* Pods_Runner.framework */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -44,15 +42,10 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
- 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 56338E24E520D8744CFF5FE2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 6B6E89A47C28537B66DC0FA4 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7D464E3E73705EDBCA621B35 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -60,64 +53,21 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- A5625BCCF88D6127AE26675C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
- CA159BA3A0CB20166BDC7649 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- D0600C43B20FD3C51A3985DD /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
- E008F2A10A874EB0C8AB0591 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- F65D90E41795239C733C3B48 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- 729BF1F2E5A6188112D79F62 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 110D5FB266DE0C87D485C5A1 /* Pods_RunnerTests.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- E0CFF8B0B56159E612BD1BF1 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 331C8082294A63A400263BE5 /* RunnerTests */ = {
- isa = PBXGroup;
- children = (
- 331C807B294A618700263BE5 /* RunnerTests.swift */,
- );
- path = RunnerTests;
- sourceTree = "";
- };
- 808219EA7A4ECE8B7D2A26F2 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 56338E24E520D8744CFF5FE2 /* Pods_Runner.framework */,
- CA159BA3A0CB20166BDC7649 /* Pods_RunnerTests.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
- 839C085E910FF72A20C1DC94 /* Pods */ = {
- isa = PBXGroup;
- children = (
- E008F2A10A874EB0C8AB0591 /* Pods-Runner.debug.xcconfig */,
- D0600C43B20FD3C51A3985DD /* Pods-Runner.release.xcconfig */,
- F65D90E41795239C733C3B48 /* Pods-Runner.profile.xcconfig */,
- 7D464E3E73705EDBCA621B35 /* Pods-RunnerTests.debug.xcconfig */,
- A5625BCCF88D6127AE26675C /* Pods-RunnerTests.release.xcconfig */,
- 6B6E89A47C28537B66DC0FA4 /* Pods-RunnerTests.profile.xcconfig */,
- );
- name = Pods;
- path = Pods;
- sourceTree = "";
- };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -129,6 +79,14 @@
name = Flutter;
sourceTree = "";
};
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
@@ -136,8 +94,6 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
- 839C085E910FF72A20C1DC94 /* Pods */,
- 808219EA7A4ECE8B7D2A26F2 /* Frameworks */,
);
sourceTree = "";
};
@@ -172,10 +128,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
- 81CBE292094CBE166A4095F9 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
+ 331C807E294A63A400263BE5 /* Frameworks */,
331C807F294A63A400263BE5 /* Resources */,
- 729BF1F2E5A6188112D79F62 /* Frameworks */,
);
buildRules = (
);
@@ -191,14 +146,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 06DBD2892C9AFDD9AA47E269 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 7C1D0099598B9B03C264FE8E /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -270,28 +223,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 06DBD2892C9AFDD9AA47E269 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -308,45 +239,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 7C1D0099598B9B03C264FE8E /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- 81CBE292094CBE166A4095F9 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -485,7 +377,7 @@
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7D464E3E73705EDBCA621B35 /* Pods-RunnerTests.debug.xcconfig */;
+ baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -503,7 +395,7 @@
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = A5625BCCF88D6127AE26675C /* Pods-RunnerTests.release.xcconfig */;
+ baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -519,7 +411,7 @@
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 6B6E89A47C28537B66DC0FA4 /* Pods-RunnerTests.profile.xcconfig */;
+ baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata
index 21a3cc14..1d526a16 100644
--- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -4,7 +4,4 @@
-
-
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index 8dd062a7..be041944 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -46,8 +46,12 @@
UIApplicationSupportsIndirectInputEvents
NSPhotoLibraryUsageDescription
- The app will use it to pick images
+ We need permission to the photo library in order for inserting images in the text editor
NSCameraUsageDescription
- The app will use it to capture a images, record videos.
+ We need permission to the camera in order for takeing a photos and record videos in the text editor
+ NSMicrophoneUsageDescription
+ We don't really need that permission
+ NSPhotoLibraryAddUsageDescription
+ We need this permission for saving the images in the editor
diff --git a/example/lib/gen/assets.gen.dart b/example/lib/gen/assets.gen.dart
new file mode 100644
index 00000000..3075816e
--- /dev/null
+++ b/example/lib/gen/assets.gen.dart
@@ -0,0 +1,114 @@
+/// GENERATED CODE - DO NOT MODIFY BY HAND
+/// *****************************************************
+/// FlutterGen
+/// *****************************************************
+
+// coverage:ignore-file
+// ignore_for_file: type=lint
+// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
+
+import 'package:flutter/widgets.dart';
+
+class $AssetsImagesGen {
+ const $AssetsImagesGen();
+
+ /// File path: assets/images/screenshot_1.png
+ AssetGenImage get screenshot1 =>
+ const AssetGenImage('assets/images/screenshot_1.png');
+
+ /// File path: assets/images/screenshot_2.png
+ AssetGenImage get screenshot2 =>
+ const AssetGenImage('assets/images/screenshot_2.png');
+
+ /// File path: assets/images/screenshot_3.png
+ AssetGenImage get screenshot3 =>
+ const AssetGenImage('assets/images/screenshot_3.png');
+
+ /// File path: assets/images/screenshot_4.png
+ AssetGenImage get screenshot4 =>
+ const AssetGenImage('assets/images/screenshot_4.png');
+
+ /// List of all assets
+ List get values =>
+ [screenshot1, screenshot2, screenshot3, screenshot4];
+}
+
+class Assets {
+ Assets._();
+
+ static const $AssetsImagesGen images = $AssetsImagesGen();
+}
+
+class AssetGenImage {
+ const AssetGenImage(this._assetName);
+
+ final String _assetName;
+
+ Image image({
+ Key? key,
+ AssetBundle? bundle,
+ ImageFrameBuilder? frameBuilder,
+ ImageErrorWidgetBuilder? errorBuilder,
+ String? semanticLabel,
+ bool excludeFromSemantics = false,
+ double? scale,
+ double? width,
+ double? height,
+ Color? color,
+ Animation? opacity,
+ BlendMode? colorBlendMode,
+ BoxFit? fit,
+ AlignmentGeometry alignment = Alignment.center,
+ ImageRepeat repeat = ImageRepeat.noRepeat,
+ Rect? centerSlice,
+ bool matchTextDirection = false,
+ bool gaplessPlayback = false,
+ bool isAntiAlias = false,
+ String? package,
+ FilterQuality filterQuality = FilterQuality.low,
+ int? cacheWidth,
+ int? cacheHeight,
+ }) {
+ return Image.asset(
+ _assetName,
+ key: key,
+ bundle: bundle,
+ frameBuilder: frameBuilder,
+ errorBuilder: errorBuilder,
+ semanticLabel: semanticLabel,
+ excludeFromSemantics: excludeFromSemantics,
+ scale: scale,
+ width: width,
+ height: height,
+ color: color,
+ opacity: opacity,
+ colorBlendMode: colorBlendMode,
+ fit: fit,
+ alignment: alignment,
+ repeat: repeat,
+ centerSlice: centerSlice,
+ matchTextDirection: matchTextDirection,
+ gaplessPlayback: gaplessPlayback,
+ isAntiAlias: isAntiAlias,
+ package: package,
+ filterQuality: filterQuality,
+ cacheWidth: cacheWidth,
+ cacheHeight: cacheHeight,
+ );
+ }
+
+ ImageProvider provider({
+ AssetBundle? bundle,
+ String? package,
+ }) {
+ return AssetImage(
+ _assetName,
+ bundle: bundle,
+ package: package,
+ );
+ }
+
+ String get path => _assetName;
+
+ String get keyName => _assetName;
+}
diff --git a/example/lib/gen/fonts.gen.dart b/example/lib/gen/fonts.gen.dart
new file mode 100644
index 00000000..f61cfa18
--- /dev/null
+++ b/example/lib/gen/fonts.gen.dart
@@ -0,0 +1,39 @@
+/// GENERATED CODE - DO NOT MODIFY BY HAND
+/// *****************************************************
+/// FlutterGen
+/// *****************************************************
+
+// coverage:ignore-file
+// ignore_for_file: type=lint
+// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
+
+class FontFamily {
+ FontFamily._();
+
+ /// Font family: SF-UI-Display
+ static const String sFUIDisplay = 'SF-UI-Display';
+
+ /// Font family: ibarra-real-nova
+ static const String ibarraRealNova = 'ibarra-real-nova';
+
+ /// Font family: monospace
+ static const String monospace = 'monospace';
+
+ /// Font family: nunito
+ static const String nunito = 'nunito';
+
+ /// Font family: pacifico
+ static const String pacifico = 'pacifico';
+
+ /// Font family: roboto-mono
+ static const String robotoMono = 'roboto-mono';
+
+ /// Font family: sans-serif
+ static const String sansSerif = 'sans-serif';
+
+ /// Font family: serif
+ static const String serif = 'serif';
+
+ /// Font family: square-peg
+ static const String squarePeg = 'square-peg';
+}
diff --git a/example/lib/main.dart b/example/lib/main.dart
index b80d1ca5..5aa625e8 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,11 +1,25 @@
+import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
-import 'package:flutter_localizations/flutter_localizations.dart';
-import 'package:flutter_quill/translations.dart';
+import 'package:flutter_localizations/flutter_localizations.dart'
+ show
+ GlobalCupertinoLocalizations,
+ GlobalMaterialLocalizations,
+ GlobalWidgetsLocalizations;
+import 'package:flutter_quill/translations.dart' show FlutterQuillLocalizations;
+import 'package:hydrated_bloc/hydrated_bloc.dart'
+ show HydratedBloc, HydratedStorage;
+import 'package:path_provider/path_provider.dart'
+ show getApplicationDocumentsDirectory;
-import 'pages/home_page.dart';
+import 'presentation/home/widgets/home_screen.dart';
-void main() {
+void main() async {
WidgetsFlutterBinding.ensureInitialized();
+ HydratedBloc.storage = await HydratedStorage.build(
+ storageDirectory: kIsWeb
+ ? HydratedStorage.webStorageDirectory
+ : await getApplicationDocumentsDirectory(),
+ );
runApp(const MyApp());
}
@@ -15,20 +29,11 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
+ title: 'Flutter Quill Demo',
+ theme: ThemeData.light(useMaterial3: true),
+ darkTheme: ThemeData.dark(useMaterial3: true),
+ themeMode: ThemeMode.system,
debugShowCheckedModeBanner: false,
- title: 'Quill Demo',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- visualDensity: VisualDensity.adaptivePlatformDensity,
- useMaterial3: true,
- brightness: Brightness.light,
- ),
- darkTheme: ThemeData(
- primarySwatch: Colors.blue,
- visualDensity: VisualDensity.adaptivePlatformDensity,
- useMaterial3: true,
- brightness: Brightness.dark,
- ),
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
diff --git a/example/lib/presentation/home/widgets/home_screen.dart b/example/lib/presentation/home/widgets/home_screen.dart
new file mode 100644
index 00000000..3fa33dba
--- /dev/null
+++ b/example/lib/presentation/home/widgets/home_screen.dart
@@ -0,0 +1,42 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_quill/flutter_quill.dart';
+
+class HomePage extends StatefulWidget {
+ const HomePage({super.key});
+
+ @override
+ State createState() => _HomePageState();
+}
+
+class _HomePageState extends State {
+ final _controller = QuillController.basic();
+ @override
+ Widget build(BuildContext context) {
+ return QuillProvider(
+ configurations: QuillConfigurations(
+ controller: _controller,
+ sharedConfigurations: QuillSharedConfigurations(
+ animationConfigurations: QuillAnimationConfigurations.disableAll(),
+ ),
+ ),
+ child: Scaffold(
+ appBar: AppBar(
+ title: const Text('Flutter Quill Demo'),
+ ),
+ body: Column(
+ children: [
+ const QuillToolbar(),
+ Expanded(
+ child: QuillEditor.basic(
+ configurations: const QuillEditorConfigurations(
+ scrollable: true,
+ padding: EdgeInsets.all(16),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/example/lib/presentation/settings/cubit/settings_cubit.dart b/example/lib/presentation/settings/cubit/settings_cubit.dart
new file mode 100644
index 00000000..5f15fdd6
--- /dev/null
+++ b/example/lib/presentation/settings/cubit/settings_cubit.dart
@@ -0,0 +1,8 @@
+import 'package:bloc/bloc.dart';
+import 'package:equatable/equatable.dart';
+
+part 'settings_state.dart';
+
+class SettingsCubit extends Cubit {
+ SettingsCubit() : super(SettingsInitial());
+}
diff --git a/example/lib/presentation/settings/cubit/settings_state.dart b/example/lib/presentation/settings/cubit/settings_state.dart
new file mode 100644
index 00000000..9dcca0aa
--- /dev/null
+++ b/example/lib/presentation/settings/cubit/settings_state.dart
@@ -0,0 +1,10 @@
+part of 'settings_cubit.dart';
+
+sealed class SettingsState extends Equatable {
+ const SettingsState();
+
+ @override
+ List