ios_platform_images 0.2.0+9 icon indicating copy to clipboard operation
ios_platform_images: ^0.2.0+9 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
Support9.0+

Usage #

iOS->Flutter Example #

// Import package
import 'package:ios_platform_images/ios_platform_images.dart';

Widget build(BuildContext context) {
  return MaterialApp(
    home: Scaffold(
      body: Center(
        child: Image(image: IosPlatformImages.load("flutter")),
      ),
      //..
    ),
  );
}

IosPlatformImages.load functions like [UIImage imageNamed:].

Flutter->iOS Example #

#import <ios_platform_images/UIImage+ios_platform_images.h>

static UIImageView* MakeImage() {
  UIImage* image = [UIImage flutterImageWithName:@"assets/foo.png"];
  return [[UIImageView alloc] initWithImage:image];
}
18
likes
130
pub points
83%
popularity

Publisher

verified publisher iconflutter.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on ios_platform_images