ios_platform_images 0.2.4+1 copy "ios_platform_images: ^0.2.4+1" to clipboard
ios_platform_images: ^0.2.4+1 copied to clipboard

PlatformiOS

A plugin to share images between Flutter and iOS in add-to-app setups.

iOS Platform Images #

A Flutter plugin to share images between Flutter and iOS.

This allows Flutter to load images from Images.xcassets and iOS code to load Flutter images.

When loading images from Image.xcassets the device specific variant is chosen (iOS documentation).

iOS
Support 12.0+

Usage #

iOS->Flutter Example #

// "flutter" is a resource in Assets.xcassets.
final Image xcassetImage = Image(
  image: IosPlatformImages.load('flutter'),
  semanticLabel: 'Flutter logo',
);

IosPlatformImages.load works similarly to UIImage(named:).

Flutter->iOS Example #

import ios_platform_images

func makeImage() -> UIImageView {
    let image = UIImage.flutterImageWithName("assets/foo.png")
    return UIImageView(image: image)
}
30
likes
150
points
516
downloads

Publisher

verified publisherflutter.dev

Weekly Downloads

A plugin to share images between Flutter and iOS in add-to-app setups.

Repository (GitHub)
View/report issues
Contributing

Topics

#image #assets

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on ios_platform_images