mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
chore: Follow up fix
This commit is contained in:
parent
fff3dc9946
commit
ee3351f643
@ -39,75 +39,84 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: MaxWidthBody(
|
body: Column(
|
||||||
withScrolling: true,
|
children: [
|
||||||
child: Container(
|
Expanded(
|
||||||
margin: const EdgeInsets.all(_qrCodePadding),
|
child: MaxWidthBody(
|
||||||
alignment: Alignment.center,
|
withScrolling: true,
|
||||||
padding: const EdgeInsets.all(_qrCodePadding * 2),
|
child: Container(
|
||||||
child: Material(
|
margin: const EdgeInsets.all(_qrCodePadding),
|
||||||
borderRadius: BorderRadius.circular(12),
|
alignment: Alignment.center,
|
||||||
elevation: 10,
|
padding: const EdgeInsets.all(_qrCodePadding * 2),
|
||||||
color: Colors.white,
|
child: Material(
|
||||||
shadowColor: Theme.of(context).appBarTheme.shadowColor,
|
borderRadius: BorderRadius.circular(12),
|
||||||
clipBehavior: Clip.hardEdge,
|
elevation: 10,
|
||||||
child: Column(
|
color: Colors.white,
|
||||||
mainAxisSize: MainAxisSize.min,
|
shadowColor: Theme.of(context).appBarTheme.shadowColor,
|
||||||
children: [
|
clipBehavior: Clip.hardEdge,
|
||||||
QrImage(
|
child: Column(
|
||||||
data:
|
mainAxisSize: MainAxisSize.min,
|
||||||
'https://matrix.to/#/${Matrix.of(context).client.userID}',
|
children: [
|
||||||
version: QrVersions.auto,
|
QrImage(
|
||||||
size: min(MediaQuery.of(context).size.width - 16, 200),
|
data:
|
||||||
),
|
'https://matrix.to/#/${Matrix.of(context).client.userID}',
|
||||||
TextButton.icon(
|
version: QrVersions.auto,
|
||||||
icon: Icon(Icons.adaptive.share_outlined),
|
size: min(MediaQuery.of(context).size.width - 16, 200),
|
||||||
label: Text(L10n.of(context)!.shareYourInviteLink),
|
),
|
||||||
onPressed: controller.inviteAction,
|
TextButton.icon(
|
||||||
),
|
icon: Icon(Icons.adaptive.share_outlined),
|
||||||
const SizedBox(height: 8),
|
label: Text(L10n.of(context)!.shareYourInviteLink),
|
||||||
],
|
onPressed: controller.inviteAction,
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 8),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar: MaxWidthBody(
|
|
||||||
withScrolling: false,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(12.0),
|
|
||||||
child: Form(
|
|
||||||
key: controller.formKey,
|
|
||||||
child: TextFormField(
|
|
||||||
controller: controller.controller,
|
|
||||||
autocorrect: false,
|
|
||||||
textInputAction: TextInputAction.go,
|
|
||||||
focusNode: controller.textFieldFocus,
|
|
||||||
onFieldSubmitted: controller.submitAction,
|
|
||||||
validator: controller.validateForm,
|
|
||||||
inputFormatters: controller.removeMatrixToFormatters,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
contentPadding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 12,
|
|
||||||
vertical: 6,
|
|
||||||
),
|
|
||||||
labelText: L10n.of(context)!.typeInInviteLinkManually,
|
|
||||||
hintText: '@username',
|
|
||||||
prefixText: NewPrivateChatController.prefixNoProtocol,
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: const Icon(Icons.send_outlined),
|
|
||||||
onPressed: controller.submitAction,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
MaxWidthBody(
|
||||||
|
withScrolling: false,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
child: Form(
|
||||||
|
key: controller.formKey,
|
||||||
|
child: TextFormField(
|
||||||
|
controller: controller.controller,
|
||||||
|
autocorrect: false,
|
||||||
|
textInputAction: TextInputAction.go,
|
||||||
|
focusNode: controller.textFieldFocus,
|
||||||
|
onFieldSubmitted: controller.submitAction,
|
||||||
|
validator: controller.validateForm,
|
||||||
|
inputFormatters: controller.removeMatrixToFormatters,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12,
|
||||||
|
vertical: 6,
|
||||||
|
),
|
||||||
|
labelText: L10n.of(context)!.typeInInviteLinkManually,
|
||||||
|
hintText: '@username',
|
||||||
|
prefixText: NewPrivateChatController.prefixNoProtocol,
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: const Icon(Icons.send_outlined),
|
||||||
|
onPressed: controller.submitAction,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||||
floatingActionButton: PlatformInfos.isMobile && !controller.hideFab
|
floatingActionButton: PlatformInfos.isMobile && !controller.hideFab
|
||||||
? FloatingActionButton.extended(
|
? Padding(
|
||||||
onPressed: controller.openScannerAction,
|
padding: const EdgeInsets.only(bottom: 64.0),
|
||||||
label: Text(L10n.of(context)!.scanQrCode),
|
child: FloatingActionButton.extended(
|
||||||
icon: const Icon(Icons.camera_alt_outlined),
|
onPressed: controller.openScannerAction,
|
||||||
|
label: Text(L10n.of(context)!.scanQrCode),
|
||||||
|
icon: const Icon(Icons.camera_alt_outlined),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user