cricket_run_map 1.0.1 copy "cricket_run_map: ^1.0.1" to clipboard
cricket_run_map: ^1.0.1 copied to clipboard

An Awesome Flutter package to create a Wagon Wheel / Run Map widget for Cricket applications.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Cricket Run Map',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.white,
        body: Container(
          width: MediaQuery.of(context).size.width,
          height: MediaQuery.of(context).size.height,
          alignment: Alignment.center,
          child: CricketRunMap(
            width: 350,
            height: 350,
            isRightHand:
                false, // True = Right Hand Batsman  |  False = Left Hand Batsman
            onPositionSelected: (String selectedPosition) {
              // Handle the selected position name here
              print('Selected position index: $selectedPosition');
            },
          ),
        ),
      ),
    );
  }
}
1
likes
150
pub points
0%
popularity

Publisher

unverified uploader

An Awesome Flutter package to create a Wagon Wheel / Run Map widget for Cricket applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on cricket_run_map