game 0.0.0 copy "game: ^0.0.0" to clipboard
game: ^0.0.0 copied to clipboard

library for make game.

Game library #

Fast, Enjoyable & Customizable Play library

Pub Version

game dart library to make application game

Features #

  • 🚀 Cross platform: mobile, desktop, browser
  • ⚡ Great performance
  • ❤️ Simple, powerful, & intuitive API

Install Library #

dart pub add game
flutter pub add game

Quickstart #

// ignore_for_file: unused_local_variable, duplicate_ignore

import 'dart:math';
import 'package:flutter/material.dart';
import 'package:play/play.dart';

void main() {
  runApp(
    const MaterialApp(
      debugShowCheckedModeBanner: true,
      title: "Azka Dev",
      home: App(),
    ),
  );
}

class App extends StatefulWidget {
  const App({Key? key}) : super(key: key);
  @override
  MyApp createState() => MyApp();
}

class MyApp extends State<App> {
  VideoController controllerVideo = VideoController();
  AudioController controllerAudio = AudioController();
  @override
  void initState() {
    super.initState();
  }

  @override
  // ignore: duplicate_ignore, duplicate_ignore
  Widget build(BuildContext context) {
    final mediaQuery = MediaQuery.of(context);
    // ignore: unused_local_variable
    final getHeight = mediaQuery.size.height;
    final getWidth = mediaQuery.size.width;
    return MaterialApp(
      debugShowCheckedModeBanner: true,
      title: "Home",
      home: Center(
        child: Column(
          children: [
            Padding(
              padding: const EdgeInsets.all(10),
              child: Video.asset(
                "/home/azkadev/Videos/video.mp4",
                controller: controllerVideo,
                callback: (UpdateVideo res) {
                  var update = res.raw;
                  if (update is Map) {
                    if (update["@type"] == "video") {}
                  }
                },
                onTap: () {
                  controllerVideo.play;
                },
                child: Padding(
                  padding: const EdgeInsets.all(10),
                  child: Image.asset("/path/thumnail"),
                ),
              ),
            ),
            Padding(
              padding: const EdgeInsets.all(10),
              child: Audio.asset(
                "/home/azkadev/Music/audio.mp3",
                controller: controllerAudio,
                callback: (UpdateAudio res) {
                  var update = res.raw;
                  if (update is Map) {
                    if (update["@type"] == "audio") {}
                  }
                },
                onTap: () {
                  controllerAudio.play;
                },
                child: Padding(
                  padding: const EdgeInsets.all(10),
                  child: Image.asset("/path/thumnail"),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
0
pub points
49%
popularity

Publisher

unverified uploader

library for make game.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on game