File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed
packages/ios_platform_images Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1- ## NEXT
1+ ## 0.2.3+1
22
3+ * Improves example code in README.
34* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
45
56## 0.2.3
Original file line number Diff line number Diff line change @@ -16,20 +16,13 @@ When loading images from Image.xcassets the device specific variant is chosen
1616
1717### iOS->Flutter Example
1818
19- ``` dart
20- // Import package
21- import 'package:ios_platform_images/ios_platform_images.dart';
22-
23- Widget build(BuildContext context) {
24- return MaterialApp(
25- home: Scaffold(
26- body: Center(
27- child: Image(image: IosPlatformImages.load("flutter")),
28- ),
29- //..
30- ),
31- );
32- }
19+ <? code-excerpt "example/lib/main.dart (Usage)"?>
20+ ``` dart
21+ // "flutter" is a resource in Assets.xcassets.
22+ final Image xcassetImage = Image(
23+ image: IosPlatformImages.load('flutter'),
24+ semanticLabel: 'Flutter logo',
25+ );
3326```
3427
3528` IosPlatformImages.load ` works similarly to [ ` UIImage(named:) ` ] ( https://developer.apple.com/documentation/uikit/uiimage/1624146-imagenamed ) .
Original file line number Diff line number Diff line change @@ -28,17 +28,20 @@ class _MyAppState extends State<MyApp> {
2828
2929 @override
3030 Widget build (BuildContext context) {
31+ // #docregion Usage
32+ // "flutter" is a resource in Assets.xcassets.
33+ final Image xcassetImage = Image (
34+ image: IosPlatformImages .load ('flutter' ),
35+ semanticLabel: 'Flutter logo' ,
36+ );
37+ // #enddocregion Usage
3138 return MaterialApp (
3239 home: Scaffold (
3340 appBar: AppBar (
3441 title: const Text ('Plugin example app' ),
3542 ),
3643 body: Center (
37- // "flutter" is a resource in Assets.xcassets.
38- child: Image (
39- image: IosPlatformImages .load ('flutter' ),
40- semanticLabel: 'Flutter logo' ,
41- ),
44+ child: xcassetImage,
4245 ),
4346 ),
4447 );
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: ios_platform_images
22description : A plugin to share images between Flutter and iOS in add-to-app setups.
33repository : https://github.com/flutter/packages/tree/main/packages/ios_platform_images
44issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+ios_platform_images%22
5- version : 0.2.3
5+ version : 0.2.3+1
66
77environment :
88 sdk : " >=3.0.0 <4.0.0"
Original file line number Diff line number Diff line change 1010- go_router_builder
1111- image_picker_for_web
1212- in_app_purchase/in_app_purchase
13- - ios_platform_images
1413- palette_generator
1514- pointer_interceptor
1615- quick_actions/quick_actions
You can’t perform that action at this time.
0 commit comments