tournament_bracket_kit 0.1.0 copy "tournament_bracket_kit: ^0.1.0" to clipboard
tournament_bracket_kit: ^0.1.0 copied to clipboard

A customizable Flutter widget for rendering single-elimination tournament brackets with pan/zoom, round tabs, and fully customizable match cards.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Tournament Bracket Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color(0xFF2D7A5A),
          brightness: Brightness.light,
        ),
      ),
      home: const BracketDemoPage(),
    );
  }
}

class BracketDemoPage extends StatefulWidget {
  const BracketDemoPage({super.key});

  @override
  State<BracketDemoPage> createState() => _BracketDemoPageState();
}

class _BracketDemoPageState extends State<BracketDemoPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('tournament_bracket_kit'),
      ),
      body: SafeArea(
        child: TournamentBracket(
          rounds: dummyBracketRounds(),
          onMatchTap: (match) {
            ScaffoldMessenger.of(context).showSnackBar(
              SnackBar(
                content: Text(
                  '${match.home?.name ?? 'TBD'} vs ${match.away?.name ?? 'TBD'}',
                ),
                // duration: const Duration(seconds: 1),
              ),
            );
          },
        ),
      ),
    );
  }
}
2
likes
160
points
76
downloads

Documentation

API reference

Publisher

verified publishersangamadhikari.com

Weekly Downloads

A customizable Flutter widget for rendering single-elimination tournament brackets with pan/zoom, round tabs, and fully customizable match cards.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on tournament_bracket_kit