Closed namdp closed 1 year ago
@namdp Hello! Thanks for your issue, we started to investigate this behavior.
@namdp Hello! At the moment, we still don't have a solution for rendering one banner object on different PageView. It would be more correct to make an implementation where the Appodeal Banner is separated from the PageView. Example:
class _PageViewDemoState extends State<PageViewDemo> {
final _controller = PageController(
initialPage: 0,
);
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Column(children: <Widget>[
Center(
child: AppodealBanner(adSize: AppodealBannerSize.BANNER),
),
Expanded(
flex: 1,
child: PageView(
controller: _controller,
children: const [
MyPageWidget(1),
MyPageWidget(2),
MyPageWidget(3),
],
))
]);
}
}
PageView have 3 childs: widget1, widget2, widget3. Each widget have it's custom AppodealBannerView. First we open widget1 -> AppodealBannerView display correct, but if we open widget2 then return to widget1 -> AppodealBannerView display blank