sliding_up_panel
sliding_up_panel copied to clipboard
Panel body event does not work when it is collapsed, the component is in the collapse region
Describe the bug Panel body event does not work when it is collapsed, the component is in the collapse region. Close button event not working
Expected behavior the event of the close button is fired
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Smartphone (please complete the following information):
- Device: Xiaomi Note 8
- OS: Mui Global 12.5.1
- Flutter Version 2.10.2
- sliding_up_panel Version 2.0.0+1
SlidingUpPanel( // renderPanelSheet: false, controller: controller.roomsPanelController, backdropTapClosesPanel: false, isDraggable: false, backdropEnabled: true, // minHeight: Get.mediaQuery.size.height * 0.12, maxHeight: Get.mediaQuery.size.height * 0.82 , color: AppColors.white, borderRadius: const BorderRadius.only( topLeft: Radius.circular(24.0), topRight: Radius.circular(24.0), ), onPanelClosed: () => controller.onPanelIsClose(), onPanelOpened: () => controller.onPanelOpen(), panelBuilder: (sc) => BodyPanelRoom( keyForm: myFormCreateRoom, scrollController: sc, createRoom: () => controller.closePanelInsertRoomWithButtonClose(), onClosePanel: () => controller.closePanelInsertRoomWithButtonClose(), openPanel: () => controller.openPanelAddRoom(), ),
collapsed: Container(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24.0),
topRight: Radius.circular(24.0),
),
),
child: Center(
child: ButtonGeneral(
radius: 16,
text: 'app.createRoom'.tr,
heightButton: Get.mediaQuery.size.height * 0.06,
widthButton: Get.mediaQuery.size.width * 0.25,
disabledColor: AppColors.primary,
buttonColor: AppColors.primary,
style: Get.textTheme.headline3!.merge(
TextStyle(fontSize: 18.sp, color: AppColors.white),
),
onPressed: () async {
controller.openPanelAddRoom();
}),
),
),
class BodyPanelRoom extends StatelessWidget { const BodyPanelRoom( {required this.keyForm, required this.scrollController, required this.createRoom, required this.onClosePanel, required this.openPanel, Key? key}) : super(key: key);
//#region Variables
final Key keyForm; final ScrollController scrollController; final VoidCallback onClosePanel; final VoidCallback createRoom; final VoidCallback openPanel;
//#endregion
@override Widget build(BuildContext context) => _floatingPanel(context);
//#region Widget
Widget _floatingPanel(BuildContext context) => Container( decoration: const BoxDecoration( color: AppColors.white, borderRadius: BorderRadius.all(Radius.circular(24)), ), child: Form( key: keyForm, child: SingleChildScrollView( controller: scrollController, padding: EdgeInsets.only( left: Get.mediaQuery.size.width * 0.08, right: Get.mediaQuery.size.width * 0.08), child: Column(children: <Widget>[ SizedBoxStatic.sizedBoxHeight16, LinedModalWithCloseAndText( text: 'app.newRoom'.tr,onPressed: onClosePanel), SizedBoxStatic.sizedBoxHeight10, Center( child: Text( "test", style: Get.textTheme.headline4!.merge(TextStyle( color: context.theme.hintColor, fontSize: 20, )), ), ), Center( child: Text( "aaaaaa", style: context.theme.textTheme.headline1!.merge(TextStyle( color: context.theme.hintColor, fontSize: 18, )), ), ), SizedBoxStatic.sizedBoxHeight26, Center( child: ButtonGeneral( radius: 16, text: 'app.createRoom'.tr, heightButton: Get.mediaQuery.size.height * 0.06, widthButton: Get.mediaQuery.size.width * 0.25, disabledColor: AppColors.primary, buttonColor: AppColors.primary, style: Get.textTheme.headline3!.merge( TextStyle(fontSize: 18.sp, color: AppColors.white), ), onPressed: createRoom), ), SizedBoxStatic.sizedBoxHeight80, ]), ), ), );
//#endregion
}