diff --git a/lib/core/widgets/intro_overlay_builder.dart b/lib/core/widgets/intro_overlay_builder.dart index 87101729b..a4a6c70b0 100644 --- a/lib/core/widgets/intro_overlay_builder.dart +++ b/lib/core/widgets/intro_overlay_builder.dart @@ -31,12 +31,27 @@ class IntroOverlayBuilder { ), ), if (onNext != null) - _button( - '下一步', - () { - params.onNext!(); - onNext(); - }, + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(right: 50.w), + child: _button( + '下一步', + () { + params.onNext!(); + onNext(); + }, + ), + ), + _button( + '跳过', + () { + params.onFinish(); + }, + isSkip: true, + ), + ], ), ], ); @@ -83,17 +98,43 @@ class IntroOverlayBuilder { onFinish(); }, ), + const Spacer(), + _button( + '跳过', + () { + params.onFinish(); + }, + isSkip: true, + ), ], ), ], ); } - static Widget _button(String text, Function() onTap) { - return _AnimatedBorderButton( - text: text, - onTap: onTap, - ); + static Widget _button(String text, Function() onTap, {bool isSkip = false}) { + return isSkip + ? GestureDetector( + onTap: onTap, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 5.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20.r), + border: Border.all(color: Colors.white), + ), + child: Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Colors.white, + ), + ), + ), + ) + : _AnimatedBorderButton( + text: text, + onTap: onTap, + ); } } @@ -208,7 +249,7 @@ class _AnimatedBorderButtonState extends State<_AnimatedBorderButton> borderRadius: 20.r, ), child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 5.w), + padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 5.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.r), border: Border.all(color: Colors.transparent),