implement PN support on iOS & Android
This commit is contained in:
@@ -69,6 +69,7 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print(">>>>>>>>>> ChannelListPage");
|
||||
final user = StreamChat.of(context).currentUser;
|
||||
if (user == null) {
|
||||
return const Offstage();
|
||||
@@ -76,8 +77,10 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||
appBar: StreamChannelListHeader(
|
||||
onNewChatButtonTap: () =>
|
||||
GoRouter.of(context).pushNamed(Routes.NEW_CHAT.name),
|
||||
onNewChatButtonTap: () {
|
||||
print(">>>>>>>>>> onNewChatButtonTap");
|
||||
GoRouter.of(context).pushNamed(Routes.NEW_CHAT.name);
|
||||
},
|
||||
preNavigationCallback: () =>
|
||||
FocusScope.of(context).requestFocus(FocusNode()),
|
||||
),
|
||||
@@ -220,6 +223,7 @@ class LeftDrawer extends StatelessWidget {
|
||||
.withOpacity(.5),
|
||||
),
|
||||
onTap: () {
|
||||
print(">>>>>>>>>> NEW_CHAT");
|
||||
Navigator.of(context).pop();
|
||||
GoRouter.of(context).pushNamed(Routes.NEW_CHAT.name);
|
||||
},
|
||||
@@ -238,6 +242,7 @@ class LeftDrawer extends StatelessWidget {
|
||||
.withOpacity(.5),
|
||||
),
|
||||
onTap: () {
|
||||
print(">>>>>>>>>> NEW_GROUP_CHAT");
|
||||
Navigator.of(context).pop();
|
||||
GoRouter.of(context).pushNamed(Routes.NEW_GROUP_CHAT.name);
|
||||
},
|
||||
@@ -253,6 +258,7 @@ class LeftDrawer extends StatelessWidget {
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: ListTile(
|
||||
onTap: () async {
|
||||
print(">>>>>>>>>> CHOOSE_USER");
|
||||
final client = StreamChat.of(context).client;
|
||||
final router = GoRouter.of(context);
|
||||
final initNotifier = context.read<InitNotifier>();
|
||||
|
||||
@@ -47,12 +47,14 @@ class _ChannelPageState extends State<ChannelPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print(">>>>>>>>>> CHANNEL PAGE");
|
||||
return Scaffold(
|
||||
backgroundColor: StreamChatTheme.of(context).colorTheme.appBg,
|
||||
appBar: StreamChannelHeader(
|
||||
showTypingIndicator: false,
|
||||
onBackPressed: () => GoRouter.of(context).pop(),
|
||||
onImageTap: () async {
|
||||
print(">>>>>>>>>> onImageTap");
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
final router = GoRouter.of(context);
|
||||
|
||||
@@ -62,6 +64,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
||||
(element) => element.user!.id != currentUser!.id,
|
||||
);
|
||||
if (otherUser != null) {
|
||||
print(">>>>>>>>>> GROUP_INFO_SCREEN otherUser");
|
||||
router.pushNamed(
|
||||
Routes.CHAT_INFO_SCREEN.name,
|
||||
params: Routes.CHAT_INFO_SCREEN.params(channel),
|
||||
@@ -69,6 +72,7 @@ class _ChannelPageState extends State<ChannelPage> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
print(">>>>>>>>>> GROUP_INFO_SCREEN");
|
||||
GoRouter.of(context).pushNamed(
|
||||
Routes.GROUP_INFO_SCREEN.name,
|
||||
params: Routes.GROUP_INFO_SCREEN.params(channel),
|
||||
|
||||
Reference in New Issue
Block a user