Skip to content

Commit c91e83d

Browse files
committed
Fix up the tests.
1 parent c610159 commit c91e83d

File tree

8 files changed

+163
-193
lines changed

8 files changed

+163
-193
lines changed

.idea/workspace.xml

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis_options.yaml

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,10 @@
1+
include: package:pedantic/analysis_options.1.8.0.yaml
2+
13
analyzer:
4+
exclude: [build/**]
25
strong-mode:
36
implicit-casts: false
4-
implicit-dynamic: false
5-
errors:
6-
todo: ignore
7-
exclude:
8-
- flutter/**
9-
- lib/api/*.dart
10-
- lib/i10n/*.dart
117

128
linter:
139
rules:
14-
- avoid_empty_else
15-
- cancel_subscriptions
16-
- close_sinks
17-
- always_declare_return_types
18-
- camel_case_types
19-
- empty_constructor_bodies
20-
- always_specify_types
21-
- prefer_collection_literals
22-
- prefer_const_literals_to_create_immutables
23-
- prefer_initializing_formals
24-
- annotate_overrides
25-
- avoid_init_to_null
26-
- one_member_abstracts
27-
- slash_for_doc_comments
28-
- sort_constructors_first
29-
- hash_and_equals
30-
- invariant_booleans
31-
- iterable_contains_unrelated_type
32-
- list_remove_unrelated_type
33-
- no_duplicate_case_values
34-
- test_types_in_equals
35-
- valid_regexps
36-
- always_put_control_body_on_new_line
37-
- always_put_required_named_parameters_first
38-
- always_require_non_null_named_parameters
39-
- recursive_getters
40-
- super_goes_last
41-
- unnecessary_overrides
42-
- unnecessary_this
43-
- use_string_buffers
10+
- camel_case_types

lib/src/calendar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class CalendarWidgetState extends State<CalendarWidget> {
201201
(CalendarEvent e, CalendarEvent e2) => e.instant.compareTo(e2.instant));
202202
// Make sure we clean up the old indexes when we update.
203203
events.clear();
204-
if (rawEvents.length > 0) {
204+
if (rawEvents.isNotEmpty) {
205205
int curIndex = CalendarEvent.indexFromMilliseconds(
206206
rawEvents[0].instant, widget.location);
207207
int sliceIndex = 0;
@@ -248,7 +248,7 @@ class CalendarWidgetState extends State<CalendarWidget> {
248248

249249
@override
250250
Widget build(BuildContext context) {
251-
return new Column(
251+
return Column(
252252
mainAxisSize: MainAxisSize.max,
253253
mainAxisAlignment: MainAxisAlignment.start,
254254
crossAxisAlignment: CrossAxisAlignment.start,

lib/src/calendardaymarker.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class CalendarDayMarker extends StatelessWidget {
88
/// The height must be positive.
99
const CalendarDayMarker(
1010
{Key? key,
11-
this.height: 16.0,
12-
this.radius: 5.0,
13-
this.indent: 0.0,
11+
this.height = 16.0,
12+
this.radius = 5.0,
13+
this.indent = 0.0,
1414
this.color})
1515
: assert(height >= 0.0),
1616
super(key: key);
@@ -82,7 +82,7 @@ class _CalendarDayMarkerPainter extends CustomPainter {
8282

8383
@override
8484
void paint(Canvas canvas, Size size) {
85-
canvas.drawCircle(_offset, _radius, new Paint()..color = _color!);
85+
canvas.drawCircle(_offset, _radius, Paint()..color = _color!);
8686
}
8787

8888
@override

lib/src/calendarevent.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:timezone/timezone.dart';
22

33
/// One day duration to use in the rest of the system.
4-
const Duration oneDay = const Duration(days: 1);
4+
final Duration oneDay = Duration(days: 1);
55

66
///
77
/// The source for the calendar, this is where to get all the events from.

0 commit comments

Comments
 (0)