David PHAM-VAN

Update Analysis options

Showing 73 changed files with 160 additions and 141 deletions
1 # Changelog 1 # Changelog
2 2
  3 +## 1.3.26
  4 +
  5 +- Update Analysis options
  6 +
3 ## 1.3.25 7 ## 1.3.25
4 8
5 - Add more warnings on type1 fonts 9 - Add more warnings on type1 fonts
1 # Specify analysis options. 1 # Specify analysis options.
2 -#  
3 -# Until there are meta linter rules, each desired lint must be explicitly enabled.  
4 -# See: https://github.com/dart-lang/linter/issues/288  
5 -#  
6 -# For a list of lints, see: http://dart-lang.github.io/linter/lints/  
7 -# See the configuration guide for more  
8 -# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer  
9 -#  
10 -# There are other similar analysis options files in the flutter repos,  
11 -# which should be kept in sync with this file:  
12 -#  
13 -# - analysis_options.yaml (this file)  
14 -# - packages/flutter/lib/analysis_options_user.yaml  
15 -# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml  
16 -# - https://github.com/flutter/engine/blob/master/analysis_options.yaml  
17 -#  
18 -# This file contains the analysis options used by Flutter tools, such as IntelliJ,  
19 -# Android Studio, and the `flutter analyze` command. 2 +include: package:pedantic/analysis_options.1.9.0.yaml
20 3
21 analyzer: 4 analyzer:
22 strong-mode: 5 strong-mode:
23 implicit-dynamic: false 6 implicit-dynamic: false
24 errors: 7 errors:
25 - # treat missing required parameters as a warning (not a hint)  
26 missing_required_param: warning 8 missing_required_param: warning
27 - # treat missing returns as a warning (not a hint)  
28 missing_return: warning 9 missing_return: warning
29 - # allow having TODOs in the code  
30 todo: ignore 10 todo: ignore
31 - # Ignore analyzer hints for updating pubspecs when using Future or  
32 - # Stream and not importing dart:async  
33 - # Please see https://github.com/flutter/flutter/pull/24528 for details.  
34 - sdk_version_async_exported_from_core: ignore  
35 - exclude:  
36 - - "bin/cache/**"  
37 - # the following two are relative to the stocks example and the flutter package respectively  
38 - # see https://github.com/dart-lang/sdk/issues/28463  
39 - - "lib/i18n/stock_messages_*.dart"  
40 - - "lib/src/http/**"  
41 11
42 linter: 12 linter:
43 rules: 13 rules:
44 - # these rules are documented on and in the same order as  
45 - # the Dart Lint rules page to make maintenance easier  
46 - # https://github.com/dart-lang/linter/blob/master/example/all.yaml  
47 - - always_declare_return_types  
48 - always_put_control_body_on_new_line 14 - always_put_control_body_on_new_line
49 - # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219  
50 - - always_require_non_null_named_parameters  
51 - always_specify_types 15 - always_specify_types
52 - - annotate_overrides  
53 - # - avoid_annotating_with_dynamic # conflicts with always_specify_types  
54 - avoid_as 16 - avoid_as
55 - avoid_bool_literals_in_conditional_expressions 17 - avoid_bool_literals_in_conditional_expressions
56 - # - avoid_catches_without_on_clauses # we do this commonly  
57 - # - avoid_catching_errors # we do this commonly  
58 - avoid_classes_with_only_static_members 18 - avoid_classes_with_only_static_members
59 - # - avoid_double_and_int_checks # only useful when targeting JS runtime  
60 - - avoid_empty_else  
61 - avoid_field_initializers_in_const_classes 19 - avoid_field_initializers_in_const_classes
62 - avoid_function_literals_in_foreach_calls 20 - avoid_function_literals_in_foreach_calls
63 - # - avoid_implementing_value_types # not yet tested  
64 - - avoid_init_to_null  
65 - # - avoid_js_rounded_ints # only useful when targeting JS runtime  
66 - - avoid_null_checks_in_equality_operators  
67 - # - avoid_positional_boolean_parameters # not yet tested  
68 - # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)  
69 - - avoid_relative_lib_imports  
70 - avoid_renaming_method_parameters 21 - avoid_renaming_method_parameters
71 - - avoid_return_types_on_setters  
72 - # - avoid_returning_null # there are plenty of valid reasons to return null  
73 - # - avoid_returning_null_for_future # not yet tested  
74 - avoid_returning_null_for_void 22 - avoid_returning_null_for_void
75 - # - avoid_returning_this # there are plenty of valid reasons to return this  
76 - # - avoid_setters_without_getters # not yet tested  
77 - # - avoid_shadowing_type_parameters # not yet tested  
78 - # - avoid_single_cascade_in_expression_statements # not yet tested  
79 - avoid_slow_async_io 23 - avoid_slow_async_io
80 - - avoid_types_as_parameter_names  
81 - # - avoid_types_on_closure_parameters # conflicts with always_specify_types  
82 - avoid_unused_constructor_parameters 24 - avoid_unused_constructor_parameters
83 - avoid_void_async 25 - avoid_void_async
84 - await_only_futures 26 - await_only_futures
85 - camel_case_types 27 - camel_case_types
86 - cancel_subscriptions 28 - cancel_subscriptions
87 - # - cascade_invocations # not yet tested  
88 - # - close_sinks # not reliable enough  
89 - # - comment_references # blocked on https://github.com/flutter/flutter/issues/20765  
90 - # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204  
91 - control_flow_in_finally 29 - control_flow_in_finally
92 - # - curly_braces_in_flow_control_structures # not yet tested  
93 - # - diagnostic_describe_all_properties # not yet tested  
94 - directives_ordering 30 - directives_ordering
95 - - empty_catches  
96 - - empty_constructor_bodies  
97 - empty_statements 31 - empty_statements
98 - # - file_names # not yet tested  
99 - flutter_style_todos 32 - flutter_style_todos
100 - hash_and_equals 33 - hash_and_equals
101 - implementation_imports 34 - implementation_imports
102 - # - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811  
103 - iterable_contains_unrelated_type 35 - iterable_contains_unrelated_type
104 - # - join_return_with_assignment # not yet tested  
105 - - library_names  
106 - - library_prefixes  
107 - # - lines_longer_than_80_chars # not yet tested  
108 - list_remove_unrelated_type 36 - list_remove_unrelated_type
109 - # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181  
110 - no_adjacent_strings_in_list 37 - no_adjacent_strings_in_list
111 - - no_duplicate_case_values  
112 - non_constant_identifier_names 38 - non_constant_identifier_names
113 - # - null_closures # not yet tested  
114 - # - omit_local_variable_types # opposite of always_specify_types  
115 - # - one_member_abstracts # too many false positives  
116 - # - only_throw_errors # https://github.com/flutter/flutter/issues/5792  
117 - overridden_fields 39 - overridden_fields
118 - package_api_docs 40 - package_api_docs
119 - package_names 41 - package_names
120 - package_prefixed_library_names 42 - package_prefixed_library_names
121 - # - parameter_assignments # we do this commonly  
122 - - prefer_adjacent_string_concatenation  
123 - prefer_asserts_in_initializer_lists 43 - prefer_asserts_in_initializer_lists
124 - # - prefer_asserts_with_message # not yet tested  
125 - - prefer_collection_literals  
126 - - prefer_conditional_assignment  
127 - - prefer_const_constructors  
128 - prefer_const_constructors_in_immutables 44 - prefer_const_constructors_in_immutables
  45 + - prefer_const_constructors
129 - prefer_const_declarations 46 - prefer_const_declarations
130 - prefer_const_literals_to_create_immutables 47 - prefer_const_literals_to_create_immutables
131 - # - prefer_constructors_over_static_methods # not yet tested  
132 - - prefer_contains  
133 - # - prefer_double_quotes # opposite of prefer_single_quotes  
134 - - prefer_equal_for_default_values  
135 - # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods  
136 - - prefer_final_fields  
137 - # - prefer_final_in_for_each # not yet tested  
138 - prefer_final_locals 48 - prefer_final_locals
139 - # - prefer_for_elements_to_map_fromIterable # not yet tested  
140 - prefer_foreach 49 - prefer_foreach
141 - # - prefer_function_declarations_over_variables # not yet tested  
142 - - prefer_generic_function_type_aliases  
143 - prefer_if_elements_to_conditional_expressions 50 - prefer_if_elements_to_conditional_expressions
144 - - prefer_if_null_operators  
145 - prefer_initializing_formals 51 - prefer_initializing_formals
146 - prefer_inlined_adds 52 - prefer_inlined_adds
147 - # - prefer_int_literals # not yet tested  
148 - # - prefer_interpolation_to_compose_strings # not yet tested  
149 - - prefer_is_empty  
150 - - prefer_is_not_empty  
151 - - prefer_iterable_whereType  
152 - # - prefer_mixin # https://github.com/dart-lang/language/issues/32  
153 - # - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932  
154 - - prefer_single_quotes  
155 - - prefer_spread_collections  
156 - prefer_typing_uninitialized_variables 53 - prefer_typing_uninitialized_variables
157 - prefer_void_to_null 54 - prefer_void_to_null
158 - # - provide_deprecation_message # not yet tested  
159 - # - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml  
160 - - recursive_getters  
161 - - slash_for_doc_comments  
162 - # - sort_child_properties_last # not yet tested  
163 - sort_constructors_first 55 - sort_constructors_first
164 - sort_pub_dependencies 56 - sort_pub_dependencies
165 - sort_unnamed_constructors_first 57 - sort_unnamed_constructors_first
166 - test_types_in_equals 58 - test_types_in_equals
167 - throw_in_finally 59 - throw_in_finally
168 - # - type_annotate_public_apis # subset of always_specify_types  
169 - - type_init_formals  
170 - # - unawaited_futures # too many false positives  
171 - # - unnecessary_await_in_return # not yet tested  
172 - unnecessary_brace_in_string_interps 60 - unnecessary_brace_in_string_interps
173 - - unnecessary_const  
174 - unnecessary_getters_setters 61 - unnecessary_getters_setters
175 - # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498  
176 - - unnecessary_new  
177 - unnecessary_null_aware_assignments 62 - unnecessary_null_aware_assignments
178 - - unnecessary_null_in_if_null_operators  
179 - unnecessary_overrides 63 - unnecessary_overrides
180 - unnecessary_parenthesis 64 - unnecessary_parenthesis
181 - unnecessary_statements 65 - unnecessary_statements
182 - - unnecessary_this  
183 - - unrelated_type_equality_checks  
184 - # - unsafe_html # not yet tested  
185 - use_full_hex_values_for_flutter_colors 66 - use_full_hex_values_for_flutter_colors
186 - # - use_function_type_syntax_for_parameters # not yet tested  
187 - - use_rethrow_when_possible  
188 - # - use_setters_to_change_properties # not yet tested  
189 - # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182  
190 - # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review  
191 - - valid_regexps  
192 - # - void_checks # not yet tested  
  1 +// ignore_for_file: omit_local_variable_types
  2 +
1 import 'dart:io'; 3 import 'dart:io';
2 4
3 import 'package:pdf/pdf.dart'; 5 import 'package:pdf/pdf.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfAnnot extends PdfObject { 21 class PdfAnnot extends PdfObject {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class Ascii85Encoder extends Converter<List<int>, List<int>> { 21 class Ascii85Encoder extends Converter<List<int>, List<int>> {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 enum PdfBorderStyle { 21 enum PdfBorderStyle {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfColor { 21 class PdfColor {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfColors { 21 class PdfColors {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 @deprecated 21 @deprecated
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 enum PdfPageMode { 21 enum PdfPageMode {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfJpegInfo { 21 class PdfJpegInfo {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 abstract class PdfFont extends PdfObject { 21 abstract class PdfFont extends PdfObject {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfFormXObject extends PdfXObject { 21 class PdfFormXObject extends PdfXObject {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 enum PdfLineCap { joinMiter, joinRound, joinBevel } 21 enum PdfLineCap { joinMiter, joinRound, joinBevel }
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 /// Represents the position of the first pixel in the data stream 21 /// Represents the position of the first pixel in the data stream
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfObjectStream extends PdfObject { 21 class PdfObjectStream extends PdfObject {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 enum PdfOutlineMode { 21 enum PdfOutlineMode {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfOutput { 21 class PdfOutput {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfPage extends PdfObject { 21 class PdfPage extends PdfObject {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfStream { 21 class PdfStream {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 /// https://opentype.js.org/ 21 /// https://opentype.js.org/
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfTtfFont extends PdfFont { 21 class PdfTtfFont extends PdfFont {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfUnicodeCmap extends PdfObjectStream { 21 class PdfUnicodeCmap extends PdfObjectStream {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of pdf; 19 part of pdf;
18 20
19 class PdfXref { 21 class PdfXref {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class Anchor extends SingleChildWidget { 21 class Anchor extends SingleChildWidget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum BoxFit { fill, contain, cover, fitWidth, fitHeight, none, scaleDown } 21 enum BoxFit { fill, contain, cover, fitWidth, fitHeight, none, scaleDown }
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class ClipRect extends SingleChildWidget { 21 class ClipRect extends SingleChildWidget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum DecorationPosition { background, foreground } 21 enum DecorationPosition { background, foreground }
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class Header extends StatelessWidget { 21 class Header extends StatelessWidget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class Document { 21 class Document {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum FlexFit { 21 enum FlexFit {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum Type1Fonts { 21 enum Type1Fonts {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class _GridViewContext extends WidgetContext { 21 class _GridViewContext extends WidgetContext {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class Image extends Widget { 21 class Image extends Widget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class WidgetContext {} 21 class WidgetContext {}
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 typedef BuildCallback = Widget Function(Context context); 21 typedef BuildCallback = Widget Function(Context context);
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class Placeholder extends Widget { 21 class Placeholder extends Widget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 class CircularProgressIndicator extends Widget { 21 class CircularProgressIndicator extends Widget {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 /// How to size the non-positioned children of a [Stack]. 21 /// How to size the non-positioned children of a [Stack].
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 /// A horizontal group of cells in a [Table]. 21 /// A horizontal group of cells in a [Table].
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum TextAlign { left, right, center, justify } 21 enum TextAlign { left, right, center, justify }
@@ -308,6 +310,9 @@ class _WidgetSpan extends _Span { @@ -308,6 +310,9 @@ class _WidgetSpan extends _Span {
308 } 310 }
309 } 311 }
310 312
  313 +typedef _VisitorCallback = bool Function(
  314 + InlineSpan span, TextStyle parentStyle);
  315 +
311 @immutable 316 @immutable
312 abstract class InlineSpan { 317 abstract class InlineSpan {
313 const InlineSpan({this.style, this.baseline, this.annotation}); 318 const InlineSpan({this.style, this.baseline, this.annotation});
@@ -329,8 +334,7 @@ abstract class InlineSpan { @@ -329,8 +334,7 @@ abstract class InlineSpan {
329 return buffer.toString(); 334 return buffer.toString();
330 } 335 }
331 336
332 - bool visitChildren(bool visitor(InlineSpan span, TextStyle parentStyle),  
333 - TextStyle parentStyle); 337 + bool visitChildren(_VisitorCallback visitor, TextStyle parentStyle);
334 } 338 }
335 339
336 class WidgetSpan extends InlineSpan { 340 class WidgetSpan extends InlineSpan {
@@ -348,8 +352,7 @@ class WidgetSpan extends InlineSpan { @@ -348,8 +352,7 @@ class WidgetSpan extends InlineSpan {
348 352
349 /// Calls `visitor` on this [WidgetSpan]. There are no children spans to walk. 353 /// Calls `visitor` on this [WidgetSpan]. There are no children spans to walk.
350 @override 354 @override
351 - bool visitChildren(bool visitor(InlineSpan span, TextStyle parentStyle),  
352 - TextStyle parentStyle) { 355 + bool visitChildren(_VisitorCallback visitor, TextStyle parentStyle) {
353 final TextStyle _style = parentStyle?.merge(style); 356 final TextStyle _style = parentStyle?.merge(style);
354 357
355 if (child != null) { 358 if (child != null) {
@@ -376,8 +379,7 @@ class TextSpan extends InlineSpan { @@ -376,8 +379,7 @@ class TextSpan extends InlineSpan {
376 final List<InlineSpan> children; 379 final List<InlineSpan> children;
377 380
378 @override 381 @override
379 - bool visitChildren(bool visitor(InlineSpan span, TextStyle parentStyle),  
380 - TextStyle parentStyle) { 382 + bool visitChildren(_VisitorCallback visitor, TextStyle parentStyle) {
381 final TextStyle _style = parentStyle?.merge(style); 383 final TextStyle _style = parentStyle?.merge(style);
382 384
383 if (text != null) { 385 if (text != null) {
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 enum FontWeight { normal, bold } 21 enum FontWeight { normal, bold }
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 @immutable 21 @immutable
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 part of widget; 19 part of widget;
18 20
19 /// How [Wrap] should align objects. 21 /// How [Wrap] should align objects.
@@ -4,17 +4,18 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl @@ -4,17 +4,18 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf 4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
5 repository: https://github.com/DavBfr/dart_pdf 5 repository: https://github.com/DavBfr/dart_pdf
6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
7 -version: 1.3.25 7 +version: 1.3.26
8 8
9 environment: 9 environment:
10 sdk: ">=2.3.0 <3.0.0" 10 sdk: ">=2.3.0 <3.0.0"
11 11
12 dependencies: 12 dependencies:
13 - meta: "^1.1.5"  
14 - vector_math: "^2.0.0"  
15 - utf: "^0.9.0"  
16 - crypto: "^2.0.6"  
17 - archive: "^2.0.10" 13 + meta: ^1.1.5
  14 + vector_math: ^2.0.0
  15 + utf: ^0.9.0
  16 + crypto: ^2.0.6
  17 + archive: ^2.0.10
18 18
19 dev_dependencies: 19 dev_dependencies:
20 - test: any 20 + test:
  21 + pedantic: 1.9.0
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math' as math; 20 import 'dart:math' as math;
19 21
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math'; 20 import 'dart:math';
19 import 'dart:typed_data'; 21 import 'dart:typed_data';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:async'; 19 import 'dart:async';
18 import 'dart:io'; 20 import 'dart:io';
19 import 'dart:isolate'; 21 import 'dart:isolate';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:async'; 19 import 'dart:async';
18 import 'dart:convert'; 20 import 'dart:convert';
19 import 'dart:io'; 21 import 'dart:io';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math'; 20 import 'dart:math';
19 import 'dart:typed_data'; 21 import 'dart:typed_data';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:test/test.dart'; 21 import 'package:test/test.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:typed_data'; 20 import 'dart:typed_data';
19 21
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:test/test.dart'; 21 import 'package:test/test.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:test/test.dart'; 21 import 'package:test/test.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math' as math; 20 import 'dart:math' as math;
19 import 'dart:typed_data'; 21 import 'dart:typed_data';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/widgets.dart'; 21 import 'package:pdf/widgets.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math' as math; 20 import 'dart:math' as math;
19 21
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:convert'; 19 import 'dart:convert';
18 import 'dart:io'; 20 import 'dart:io';
19 import 'dart:typed_data'; 21 import 'dart:typed_data';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math' as math; 20 import 'dart:math' as math;
19 import 'dart:typed_data'; 21 import 'dart:typed_data';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:typed_data'; 20 import 'dart:typed_data';
19 21
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 20
19 import 'package:pdf/widgets.dart'; 21 import 'package:pdf/widgets.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:io'; 19 import 'dart:io';
18 import 'dart:math' as math; 20 import 'dart:math' as math;
19 21
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'package:intl/intl.dart'; 19 import 'package:intl/intl.dart';
18 import 'package:pdf/pdf.dart'; 20 import 'package:pdf/pdf.dart';
19 import 'package:pdf/widgets.dart'; 21 import 'package:pdf/widgets.dart';
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
  17 +// ignore_for_file: omit_local_variable_types
  18 +
17 import 'dart:async'; 19 import 'dart:async';
18 import 'dart:html'; 20 import 'dart:html';
19 import 'dart:js' as js; 21 import 'dart:js' as js;