1.全部完成后,修改对话内容
This commit is contained in:
@@ -78,73 +78,78 @@ class _AvatarCardState extends State<AvatarCard> with SingleTickerProviderStateM
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, 50),
|
||||
child: Column(
|
||||
children: [
|
||||
BothSizeTransition(
|
||||
animation: _animation,
|
||||
offset: Offset(50, 50),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: InkWell(
|
||||
onTap: _toggleShow,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
border: Border.all(color: Colors.black, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
_dialog,
|
||||
style: TextStyle(fontSize: 12),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
return Selector<PlanDetailStore, bool>(
|
||||
selector: (_, store) => store.isAllDone(),
|
||||
builder: (context, isAllDone, _) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, 50),
|
||||
child: Column(
|
||||
children: [
|
||||
BothSizeTransition(
|
||||
animation: _animation,
|
||||
offset: Offset(50, 50),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: InkWell(
|
||||
onTap: _toggleShow,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
border: Border.all(color: Colors.black, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
isAllDone ? "🎉 Great — you’ve completed everything! 🎉" : _dialog,
|
||||
style: TextStyle(fontSize: 12),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: CustomPaint(
|
||||
painter: BubblePainter(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
Image.asset("assets/image/kbn.png", height: 100),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: CustomPaint(
|
||||
painter: BubblePainter(),
|
||||
top: 20,
|
||||
child: Transform.translate(
|
||||
offset: Offset(40, -10),
|
||||
child: GestureDetector(
|
||||
onTap: _toggleShow,
|
||||
child: BothSizeTransition(
|
||||
animation: ReverseAnimation(_animation),
|
||||
offset: Offset(-50, -50),
|
||||
child: Icon(RemixIcons.message_2_line),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
Image.asset("assets/image/kbn.png", height: 100),
|
||||
Positioned(
|
||||
top: 20,
|
||||
child: Transform.translate(
|
||||
offset: Offset(40, -10),
|
||||
child: GestureDetector(
|
||||
onTap: _toggleShow,
|
||||
child: BothSizeTransition(
|
||||
animation: ReverseAnimation(_animation),
|
||||
offset: Offset(-50, -50),
|
||||
child: Icon(RemixIcons.message_2_line),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user