chore: update package lints and apply fixes
This commit is contained in:
@@ -6,6 +6,8 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'channel_page.dart';
|
||||
|
||||
class PinnedMessagesScreen extends StatefulWidget {
|
||||
const PinnedMessagesScreen({super.key});
|
||||
|
||||
@override
|
||||
State<PinnedMessagesScreen> createState() => _PinnedMessagesScreenState();
|
||||
}
|
||||
@@ -22,7 +24,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
true,
|
||||
),
|
||||
sort: [
|
||||
SortOption(
|
||||
const SortOption(
|
||||
'created_at',
|
||||
direction: SortOption.ASC,
|
||||
),
|
||||
@@ -44,7 +46,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
leading: StreamBackButton(),
|
||||
leading: const StreamBackButton(),
|
||||
backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg,
|
||||
),
|
||||
body: StreamMessageSearchListView(
|
||||
@@ -58,7 +60,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
size: 136.0,
|
||||
color: StreamChatTheme.of(context).colorTheme.disabled,
|
||||
),
|
||||
SizedBox(height: 16.0),
|
||||
const SizedBox(height: 16.0),
|
||||
Text(
|
||||
AppLocalizations.of(context).noPinnedItems,
|
||||
style: TextStyle(
|
||||
@@ -68,7 +70,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.0),
|
||||
const SizedBox(height: 8.0),
|
||||
RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(children: [
|
||||
@@ -101,6 +103,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
},
|
||||
onMessageTap: (messageResponse) async {
|
||||
final client = StreamChat.of(context).client;
|
||||
final navigator = Navigator.of(context);
|
||||
final message = messageResponse.message;
|
||||
final channel = client.channel(
|
||||
messageResponse.channel!.type,
|
||||
@@ -109,8 +112,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
||||
if (channel.state == null) {
|
||||
await channel.watch();
|
||||
}
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
navigator.pushNamed(
|
||||
Routes.CHANNEL_PAGE,
|
||||
arguments: ChannelPageArgs(
|
||||
channel: channel,
|
||||
|
||||
Reference in New Issue
Block a user