Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: resolve non_exhaustive_switch_statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Craftplacer committed Apr 27, 2023
1 parent 8cfc0da commit 362a3cf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/kaiteki/lib/ui/main/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,9 @@ class _MainScreenState extends ConsumerState<MainScreen> {
case AppLocation.settings:
context.push("/settings");
break;
default:
return null;
}
return null;
}

void _changePage(TabKind tab) => setState(() => _currentTab = tab);
Expand Down
12 changes: 6 additions & 6 deletions src/kaiteki/lib/ui/shared/attachment_inspection_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ class _AttachmentInspectionScreenState
),
),
);
default:
throw ArgumentError.value(
attachment.type,
"attachment",
"Can't build widget for specified attachment type",
);
}

throw ArgumentError.value(
attachment.type,
"attachment",
"Can't build widget for specified attachment type",
);
}

Future<void> downloadAttachment(BuildContext context) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class AttachmentTrayItem extends StatelessWidget {
);
break;
}
default:
}

return Padding(
Expand Down
2 changes: 2 additions & 0 deletions src/kaiteki/lib/ui/shared/posts/compose/compose_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ class ComposeFormState extends ConsumerState<ComposeForm> {
} else {
return PostWidget(snapshot.data!, showActions: false);
}

default:
}

return const Padding(
Expand Down

0 comments on commit 362a3cf

Please sign in to comment.