|
|
@ -44,7 +44,7 @@ class IntroOverlayBuilder { |
|
|
child: Lottie.asset('assets/lottie/intro_foriday.json'), |
|
|
child: Lottie.asset('assets/lottie/intro_foriday.json'), |
|
|
), |
|
|
), |
|
|
Padding( |
|
|
Padding( |
|
|
padding: EdgeInsets.only(bottom: 20.w), |
|
|
padding: EdgeInsets.only(bottom: 10.w), |
|
|
child: Text( |
|
|
child: Text( |
|
|
isWakeup ? '我在呢~' : title, |
|
|
isWakeup ? '我在呢~' : title, |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
@ -74,50 +74,71 @@ class IntroOverlayBuilder { |
|
|
Function? onNext, |
|
|
Function? onNext, |
|
|
Function? onFinish, |
|
|
Function? onFinish, |
|
|
}) { |
|
|
}) { |
|
|
return Column( |
|
|
double height = |
|
|
crossAxisAlignment: |
|
|
(params.offset?.dy ?? 0) - ScreenUtil().statusBarHeight - 20.w; |
|
|
alignment ? CrossAxisAlignment.start : CrossAxisAlignment.end, |
|
|
double left = params.offset?.dx ?? 0; |
|
|
children: [ |
|
|
double right = 1.sw - left - params.size.width; |
|
|
Padding( |
|
|
return SizedBox( |
|
|
padding: EdgeInsets.only(bottom: 10.w), |
|
|
height: height, |
|
|
child: Text( |
|
|
child: Column( |
|
|
text, |
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
style: TextStyle( |
|
|
children: [ |
|
|
fontSize: 15.sp, |
|
|
Container( |
|
|
color: Colors.white, |
|
|
padding: EdgeInsetsGeometry.all(12.w), |
|
|
fontWeight: FontWeight.bold, |
|
|
alignment: Alignment.centerRight, |
|
|
), |
|
|
child: _button( |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
if (onNext != null) |
|
|
|
|
|
_button( |
|
|
|
|
|
buttonText, |
|
|
|
|
|
() { |
|
|
|
|
|
params.onNext!(); |
|
|
|
|
|
onNext(); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
if (onFinish != null) |
|
|
|
|
|
_button( |
|
|
|
|
|
buttonText, |
|
|
|
|
|
() { |
|
|
|
|
|
params.onFinish(); |
|
|
|
|
|
onFinish(); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
if (onNext != null || onFinish != null) const Spacer(), |
|
|
|
|
|
_button( |
|
|
|
|
|
'跳过', |
|
|
'跳过', |
|
|
() { |
|
|
() { |
|
|
params.onFinish(); |
|
|
params.onFinish(); |
|
|
}, |
|
|
}, |
|
|
isSkip: true, |
|
|
isSkip: true, |
|
|
), |
|
|
), |
|
|
], |
|
|
), |
|
|
), |
|
|
Padding( |
|
|
], |
|
|
padding: EdgeInsets.only( |
|
|
|
|
|
left: alignment ? left : 12.w, |
|
|
|
|
|
right: alignment ? 12.w : right, |
|
|
|
|
|
), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
crossAxisAlignment: |
|
|
|
|
|
alignment ? CrossAxisAlignment.start : CrossAxisAlignment.end, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Padding( |
|
|
|
|
|
padding: EdgeInsets.only(bottom: 10.w), |
|
|
|
|
|
child: Text( |
|
|
|
|
|
text, |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 15.sp, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
if (onNext != null) |
|
|
|
|
|
_button( |
|
|
|
|
|
buttonText, |
|
|
|
|
|
() { |
|
|
|
|
|
params.onNext!(); |
|
|
|
|
|
onNext(); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
if (onFinish != null) |
|
|
|
|
|
_button( |
|
|
|
|
|
buttonText, |
|
|
|
|
|
() { |
|
|
|
|
|
params.onFinish(); |
|
|
|
|
|
onFinish(); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|