Changed Media bubbles to tansparent bubbles
This commit is contained in:
parent
37a0d5cb4a
commit
b9424a9f4a
@ -33,7 +33,7 @@ class RichObjectStringProcessor {
|
||||
return const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator());
|
||||
},
|
||||
fadeInDuration: const Duration(seconds: 1),
|
||||
imageUrl: "https://cloud.marianum-fulda.de/core/preview?fileId=${value.id}&x=110&y=-1&a=1",
|
||||
imageUrl: "https://cloud.marianum-fulda.de/core/preview?fileId=${value.id}&x=100&y=-1&a=1",
|
||||
httpHeaders: {
|
||||
"Authorization": "Basic ${base64.encode(utf8.encode("${preferences.getString("username")}:${preferences.getString("password")}"))}"
|
||||
},
|
||||
|
@ -29,23 +29,27 @@ class _ChatViewState extends State<ChatView> {
|
||||
alignment: Alignment.center,
|
||||
);
|
||||
|
||||
static const styleOther = BubbleStyle(
|
||||
static BubbleStyle getStyleOther(bool seamless) {
|
||||
return BubbleStyle(
|
||||
nip: BubbleNip.leftTop,
|
||||
color: Colors.white,
|
||||
borderWidth: 1,
|
||||
elevation: 1,
|
||||
margin: BubbleEdges.only(top: 15, left: 10, right: 50),
|
||||
color: seamless ? Colors.transparent : Colors.white,
|
||||
borderWidth: seamless ? 0 : 1,
|
||||
elevation: seamless ? 0 : 1,
|
||||
margin: const BubbleEdges.only(top: 15, left: 10, right: 50),
|
||||
alignment: Alignment.topLeft,
|
||||
);
|
||||
}
|
||||
|
||||
static const styleSelf = BubbleStyle(
|
||||
static BubbleStyle getStyleSelf(bool seamless) {
|
||||
return BubbleStyle(
|
||||
nip: BubbleNip.rightBottom,
|
||||
color: Color(0xffd9fdd3),
|
||||
borderWidth: 1,
|
||||
elevation: 1,
|
||||
margin: BubbleEdges.only(top: 15, right: 10, left: 50),
|
||||
color: seamless ? Colors.transparent : const Color(0xffd9fdd3),
|
||||
borderWidth: seamless ? 0 : 1,
|
||||
elevation: seamless ? 0 : 1,
|
||||
margin: const BubbleEdges.only(top: 15, right: 10, left: 50),
|
||||
alignment: Alignment.topRight,
|
||||
);
|
||||
}
|
||||
|
||||
final ScrollController _listController = ScrollController();
|
||||
final TextEditingController _textBoxController = TextEditingController();
|
||||
@ -78,9 +82,9 @@ class _ChatViewState extends State<ChatView> {
|
||||
BubbleStyle currentStyle;
|
||||
if(element.messageType == GetRoomResponseObjectMessageType.comment) {
|
||||
if(element.actorId == widget.selfId) {
|
||||
currentStyle = styleSelf;
|
||||
currentStyle = getStyleSelf(element.messageParameters?.containsKey("file") ?? false);
|
||||
} else {
|
||||
currentStyle = styleOther;
|
||||
currentStyle = getStyleOther(element.messageParameters?.containsKey("file") ?? false);
|
||||
}
|
||||
} else {
|
||||
currentStyle = styleSystem;
|
||||
@ -95,7 +99,7 @@ class _ChatViewState extends State<ChatView> {
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width * 0.9,
|
||||
minWidth: _textSize(element.actorDisplayName, _actorTextStyle).width,
|
||||
minWidth: showActorDisplayName ? _textSize(element.actorDisplayName, _actorTextStyle).width : 30,
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user