feat(profile): social links

This commit is contained in:
Alex
2024-12-02 17:52:21 +03:00
parent a4b2711914
commit 6cf6e32fe6
4 changed files with 433 additions and 11 deletions

View File

@@ -27,6 +27,7 @@ import 'package:go_router/go_router.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:image_picker/image_picker.dart';
import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class ProfileScreen extends StatefulWidget {
final Author? author;
@@ -460,11 +461,38 @@ class _ProfileScreenState extends State<ProfileScreen> {
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(
children: [
_socialLinkButton(() {}, 'assets/icons/vk.svg'),
_socialLinkButton(
() {
launchUrl(
Uri.parse(
state.profile.educationResource?.vkLink ?? '',
),
);
},
'assets/icons/vk.svg',
),
const SizedBox(width: 12),
_socialLinkButton(() {}, 'assets/icons/telegram.svg'),
_socialLinkButton(
() {
launchUrl(
Uri.parse(
state.profile.educationResource?.tgLink ?? '',
),
);
},
'assets/icons/telegram.svg',
),
const SizedBox(width: 12),
_socialLinkButton(() {}, 'assets/icons/web.svg'),
_socialLinkButton(
() {
launchUrl(
Uri.parse(
state.profile.educationResource?.personalSiteLink ?? '',
),
);
},
'assets/icons/web.svg',
),
],
),
),