Migrated most of the code from deprecated widgets to v4 widgets, and changed data being supplied for full screen implementation
This commit is contained in:
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 31
|
||||||
ndkVersion '21.4.7075529'
|
ndkVersion '21.4.7075529'
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -264,8 +264,7 @@
|
|||||||
"${BUILT_PRODUCTS_DIR}/sqlite3/sqlite3.framework",
|
"${BUILT_PRODUCTS_DIR}/sqlite3/sqlite3.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/sqlite3_flutter_libs/sqlite3_flutter_libs.framework",
|
"${BUILT_PRODUCTS_DIR}/sqlite3_flutter_libs/sqlite3_flutter_libs.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
|
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/video_compress/video_compress.framework",
|
"${BUILT_PRODUCTS_DIR}/video_player_avfoundation/video_player_avfoundation.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/video_player/video_player.framework",
|
|
||||||
"${BUILT_PRODUCTS_DIR}/video_thumbnail/video_thumbnail.framework",
|
"${BUILT_PRODUCTS_DIR}/video_thumbnail/video_thumbnail.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
|
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
|
||||||
);
|
);
|
||||||
@@ -293,8 +292,7 @@
|
|||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3_flutter_libs.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3_flutter_libs.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_compress.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player_avfoundation.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework",
|
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_thumbnail.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_thumbnail.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:example/localizations.dart';
|
|||||||
import 'package:example/routes/routes.dart';
|
import 'package:example/routes/routes.dart';
|
||||||
import 'package:example/stream_version.dart';
|
import 'package:example/stream_version.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class _ChannelFileDisplayScreenState extends State<ChannelFileDisplayScreen> {
|
|||||||
padding: const EdgeInsets.all(1.0),
|
padding: const EdgeInsets.all(1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: FileAttachment(
|
child: StreamFileAttachment(
|
||||||
message: media.values.toList()[position],
|
message: media.values.toList()[position],
|
||||||
attachment: media.keys.toList()[position],
|
attachment: media.keys.toList()[position],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class _ChannelList extends State<ChannelList> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
body: _isSearchActive
|
body: _isSearchActive
|
||||||
? MessageSearchListView(
|
? StreamMessageSearchListView(
|
||||||
showErrorTile: true,
|
showErrorTile: true,
|
||||||
messageQuery: _channelQuery,
|
messageQuery: _channelQuery,
|
||||||
filters: Filter.in_('members', [user!.id]),
|
filters: Filter.in_('members', [user!.id]),
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: -3,
|
top: -3,
|
||||||
right: -16,
|
right: -16,
|
||||||
child: UnreadIndicator(),
|
child: StreamUnreadIndicator(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -70,7 +70,7 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
appBar: ChannelListHeader(
|
appBar: StreamChannelListHeader(
|
||||||
onNewChatButtonTap: () {
|
onNewChatButtonTap: () {
|
||||||
Navigator.pushNamed(context, Routes.NEW_CHAT);
|
Navigator.pushNamed(context, Routes.NEW_CHAT);
|
||||||
},
|
},
|
||||||
@@ -165,7 +165,7 @@ class LeftDrawer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
UserAvatar(
|
StreamUserAvatar(
|
||||||
user: user,
|
user: user,
|
||||||
showOnlineStatus: false,
|
showOnlineStatus: false,
|
||||||
constraints: BoxConstraints.tight(Size.fromRadius(20)),
|
constraints: BoxConstraints.tight(Size.fromRadius(20)),
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class ChannelMediaDisplayScreen extends StatefulWidget {
|
|||||||
|
|
||||||
final ShowMessageCallback? onShowMessage;
|
final ShowMessageCallback? onShowMessage;
|
||||||
|
|
||||||
final MessageThemeData messageTheme;
|
final StreamMessageThemeData messageTheme;
|
||||||
|
|
||||||
const ChannelMediaDisplayScreen({
|
const ChannelMediaDisplayScreen({
|
||||||
required this.messageTheme,
|
required this.messageTheme,
|
||||||
@@ -180,11 +180,16 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
|
|||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => StreamChannel(
|
builder: (context) => StreamChannel(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
child: FullScreenMedia(
|
child: StreamFullScreenMedia(
|
||||||
mediaAttachments:
|
mediaAttachmentPackages: media
|
||||||
media.map((e) => e.attachment).toList(),
|
.map(
|
||||||
|
(e) => StreamAttachmentPackage(
|
||||||
|
attachment: e.attachment,
|
||||||
|
message: e.message,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
startIndex: position,
|
startIndex: position,
|
||||||
message: media[position].message,
|
|
||||||
userName: media[position].message.user!.name,
|
userName: media[position].message.user!.name,
|
||||||
onShowMessage: widget.onShowMessage,
|
onShowMessage: widget.onShowMessage,
|
||||||
),
|
),
|
||||||
@@ -194,7 +199,7 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
|
|||||||
},
|
},
|
||||||
child: media[position].attachment.type == 'image'
|
child: media[position].attachment.type == 'image'
|
||||||
? IgnorePointer(
|
? IgnorePointer(
|
||||||
child: ImageAttachment(
|
child: StreamImageAttachment(
|
||||||
attachment: media[position].attachment,
|
attachment: media[position].attachment,
|
||||||
message: media[position].message,
|
message: media[position].message,
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
appBar: ChannelHeader(
|
appBar: StreamChannelHeader(
|
||||||
showTypingIndicator: false,
|
showTypingIndicator: false,
|
||||||
onImageTap: () async {
|
onImageTap: () async {
|
||||||
var channel = StreamChannel.of(context).channel;
|
var channel = StreamChannel.of(context).channel;
|
||||||
@@ -108,7 +108,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
MessageListView(
|
StreamMessageListView(
|
||||||
initialScrollIndex: widget.initialScrollIndex,
|
initialScrollIndex: widget.initialScrollIndex,
|
||||||
initialAlignment: widget.initialAlignment,
|
initialAlignment: widget.initialAlignment,
|
||||||
highlightInitialMessage: widget.highlightInitialMessage,
|
highlightInitialMessage: widget.highlightInitialMessage,
|
||||||
@@ -137,7 +137,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
deletedBottomRowBuilder: (context, message) {
|
deletedBottomRowBuilder: (context, message) {
|
||||||
return const VisibleFootnote();
|
return const StreamVisibleFootnote();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -155,8 +155,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
.colorTheme
|
.colorTheme
|
||||||
.appBg
|
.appBg
|
||||||
.withOpacity(.9),
|
.withOpacity(.9),
|
||||||
child: TypingIndicator(
|
child: StreamTypingIndicator(
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 8,
|
horizontal: 8,
|
||||||
vertical: 4,
|
vertical: 4,
|
||||||
@@ -174,7 +173,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MessageInput(
|
StreamMessageInput(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
messageInputController: _messageInputController,
|
messageInputController: _messageInputController,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'package:collection/collection.dart' show IterableExtension;
|
|||||||
import 'package:example/localizations.dart';
|
import 'package:example/localizations.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.dart';
|
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
import 'channel_file_display_screen.dart';
|
import 'channel_file_display_screen.dart';
|
||||||
@@ -16,7 +15,7 @@ class ChatInfoScreen extends StatefulWidget {
|
|||||||
/// User in consideration
|
/// User in consideration
|
||||||
final User? user;
|
final User? user;
|
||||||
|
|
||||||
final MessageThemeData messageTheme;
|
final StreamMessageThemeData messageTheme;
|
||||||
|
|
||||||
const ChatInfoScreen({
|
const ChatInfoScreen({
|
||||||
Key? key,
|
Key? key,
|
||||||
@@ -78,7 +77,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: UserAvatar(
|
child: StreamUserAvatar(
|
||||||
user: widget.user!,
|
user: widget.user!,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
width: 72.0,
|
width: 72.0,
|
||||||
@@ -95,7 +94,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
SizedBox(height: 7.0),
|
SizedBox(height: 7.0),
|
||||||
_buildConnectedTitleState(),
|
_buildConnectedTitleState(),
|
||||||
SizedBox(height: 15.0),
|
SizedBox(height: 15.0),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: '@${widget.user!.id}',
|
title: '@${widget.user!.id}',
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
trailing: Padding(
|
trailing: Padding(
|
||||||
@@ -148,7 +147,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
mutedBool.value = snapshot.data;
|
mutedBool.value = snapshot.data;
|
||||||
|
|
||||||
return OptionListTile(
|
return StreamOptionListTile(
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
title: AppLocalizations.of(context).muteUser,
|
title: AppLocalizations.of(context).muteUser,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -201,7 +200,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
// ),
|
// ),
|
||||||
// onTap: () {},
|
// onTap: () {},
|
||||||
// ),
|
// ),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: AppLocalizations.of(context).pinnedMessages,
|
title: AppLocalizations.of(context).pinnedMessages,
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -261,7 +260,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: AppLocalizations.of(context).photosAndVideos,
|
title: AppLocalizations.of(context).photosAndVideos,
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -321,7 +320,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: AppLocalizations.of(context).files,
|
title: AppLocalizations.of(context).files,
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -361,7 +360,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: AppLocalizations.of(context).sharedGroups,
|
title: AppLocalizations.of(context).sharedGroups,
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -391,7 +390,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDeleteListTile() {
|
Widget _buildDeleteListTile() {
|
||||||
return OptionListTile(
|
return StreamOptionListTile(
|
||||||
title: 'Delete Conversation',
|
title: 'Delete Conversation',
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body.copyWith(
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body.copyWith(
|
||||||
@@ -632,7 +631,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: ChannelAvatar(
|
child: StreamChannelAvatar(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(maxWidth: 40.0, maxHeight: 40.0),
|
BoxConstraints(maxWidth: 40.0, maxHeight: 40.0),
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class ChooseUserPage extends StatelessWidget {
|
|||||||
arguments: HomePageArgs(client),
|
arguments: HomePageArgs(client),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
leading: UserAvatar(
|
leading: StreamUserAvatar(
|
||||||
user: user,
|
user: user,
|
||||||
constraints: BoxConstraints.tight(
|
constraints: BoxConstraints.tight(
|
||||||
Size.fromRadius(20),
|
Size.fromRadius(20),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:example/localizations.dart';
|
import 'package:example/localizations.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
|
||||||
|
|
||||||
import 'channel_page.dart';
|
import 'channel_page.dart';
|
||||||
import 'routes/routes.dart';
|
import 'routes/routes.dart';
|
||||||
@@ -155,7 +154,7 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: ConnectionStatusBuilder(
|
body: StreamConnectionStatusBuilder(
|
||||||
statusBuilder: (context, status) {
|
statusBuilder: (context, status) {
|
||||||
String statusString = '';
|
String statusString = '';
|
||||||
bool showStatus = true;
|
bool showStatus = true;
|
||||||
@@ -172,7 +171,7 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
|
|||||||
statusString = AppLocalizations.of(context).disconnected;
|
statusString = AppLocalizations.of(context).disconnected;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return InfoTile(
|
return StreamInfoTile(
|
||||||
showMessage: showStatus,
|
showMessage: showStatus,
|
||||||
tileAnchor: Alignment.topCenter,
|
tileAnchor: Alignment.topCenter,
|
||||||
childAnchor: Alignment.topCenter,
|
childAnchor: Alignment.topCenter,
|
||||||
@@ -222,7 +221,7 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
|
|||||||
final user = _selectedUsers[index];
|
final user = _selectedUsers[index];
|
||||||
return ListTile(
|
return ListTile(
|
||||||
key: ObjectKey(user),
|
key: ObjectKey(user),
|
||||||
leading: UserAvatar(
|
leading: StreamUserAvatar(
|
||||||
user: user,
|
user: user,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
width: 40,
|
width: 40,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:collection/collection.dart' show IterableExtension;
|
|||||||
import 'package:example/localizations.dart';
|
import 'package:example/localizations.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.dart';
|
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
import 'channel_file_display_screen.dart';
|
import 'channel_file_display_screen.dart';
|
||||||
@@ -15,7 +14,7 @@ import 'pinned_messages_screen.dart';
|
|||||||
import 'routes/routes.dart';
|
import 'routes/routes.dart';
|
||||||
|
|
||||||
class GroupInfoScreen extends StatefulWidget {
|
class GroupInfoScreen extends StatefulWidget {
|
||||||
final MessageThemeData messageTheme;
|
final StreamMessageThemeData messageTheme;
|
||||||
|
|
||||||
const GroupInfoScreen({
|
const GroupInfoScreen({
|
||||||
Key? key,
|
Key? key,
|
||||||
@@ -222,7 +221,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
horizontal: 8.0,
|
horizontal: 8.0,
|
||||||
vertical: 12.0,
|
vertical: 12.0,
|
||||||
),
|
),
|
||||||
child: UserAvatar(
|
child: StreamUserAvatar(
|
||||||
user: member.user!,
|
user: member.user!,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
height: 40.0,
|
height: 40.0,
|
||||||
@@ -456,7 +455,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
mutedBool.value = snapshot.data;
|
mutedBool.value = snapshot.data;
|
||||||
|
|
||||||
return OptionListTile(
|
return StreamOptionListTile(
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
separatorColor:
|
separatorColor:
|
||||||
StreamChatTheme.of(context).colorTheme.disabled,
|
StreamChatTheme.of(context).colorTheme.disabled,
|
||||||
@@ -493,7 +492,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
onTap: () {},
|
onTap: () {},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
title: AppLocalizations.of(context).pinnedMessages,
|
title: AppLocalizations.of(context).pinnedMessages,
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
titleTextStyle: StreamChatTheme.of(context).textTheme.body,
|
||||||
@@ -553,7 +552,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
||||||
title: AppLocalizations.of(context).photosAndVideos,
|
title: AppLocalizations.of(context).photosAndVideos,
|
||||||
@@ -615,7 +614,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
||||||
title: AppLocalizations.of(context).files,
|
title: AppLocalizations.of(context).files,
|
||||||
@@ -660,7 +659,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
if (!channel.channel.isDistinct &&
|
if (!channel.channel.isDistinct &&
|
||||||
channel.channel.ownCapabilities
|
channel.channel.ownCapabilities
|
||||||
.contains(PermissionType.leaveChannel))
|
.contains(PermissionType.leaveChannel))
|
||||||
OptionListTile(
|
StreamOptionListTile(
|
||||||
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
tileColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
separatorColor: StreamChatTheme.of(context).colorTheme.disabled,
|
||||||
title: AppLocalizations.of(context).leaveGroup,
|
title: AppLocalizations.of(context).leaveGroup,
|
||||||
@@ -730,7 +729,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
child: _buildTextInputSection(modalSetState),
|
child: _buildTextInputSection(modalSetState),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: UserListView(
|
child: StreamUserListView(
|
||||||
selectedUsers: {},
|
selectedUsers: {},
|
||||||
onUserTap: (user, _) async {
|
onUserTap: (user, _) async {
|
||||||
_searchController!.clear();
|
_searchController!.clear();
|
||||||
@@ -900,7 +899,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
Center(
|
Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: UserAvatar(
|
child: StreamUserAvatar(
|
||||||
user: user,
|
user: user,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
height: 64.0,
|
height: 64.0,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:example/channel_page.dart';
|
|||||||
import 'package:example/notifications_service.dart';
|
import 'package:example/notifications_service.dart';
|
||||||
import 'package:example/routes/app_routes.dart';
|
import 'package:example/routes/app_routes.dart';
|
||||||
import 'package:example/routes/routes.dart';
|
import 'package:example/routes/routes.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:example/choose_user_page.dart';
|
|||||||
import 'package:example/home_page.dart';
|
import 'package:example/home_page.dart';
|
||||||
import 'package:example/localizations.dart';
|
import 'package:example/localizations.dart';
|
||||||
import 'package:example/splash_screen.dart';
|
import 'package:example/splash_screen.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/scheduler.dart';
|
import 'package:flutter/scheduler.dart';
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
),
|
),
|
||||||
body: ConnectionStatusBuilder(
|
body: StreamConnectionStatusBuilder(
|
||||||
statusBuilder: (context, status) {
|
statusBuilder: (context, status) {
|
||||||
String statusString = '';
|
String statusString = '';
|
||||||
bool showStatus = true;
|
bool showStatus = true;
|
||||||
@@ -147,7 +147,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
statusString = AppLocalizations.of(context).disconnected;
|
statusString = AppLocalizations.of(context).disconnected;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return InfoTile(
|
return StreamInfoTile(
|
||||||
showMessage: showStatus,
|
showMessage: showStatus,
|
||||||
tileAnchor: Alignment.topCenter,
|
tileAnchor: Alignment.topCenter,
|
||||||
childAnchor: Alignment.topCenter,
|
childAnchor: Alignment.topCenter,
|
||||||
@@ -200,7 +200,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
.overlay,
|
.overlay,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: UserAvatar(
|
child: StreamUserAvatar(
|
||||||
showOnlineStatus: false,
|
showOnlineStatus: false,
|
||||||
user: user,
|
user: user,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
@@ -288,7 +288,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
||||||
child: UsersBloc(
|
child: UsersBloc(
|
||||||
child: UserListView(
|
child: StreamUserListView(
|
||||||
selectedUsers: _selectedUsers,
|
selectedUsers: _selectedUsers,
|
||||||
groupAlphabetically:
|
groupAlphabetically:
|
||||||
_isSearchActive ? false : true,
|
_isSearchActive ? false : true,
|
||||||
@@ -366,7 +366,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
future: channel!.initialized,
|
future: channel!.initialized,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.data == true) {
|
if (snapshot.data == true) {
|
||||||
return MessageListView();
|
return StreamMessageListView();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
@@ -384,7 +384,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MessageInput(
|
StreamMessageInput(
|
||||||
focusNode: _messageInputFocusNode,
|
focusNode: _messageInputFocusNode,
|
||||||
preMessageSending: (message) async {
|
preMessageSending: (message) async {
|
||||||
await channel!.watch();
|
await channel!.watch();
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: ConnectionStatusBuilder(
|
body: StreamConnectionStatusBuilder(
|
||||||
statusBuilder: (context, status) {
|
statusBuilder: (context, status) {
|
||||||
String statusString = '';
|
String statusString = '';
|
||||||
bool showStatus = true;
|
bool showStatus = true;
|
||||||
@@ -105,7 +105,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
statusString = AppLocalizations.of(context).disconnected;
|
statusString = AppLocalizations.of(context).disconnected;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return InfoTile(
|
return StreamInfoTile(
|
||||||
showMessage: showStatus,
|
showMessage: showStatus,
|
||||||
tileAnchor: Alignment.topCenter,
|
tileAnchor: Alignment.topCenter,
|
||||||
childAnchor: Alignment.topCenter,
|
childAnchor: Alignment.topCenter,
|
||||||
@@ -136,7 +136,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
UserAvatar(
|
StreamUserAvatar(
|
||||||
onlineIndicatorAlignment:
|
onlineIndicatorAlignment:
|
||||||
Alignment(0.9, 0.9),
|
Alignment(0.9, 0.9),
|
||||||
user: user,
|
user: user,
|
||||||
@@ -229,7 +229,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
||||||
child: UsersBloc(
|
child: UsersBloc(
|
||||||
child: UserListView(
|
child: StreamUserListView(
|
||||||
selectedUsers: _selectedUsers,
|
selectedUsers: _selectedUsers,
|
||||||
pullToRefresh: false,
|
pullToRefresh: false,
|
||||||
groupAlphabetically: _isSearchActive ? false : true,
|
groupAlphabetically: _isSearchActive ? false : true,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class PinnedMessagesScreen extends StatefulWidget {
|
|||||||
|
|
||||||
final ShowMessageCallback? onShowMessage;
|
final ShowMessageCallback? onShowMessage;
|
||||||
|
|
||||||
final MessageThemeData messageTheme;
|
final StreamMessageThemeData messageTheme;
|
||||||
|
|
||||||
const PinnedMessagesScreen({
|
const PinnedMessagesScreen({
|
||||||
required this.messageTheme,
|
required this.messageTheme,
|
||||||
@@ -166,7 +166,7 @@ class _PinnedMessagesScreenState extends State<PinnedMessagesScreen> {
|
|||||||
var text = data[position].message.text ?? '';
|
var text = data[position].message.text ?? '';
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: UserAvatar(
|
leading: StreamUserAvatar(
|
||||||
user: user,
|
user: user,
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
width: 40.0,
|
width: 40.0,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/scheduler.dart';
|
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
|
|
||||||
mixin SplashScreenStateMixin<T extends StatefulWidget> on State<T>
|
mixin SplashScreenStateMixin<T extends StatefulWidget> on State<T>
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ class _ThreadPageState extends State<ThreadPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||||
appBar: ThreadHeader(
|
appBar: StreamThreadHeader(
|
||||||
parent: widget.parent,
|
parent: widget.parent,
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: MessageListView(
|
child: StreamMessageListView(
|
||||||
parentMessage: widget.parent,
|
parentMessage: widget.parent,
|
||||||
initialScrollIndex: widget.initialScrollIndex,
|
initialScrollIndex: widget.initialScrollIndex,
|
||||||
initialAlignment: widget.initialAlignment,
|
initialAlignment: widget.initialAlignment,
|
||||||
@@ -62,14 +62,14 @@ class _ThreadPageState extends State<ThreadPage> {
|
|||||||
return defaultMessage.copyWith(
|
return defaultMessage.copyWith(
|
||||||
onReplyTap: _reply,
|
onReplyTap: _reply,
|
||||||
deletedBottomRowBuilder: (context, message) {
|
deletedBottomRowBuilder: (context, message) {
|
||||||
return const VisibleFootnote();
|
return const StreamVisibleFootnote();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (widget.parent.type != 'deleted')
|
if (widget.parent.type != 'deleted')
|
||||||
MessageInput(
|
StreamMessageInput(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
messageInputController: _messageInputController,
|
messageInputController: _messageInputController,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class UserMentionsPage extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final user = StreamChat.of(context).currentUser!;
|
final user = StreamChat.of(context).currentUser!;
|
||||||
return MessageSearchBloc(
|
return MessageSearchBloc(
|
||||||
child: MessageSearchListView(
|
child: StreamMessageSearchListView(
|
||||||
filters: Filter.in_('members', [user.id]),
|
filters: Filter.in_('members', [user.id]),
|
||||||
messageFilters: Filter.custom(
|
messageFilters: Filter.custom(
|
||||||
operator: r'$contains',
|
operator: r'$contains',
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ dependencies:
|
|||||||
ref: feat/capabilities
|
ref: feat/capabilities
|
||||||
path: packages/stream_chat_localizations
|
path: packages/stream_chat_localizations
|
||||||
flutter_local_notifications: ^9.0.0
|
flutter_local_notifications: ^9.0.0
|
||||||
flutter_svg: ^0.23.0
|
flutter_svg:
|
||||||
flutter_secure_storage: ^4.2.1
|
flutter_secure_storage: ^4.2.1
|
||||||
yaml: ^3.1.0
|
yaml: ^3.1.0
|
||||||
uuid: ^3.0.5
|
uuid: ^3.0.5
|
||||||
@@ -42,17 +42,17 @@ dependency_overrides:
|
|||||||
stream_chat:
|
stream_chat:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/GetStream/stream-chat-flutter.git
|
url: https://github.com/GetStream/stream-chat-flutter.git
|
||||||
ref: feat/capabilities
|
ref: 5587622587e1fb31e1935d4209189db0434ef09b
|
||||||
path: packages/stream_chat
|
path: packages/stream_chat
|
||||||
stream_chat_flutter_core:
|
stream_chat_flutter_core:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/GetStream/stream-chat-flutter.git
|
url: https://github.com/GetStream/stream-chat-flutter.git
|
||||||
ref: feat/capabilities
|
ref: 5587622587e1fb31e1935d4209189db0434ef09b
|
||||||
path: packages/stream_chat_flutter_core
|
path: packages/stream_chat_flutter_core
|
||||||
stream_chat_flutter:
|
stream_chat_flutter:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/GetStream/stream-chat-flutter.git
|
url: https://github.com/GetStream/stream-chat-flutter.git
|
||||||
ref: feat/capabilities
|
ref: 5587622587e1fb31e1935d4209189db0434ef09b
|
||||||
path: packages/stream_chat_flutter
|
path: packages/stream_chat_flutter
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
|||||||
Reference in New Issue
Block a user