Skip to content

Commit 2272bc1

Browse files
committed
style: fix lint errors
For diagnostic warnings introduced in recent analyzer versions.
1 parent 9bce04f commit 2272bc1

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

lib/features/checkin/view/auto_checkin_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class _AutoCheckinPageState extends State<AutoCheckinPage> {
2424
Widget build(BuildContext context) {
2525
final tr = context.t.autoCheckinPage;
2626
return BlocBuilder<AutoCheckinBloc, AutoCheckinState>(
27-
builder: (BuildContext context, state) {
27+
builder: (context, state) {
2828
var waitingList = <UserLoginInfo>[];
2929
var runningList = <UserLoginInfo>[];
3030
var succeededList = <(UserLoginInfo, CheckinResult)>[];

lib/features/editor/widgets/color_bottom_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class _ColorBottomSheetState extends State<_ColorBottomSheet> with SingleTickerP
118118
// Use the dialogPickerColor as start and active color.
119119
color: _advancedTabColor,
120120
// Update the dialogPickerColor using the callback.
121-
onColorChanged: (Color color) => setState(() => _advancedTabColor = color),
121+
onColorChanged: (color) => setState(() => _advancedTabColor = color),
122122
borderRadius: 15,
123123
spacing: 5,
124124
runSpacing: 5,

lib/features/settings/view/debug_log_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class DebugHistoricalLogPage extends StatelessWidget with LoggerMixin {
7575
final tr = context.t.settingsPage.debugSection.viewHistoryLog;
7676
final body = FutureBuilder(
7777
future: _loadLogFiles(),
78-
builder: (BuildContext context, AsyncSnapshot<List<HistoricalLog>> snapshot) {
78+
builder: (context, snapshot) {
7979
if (!snapshot.hasData) {
8080
return const CenteredCircularIndicator();
8181
}
@@ -128,7 +128,7 @@ class _DebugHistoricalLogDetailPageState extends State<DebugHistoricalLogDetailP
128128
final tr = context.t.settingsPage.debugSection.viewHistoryLog;
129129
final body = FutureBuilder(
130130
future: File(widget.log.file.path).readAsString(),
131-
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
131+
builder: (context, snapshot) {
132132
if (!snapshot.hasData) {
133133
return const CenteredCircularIndicator();
134134
}

lib/shared/providers/storage_provider/models/database/database.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ final class AppDatabase extends _$AppDatabase with LoggerMixin {
7272
updates: {schema.notice},
7373
updateKind: UpdateKind.delete,
7474
);
75+
// We are using table migration for old versions.
76+
// If in a far future the `TableMigration` API is removed, we may also
77+
// drop support for versions < 1.2.0
78+
// ignore: experimental_member_use
7579
await m.alterTable(TableMigration(schema.notice));
7680
info('migrating database schema from 4 to 5... ok!');
7781
},
@@ -94,6 +98,10 @@ final class AppDatabase extends _$AppDatabase with LoggerMixin {
9498
updates: {schema.personalMessage},
9599
updateKind: UpdateKind.delete,
96100
);
101+
// We are using table migration for old versions.
102+
// If in a far future the `TableMigration` API is removed, we may also
103+
// drop support for versions < 1.2.0
104+
// ignore: experimental_member_use
97105
await m.alterTable(TableMigration(schema.personalMessage));
98106
// Migrate personal message table.
99107
await m.addColumn(schema.broadcastMessage, schema.broadcastMessage.alreadyRead);

lib/widgets/annimate/animated_visibility.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AnimatedVisibility extends StatelessWidget {
1818
@override
1919
Widget build(BuildContext context) {
2020
return AnimatedSwitcher(
21-
transitionBuilder: (Widget child, Animation<double> animation) =>
21+
transitionBuilder: (child, animation) =>
2222
SizeTransition(sizeFactor: animation, axisAlignment: 1, child: child),
2323
duration: duration ?? duration100,
2424
child: visible ? child : null,

lib/widgets/section_switch_list_tile.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SectionSwitchListTile extends SwitchListTile {
2222
const SectionSwitchListTile({
2323
required super.value,
2424
required super.onChanged,
25-
super.activeColor,
25+
super.activeThumbColor,
2626
super.activeTrackColor,
2727
super.inactiveThumbColor,
2828
super.inactiveTrackColor,

lib/widgets/single_line_text.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SingleLineText extends Text {
1414
super.textDirection,
1515
super.locale,
1616
super.softWrap,
17-
super.textScaleFactor,
17+
super.textScaler,
1818
super.semanticsLabel,
1919
super.textWidthBasis,
2020
super.textHeightBehavior,

0 commit comments

Comments
 (0)