dart_discord_rpc
0.0.2, released 5 years ago by an unverified publisher
Discord Rich Presence integration for Flutter and Dart apps and games.
What it does
Allows Flutter and Dart apps and games to integrate Discord Rich Presence. You can initialize the Discord RPC client, set or update user presence with details and images, clear presence, and listen to events through a stream.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to display rich presence status on Discord for a desktop app or game.
- You need to handle Discord RPC events like ready, errors, or game joins.
Skip it when
- You are targeting macOS or iOS platforms, which are unsupported.
- You do not need Discord integration.
Strengths
- Stream-based event handling for Discord events.
- Easy to initialize and update presence states.
Weaknesses
- Limited platform support (macOS, iOS, and Linux are unsupported or coming soon depending on the context).
- Early version release (0.0.2).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
You must create an application at the Discord Developer Portal to obtain an application ID.
void main() {
DiscordRPC.initialize();
runApp(MyApp());
}
DiscordRPC rpc = DiscordRPC(
applicationId: 'APPLICATION_ID',
);
rpc.start(autoRegister: true);
rpc.updatePresence(
DiscordPresence(
state: 'Discord Rich Presence from Dart. 🎯',
details: 'github.com/alexmercerind/dart_discord_rpc',
),
);