Skip to main content

playmez_embed 2.2.0 copy "playmez_embed: ^2.2.0" to clipboard
playmez_embed: ^2.2.0 copied to clipboard

Put a Playmez game in your Flutter app. One widget wrapping webview_flutter that relays the game's events.

playmez_embed #

Put a Playmez game in your Flutter app (iOS and Android). One widget wrapping webview_flutter that relays the game's events. Points are virtual, non-transferable and worth nothing.

flutter pub add playmez_embed
import 'package:playmez_embed/playmez_embed.dart';

// launchUrl comes from YOUR backend, which calls POST /partner/launch with the API key. Never ship the key.
PlaymezGame(
  launchUrl: launchUrl,
  onEvent: (e) {
    if (e.type == 'result') debugPrint('${e.won ? "won" : "lost"} ${e.net} points');
  },
  onClose: () => Navigator.of(context).pop(),
)

Events: ready (game), result (game, won, net), close, error (code, message), resize (height), local_finished (game, draw, won). Launch with mode: "local" and the game runs on the device with no network once it has loaded: every table game alone against the computer, or people passing the device in Ludo, Chess, Carrom and 8-ball. won is the player's result against the computer (null for people together or a game of chance); no names leave the device. Show launches (POST /partner/shows/:code/launch) open a live show the partner hosts: ready then carries game: "show", show (its kind, such as quiz), showCode and role (host or player).

Voice at shared tables (only when Playmez switched it on for you): the widget grants microphone capture to the game page; add RECORD_AUDIO on Android and NSMicrophoneUsageDescription on iOS, or pass allowMicrophone: false.

Full guide: https://playmez.com/developers

MIT © Playmez

0
likes
130
points
272
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Put a Playmez game in your Flutter app. One widget wrapping webview_flutter that relays the game's events.

Homepage
Repository (GitHub)
View/report issues

Topics

#games #webview #embed

License

MIT (license)

Dependencies

flutter, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on playmez_embed