Skip to content

Commit 453afcb

Browse files
docs: add missing imports to remaining code examples
- android_intent_plus: add import for AndroidIntent usage example - share_plus: add missing imports to web fallback, XFile.fromData, and URI examples - include dart:convert import for utf8.encode usage All code examples now have complete import statements for copy-paste usage.
1 parent 000e9b6 commit 453afcb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

packages/android_intent_plus/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ of integers or strings.
8888
or get the details of the activity that can handle the intent.
8989

9090
```dart
91+
import 'package:android_intent_plus/android_intent.dart';
92+
9193
final intent = AndroidIntent(
9294
action: 'action_view',
9395
data: Uri.encodeFull('http://'),

packages/share_plus/share_plus/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ package.
127127
File downloading fallback mechanism for web can be disabled by setting:
128128

129129
```dart
130+
import 'package:share_plus/share_plus.dart';
131+
130132
ShareParams(
131133
// rest of params
132134
downloadFallbackEnabled: false,
@@ -140,6 +142,10 @@ You can also share files that you dynamically generate from its data using [`XFi
140142
To set the name of such files, use the `fileNameOverrides` parameter, otherwise the file name will be a random UUID string.
141143

142144
```dart
145+
import 'package:share_plus/share_plus.dart';
146+
import 'package:cross_file/cross_file.dart';
147+
import 'dart:convert';
148+
143149
final params = ShareParams(
144150
files: [XFile.fromData(utf8.encode(text), mimeType: 'text/plain')],
145151
fileNameOverrides: ['myfile.txt']
@@ -158,6 +164,8 @@ This special functionality is only properly supported on iOS.
158164
On other platforms, the URI will be shared as plain text.
159165

160166
```dart
167+
import 'package:share_plus/share_plus.dart';
168+
161169
final params = ShareParams(uri: uri);
162170
163171
SharePlus.instance.share(params);

0 commit comments

Comments
 (0)