Widget _buildPopFromCenterWithClose(BuildContext context) { return TDButton( text: '居中弹出层-带关闭', isBlock: true, theme: TDButtonTheme.primary, type: TDButtonType.outline, size: TDButtonSize.large, onTap: () { Navigator.of(context).push(TDSlidePopupRoute( modalBarrierColor: TDTheme.of(context).fontGyColor2, isDismissible: false, slideTransitionFrom: SlideTransitionFrom.center, builder: (context) { return TDPopupCenterPanel( closeClick: () { Navigator.maybePop(context); }, child: const SizedBox( width: 240, height: 240, ), ); })); }, ); }