feat(discord): add opt-in mobile rich presence with track artwork

This commit is contained in:
zarzet committed 2026-10-03 02:14:11 +07:00
1 parent bbe2caa754
commit 0b2cf0e4e5
40 files changed
+1839 -18

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('native Discord SDK can initialize, stop, and restart', (
tester,
) async {
const channel = MethodChannel('com.zarz.spotiflac/discord');
// Staging the official SDK is a prerequisite for this device-only test.
// No account is linked and no listening activity is published.
for (var i = 0; i < 2; i++) {
try {
expect(await channel.invokeMethod<bool>('initialize'), isTrue);
await tester.pump(const Duration(milliseconds: 350));
await channel.invokeMethod<void>('clear');
} finally {
await channel.invokeMethod<void>('shutdown');
}
}
});
}