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