|
|
@ -26,49 +26,22 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
title: Text(L10n.of(context)!.newChat),
|
|
|
|
title: Text(L10n.of(context)!.newChat),
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
actions: [
|
|
|
|
actions: [
|
|
|
|
TextButton(
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
child: TextButton(
|
|
|
|
onPressed: () => VRouter.of(context).to('/newgroup'),
|
|
|
|
onPressed: () => VRouter.of(context).to('/newgroup'),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
L10n.of(context)!.createNewGroup,
|
|
|
|
L10n.of(context)!.createNewGroup,
|
|
|
|
style: TextStyle(color: Theme.of(context).colorScheme.secondary),
|
|
|
|
style:
|
|
|
|
|
|
|
|
TextStyle(color: Theme.of(context).colorScheme.secondary),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: MaxWidthBody(
|
|
|
|
body: MaxWidthBody(
|
|
|
|
withScrolling: true,
|
|
|
|
withScrolling: true,
|
|
|
|
child: Column(
|
|
|
|
child: Container(
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
|
|
|
child: Form(
|
|
|
|
|
|
|
|
key: controller.formKey,
|
|
|
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
|
|
|
controller: controller.controller,
|
|
|
|
|
|
|
|
autocorrect: false,
|
|
|
|
|
|
|
|
autofocus: !PlatformInfos.isMobile,
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
margin: const EdgeInsets.all(_qrCodePadding),
|
|
|
|
margin: const EdgeInsets.all(_qrCodePadding),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: const EdgeInsets.all(_qrCodePadding * 2),
|
|
|
|
padding: const EdgeInsets.all(_qrCodePadding * 2),
|
|
|
@ -97,7 +70,36 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
|
|
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
|
|
|