-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Describe the bug
When using the OpenContainer widget from the animations library, a return exception occurs when using the system's swipe-back route. It works fine in get:4.7.3, but the route fails in get:^5.0.0-release-candidate-9.3.2. For details, please watch the videos for the two versions below.
**Reproduction code
example:
import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
class OpenContainerWrapper extends StatelessWidget {
const OpenContainerWrapper({
super.key,
required this.closedBuilder,
required this.openBuilder,
this.tappable = true,
});
final CloseContainerBuilder closedBuilder;
final OpenContainerBuilder openBuilder;
final bool tappable;
@override
Widget build(BuildContext context) {
return OpenContainer(
closedBuilder: closedBuilder,
openBuilder: openBuilder,
openColor: Colors.transparent,
closedColor: Colors.transparent,
openElevation: 0,
closedElevation: 0,
tappable: tappable,
);
}
}
OpenContainerWrapper(
closedBuilder: (BuildContext context, void Function() action) {
return GestureDetector(
onLongPress: showContextMenu
? () {
vibrate();
showMenu();
}
: null,
child: Container(
width: width,
padding: .all(8.w),
decoration: BoxDecoration(
color: colorScheme.surfaceContainerHigh,
borderRadius: AppStyle.defaultRadius,
),
child: Row(
spacing: 8.w,
children: <Widget>[
Expanded(
child: Column(
spacing: 4.h,
crossAxisAlignment: isMe ? .start : .end,
mainAxisSize: .min,
children: [
Text(
fileName,
maxLines: 1,
overflow: .ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: .w500,
color: colorScheme.onSecondary,
),
),
Text(
fileSize,
style: TextStyle(
fontSize: 12.sp,
color: colorScheme.onSecondary.withValues(alpha: 0.8),
),
),
],
),
),
SvgPicture.asset(
getFileMessageType(fileName).assetName,
width: 48.w,
height: 48.w,
),
],
),
),
);
},
openBuilder: (BuildContext context, void Function({dynamic returnValue}) action) {
return FileMessagePreview(message: message);
},
),Screenshots
get: ^4.7.3
SVID_20251230_185957_1.mp4
get: ^5.0.0-release-candidate-9.3.2
Screenrecording_20251230_190155.mp4
Flutter Version:
3.38.5
Getx Version:
get: ^5.0.0-release-candidate-9.3.2
Describe on which device you found the bug:
ex: AllPlatform
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels