|
|
|
@ -99,15 +99,14 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AnimatedCrossFade(
|
|
|
|
|
child: AnimatedSwitcher(
|
|
|
|
|
duration: FluffyThemes.animationDuration,
|
|
|
|
|
crossFadeState: searchResponse == null
|
|
|
|
|
? CrossFadeState.showFirst
|
|
|
|
|
: CrossFadeState.showSecond,
|
|
|
|
|
firstChild: ListView(
|
|
|
|
|
child: searchResponse == null
|
|
|
|
|
? ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 18.0),
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets.symmetric(horizontal: 18.0),
|
|
|
|
|
child: SelectableText.rich(
|
|
|
|
|
TextSpan(
|
|
|
|
|
children: [
|
|
|
|
@ -131,8 +130,10 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor: theme.colorScheme.secondaryContainer,
|
|
|
|
|
foregroundColor: theme.colorScheme.onSecondaryContainer,
|
|
|
|
|
backgroundColor:
|
|
|
|
|
theme.colorScheme.secondaryContainer,
|
|
|
|
|
foregroundColor:
|
|
|
|
|
theme.colorScheme.onSecondaryContainer,
|
|
|
|
|
child: Icon(Icons.adaptive.share_outlined),
|
|
|
|
|
),
|
|
|
|
|
title: Text(L10n.of(context).shareInviteLink),
|
|
|
|
@ -140,8 +141,10 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor: theme.colorScheme.tertiaryContainer,
|
|
|
|
|
foregroundColor: theme.colorScheme.onTertiaryContainer,
|
|
|
|
|
backgroundColor:
|
|
|
|
|
theme.colorScheme.tertiaryContainer,
|
|
|
|
|
foregroundColor:
|
|
|
|
|
theme.colorScheme.onTertiaryContainer,
|
|
|
|
|
child: const Icon(Icons.group_add_outlined),
|
|
|
|
|
),
|
|
|
|
|
title: Text(L10n.of(context).createGroup),
|
|
|
|
@ -150,9 +153,12 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
if (PlatformInfos.isMobile)
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor: theme.colorScheme.primaryContainer,
|
|
|
|
|
foregroundColor: theme.colorScheme.onPrimaryContainer,
|
|
|
|
|
child: const Icon(Icons.qr_code_scanner_outlined),
|
|
|
|
|
backgroundColor:
|
|
|
|
|
theme.colorScheme.primaryContainer,
|
|
|
|
|
foregroundColor:
|
|
|
|
|
theme.colorScheme.onPrimaryContainer,
|
|
|
|
|
child:
|
|
|
|
|
const Icon(Icons.qr_code_scanner_outlined),
|
|
|
|
|
),
|
|
|
|
|
title: Text(L10n.of(context).scanQrCode),
|
|
|
|
|
onTap: controller.openScannerAction,
|
|
|
|
@ -165,8 +171,9 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
child: Material(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(AppConfig.borderRadius),
|
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
|
AppConfig.borderRadius,
|
|
|
|
|
),
|
|
|
|
|
side: BorderSide(
|
|
|
|
|
width: 3,
|
|
|
|
|
color: theme.colorScheme.primary,
|
|
|
|
@ -175,8 +182,9 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
clipBehavior: Clip.hardEdge,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(AppConfig.borderRadius),
|
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
|
AppConfig.borderRadius,
|
|
|
|
|
),
|
|
|
|
|
onTap: () => showQrCodeViewer(
|
|
|
|
|
context,
|
|
|
|
|
userId,
|
|
|
|
@ -202,8 +210,8 @@ class NewPrivateChatView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
secondChild: FutureBuilder(
|
|
|
|
|
)
|
|
|
|
|
: FutureBuilder(
|
|
|
|
|
future: searchResponse,
|
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
|
final result = snapshot.data;
|
|
|
|
|