buttonsWidget method
Implementation
Widget buttonsWidget() {
double animatedWidth = 0.0;
return Align(
alignment: Alignment.topRight,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const Spacer(),
// SizedBox(
// child: AnimatedContainer (
// duration: const Duration (milliseconds: 800),
// width: !animateLabel ? animatedWidth: animatedWidth + 70,
// height: 15,
// color: const Color(0xFFF2F2F2),
// child: const Text("Ads by doceree", style: TextStyle(fontSize: 9, color: Color(0xFF6C40F7), backgroundColor: Color(0xFFF2F2F2)),),
// onEnd: () async {
// await Future.delayed(const Duration(microseconds: 1200));
// setState(() {
// if (animateLabel) {
// animateLabel = false;
// widget.callbackData.showConsent = true;
// // animatedWidth = 0;
// }
// });
// },
// ),
// ),
PointerInterceptor(
child: SizedBox(
height: 15.0,
child: AnimatedContainer(
color: const Color(0xFFF2F2F2),
duration: const Duration(milliseconds: 500),
width: !animateLabel ? animatedWidth: animatedWidth + 70,
child: const Text("Ads by doceree", style: TextStyle(fontSize: 9, color: Color(0xFF6C40F7),),),
onEnd: () async {
await Future.delayed(const Duration(seconds: 1));
setState(() {
if (animateLabel) {
animateLabel = false;
widget.callbackData.showConsent = true;
}
});
},
),
),
),
SizedBox(
height: 15.0,
width: 15.0,
child: PointerInterceptor(
child: IconButton(
padding: const EdgeInsets.all(0.0),
// color: const Color(0xff6C40F7),
icon: Image.asset("packages/doceree_ads/assets/appimages/info.png", color: const Color(0xff6C40F7)),
onPressed: () {
setState(() {
animateLabel = true;
});
},
),
),
),
const SizedBox(
width: 5,
),
SizedBox(
height: 15.0,
width: 15.0,
child: PointerInterceptor(
child: IconButton(
padding: const EdgeInsets.all(0.0),
// color: const Color(0xff6C40F7),
icon: Image.asset("packages/doceree_ads/assets/appimages/xmark.png", color: const Color(0xff6C40F7)),
onPressed: () {
setState(() {
widget.callbackData.showConsent = true;
});
},
)
)
),
]
),
);
}