From 2bd00e6bb3115a9a0ef11c73e623c66b3ab453ce Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 6 Feb 2021 13:15:25 +0100 Subject: [PATCH] fix: Share view --- lib/views/share_view.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/views/share_view.dart b/lib/views/share_view.dart index ed8369eb..9656a5de 100644 --- a/lib/views/share_view.dart +++ b/lib/views/share_view.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:adaptive_page_layout/adaptive_page_layout.dart'; import 'package:fluffychat/components/matrix.dart'; import 'package:flutter/material.dart'; @@ -6,6 +8,8 @@ import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'home_view_parts/chat_list.dart'; class ShareView extends StatelessWidget { + final StreamController _onAppBarButtonTap = + StreamController.broadcast(); @override Widget build(BuildContext context) { return Scaffold( @@ -18,8 +22,14 @@ class ShareView extends StatelessWidget { }, ), title: Text(L10n.of(context).share), + actions: [ + IconButton( + icon: Icon(Icons.search_outlined), + onPressed: () => _onAppBarButtonTap.add(1), + ), + ], ), - body: ChatList(), + body: ChatList(onAppBarButtonTap: _onAppBarButtonTap.stream), ); } }