design: Nicer QR Code design

This commit is contained in:
krille-chan 2024-02-25 20:19:45 +01:00
commit 0e8363221b
No known key found for this signature in database
3 changed files with 27 additions and 15 deletions

View file

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
import 'package:matrix/matrix.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:pretty_qr_code/pretty_qr_code.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
@ -161,11 +161,23 @@ class NewPrivateChatView extends StatelessWidget {
shadowColor:
Theme.of(context).appBarTheme.shadowColor,
clipBehavior: Clip.hardEdge,
child: QrImageView(
data:
'https://matrix.to/#/${Matrix.of(context).client.userID}',
version: QrVersions.auto,
// size: qrCodeSize,
child: Padding(
padding: const EdgeInsets.all(8),
child: PrettyQrView.data(
data:
'https://matrix.to/#/${Matrix.of(context).client.userID}',
decoration: PrettyQrDecoration(
shape: PrettyQrSmoothSymbol(
roundFactor: 1,
color: Theme.of(context).brightness ==
Brightness.light
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onPrimary,
),
),
),
),
),
),