linter issues

This commit is contained in:
otsmr 2025-10-27 23:55:02 +01:00
parent 9d563793c7
commit 4914df5610
4 changed files with 195 additions and 200 deletions

View file

@ -40,7 +40,7 @@ class _ArchivedChatsViewState extends State<ArchivedChatsView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text("Archivierte Chats"), title: const Text('Archivierte Chats'),
), ),
body: ListView( body: ListView(
children: _groupsArchived.map((group) { children: _groupsArchived.map((group) {

View file

@ -105,8 +105,7 @@ class _ChatListViewState extends State<ChatListView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final isConnected = context.watch<CustomChangeProvider>().isConnected; final isConnected = context.watch<CustomChangeProvider>().isConnected;
final planId = context.watch<CustomChangeProvider>().plan; final planId = context.watch<CustomChangeProvider>().plan;
return Container( return Scaffold(
child: Scaffold(
appBar: AppBar( appBar: AppBar(
title: Row( title: Row(
children: [ children: [
@ -155,8 +154,7 @@ class _ChatListViewState extends State<ChatListView> {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: isDarkMode(context) ? Colors.black : Colors.white,
isDarkMode(context) ? Colors.black : Colors.white,
), ),
), ),
), ),
@ -213,7 +211,6 @@ class _ChatListViewState extends State<ChatListView> {
child: isConnected ? Container() : const ConnectionInfo(), child: isConnected ? Container() : const ConnectionInfo(),
), ),
Positioned.fill( Positioned.fill(
child: Container(
child: RefreshIndicator( child: RefreshIndicator(
onRefresh: () async { onRefresh: () async {
await apiService.close(() {}); await apiService.close(() {});
@ -232,13 +229,13 @@ class _ChatListViewState extends State<ChatListView> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => builder: (context) => const AddNewUserView(),
const AddNewUserView(),
), ),
); );
}, },
label: Text( label: Text(
context.lang.chatListViewSearchUserNameBtn), context.lang.chatListViewSearchUserNameBtn,
),
), ),
), ),
) )
@ -255,16 +252,16 @@ class _ChatListViewState extends State<ChatListView> {
if (_groupsArchived.isEmpty) return Container(); if (_groupsArchived.isEmpty) return Container();
return ListTile( return ListTile(
title: Text( title: Text(
"Archivierte Chats (${_groupsArchived.length})", 'Archivierte Chats (${_groupsArchived.length})',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 13), style: const TextStyle(fontSize: 13),
), ),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) { builder: (context) {
return ArchivedChatsView(); return const ArchivedChatsView();
}, },
), ),
); );
@ -282,8 +279,7 @@ class _ChatListViewState extends State<ChatListView> {
// If there are pinned users, account for the Divider // If there are pinned users, account for the Divider
var adjustedIndex = index - _groupsPinned.length; var adjustedIndex = index - _groupsPinned.length;
if (_groupsPinned.isNotEmpty && if (_groupsPinned.isNotEmpty && adjustedIndex == 0) {
adjustedIndex == 0) {
return const Divider(); return const Divider();
} }
@ -295,12 +291,13 @@ class _ChatListViewState extends State<ChatListView> {
adjustedIndex, adjustedIndex,
); );
return GroupListItem( return GroupListItem(
key: ValueKey(group.groupId), group: group); key: ValueKey(group.groupId),
group: group,
);
}, },
), ),
), ),
), ),
),
], ],
), ),
floatingActionButton: Padding( floatingActionButton: Padding(
@ -319,7 +316,6 @@ class _ChatListViewState extends State<ChatListView> {
child: const FaIcon(FontAwesomeIcons.penToSquare), child: const FaIcon(FontAwesomeIcons.penToSquare),
), ),
), ),
),
); );
} }
} }

View file

@ -1,5 +1,4 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:mutex/mutex.dart'; import 'package:mutex/mutex.dart';

View file

@ -66,7 +66,7 @@ class _ContextMenuState extends State<ContextMenu> {
leading: _getIcon(item.icon), leading: _getIcon(item.icon),
), ),
), ),
) ),
], ],
position: RelativeRect.fromRect( position: RelativeRect.fromRect(
_tapPosition! & const Size(40, 40), _tapPosition! & const Size(40, 40),