mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-23 12:39:29 +01:00
feat: Make QR Code clickable
This commit is contained in:
parent
a9b496c083
commit
9ff97d0162
BIN
assets/share.png
Normal file
BIN
assets/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -42,15 +42,23 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
margin: EdgeInsets.all(_qrCodePadding),
|
margin: EdgeInsets.all(_qrCodePadding),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.all(_qrCodePadding * 2),
|
padding: EdgeInsets.all(_qrCodePadding * 2),
|
||||||
child: Material(
|
child: InkWell(
|
||||||
|
onTap: controller.inviteAction,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
elevation: 4,
|
child: Material(
|
||||||
color: Colors.white,
|
borderRadius: BorderRadius.circular(12),
|
||||||
child: QrImage(
|
elevation: 4,
|
||||||
data:
|
color: Colors.white,
|
||||||
'https://matrix.to/#/${Matrix.of(context).client.userID}',
|
child: QrImage(
|
||||||
version: QrVersions.auto,
|
data:
|
||||||
size: min(MediaQuery.of(context).size.width - 16, 200),
|
'https://matrix.to/#/${Matrix.of(context).client.userID}',
|
||||||
|
version: QrVersions.auto,
|
||||||
|
size: min(MediaQuery.of(context).size.width - 16, 200),
|
||||||
|
embeddedImage: AssetImage('assets/share.png'),
|
||||||
|
embeddedImageStyle: QrEmbeddedImageStyle(
|
||||||
|
size: Size(64, 64),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -63,16 +71,6 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(12.0),
|
|
||||||
child: SizedBox(
|
|
||||||
height: 56,
|
|
||||||
child: OutlinedButton.icon(
|
|
||||||
onPressed: controller.inviteAction,
|
|
||||||
icon: Icon(Icons.share_outlined),
|
|
||||||
label: Text(L10n.of(context).shareYourInviteLink)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.all(12),
|
padding: EdgeInsets.all(12),
|
||||||
child: Form(
|
child: Form(
|
||||||
|
Loading…
Reference in New Issue
Block a user