refactor: Update flutter lints
This commit is contained in:
parent
b473f514ba
commit
35983437e2
15 changed files with 43 additions and 82 deletions
|
|
@ -118,9 +118,9 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
bool currentlyTyping = false;
|
||||
bool dragging = false;
|
||||
|
||||
void onDragEntered(_) => setState(() => dragging = true);
|
||||
void onDragEntered(dynamic _) => setState(() => dragging = true);
|
||||
|
||||
void onDragExited(_) => setState(() => dragging = false);
|
||||
void onDragExited(dynamic _) => setState(() => dragging = false);
|
||||
|
||||
void onDragDone(DropDoneDetails details) async {
|
||||
setState(() => dragging = false);
|
||||
|
|
@ -148,7 +148,8 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
MessageTypes.File,
|
||||
}.contains(selectedEvents.single.messageType);
|
||||
|
||||
void saveSelectedEvent(context) => selectedEvents.single.saveFile(context);
|
||||
void saveSelectedEvent(BuildContext context) =>
|
||||
selectedEvents.single.saveFile(context);
|
||||
|
||||
List<Event> selectedEvents = [];
|
||||
|
||||
|
|
@ -213,7 +214,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
context.go('/rooms');
|
||||
}
|
||||
|
||||
void requestHistory([_]) async {
|
||||
void requestHistory([dynamic _]) async {
|
||||
Logs().v('Requesting history...');
|
||||
await timeline?.requestHistory(historyCount: _loadHistoryCount);
|
||||
}
|
||||
|
|
@ -254,7 +255,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
}
|
||||
}
|
||||
|
||||
void _shareItems([_]) {
|
||||
void _shareItems([dynamic _]) {
|
||||
final shareItems = widget.shareItems;
|
||||
if (shareItems == null || shareItems.isEmpty) return;
|
||||
if (!room.otherPartyCanReceiveMessages) {
|
||||
|
|
@ -1062,7 +1063,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
scrollController.jumpTo(0);
|
||||
}
|
||||
|
||||
void onEmojiSelected(_, Emoji? emoji) {
|
||||
void onEmojiSelected(dynamic _, Emoji? emoji) {
|
||||
typeEmoji(emoji);
|
||||
onInputBarChanged(sendController.text);
|
||||
}
|
||||
|
|
@ -1185,7 +1186,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
return index + 1;
|
||||
}
|
||||
|
||||
void onInputBarSubmitted(_) {
|
||||
void onInputBarSubmitted(String _) {
|
||||
send();
|
||||
FocusScope.of(context).requestFocus(inputFocus);
|
||||
}
|
||||
|
|
@ -1221,7 +1222,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
}
|
||||
}
|
||||
|
||||
unpinEvent(String eventId) async {
|
||||
void unpinEvent(String eventId) async {
|
||||
final response = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context).unpin,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class _CuteContentState extends State<CuteContent> {
|
|||
Overlay.of(context).insert(overlay);
|
||||
}
|
||||
|
||||
generateLabel(User? user) {
|
||||
String? generateLabel(User? user) {
|
||||
switch (widget.event.content['cute_type']) {
|
||||
case 'googly_eyes':
|
||||
return L10n.of(context).googlyEyesContent(
|
||||
|
|
@ -90,6 +90,7 @@ class _CuteContentState extends State<CuteContent> {
|
|||
'',
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class _StartPollBottomSheetState extends State<StartPollBottomSheet> {
|
|||
}
|
||||
}
|
||||
|
||||
void _updateCanCreate([_]) {
|
||||
void _updateCanCreate([dynamic _]) {
|
||||
final newCanCreate = _bodyController.text.trim().isNotEmpty &&
|
||||
!_answers.any((controller) => controller.text.trim().isEmpty);
|
||||
if (_canCreate != newCanCreate) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue