chore: Move share icon in drawer to the header

This commit is contained in:
Christian Pauly 2022-08-14 15:58:32 +02:00
parent 1d4dc3e77b
commit c4ec6ebb3f

View file

@ -25,6 +25,18 @@ class ChatListDrawer extends StatelessWidget {
backgroundImage: AssetImage('assets/logo.png'),
),
title: Text(AppConfig.applicationName),
trailing: Icon(
Icons.adaptive.share_outlined,
color: Theme.of(context).colorScheme.onBackground,
),
onTap: () {
Scaffold.of(context).closeDrawer();
FluffyShare.share(
L10n.of(context)!.inviteText(
Matrix.of(context).client.userID!,
'https://matrix.to/#/${Matrix.of(context).client.userID}?client=im.fluffychat'),
context);
},
),
const Divider(thickness: 1),
Expanded(
@ -55,21 +67,6 @@ class ChatListDrawer extends StatelessWidget {
VRouter.of(context).to('/newspace');
},
),
ListTile(
leading: Icon(
Icons.adaptive.share_outlined,
color: Theme.of(context).colorScheme.onBackground,
),
title: Text(L10n.of(context)!.inviteContact),
onTap: () {
Scaffold.of(context).closeDrawer();
FluffyShare.share(
L10n.of(context)!.inviteText(
Matrix.of(context).client.userID!,
'https://matrix.to/#/${Matrix.of(context).client.userID}?client=im.fluffychat'),
context);
},
),
ListTile(
leading: Icon(
Icons.settings_outlined,