polish 4.0.0 and prepare 4.0.1

This commit is contained in:
Salvatore Giordano
2022-05-03 11:58:55 +02:00
parent 9c05625f9b
commit 41f2d55f70
8 changed files with 86 additions and 95 deletions
@@ -46,11 +46,13 @@ class StreamInfoTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
final chatThemeData = StreamChatTheme.of(context);
return PortalEntry(
return PortalTarget(
visible: showMessage,
portalAnchor: tileAnchor ?? Alignment.topCenter,
childAnchor: childAnchor ?? Alignment.bottomCenter,
portal: Container(
anchor: Aligned(
follower: tileAnchor ?? Alignment.topCenter,
target: childAnchor ?? Alignment.bottomCenter,
),
portalFollower: Container(
height: 25,
color: backgroundColor ??
chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9),
@@ -659,9 +659,9 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
if (widget.showUserAvatar == DisplayWidget.hide)
SizedBox(width: avatarWidth + 4),
Flexible(
child: PortalEntry(
child: PortalTarget(
visible: showReactions,
portal: showReactions
portalFollower: showReactions
? Container(
transform:
Matrix4.translationValues(
@@ -677,10 +677,16 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
),
)
: null,
portalAnchor:
Alignment(widget.reverse ? 1 : -1, -1),
childAnchor:
Alignment(widget.reverse ? -1 : 1, -1),
anchor: Aligned(
follower: Alignment(
widget.reverse ? 1 : -1,
-1,
),
target: Alignment(
widget.reverse ? -1 : 1,
-1,
),
),
child: Stack(
clipBehavior: Clip.none,
children: [
@@ -41,11 +41,13 @@ class StreamMultiOverlay extends StatelessWidget {
final visibleOverlay =
overlayOptions.firstWhereOrNull((element) => element.visible);
return PortalEntry(
childAnchor: childAnchor,
portalAnchor: overlayAnchor,
return PortalTarget(
anchor: Aligned(
follower: overlayAnchor ?? Alignment.center,
target: childAnchor ?? Alignment.center,
),
visible: visibleOverlay != null,
portal: visibleOverlay?.widget,
portalFollower: visibleOverlay?.widget,
child: child,
);
}
+1 -1
View File
@@ -21,7 +21,7 @@ dependencies:
flutter:
sdk: flutter
flutter_markdown: ^0.6.1
flutter_portal: ^0.4.0
flutter_portal: ^1.0.0
flutter_slidable: ^1.2.0
flutter_svg: ^1.0.1
http_parser: ^4.0.0