tree: a58f161c03552c0b97a640136581dd6fd7d302f4 [path history] [tgz]
  1. example/
  2. ios/
  3. lib/
  4. pigeons/
  5. test/
  6. .gitignore
  7. AUTHORS
  8. CHANGELOG.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
packages/ios_platform_images/README.md

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
Support12.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)
}