ITADN

get: ^5.0.0-release-candidate-9.3.2 Navigator Bug

#3436OpenMatkurban 创建于 2025-12-30
M
Matkurbancommented
**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: ```dart 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` https://github.com/user-attachments/assets/e0095510-49a4-401c-b630-8962e6cdefa5 `get: ^5.0.0-release-candidate-9.3.2` https://github.com/user-attachments/assets/3a099792-3c81-4d1c-b674-41fb58941e3e **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
0 条评论