├── lib
├── splash_tap.dart
└── src
│ └── splash.dart
├── android
├── local.properties
└── app
│ └── src
│ └── main
│ └── java
│ └── io
│ └── flutter
│ └── plugins
│ └── GeneratedPluginRegistrant.java
├── .idea
├── encodings.xml
├── libraries
│ ├── Flutter_Plugins.xml
│ ├── Dart_SDK.xml
│ └── Dart_Packages.xml
├── vcs.xml
├── modules.xml
└── workspace.xml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── example
└── main.dart
├── splash_tap.iml
├── README.md
├── LICENSE
├── pubspec.yaml
├── pubspec.lock
└── analysis_options.yaml
/lib/splash_tap.dart:
--------------------------------------------------------------------------------
1 | library splash_tap;
2 |
3 | export 'src/splash.dart';
4 |
--------------------------------------------------------------------------------
/android/local.properties:
--------------------------------------------------------------------------------
1 | sdk.dir=/home/gordon/Android/Sdk
2 | flutter.sdk=/home/gordon/development/flutter
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 | ios/.generated/
9 | ios/Flutter/Generated.xcconfig
10 | ios/Runner/GeneratedPluginRegistrant.*
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
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: 985ccb6d14c6ce5ce74823a4d366df2438eac44f
8 | channel: beta
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.1.2] - June 21 2019.
2 |
3 | * Testing upload terminal change.
4 |
5 | ## [0.1.1] - June 21 2019.
6 |
7 | * Add dispose for animation.
8 | * Add example folder.
9 | * Add analysis_options and fixed lint errors
10 |
11 | ## [0.1.0] - June 20 2019.
12 |
13 | * Add null checks to all parameters.
14 | * Updated documentation.
15 |
16 | ### New Features
17 |
18 | * Add *splashColor* parameter to define custom splash colors.
19 | * Add *minRadius* and *maxRadius* parameters to define splash size constraints.
20 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import io.flutter.plugin.common.PluginRegistry;
4 |
5 | /**
6 | * Generated file. Do not edit.
7 | */
8 | public final class GeneratedPluginRegistrant {
9 | public static void registerWith(PluginRegistry registry) {
10 | if (alreadyRegisteredWith(registry)) {
11 | return;
12 | }
13 | }
14 |
15 | private static boolean alreadyRegisteredWith(PluginRegistry registry) {
16 | final String key = GeneratedPluginRegistrant.class.getCanonicalName();
17 | if (registry.hasPlugin(key)) {
18 | return true;
19 | }
20 | registry.registrarFor(key);
21 | return false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:splash_tap/splash_tap.dart';
3 |
4 | void main() => runApp(MyApp());
5 |
6 | class MyApp extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | return MaterialApp(
10 | title: 'Splash Tap Demo',
11 | theme: ThemeData(
12 | primarySwatch: Colors.blue,
13 | ),
14 | home: SplashTapDemo(),
15 | );
16 | }
17 | }
18 |
19 | class SplashTapDemo extends StatelessWidget {
20 | @override
21 | Widget build(BuildContext context) {
22 | return Scaffold(
23 | body: Center(
24 | child: Splash(
25 | onTap: () {},
26 | child: Text(
27 | 'Splash!',
28 | style: TextStyle(fontSize: 32),
29 | ),
30 | ),
31 | ),
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/splash_tap.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | Makes an interesting splash effect when tapping its child widget.
3 |
4 | ## Getting Started
5 |
6 | To use this plugin, add `splash_tap` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
7 |
8 | The color can be set with the **splashColor** property. The splash size is dependent on the size of the child widget passed in - which is constrained by the **minRadius** and **maxRadius** parameters.
9 |
10 | ### Example
11 |
12 | ```dart
13 | import 'package:flutter/material.dart';
14 | import 'package:splash_tap/splash_tap.dart';
15 |
16 | void main() => runApp(MyApp());
17 |
18 | class MyApp extends StatelessWidget {
19 | @override
20 | Widget build(BuildContext context) {
21 | return MaterialApp(
22 | title: 'Splash Tap Demo',
23 | theme: ThemeData(
24 | primarySwatch: Colors.blue,
25 | ),
26 | home: SplashTapDemo(),
27 | );
28 | }
29 | }
30 |
31 | class SplashTapDemo extends StatelessWidget {
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | body: Center(
36 | child: Splash(
37 | onTap: () {},
38 | child: Text(
39 | 'Splash!',
40 | style: TextStyle(fontSize: 32),
41 | ),
42 | ),
43 | ),
44 | );
45 | }
46 | }
47 | ```
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Created by Fun with Flutter
2 |
3 | Copyright (c) 2019 Fun with Flutter.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 | * Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 | * Neither the name of the Fun with Flutter nor the names of its contributors may
15 | be used to endorse or promote products derived from this software without
16 | specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL FUN WITH FLUTTER BE LIABLE FOR ANY
22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: splash_tap
2 | description: Makes an interesting splash effect when tapping it's child widget
3 | version: 0.1.2
4 | author: Fun with Flutter
5 | homepage: https://github.com/funwithflutter/splash_tap
6 |
7 | environment:
8 | sdk: ">=2.1.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 |
18 | # For information on the generic Dart part of this file, see the
19 | # following page: https://www.dartlang.org/tools/pub/pubspec
20 |
21 | # The following section is specific to Flutter.
22 | flutter:
23 |
24 | # To add assets to your package, add an assets section, like this:
25 | # assets:
26 | # - images/a_dot_burr.jpeg
27 | # - images/a_dot_ham.jpeg
28 | #
29 | # For details regarding assets in packages, see
30 | # https://flutter.io/assets-and-images/#from-packages
31 | #
32 | # An image asset can refer to one or more resolution-specific "variants", see
33 | # https://flutter.io/assets-and-images/#resolution-aware.
34 |
35 | # To add custom fonts to your package, add a fonts section here,
36 | # in this "flutter" section. Each entry in this list should have a
37 | # "family" key with the font family name, and a "fonts" key with a
38 | # list giving the asset and other descriptors for the font. For
39 | # example:
40 | # fonts:
41 | # - family: Schyler
42 | # fonts:
43 | # - asset: fonts/Schyler-Regular.ttf
44 | # - asset: fonts/Schyler-Italic.ttf
45 | # style: italic
46 | # - family: Trajan Pro
47 | # fonts:
48 | # - asset: fonts/TrajanPro.ttf
49 | # - asset: fonts/TrajanPro_Bold.ttf
50 | # weight: 700
51 | #
52 | # For details regarding fonts in packages, see
53 | # https://flutter.io/custom-fonts/#from-packages
54 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.1.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | flutter:
33 | dependency: "direct main"
34 | description: flutter
35 | source: sdk
36 | version: "0.0.0"
37 | flutter_test:
38 | dependency: "direct dev"
39 | description: flutter
40 | source: sdk
41 | version: "0.0.0"
42 | matcher:
43 | dependency: transitive
44 | description:
45 | name: matcher
46 | url: "https://pub.dartlang.org"
47 | source: hosted
48 | version: "0.12.5"
49 | meta:
50 | dependency: transitive
51 | description:
52 | name: meta
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "1.1.6"
56 | path:
57 | dependency: transitive
58 | description:
59 | name: path
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "1.6.2"
63 | pedantic:
64 | dependency: transitive
65 | description:
66 | name: pedantic
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.5.0"
70 | quiver:
71 | dependency: transitive
72 | description:
73 | name: quiver
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "2.0.2"
77 | sky_engine:
78 | dependency: transitive
79 | description: flutter
80 | source: sdk
81 | version: "0.0.99"
82 | source_span:
83 | dependency: transitive
84 | description:
85 | name: source_span
86 | url: "https://pub.dartlang.org"
87 | source: hosted
88 | version: "1.5.5"
89 | stack_trace:
90 | dependency: transitive
91 | description:
92 | name: stack_trace
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.9.3"
96 | stream_channel:
97 | dependency: transitive
98 | description:
99 | name: stream_channel
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "2.0.0"
103 | string_scanner:
104 | dependency: transitive
105 | description:
106 | name: string_scanner
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.0.4"
110 | term_glyph:
111 | dependency: transitive
112 | description:
113 | name: term_glyph
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.1.0"
117 | test_api:
118 | dependency: transitive
119 | description:
120 | name: test_api
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "0.2.4"
124 | typed_data:
125 | dependency: transitive
126 | description:
127 | name: typed_data
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.6"
131 | vector_math:
132 | dependency: transitive
133 | description:
134 | name: vector_math
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.0.8"
138 | sdks:
139 | dart: ">=2.2.0 <3.0.0"
140 |
--------------------------------------------------------------------------------
/lib/src/splash.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Splash extends StatefulWidget {
4 | /// Creates a splash effect onTap, surrounding its [child] widget.
5 | ///
6 | /// The [child] parameter can not be null.
7 | /// The tap is disabled if the [onTap] parameter is null.
8 | Splash({
9 | Key key,
10 | @required this.onTap,
11 | @required this.child,
12 | this.splashColor,
13 | this.minRadius = defaultMinRadius,
14 | this.maxRadius = defaultMaxRadius,
15 | }) : assert(minRadius != null),
16 | assert(maxRadius != null),
17 | assert(minRadius > 0),
18 | assert(minRadius < maxRadius),
19 | super(key: key);
20 |
21 | /// Child widget. Could be anything that should be surrounded by the splash.
22 | ///
23 | /// The bigger the child the bigger the splash effect - which is constrained
24 | /// by the [minRadius] and [maxRadius]
25 | final Widget child;
26 |
27 | /// [onTap] method, should not be null or empty.
28 | final GestureTapCallback onTap;
29 |
30 | /// The color of the splash effect. The default [splashColor] is black.
31 | final Color splashColor;
32 |
33 | /// The minimum radius of the splash effect.
34 | /// Should be set if the [child] widget is very small to create a
35 | /// more desired effect.
36 | ///
37 | /// The default minimum radius is set to [defaultMinRadius]
38 | final double minRadius;
39 |
40 | /// The maximum radius of the splash effect.
41 | /// Regardless of how big the child widget is, the splash will not extend
42 | /// the [maxRadius]. Should be set if a larger splash effect is desired.
43 | ///
44 | /// The default maximum radius is set to [defaultMaxRadius]
45 | final double maxRadius;
46 |
47 | static const double defaultMinRadius = 50;
48 | static const double defaultMaxRadius = 120;
49 |
50 | @override
51 | _SplashState createState() => _SplashState();
52 | }
53 |
54 | class _SplashState extends State with SingleTickerProviderStateMixin {
55 | AnimationController controller;
56 | Tween radiusTween;
57 | Tween borderWidthTween;
58 | Animation radiusAnimation;
59 | Animation borderWidthAnimation;
60 | AnimationStatus status;
61 | Offset _tapPosition;
62 |
63 | @override
64 | void initState() {
65 | controller =
66 | AnimationController(vsync: this, duration: Duration(milliseconds: 350))
67 | ..addListener(() {
68 | setState(() {});
69 | })
70 | ..addStatusListener((AnimationStatus listener) {
71 | status = listener;
72 | });
73 | radiusTween = Tween(begin: 0, end: 50);
74 | radiusAnimation = radiusTween
75 | .animate(CurvedAnimation(curve: Curves.ease, parent: controller));
76 | borderWidthTween = Tween(begin: 25, end: 1);
77 | borderWidthAnimation = borderWidthTween.animate(
78 | CurvedAnimation(curve: Curves.fastOutSlowIn, parent: controller));
79 |
80 | super.initState();
81 | }
82 |
83 | void _animate() {
84 | controller.forward(from: 0);
85 | }
86 |
87 | @override
88 | void dispose() {
89 | controller.dispose();
90 | super.dispose();
91 | }
92 |
93 | /// Buttons are disabled by default. To enable a button, set its [onTap]
94 | /// property to a non-null value.
95 | bool get _enabled => widget.onTap != null;
96 |
97 | void _handleTap(TapUpDetails tapDetails) {
98 | if (!_enabled) {
99 | return;
100 | }
101 | final RenderBox renderBox = context.findRenderObject();
102 | _tapPosition = renderBox.globalToLocal(tapDetails.globalPosition);
103 | final double radius = (renderBox.size.width > renderBox.size.height)
104 | ? renderBox.size.width
105 | : renderBox.size.height;
106 |
107 | double constraintRadius;
108 | if (radius > widget.maxRadius) {
109 | constraintRadius = widget.maxRadius;
110 | } else if (radius < widget.minRadius) {
111 | constraintRadius = widget.minRadius;
112 | } else {
113 | constraintRadius = radius;
114 | }
115 |
116 | radiusTween.end = constraintRadius * 0.6;
117 | borderWidthTween.begin = radiusTween.end / 2;
118 | borderWidthTween.end = radiusTween.end * 0.01;
119 | _animate();
120 |
121 | widget.onTap();
122 | }
123 |
124 | @override
125 | Widget build(BuildContext context) {
126 | return CustomPaint(
127 | foregroundPainter: _SplashPaint(
128 | radius: radiusAnimation.value,
129 | borderWidth: borderWidthAnimation.value,
130 | status: status,
131 | tapPosition: _tapPosition,
132 | color: widget.splashColor ?? Colors.black,
133 | ),
134 | child: GestureDetector(
135 | child: widget.child,
136 | onTapUp: _handleTap,
137 | ),
138 | );
139 | }
140 | }
141 |
142 | class _SplashPaint extends CustomPainter {
143 | _SplashPaint({
144 | @required this.radius,
145 | @required this.borderWidth,
146 | @required this.status,
147 | @required this.tapPosition,
148 | @required this.color,
149 | }) : blackPaint = Paint()
150 | ..color = color
151 | ..style = PaintingStyle.stroke
152 | ..strokeWidth = borderWidth;
153 |
154 | final double radius;
155 | final double borderWidth;
156 | final AnimationStatus status;
157 | final Offset tapPosition;
158 | final Color color;
159 | final Paint blackPaint;
160 |
161 | @override
162 | void paint(Canvas canvas, Size size) {
163 | if (status == AnimationStatus.forward) {
164 | canvas.drawCircle(tapPosition, radius, blackPaint);
165 | }
166 | }
167 |
168 | @override
169 | bool shouldRepaint(_SplashPaint oldDelegate) {
170 | if (radius != oldDelegate.radius) {
171 | return true;
172 | } else {
173 | return false;
174 | }
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_Packages.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
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.
20 |
21 | analyzer:
22 | strong-mode:
23 | implicit-dynamic: false
24 | errors:
25 | # treat missing required parameters as a warning (not a hint)
26 | missing_required_param: warning
27 | # treat missing returns as a warning (not a hint)
28 | missing_return: warning
29 | # allow having TODOs in the code
30 | 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 |
42 | linter:
43 | 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
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
52 | - annotate_overrides
53 | # - avoid_annotating_with_dynamic # conflicts with always_specify_types
54 | - avoid_as
55 | # - avoid_bool_literals_in_conditional_expressions # not yet tested
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
59 | # - avoid_double_and_int_checks # only useful when targeting JS runtime
60 | - avoid_empty_else
61 | - avoid_field_initializers_in_const_classes
62 | - 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
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
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
80 | - avoid_types_as_parameter_names
81 | # - avoid_types_on_closure_parameters # conflicts with always_specify_types
82 | - avoid_unused_constructor_parameters
83 | - avoid_void_async
84 | - await_only_futures
85 | - camel_case_types
86 | - 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
92 | # - curly_braces_in_flow_control_structures # not yet tested
93 | - directives_ordering
94 | - empty_catches
95 | - empty_constructor_bodies
96 | - empty_statements
97 | # - file_names # not yet tested
98 | - flutter_style_todos
99 | - hash_and_equals
100 | - implementation_imports
101 | # - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
102 | - iterable_contains_unrelated_type
103 | # - join_return_with_assignment # not yet tested
104 | - library_names
105 | - library_prefixes
106 | # - lines_longer_than_80_chars # not yet tested
107 | - list_remove_unrelated_type
108 | # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
109 | - no_adjacent_strings_in_list
110 | - no_duplicate_case_values
111 | - non_constant_identifier_names
112 | # - null_closures # not yet tested
113 | # - omit_local_variable_types # opposite of always_specify_types
114 | # - one_member_abstracts # too many false positives
115 | # - only_throw_errors # https://github.com/flutter/flutter/issues/5792
116 | - overridden_fields
117 | - package_api_docs
118 | - package_names
119 | - package_prefixed_library_names
120 | # - parameter_assignments # we do this commonly
121 | - prefer_adjacent_string_concatenation
122 | - prefer_asserts_in_initializer_lists
123 | - prefer_collection_literals
124 | - prefer_conditional_assignment
125 | - prefer_const_constructors
126 | - prefer_const_constructors_in_immutables
127 | - prefer_const_declarations
128 | - prefer_const_literals_to_create_immutables
129 | # - prefer_constructors_over_static_methods # not yet tested
130 | - prefer_contains
131 | - prefer_equal_for_default_values
132 | # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
133 | - prefer_final_fields
134 | - prefer_final_locals
135 | - prefer_foreach
136 | # - prefer_function_declarations_over_variables # not yet tested
137 | - prefer_generic_function_type_aliases
138 | - prefer_initializing_formals
139 | # - prefer_int_literals # not yet tested
140 | # - prefer_interpolation_to_compose_strings # not yet tested
141 | - prefer_is_empty
142 | - prefer_is_not_empty
143 | - prefer_iterable_whereType
144 | # - prefer_mixin # https://github.com/dart-lang/language/issues/32
145 | # - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
146 | - prefer_single_quotes
147 | - prefer_typing_uninitialized_variables
148 | - prefer_void_to_null
149 | # - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
150 | - recursive_getters
151 | - slash_for_doc_comments
152 | - sort_constructors_first
153 | - sort_pub_dependencies
154 | - sort_unnamed_constructors_first
155 | # - super_goes_last # no longer needed w/ Dart 2
156 | - test_types_in_equals
157 | - throw_in_finally
158 | # - type_annotate_public_apis # subset of always_specify_types
159 | - type_init_formals
160 | # - unawaited_futures # too many false positives
161 | # - unnecessary_await_in_return # not yet tested
162 | - unnecessary_brace_in_string_interps
163 | - unnecessary_const
164 | - unnecessary_getters_setters
165 | # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
166 | - unnecessary_new
167 | - unnecessary_null_aware_assignments
168 | - unnecessary_null_in_if_null_operators
169 | - unnecessary_overrides
170 | - unnecessary_parenthesis
171 | - unnecessary_statements
172 | - unnecessary_this
173 | - unrelated_type_equality_checks
174 | # - use_function_type_syntax_for_parameters # not yet tested
175 | - use_rethrow_when_possible
176 | # - use_setters_to_change_properties # not yet tested
177 | # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
178 | # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
179 | - valid_regexps
180 | # - void_checks # not yet tested
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | onTap
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 | 1550742224871
197 |
198 |
199 | 1550742224871
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
--------------------------------------------------------------------------------