Skip to main content

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

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:playmez_embed/playmez_embed.dart';

void main() => runApp(const ExampleApp());

/// Opens one game from a launch URL your backend fetched with POST /partner/launch.
class ExampleApp extends StatelessWidget {
  /// Creates the example app.
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: const Color(0xFF0B0F1A),
        body: SafeArea(
          child: PlaymezGame(
            launchUrl: 'https://playmez.com/embed/ludo?launch=PASTE_A_LAUNCH_TOKEN',
            onEvent: (e) => debugPrint('${e.type} ${e.game ?? ''} ${e.net}'),
            onClose: () => debugPrint('closed'),
          ),
        ),
      ),
    );
  }
}
0
likes
140
points
0
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