You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new version of google_mobile_ads: 5.3.0, didn't run with flutter 3.24.5, and dart 3.5.4, it requires flutter version >= 3.27.
To solve it, just need to bump the flutter version - but there are people who can't do the version bump - in this case should'n the documentation be fixed with the new minimum dart version?
As documentation says, it should be able to run at minimum dart 2.17 (but it's not):
See the error logs when try to build:
Error log
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:992:33: Error: The getter 'a' isn't defined for the class 'Color'.
- 'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
writeValue(buffer, (value.a * 255).toInt());
^
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:993:33: Error: The getter 'r' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'r'.
writeValue(buffer, (value.r * 255).toInt());
^
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:994:33: Error: The getter 'g' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'g'.
writeValue(buffer, (value.g * 255).toInt());
^
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:995:33: Error: The getter 'b' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'.
writeValue(buffer, (value.b * 255).toInt());
^
Target kernel_snapshot_program failed: Exception
Plugin Version
google_mobile_ads: ^5.3.0
The problem
Steps to Reproduce
Update this package to 5.3.0 and run with Flutter 3.24.5.
The text was updated successfully, but these errors were encountered:
The Color class, on Flutter 3.24.5 with Dart 3.5.4, is defined with this fields:
int get alpha => (0xff000000 & value) >> 24;
...
int get red => (0x00ff0000 & value) >> 16;
...
int get green => (0x0000ff00 & value) >> 8;
...
int get blue => (0x000000ff & value) >> 0;
The new version of
google_mobile_ads: 5.3.0
, didn't run withflutter 3.24.5
, anddart 3.5.4
, it requiresflutter version >= 3.27
.To solve it, just need to bump the flutter version - but there are people who can't do the version bump - in this case should'n the documentation be fixed with the new minimum dart version?
As documentation says, it should be able to run at minimum dart 2.17 (but it's not):
See the error logs when try to build:
Error log
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:992:33: Error: The getter 'a' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'. writeValue(buffer, (value.a * 255).toInt()); ^../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:993:33: Error: The getter 'r' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'r'.
writeValue(buffer, (value.r * 255).toInt());
^
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:994:33: Error: The getter 'g' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'g'.
writeValue(buffer, (value.g * 255).toInt());
^
../../.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/lib/src/ad_instance_manager.dart:995:33: Error: The getter 'b' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'.
writeValue(buffer, (value.b * 255).toInt());
^
Target kernel_snapshot_program failed: Exception
Plugin Version
google_mobile_ads: ^5.3.0
The problem
Steps to Reproduce
Update this package to 5.3.0 and run with Flutter 3.24.5.
The text was updated successfully, but these errors were encountered: