fix(lint): adjust lint errors

This commit is contained in:
ricardodalarme 2023-05-15 09:27:53 -03:00
parent b1c4faf998
commit 44faeebb08
6 changed files with 397 additions and 7 deletions

View File

@ -66,7 +66,6 @@ linter:
- empty_catches - empty_catches
- empty_constructor_bodies - empty_constructor_bodies
- empty_statements - empty_statements
- enable_null_safety
- eol_at_end_of_file - eol_at_end_of_file
- exhaustive_cases - exhaustive_cases
- file_names - file_names

389
coverage/lcov.info Normal file
View File

@ -0,0 +1,389 @@
SF:lib/src/undoable.dart
DA:2,3
DA:7,6
DA:8,6
DA:10,3
DA:11,12
DA:12,3
DA:15,2
DA:16,2
DA:17,6
DA:18,6
LF:10
LH:10
end_of_record
SF:lib/src/extensions.dart
DA:5,2
DA:6,4
DA:11,1
DA:13,1
DA:14,1
DA:16,1
DA:17,1
DA:19,1
DA:20,1
LF:9
LH:9
end_of_record
SF:lib/src/allowed_swipe_direction.dart
DA:16,2
DA:24,7
DA:31,1
DA:38,2
DA:44,2
DA:52,1
DA:56,1
LF:7
LH:7
end_of_record
SF:lib/src/card_swiper.dart
DA:136,2
DA:162,6
DA:166,6
DA:170,4
DA:174,6
DA:178,6
DA:182,6
DA:185,2
DA:187,2
DA:188,2
DA:203,6
DA:205,4
DA:207,4
DA:209,2
DA:211,2
DA:213,8
DA:215,6
DA:217,4
DA:218,4
DA:221,4
DA:222,4
DA:224,4
DA:225,2
DA:226,4
DA:227,4
DA:228,4
DA:229,4
DA:230,4
DA:231,4
DA:235,2
DA:237,2
DA:238,4
DA:239,6
DA:242,2
DA:244,2
DA:245,2
DA:246,2
DA:247,4
DA:248,2
DA:249,2
DA:250,2
DA:253,6
DA:254,4
DA:256,2
DA:257,4
DA:266,2
DA:267,2
DA:268,4
DA:269,4
DA:270,2
DA:271,2
DA:272,4
DA:273,2
DA:275,10
DA:278,1
DA:279,2
DA:280,3
DA:283,1
DA:284,2
DA:285,2
DA:286,2
DA:288,6
DA:291,1
DA:292,2
DA:293,1
DA:294,3
DA:295,2
DA:296,2
DA:297,1
DA:302,1
DA:303,1
DA:304,1
DA:305,1
DA:312,2
DA:313,2
DA:314,16
DA:315,16
DA:316,2
DA:317,16
DA:318,2
DA:320,10
DA:326,1
DA:327,3
DA:328,1
DA:329,3
DA:330,1
DA:331,1
DA:332,1
DA:333,1
DA:334,1
DA:335,1
DA:336,1
DA:337,1
DA:338,1
DA:339,1
DA:345,2
DA:346,6
DA:347,6
DA:351,2
DA:352,2
DA:353,2
DA:354,2
DA:355,2
DA:361,2
DA:365,2
DA:366,10
DA:367,4
DA:368,10
DA:375,6
DA:376,6
DA:379,3
DA:383,2
DA:384,4
DA:385,4
DA:386,4
DA:387,2
DA:391,1
DA:392,6
DA:393,3
DA:396,1
DA:397,3
DA:398,1
DA:399,3
DA:400,1
DA:402,1
DA:404,6
DA:405,3
DA:408,1
DA:409,3
DA:410,1
DA:411,3
DA:412,1
DA:414,1
DA:417,1
DA:421,2
DA:422,2
DA:424,2
DA:425,2
DA:426,6
DA:429,1
DA:430,1
DA:431,1
DA:432,3
DA:435,1
DA:436,2
DA:437,2
DA:439,2
DA:440,3
DA:441,1
DA:442,2
DA:444,1
DA:451,2
DA:452,2
DA:453,1
DA:454,3
DA:457,2
DA:458,4
DA:459,4
DA:461,1
DA:465,1
DA:466,2
DA:467,4
DA:471,2
DA:472,2
DA:476,4
DA:477,8
DA:480,6
LF:167
LH:167
end_of_record
SF:lib/src/card_swiper_controller.dart
DA:9,1
DA:10,1
DA:11,1
DA:15,1
DA:16,1
DA:17,1
DA:21,1
DA:22,1
DA:23,1
DA:27,1
DA:28,1
DA:29,1
DA:33,1
DA:34,1
DA:35,1
DA:39,1
DA:40,1
DA:41,1
LF:18
LH:18
end_of_record
SF:lib/src/card_animation.dart
DA:8,2
DA:38,4
DA:40,2
DA:41,6
DA:42,6
DA:43,6
DA:44,6
DA:47,2
DA:48,4
DA:49,2
DA:50,2
DA:51,2
DA:52,2
DA:53,4
DA:54,2
DA:57,1
DA:59,1
DA:60,4
DA:61,2
DA:62,2
DA:63,4
DA:64,2
DA:65,4
DA:70,1
DA:71,4
DA:72,2
DA:73,2
DA:74,4
DA:75,2
DA:76,4
DA:80,4
DA:81,1
DA:82,1
DA:83,1
DA:86,1
DA:87,2
DA:88,4
DA:89,2
DA:90,1
DA:92,3
DA:95,1
DA:96,8
DA:99,1
DA:100,3
DA:104,3
DA:106,3
DA:107,0
DA:110,3
DA:111,0
DA:112,3
DA:116,2
DA:119,2
DA:121,2
DA:122,2
DA:123,2
DA:124,2
DA:125,2
DA:126,2
DA:127,2
DA:128,2
DA:134,2
DA:135,6
DA:137,4
DA:138,2
DA:139,2
DA:140,4
DA:141,4
DA:142,2
DA:143,6
DA:144,4
DA:145,4
DA:146,2
DA:148,4
DA:149,4
DA:150,2
DA:151,2
DA:152,4
DA:153,4
DA:156,2
DA:157,6
DA:159,4
DA:160,2
DA:161,6
DA:162,4
DA:163,4
DA:164,2
DA:165,2
DA:166,4
DA:167,4
DA:168,2
DA:170,4
DA:171,4
DA:172,2
DA:173,2
DA:174,4
DA:175,4
DA:178,1
DA:179,2
DA:180,1
DA:182,2
DA:183,2
DA:184,1
DA:186,2
DA:187,2
DA:188,1
DA:189,1
DA:190,2
DA:191,2
DA:192,1
DA:194,2
DA:195,2
DA:198,1
DA:200,1
DA:201,1
DA:202,1
DA:203,1
DA:204,1
DA:205,1
DA:206,1
DA:207,1
DA:213,1
DA:214,2
DA:216,2
DA:217,3
DA:219,2
DA:220,2
DA:221,1
DA:222,3
DA:223,2
DA:224,2
DA:226,1
DA:227,2
DA:228,2
DA:229,1
DA:230,1
DA:231,2
DA:232,2
DA:235,1
DA:236,2
DA:238,2
DA:239,1
DA:240,3
DA:241,2
DA:242,2
DA:243,3
DA:245,2
DA:246,2
DA:248,1
DA:249,2
DA:250,2
DA:251,1
DA:252,1
DA:253,2
DA:254,2
LF:154
LH:152
end_of_record

View File

@ -24,7 +24,7 @@ class Example extends StatefulWidget {
class _ExamplePageState extends State<Example> { class _ExamplePageState extends State<Example> {
final CardSwiperController controller = CardSwiperController(); final CardSwiperController controller = CardSwiperController();
final cards = candidates.map((candidate) => ExampleCard(candidate)).toList(); final cards = candidates.map(ExampleCard.new).toList();
@override @override
void dispose() { void dispose() {

View File

@ -1,11 +1,11 @@
name: example name: example
description: Example for the flutter_card_swiper description: Example for the flutter_card_swiper
publish_to: 'none' publish_to: "none"
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.15.0 <3.0.0"
dependencies: dependencies:
flutter: flutter:

View File

@ -10,8 +10,8 @@ class CardAnimation {
required this.maxAngle, required this.maxAngle,
required this.initialScale, required this.initialScale,
required this.initialOffset, required this.initialOffset,
this.isHorizontalSwipingEnabled = true, this.isHorizontalSwipingEnabled = true,
this.isVerticalSwipingEnabled = true, this.isVerticalSwipingEnabled = true,
this.allowedSwipeDirection = const AllowedSwipeDirection.all(), this.allowedSwipeDirection = const AllowedSwipeDirection.all(),
}) : scale = initialScale; }) : scale = initialScale;

View File

@ -2,8 +2,8 @@ import 'dart:collection';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_card_swiper/src/card_animation.dart';
import 'package:flutter_card_swiper/src/allowed_swipe_direction.dart'; import 'package:flutter_card_swiper/src/allowed_swipe_direction.dart';
import 'package:flutter_card_swiper/src/card_animation.dart';
import 'package:flutter_card_swiper/src/card_swiper_controller.dart'; import 'package:flutter_card_swiper/src/card_swiper_controller.dart';
import 'package:flutter_card_swiper/src/enums.dart'; import 'package:flutter_card_swiper/src/enums.dart';
import 'package:flutter_card_swiper/src/extensions.dart'; import 'package:flutter_card_swiper/src/extensions.dart';
@ -225,7 +225,9 @@ class _CardSwiperState<T extends Widget> extends State<CardSwiper>
animationController: _animationController, animationController: _animationController,
maxAngle: widget.maxAngle, maxAngle: widget.maxAngle,
initialScale: widget.scale, initialScale: widget.scale,
// ignore: deprecated_member_use_from_same_package
isVerticalSwipingEnabled: widget.isVerticalSwipingEnabled, isVerticalSwipingEnabled: widget.isVerticalSwipingEnabled,
// ignore: deprecated_member_use_from_same_package
isHorizontalSwipingEnabled: widget.isHorizontalSwipingEnabled, isHorizontalSwipingEnabled: widget.isHorizontalSwipingEnabled,
allowedSwipeDirection: widget.allowedSwipeDirection, allowedSwipeDirection: widget.allowedSwipeDirection,
initialOffset: widget.backCardOffset, initialOffset: widget.backCardOffset,