-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Google_maps]After change BitmapDescriptor.fromBytes to BitmapDescriptor.bytes app crash #149183
Comments
Having the same problem after migration, pls help :D |
@PrzemyslawPluszowy Can you provide us a runnable reproducible code sample in properly formatted text so that we can directly use it and verify at our end ? Providing code screenshot isn't much helpful. |
This comment was marked as outdated.
This comment was marked as outdated.
another error after migration to flutter maps 2.6.1 in another project static Future<BitmapDescriptor> _createIcon(MapPinType type) async {
return await BitmapDescriptor.asset(
const ImageConfiguration(
devicePixelRatio: 2.5,
size: Size(28, 28),
),
type.getPathIcon(),
);
}
}
enum MapPinType {
accident,
towing,
delivery;
String getPathIcon() {
switch (this) {
case MapPinType.accident:
return Assets.images.iconMapCrashPng.path;
case MapPinType.towing:
return Assets.images.garageMapIcon.path;
case MapPinType.delivery:
return Assets.images.iconMapHome.path;
}
}
} |
@PrzemyslawPluszowy How are you calling this method ? Can you provide us complete code (ex: main.dart) so that we can simply copy paste and verify this further ?
What version you were on earlier before upgrading to 2.6.1 ? |
this is the same issue #149226 (comment) |
This is an unintended effect of the way the federated change to add the new formats was rolled out. The new formats won't be supported until flutter/packages#6826 lands. @jokerttu Could you do a new PR ASAP to remove the deprecation notice? We can re-add it after the implementation PRs have landed. |
@stuartmorgan PR available here: flutter/packages#6832 |
Re-opening as the crash will still happen if people use the new methods; removing the deprecation should just reduce the chances of people starting to use them before the implementation lands.
Let's see how quickly the implementations land; not actively pushing people to the not-yet-supported versions should help a lot. (In retrospect, yes, we should have added the class without public constructors first, then added support for them, then added the constructors and the deprecations.) |
Same problem here, someone has any solution for this ? |
The solution is not to use the new constructors until flutter/packages#6826 lands. |
Ok, got it, thank you!!! |
) Undeprecate BitmapDescriptor.fromAssetImage and BitmapDescriptor.fromBytes * Undeprecates `BitmapDescriptor.fromAssetImage`. * Undeprecates `BitmapDescriptor.fromBytes`. * Fixes issues with deprecation in version 2.7.0. The new formats won't be supported until flutter#6826 lands. Deprecation notices can be re-added after the implementation PRs have landed. Fixes: flutter/flutter#149183
One thing I've noticed when using It will be really awesome if |
flutter/packages#6826 is now landed and new methods, |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to reproduce
this func work good but if i change to BitmapDescriptor.bytes(imageToBytesUint8List);
i have this error:
What is wrong?
Expected results
Need find solution for this error
Actual results
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[Paste your output here]
The text was updated successfully, but these errors were encountered: