Implement desktop client layout
This commit is contained in:
parent
1c573c6681
commit
a71eb9cd25
|
|
@ -218,79 +218,86 @@ class _ClientViewFullwidthState extends State<ClientViewFullwidth>
|
||||||
(state.prefState.isPreviewVisible ? 1 : 3),
|
(state.prefState.isPreviewVisible ? 1 : 3),
|
||||||
bottom: kMobileDialogPadding,
|
bottom: kMobileDialogPadding,
|
||||||
left: kMobileDialogPadding / 3),
|
left: kMobileDialogPadding / 3),
|
||||||
child: SingleChildScrollView(
|
child: Scrollbar(
|
||||||
child: Column(
|
controller: _scrollController,
|
||||||
children: [
|
child: SingleChildScrollView(
|
||||||
Text(
|
controller: _scrollController,
|
||||||
localization.contacts,
|
child: Column(
|
||||||
style: Theme.of(context).textTheme.headline6,
|
|
||||||
),
|
|
||||||
SizedBox(height: 4),
|
|
||||||
...client.contacts.map((contact) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
contact.fullName,
|
localization.contacts,
|
||||||
style: Theme.of(context).textTheme.subtitle1,
|
style: Theme.of(context).textTheme.headline6,
|
||||||
),
|
),
|
||||||
if (contact.email.isNotEmpty)
|
SizedBox(height: 4),
|
||||||
Padding(
|
...client.contacts.map((contact) {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
return Column(
|
||||||
child: CopyToClipboard(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
value: contact.email,
|
children: [
|
||||||
child: IconText(
|
Text(
|
||||||
icon: Icons.email, text: contact.email),
|
contact.fullName,
|
||||||
),
|
style: Theme.of(context).textTheme.subtitle1,
|
||||||
),
|
),
|
||||||
if (contact.phone.isNotEmpty)
|
if (contact.email.isNotEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
padding:
|
||||||
child: CopyToClipboard(
|
const EdgeInsets.symmetric(vertical: 4),
|
||||||
value: contact.phone,
|
child: CopyToClipboard(
|
||||||
child: IconText(
|
value: contact.email,
|
||||||
icon: Icons.phone, text: contact.phone),
|
child: IconText(
|
||||||
),
|
icon: Icons.email, text: contact.email),
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
),
|
||||||
Row(
|
if (contact.phone.isNotEmpty)
|
||||||
children: [
|
Padding(
|
||||||
Flexible(
|
padding:
|
||||||
child: OutlinedButton(
|
const EdgeInsets.symmetric(vertical: 4),
|
||||||
onPressed: () => launch(
|
child: CopyToClipboard(
|
||||||
'${contact.silentLink}&client_hash=${client.clientHash}'),
|
value: contact.phone,
|
||||||
child: Text(
|
child: IconText(
|
||||||
localization.clientPortal,
|
icon: Icons.phone, text: contact.phone),
|
||||||
textAlign: TextAlign.center,
|
),
|
||||||
maxLines: 2,
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
SizedBox(height: 8),
|
||||||
)),
|
Row(
|
||||||
),
|
children: [
|
||||||
SizedBox(width: 4),
|
Flexible(
|
||||||
Flexible(
|
child: OutlinedButton(
|
||||||
child: OutlinedButton(
|
onPressed: () => launch(
|
||||||
onPressed: () {
|
'${contact.silentLink}&client_hash=${client.clientHash}'),
|
||||||
final url =
|
child: Text(
|
||||||
'${contact.link}&client_hash=${client.clientHash}';
|
localization.clientPortal,
|
||||||
Clipboard.setData(ClipboardData(text: url));
|
textAlign: TextAlign.center,
|
||||||
showToast(localization.copiedToClipboard
|
maxLines: 2,
|
||||||
.replaceFirst(':value ', ''));
|
overflow: TextOverflow.ellipsis,
|
||||||
},
|
)),
|
||||||
child: Text(
|
),
|
||||||
localization.copyLink,
|
SizedBox(width: 4),
|
||||||
textAlign: TextAlign.center,
|
Flexible(
|
||||||
maxLines: 2,
|
child: OutlinedButton(
|
||||||
overflow: TextOverflow.ellipsis,
|
onPressed: () {
|
||||||
)),
|
final url =
|
||||||
),
|
'${contact.link}&client_hash=${client.clientHash}';
|
||||||
],
|
Clipboard.setData(
|
||||||
),
|
ClipboardData(text: url));
|
||||||
SizedBox(height: 16),
|
showToast(localization.copiedToClipboard
|
||||||
|
.replaceFirst(':value ', ''));
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
localization.copyLink,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList()
|
||||||
],
|
],
|
||||||
);
|
)),
|
||||||
}).toList()
|
),
|
||||||
],
|
|
||||||
)),
|
|
||||||
)),
|
)),
|
||||||
if (!state.prefState.isPreviewVisible && !state.uiState.isEditing)
|
if (!state.prefState.isPreviewVisible && !state.uiState.isEditing)
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
|
||||||
|
|
@ -175,46 +175,52 @@ class _VendorViewFullwidthState extends State<VendorViewFullwidth>
|
||||||
(state.prefState.isPreviewVisible ? 1 : 3),
|
(state.prefState.isPreviewVisible ? 1 : 3),
|
||||||
bottom: kMobileDialogPadding,
|
bottom: kMobileDialogPadding,
|
||||||
left: kMobileDialogPadding / 3),
|
left: kMobileDialogPadding / 3),
|
||||||
child: SingleChildScrollView(
|
child: Scrollbar(
|
||||||
child: Column(
|
controller: _scrollController,
|
||||||
children: [
|
child: SingleChildScrollView(
|
||||||
Text(
|
controller: _scrollController,
|
||||||
localization.contacts,
|
child: Column(
|
||||||
style: Theme.of(context).textTheme.headline6,
|
|
||||||
),
|
|
||||||
SizedBox(height: 4),
|
|
||||||
...vendor.contacts.map((contact) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
contact.fullName,
|
localization.contacts,
|
||||||
style: Theme.of(context).textTheme.subtitle1,
|
style: Theme.of(context).textTheme.headline6,
|
||||||
),
|
),
|
||||||
if (contact.email.isNotEmpty)
|
SizedBox(height: 4),
|
||||||
Padding(
|
...vendor.contacts.map((contact) {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
return Column(
|
||||||
child: CopyToClipboard(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
value: contact.email,
|
children: [
|
||||||
child: IconText(
|
Text(
|
||||||
icon: Icons.email, text: contact.email),
|
contact.fullName,
|
||||||
),
|
style: Theme.of(context).textTheme.subtitle1,
|
||||||
),
|
),
|
||||||
if (contact.phone.isNotEmpty)
|
if (contact.email.isNotEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
padding:
|
||||||
child: CopyToClipboard(
|
const EdgeInsets.symmetric(vertical: 4),
|
||||||
value: contact.phone,
|
child: CopyToClipboard(
|
||||||
child: IconText(
|
value: contact.email,
|
||||||
icon: Icons.phone, text: contact.phone),
|
child: IconText(
|
||||||
),
|
icon: Icons.email, text: contact.email),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
),
|
||||||
|
if (contact.phone.isNotEmpty)
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 4),
|
||||||
|
child: CopyToClipboard(
|
||||||
|
value: contact.phone,
|
||||||
|
child: IconText(
|
||||||
|
icon: Icons.phone, text: contact.phone),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList()
|
||||||
],
|
],
|
||||||
);
|
)),
|
||||||
}).toList()
|
),
|
||||||
],
|
|
||||||
)),
|
|
||||||
)),
|
)),
|
||||||
if (!state.prefState.isPreviewVisible && !state.uiState.isEditing)
|
if (!state.prefState.isPreviewVisible && !state.uiState.isEditing)
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue