fire_game_infra 0.1.1 copy "fire_game_infra: ^0.1.1" to clipboard
fire_game_infra: ^0.1.1 copied to clipboard

A Flutter package for creating online multiplayer games using Firebase, featuring real-time game state management.

example/main.dart

import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'rooms_page.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
      options: const FirebaseOptions(
          apiKey: String.fromEnvironment('API_KEY'),
          projectId: String.fromEnvironment('PROJECT_ID'),
          messagingSenderId: String.fromEnvironment('MESSAGING_SENDER_ID'),
          appId: kIsWeb
              ? String.fromEnvironment('APP_ID_WEB')
              : String.fromEnvironment('APP_ID_ANDROID')));
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const RoomsPage(),
    );
  }
}
0
likes
160
pub points
12%
popularity

Publisher

unverified uploader

A Flutter package for creating online multiplayer games using Firebase, featuring real-time game state management.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

cloud_firestore, either_dart, firebase_core, flutter

More

Packages that depend on fire_game_infra