|
|
|
|
@ -3,6 +3,7 @@ import 'dart:io';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
import 'package:flutter_markdown_plus/flutter_markdown_plus.dart';
|
|
|
|
|
import 'package:test_sa/controllers/api_routes/urls.dart';
|
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/string_extensions.dart';
|
|
|
|
|
@ -87,7 +88,7 @@ class CopilotMessageBubble extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
6.height,
|
|
|
|
|
],
|
|
|
|
|
if(message.images.isNotEmpty) ...[
|
|
|
|
|
if (message.images.isNotEmpty) ...[
|
|
|
|
|
for (var imagePath in message.images) ...[
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
@ -143,7 +144,7 @@ class CopilotMessageBubble extends StatelessWidget {
|
|
|
|
|
decoration: BoxDecoration(color: AppColor.background(context), shape: BoxShape.circle, border: Border.all(color: Colors.transparent)),
|
|
|
|
|
child: "atoms_logo".toSvgAsset(width: 14, height: 14)),
|
|
|
|
|
8.width,
|
|
|
|
|
const InfoTextLabelWidget(label: "Atoms"),
|
|
|
|
|
const InfoTextLabelWidget(label: "BARQ"),
|
|
|
|
|
// Text(
|
|
|
|
|
// "Copilot",
|
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
|
@ -270,15 +271,11 @@ class CopilotMessageBubble extends StatelessWidget {
|
|
|
|
|
selectable: true,
|
|
|
|
|
onTapLink: (text, href, title) async {
|
|
|
|
|
if (href == null || href.isEmpty) return;
|
|
|
|
|
|
|
|
|
|
final uri = Uri.tryParse(href);
|
|
|
|
|
|
|
|
|
|
String subS = href.substring(href.lastIndexOf("_") + 1, href.length);
|
|
|
|
|
String link = URLs.getFileUrl(subS)!;
|
|
|
|
|
final uri = Uri.tryParse(link);
|
|
|
|
|
if (uri == null) return;
|
|
|
|
|
|
|
|
|
|
await launchUrl(
|
|
|
|
|
uri,
|
|
|
|
|
mode: LaunchMode.externalApplication,
|
|
|
|
|
);
|
|
|
|
|
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
|
|
|
|
},
|
|
|
|
|
styleSheet: MarkdownStyleSheet(
|
|
|
|
|
p: AppTextStyles.bodyText2.copyWith(
|
|
|
|
|
|