Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8560d914
Unverified
Commit
8560d914
authored
Mar 22, 2022
by
Michael Goderbauer
Committed by
GitHub
Mar 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to flutter_lints 2.0 (#99881)
parent
d435b724
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
54 additions
and
52 deletions
+54
-52
analyze_sample_code.dart
dev/bots/analyze_sample_code.dart
+2
-1
animation.dart
packages/flutter/lib/src/animation/animation.dart
+2
-2
colors.dart
packages/flutter/lib/src/cupertino/colors.dart
+1
-1
context_menu.dart
packages/flutter/lib/src/cupertino/context_menu.dart
+4
-4
form_row.dart
packages/flutter/lib/src/cupertino/form_row.dart
+3
-3
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+1
-1
container.dart
packages/flutter/lib/src/widgets/container.dart
+1
-1
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+3
-3
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+1
-1
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+12
-12
scrollbar.dart
packages/flutter/lib/src/widgets/scrollbar.dart
+18
-18
flutter_plugins.dart
packages/flutter_tools/lib/src/flutter_plugins.dart
+1
-0
pubspec.yaml.tmpl
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
+1
-1
pubspec.yaml.tmpl
...s/flutter_tools/templates/module/common/pubspec.yaml.tmpl
+1
-1
pubspec.yaml.tmpl
packages/flutter_tools/templates/package/pubspec.yaml.tmpl
+1
-1
pubspec.yaml.tmpl
...s/flutter_tools/templates/plugin_shared/pubspec.yaml.tmpl
+1
-1
pubspec.yaml.tmpl
packages/flutter_tools/templates/skeleton/pubspec.yaml.tmpl
+1
-1
No files found.
dev/bots/analyze_sample_code.dart
View file @
8560d914
...
...
@@ -746,9 +746,10 @@ dependencies:
sdk:
flutter
flutter_test:
sdk:
flutter
vector_math:
any
dev_dependencies:
flutter_lints:
^
1.0
.
3
flutter_lints:
^
2.0
.
0
''');
}
...
...
packages/flutter/lib/src/animation/animation.dart
View file @
8560d914
...
...
@@ -135,10 +135,10 @@ abstract class Animation<T> extends Listenable implements ValueListenable<T> {
/// vary.
///
/// ```dart
/// final Animatable<Alignment>
_
tween = AlignmentTween(begin: Alignment.topLeft, end: Alignment.topRight)
/// final Animatable<Alignment> tween = AlignmentTween(begin: Alignment.topLeft, end: Alignment.topRight)
/// .chain(CurveTween(curve: Curves.easeIn));
/// // ...
/// final Animation<Alignment>
_alignment2 = _controller.drive(_
tween);
/// final Animation<Alignment>
alignment2 = _controller.drive(
tween);
/// ```
/// {@end-tool}
/// {@tool snippet}
...
...
packages/flutter/lib/src/cupertino/colors.dart
View file @
8560d914
...
...
@@ -598,13 +598,13 @@ class CupertinoColors {
///
/// ```dart
/// CupertinoButton(
/// child: child,
/// // CupertinoDynamicColor works out of box in a CupertinoButton.
/// color: const CupertinoDynamicColor.withBrightness(
/// color: CupertinoColors.white,
/// darkColor: CupertinoColors.black,
/// ),
/// onPressed: () { },
/// child: child,
/// )
/// ```
/// {@end-tool}
...
...
packages/flutter/lib/src/cupertino/context_menu.dart
View file @
8560d914
...
...
@@ -158,10 +158,6 @@ class CupertinoContextMenu extends StatefulWidget {
///
/// ```dart
/// CupertinoContextMenu(
/// child: FittedBox(
/// fit: BoxFit.cover,
/// child: Image.asset('assets/photo.jpg'),
/// ),
/// // The FittedBox in the preview here allows the image to animate its
/// // aspect ratio when the CupertinoContextMenu is animating its preview
/// // widget open and closed.
...
...
@@ -184,6 +180,10 @@ class CupertinoContextMenu extends StatefulWidget {
/// onPressed: () {},
/// ),
/// ],
/// child: FittedBox(
/// fit: BoxFit.cover,
/// child: Image.asset('assets/photo.jpg'),
/// ),
/// )
/// ```
///
...
...
packages/flutter/lib/src/cupertino/form_row.dart
View file @
8560d914
...
...
@@ -58,6 +58,9 @@ const EdgeInsetsGeometry _kDefaultPadding =
/// header: const Text('SECTION 1'),
/// children: <Widget>[
/// CupertinoFormRow(
/// prefix: const Text('Toggle'),
/// helper: const Text('Use your instincts'),
/// error: toggleValue ? const Text('Cannot be true') : null,
/// child: CupertinoSwitch(
/// value: toggleValue,
/// onChanged: (bool value) {
...
...
@@ -66,9 +69,6 @@ const EdgeInsetsGeometry _kDefaultPadding =
/// });
/// },
/// ),
/// prefix: const Text('Toggle'),
/// helper: const Text('Use your instincts'),
/// error: toggleValue ? const Text('Cannot be true') : null,
/// ),
/// ],
/// ),
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
8560d914
...
...
@@ -3162,8 +3162,8 @@ class RenderRepaintBoundary extends RenderProxyBox {
/// key: globalKey,
/// child: Center(
/// child: TextButton(
/// child: const Text('Hello World', textDirection: TextDirection.ltr),
/// onPressed: _capturePng,
/// child: const Text('Hello World', textDirection: TextDirection.ltr),
/// ),
/// ),
/// );
...
...
packages/flutter/lib/src/widgets/container.dart
View file @
8560d914
...
...
@@ -222,12 +222,12 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
/// padding: const EdgeInsets.all(8.0),
/// color: Colors.blue[600],
/// alignment: Alignment.center,
/// transform: Matrix4.rotationZ(0.1),
/// child: Text('Hello World',
/// style: Theme.of(context)
/// .textTheme
/// .headline4!
/// .copyWith(color: Colors.white)),
/// transform: Matrix4.rotationZ(0.1),
/// )
/// ```
/// {@end-tool}
...
...
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
8560d914
...
...
@@ -1324,8 +1324,8 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
/// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[
/// ElevatedButton(
/// child: const Text('Scale Logo'),
/// onPressed: _changeScale,
/// child: const Text('Scale Logo'),
/// ),
/// Padding(
/// padding: const EdgeInsets.all(50),
...
...
@@ -1455,8 +1455,8 @@ class _AnimatedScaleState extends ImplicitlyAnimatedWidgetState<AnimatedScale> {
/// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[
/// ElevatedButton(
/// child: const Text('Rotate Logo'),
/// onPressed: _changeRotation,
/// child: const Text('Rotate Logo'),
/// ),
/// Padding(
/// padding: const EdgeInsets.all(50),
...
...
@@ -1673,8 +1673,8 @@ class _AnimatedSlideState extends ImplicitlyAnimatedWidgetState<AnimatedSlide> {
/// child: const FlutterLogo(),
/// ),
/// ElevatedButton(
/// child: const Text('Fade Logo'),
/// onPressed: _changeOpacity,
/// child: const Text('Fade Logo'),
/// ),
/// ],
/// );
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
8560d914
...
...
@@ -586,8 +586,8 @@ mixin LocalHistoryRoute<T> on Route<T> {
/// color: Colors.red,
/// )
/// : ElevatedButton(
/// child: const Text('Show Rectangle'),
/// onPressed: _navigateLocallyToShowRectangle,
/// child: const Text('Show Rectangle'),
/// );
///
/// return Scaffold(
...
...
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
8560d914
...
...
@@ -1588,33 +1588,33 @@ class ListView extends BoxScrollView {
/// children: <Widget>[
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text("He'd have you all unravel at the"),
/// color: Colors.teal[100],
/// child: const Text("He'd have you all unravel at the"),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Heed not the rabble'),
/// color: Colors.teal[200],
/// child: const Text('Heed not the rabble'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Sound of screams but the'),
/// color: Colors.teal[300],
/// child: const Text('Sound of screams but the'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Who scream'),
/// color: Colors.teal[400],
/// child: const Text('Who scream'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Revolution is coming...'),
/// color: Colors.teal[500],
/// child: const Text('Revolution is coming...'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Revolution, they...'),
/// color: Colors.teal[600],
/// child: const Text('Revolution, they...'),
/// ),
/// ],
/// )
...
...
@@ -1640,33 +1640,33 @@ class ListView extends BoxScrollView {
/// children: <Widget>[
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text("He'd have you all unravel at the"),
/// color: Colors.green[100],
/// child: const Text("He'd have you all unravel at the"),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Heed not the rabble'),
/// color: Colors.green[200],
/// child: const Text('Heed not the rabble'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Sound of screams but the'),
/// color: Colors.green[300],
/// child: const Text('Sound of screams but the'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Who scream'),
/// color: Colors.green[400],
/// child: const Text('Who scream'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Revolution is coming...'),
/// color: Colors.green[500],
/// child: const Text('Revolution is coming...'),
/// ),
/// Container(
/// padding: const EdgeInsets.all(8),
/// child: const Text('Revolution, they...'),
/// color: Colors.green[600],
/// child: const Text('Revolution, they...'),
/// ),
/// ],
/// ),
...
...
packages/flutter/lib/src/widgets/scrollbar.dart
View file @
8560d914
...
...
@@ -969,8 +969,8 @@ class RawScrollbar extends StatefulWidget {
/// scrollbar dragging for multiple independent ListViews:
///
/// ```dart
/// final ScrollController
_
controllerOne = ScrollController();
/// final ScrollController
_
controllerTwo = ScrollController();
/// final ScrollController controllerOne = ScrollController();
/// final ScrollController controllerTwo = ScrollController();
///
/// Widget build(BuildContext context) {
/// return Column(
...
...
@@ -978,9 +978,9 @@ class RawScrollbar extends StatefulWidget {
/// SizedBox(
/// height: 200,
/// child: CupertinoScrollbar(
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// child: ListView.builder(
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) => Text('item $index'),
/// ),
...
...
@@ -989,9 +989,9 @@ class RawScrollbar extends StatefulWidget {
/// SizedBox(
/// height: 200,
/// child: CupertinoScrollbar(
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// child: ListView.builder(
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) => Text('list 2 item $index'),
/// ),
...
...
@@ -1030,8 +1030,8 @@ class RawScrollbar extends StatefulWidget {
/// {@tool snippet}
///
/// ```dart
/// final ScrollController
_
controllerOne = ScrollController();
/// final ScrollController
_
controllerTwo = ScrollController();
/// final ScrollController controllerOne = ScrollController();
/// final ScrollController controllerTwo = ScrollController();
///
/// Widget build(BuildContext context) {
/// return Column(
...
...
@@ -1040,9 +1040,9 @@ class RawScrollbar extends StatefulWidget {
/// height: 200,
/// child: Scrollbar(
/// thumbVisibility: true,
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// child: ListView.builder(
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) {
/// return Text('item $index');
...
...
@@ -1054,9 +1054,9 @@ class RawScrollbar extends StatefulWidget {
/// height: 200,
/// child: CupertinoScrollbar(
/// thumbVisibility: true,
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// child: SingleChildScrollView(
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// child: const SizedBox(
/// height: 2000,
/// width: 500,
...
...
@@ -1112,8 +1112,8 @@ class RawScrollbar extends StatefulWidget {
/// {@tool snippet}
///
/// ```dart
/// final ScrollController
_
controllerOne = ScrollController();
/// final ScrollController
_
controllerTwo = ScrollController();
/// final ScrollController controllerOne = ScrollController();
/// final ScrollController controllerTwo = ScrollController();
///
/// Widget build(BuildContext context) {
/// return Column(
...
...
@@ -1122,9 +1122,9 @@ class RawScrollbar extends StatefulWidget {
/// height: 200,
/// child: Scrollbar(
/// thumbVisibility: true,
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// child: ListView.builder(
/// controller:
_
controllerOne,
/// controller: controllerOne,
/// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) {
/// return Text('item $index');
...
...
@@ -1136,9 +1136,9 @@ class RawScrollbar extends StatefulWidget {
/// height: 200,
/// child: CupertinoScrollbar(
/// thumbVisibility: true,
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// child: SingleChildScrollView(
/// controller:
_
controllerTwo,
/// controller: controllerTwo,
/// child: const SizedBox(
/// height: 2000,
/// width: 500,
...
...
packages/flutter_tools/lib/src/flutter_plugins.dart
View file @
8560d914
...
...
@@ -557,6 +557,7 @@ const String _dartPluginRegistryTemplate = '''
// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: depend_on_referenced_packages
{{
#methodChannelPlugins
}}
import
'package:{{name}}/{{file}}'
;
...
...
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
View file @
8560d914
...
...
@@ -55,7 +55,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^
1
.0.0
flutter_lints: ^
2
.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/module/common/pubspec.yaml.tmpl
View file @
8560d914
...
...
@@ -31,7 +31,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^
1
.0.0
flutter_lints: ^
2
.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/package/pubspec.yaml.tmpl
View file @
8560d914
...
...
@@ -14,7 +14,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^
1
.0.0
flutter_lints: ^
2
.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/plugin_shared/pubspec.yaml.tmpl
View file @
8560d914
...
...
@@ -28,7 +28,7 @@ dev_dependencies:
{{/withFfiPluginHook}}
flutter_test:
sdk: flutter
flutter_lints: ^
1
.0.0
flutter_lints: ^
2
.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/skeleton/pubspec.yaml.tmpl
View file @
8560d914
...
...
@@ -19,7 +19,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^
1
.0.0
flutter_lints: ^
2
.0.0
flutter:
uses-material-design: true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment