Designed talk message reactions
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_linkify/flutter_linkify.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import '../../../api/marianumcloud/talk/chat/getChatResponse.dart';
|
||||
import '../../../api/marianumcloud/talk/chat/richObjectStringProcessor.dart';
|
||||
import '../../../model/accountData.dart';
|
||||
|
||||
class ChatMessage {
|
||||
String originalMessage;
|
||||
@ -27,8 +26,7 @@ class ChatMessage {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Widget> getWidget() async {
|
||||
SharedPreferences preferences = await SharedPreferences.getInstance();
|
||||
Widget getWidget() {
|
||||
|
||||
if(file == null) {
|
||||
return SelectableLinkify(
|
||||
@ -50,10 +48,9 @@ class ChatMessage {
|
||||
placeholder: (context, url) {
|
||||
return const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator());
|
||||
},
|
||||
fadeInDuration: const Duration(seconds: 1),
|
||||
imageUrl: "https://cloud.marianum-fulda.de/core/preview?fileId=${file!.id}&x=100&y=-1&a=1",
|
||||
httpHeaders: {
|
||||
"Authorization": "Basic ${base64.encode(utf8.encode("${preferences.getString("username")}:${preferences.getString("password")}"))}" // TODO move authentication
|
||||
"Authorization": "Basic ${AccountData().buildHttpAuthString()}"
|
||||
},
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user