mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-22 07:18:38 +02:00
feat(discord): add opt-in mobile rich presence with track artwork
This commit is contained in:
1 parent
bbe2caa754
commit
0b2cf0e4e5
40 files changed
+1839
-18
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user