Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.24.3
version: 3.29.3

- name: Install dependencies
run: flutter pub get
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.24.3
version: 3.29.3

- name: Analyze
run: flutter analyze
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [3.10.0]
- Bump dependencies

## [3.9.1]
- Added `quickShareAction` property. This action will be called on long press on share button. It has AliceHttpCall as argument and should be used to handle share action. By default it will share cURL command.

Expand Down
8 changes: 5 additions & 3 deletions lib/alice.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ class Alice {
void Function(AliceHttpCall aliceHttpCall)? quickShareAction,
}) {
final defaultQuickShareAction = (call) {
Share.share(
call.getCurlCommand(),
subject: 'cURL Command',
SharePlus.instance.share(
ShareParams(
text: call.getCurlCommand(),
subject: 'cURL Command',
),
);
};
final aliceCore = AliceCore(
Expand Down
2 changes: 1 addition & 1 deletion lib/core/alice_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AliceCore {

/// Function which will be called on long press on share button.
/// It has AliceHttpCall as argument and should be used to handle share action.
///
///
/// By default it will share cURL command.
final void Function(AliceHttpCall aliceHttpCall)? quickShareAction;

Expand Down
9 changes: 7 additions & 2 deletions lib/ui/page/alice_call_details_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ class _AliceCallDetailsScreenState extends State<AliceCallDetailsScreen>
backgroundColor: AliceConstants.lightRed(widget.customColors),
key: Key('share_key'),
onPressed: () async {
Share.share(await _getSharableResponseString(),
subject: 'Request Details');
SharePlus.instance.share(
ShareParams(
title: 'Alice - HTTP Call Details',
subject: 'Request Details',
text: await _getSharableResponseString(),
),
);
},
child: Icon(Icons.share, color: Colors.white),
),
Expand Down
8 changes: 7 additions & 1 deletion lib/utils/alice_share_logs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@ Future<XFile> saveLogs(List<AliceHttpCall> logs) async {
}

void shareFile(XFile file) {
Share.shareXFiles([file], subject: "Alice logs");
SharePlus.instance.share(
ShareParams(
files: [file],
title: 'Alice - HTTP Call Details',
subject: "Alice logs",
),
);
}
Loading