parent
9ed385db79
commit
cac922a0d8
21 changed files with 0 additions and 2615 deletions
@ -1,29 +0,0 @@ |
|||||||
# Miscellaneous |
|
||||||
*.class |
|
||||||
*.log |
|
||||||
*.pyc |
|
||||||
*.swp |
|
||||||
.DS_Store |
|
||||||
.atom/ |
|
||||||
.buildlog/ |
|
||||||
.history |
|
||||||
.svn/ |
|
||||||
migrate_working_dir/ |
|
||||||
|
|
||||||
# IntelliJ related |
|
||||||
*.iml |
|
||||||
*.ipr |
|
||||||
*.iws |
|
||||||
.idea/ |
|
||||||
|
|
||||||
# The .vscode folder contains launch configuration and tasks you configure in |
|
||||||
# VS Code which you may wish to be included in version control, so this line |
|
||||||
# is commented out by default. |
|
||||||
#.vscode/ |
|
||||||
|
|
||||||
# Flutter/Dart/Pub related |
|
||||||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. |
|
||||||
/pubspec.lock |
|
||||||
**/doc/api/ |
|
||||||
.dart_tool/ |
|
||||||
build/ |
|
@ -1,10 +0,0 @@ |
|||||||
# This file tracks properties of this Flutter project. |
|
||||||
# Used by Flutter tool to assess capabilities and perform upgrades etc. |
|
||||||
# |
|
||||||
# This file should be version controlled and should not be manually edited. |
|
||||||
|
|
||||||
version: |
|
||||||
revision: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9" |
|
||||||
channel: "stable" |
|
||||||
|
|
||||||
project_type: package |
|
File diff suppressed because it is too large
Load Diff
@ -1,21 +0,0 @@ |
|||||||
MIT License |
|
||||||
|
|
||||||
Copyright (c) 2023 Flutter Quill Team |
|
||||||
|
|
||||||
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: |
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all |
|
||||||
copies or substantial portions of the Software. |
|
||||||
|
|
||||||
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. |
|
@ -1,34 +0,0 @@ |
|||||||
# Flutter Quill Pdf |
|
||||||
A extension for [flutter_quill](https://pub.dev/packages/flutter_quill) package to add support for dealing with conversion to Pdf |
|
||||||
|
|
||||||
It uses [quill_html_converter](https://pub.dev/packages/quill_html_converter) package to convert the the delta to Html and [htmltopdfwidgets](https://pub.dev/packages/htmltopdfwidgets) to convert the Html to Pdf |
|
||||||
|
|
||||||
This library is **experimental** and the support might be dropped at anytime. |
|
||||||
|
|
||||||
## Features |
|
||||||
|
|
||||||
```markdown |
|
||||||
- Easy to use |
|
||||||
- Support Flutter Quill package |
|
||||||
``` |
|
||||||
|
|
||||||
## Getting started |
|
||||||
|
|
||||||
```yaml |
|
||||||
dependencies: |
|
||||||
quill_pdf_converter: ^<latest-version-here> |
|
||||||
``` |
|
||||||
|
|
||||||
## Usage |
|
||||||
|
|
||||||
First, you need to [setup](../README.md#usage) the `flutter_quill` first |
|
||||||
|
|
||||||
Then you can simply convert to PDF |
|
||||||
|
|
||||||
```dart |
|
||||||
import 'package:quill_pdf_converter/quill_pdf_converter.dart'; |
|
||||||
|
|
||||||
// Convert Delta to Pdf |
|
||||||
final pdfWidgets = _controller.document.toDelta().toPdf(); |
|
||||||
|
|
||||||
``` |
|
@ -1,36 +0,0 @@ |
|||||||
include: package:flutter_lints/flutter.yaml |
|
||||||
|
|
||||||
analyzer: |
|
||||||
errors: |
|
||||||
undefined_prefixed_name: ignore |
|
||||||
unsafe_html: ignore |
|
||||||
linter: |
|
||||||
rules: |
|
||||||
always_declare_return_types: true |
|
||||||
always_put_required_named_parameters_first: true |
|
||||||
annotate_overrides: true |
|
||||||
avoid_empty_else: true |
|
||||||
avoid_escaping_inner_quotes: true |
|
||||||
avoid_print: true |
|
||||||
avoid_redundant_argument_values: true |
|
||||||
avoid_types_on_closure_parameters: true |
|
||||||
avoid_void_async: true |
|
||||||
cascade_invocations: true |
|
||||||
directives_ordering: true |
|
||||||
omit_local_variable_types: true |
|
||||||
prefer_const_constructors: true |
|
||||||
prefer_const_constructors_in_immutables: true |
|
||||||
prefer_const_declarations: true |
|
||||||
prefer_final_fields: true |
|
||||||
prefer_final_in_for_each: true |
|
||||||
prefer_final_locals: true |
|
||||||
prefer_initializing_formals: true |
|
||||||
prefer_int_literals: true |
|
||||||
prefer_interpolation_to_compose_strings: true |
|
||||||
prefer_relative_imports: true |
|
||||||
prefer_single_quotes: true |
|
||||||
sort_constructors_first: true |
|
||||||
sort_unnamed_constructors_first: true |
|
||||||
unnecessary_lambdas: true |
|
||||||
unnecessary_parenthesis: true |
|
||||||
unnecessary_string_interpolations: true |
|
@ -1,21 +0,0 @@ |
|||||||
library quill_pdf_converter; |
|
||||||
|
|
||||||
import 'package:dart_quill_delta/dart_quill_delta.dart'; |
|
||||||
import 'package:htmltopdfwidgets/htmltopdfwidgets.dart'; |
|
||||||
import 'package:meta/meta.dart'; |
|
||||||
import 'package:pdf/widgets.dart' as pw; |
|
||||||
|
|
||||||
/// Extension on [Delta] to add extra functions for converting to Pdf |
|
||||||
extension DeltaPdfExt on Delta { |
|
||||||
/// First convert to Html then to Pdf |
|
||||||
@experimental |
|
||||||
Future<List<pw.Widget>> toPdf() async { |
|
||||||
const html = '<html></html'; |
|
||||||
return HTMLToPdf().convert( |
|
||||||
html, |
|
||||||
fontFallback: [ |
|
||||||
pw.Font.symbol(), |
|
||||||
], |
|
||||||
); |
|
||||||
} |
|
||||||
} |
|
@ -1,34 +0,0 @@ |
|||||||
name: quill_pdf_converter |
|
||||||
description: A extension for flutter_quill package to add support for dealing with conversion to pdf |
|
||||||
version: 9.5.13 |
|
||||||
homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ |
|
||||||
repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ |
|
||||||
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ |
|
||||||
documentation: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ |
|
||||||
|
|
||||||
topics: |
|
||||||
- ui |
|
||||||
- widgets |
|
||||||
- widget |
|
||||||
- rich-text-editor |
|
||||||
- quill |
|
||||||
|
|
||||||
environment: |
|
||||||
sdk: '>=3.2.3 <4.0.0' |
|
||||||
flutter: ">=1.17.0" |
|
||||||
|
|
||||||
dependencies: |
|
||||||
flutter: |
|
||||||
sdk: flutter |
|
||||||
dart_quill_delta: ^9.3.1 |
|
||||||
quill_html_converter: ^9.3.1 |
|
||||||
pdf: ^3.10.8 |
|
||||||
htmltopdfwidgets: ^1.0.3 |
|
||||||
meta: ^1.10.0 |
|
||||||
|
|
||||||
dev_dependencies: |
|
||||||
flutter_test: |
|
||||||
sdk: flutter |
|
||||||
flutter_lints: ^4.0.0 |
|
||||||
|
|
||||||
flutter: |
|
@ -1,3 +0,0 @@ |
|||||||
dependency_overrides: |
|
||||||
dart_quill_delta: |
|
||||||
path: ../dart_quill_delta |
|
@ -1,7 +0,0 @@ |
|||||||
import 'package:flutter_test/flutter_test.dart'; |
|
||||||
|
|
||||||
void main() { |
|
||||||
test('No tests for now', () { |
|
||||||
expect(true, true); |
|
||||||
}); |
|
||||||
} |
|
Loading…
Reference in new issue