Open
Description
Hello,
I've found an issue that the banner isn't updated after the screen size was changed.
Preconditions:
I try to use maximum space for the banner widget.
So, my banner size depends on the screen size.
Widget example:
AppodealBanner(
adSize: AppodealBannerSize(
width: banner.size.width.round(),
height: banner.size.height.round(),
name: 'BANNER',
),
)
When you rotate the device we have to update the banner size but nothing changes.
How to resolve the issue:
@override
void didUpdateWidget(AppodealBanner oldWidget) {
super.initState(oldWidget);
if (widget.adSize != oldWidget.adSize) {
setState(() {
adSize = Future.value(Size(
widget.adSize.width.toDouble(),
widget.adSize.height.toDouble(),
));
});
}
}
Metadata
Metadata
Assignees
Labels
No labels