Flutter Bullet Dots

A simple Flutter package for customizable bullet dots and lists with various shapes and styles.

Features

  • 🎯 Multiple bullet shapes (circle, square, diamond, triangle, star, hexagon)
  • 🎨 Customizable colors, sizes, and borders
  • 📝 Simple bullet lists with text
  • 🔧 Custom bullet lists with any widget content
  • 📱 Easy to use and integrate

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_bullet_dots: ^1.0.0

Usage

Basic Bullet Dot

import 'package:flutter_bullet_dots/flutter_bullet_dots.dart';

// Simple circular bullet dot
BulletDot(
  size: 8.0,
  color: Colors.blue,
  shape: BulletShape.circle,
)

Different Shapes

// Circle (default)
BulletDot(shape: BulletShape.circle)

// Square
BulletDot(shape: BulletShape.square)

// Diamond
BulletDot(shape: BulletShape.diamond)

// Triangle
BulletDot(shape: BulletShape.triangle)

// Star
BulletDot(shape: BulletShape.star)

// Hexagon
BulletDot(shape: BulletShape.hexagon)

Customized Bullet Dot

BulletDot(
  size: 12.0,
  color: Colors.red,
  shape: BulletShape.square,
  borderRadius: 8.0,
  borderColor: Colors.black,
  borderWidth: 2.0,
)

Simple Bullet List

BulletList(
  items: [
    'First item',
    'Second item',
    'Third item',
  ],
  bulletDot: BulletDot(
    color: Colors.green,
    shape: BulletShape.star,
  ),
  spacing: 8.0,
  itemSpacing: 4.0,
  textStyle: TextStyle(fontSize: 16),
)

Custom Bullet List

CustomBulletList(
  items: [
    BulletListItem(
      bulletDot: BulletDot(
        color: Colors.blue,
        shape: BulletShape.circle,
      ),
      child: Text('Item with custom bullet'),
    ),
    BulletListItem(
      bulletDot: BulletDot(
        color: Colors.red,
        shape: BulletShape.star,
      ),
      child: Row(
        children: [
          Icon(Icons.check),
          SizedBox(width: 8),
          Text('Item with icon'),
        ],
      ),
    ),
  ],
)

API Reference

BulletDot

Property Type Default Description
size double 8.0 Size of the bullet dot
color Color Colors.blue Color of the bullet dot
shape BulletShape BulletShape.circle Shape of the bullet dot
borderRadius double 4.0 Border radius for rounded shapes
borderColor Color? null Border color
borderWidth double 0.0 Border width

BulletShape

  • circle - Circular bullet dot
  • square - Square bullet dot
  • diamond - Diamond-shaped bullet dot
  • triangle - Triangle-shaped bullet dot
  • star - Star icon bullet dot
  • hexagon - Hexagon-shaped bullet dot

BulletList

Property Type Default Description
items List<String> Required List of text items
bulletDot BulletDot BulletDot() Bullet dot style
spacing double 8.0 Spacing between bullet and text
itemSpacing double 4.0 Spacing between list items
textStyle TextStyle? null Text style for items
alignment CrossAxisAlignment CrossAxisAlignment.start Alignment of bullet dots

CustomBulletList

Property Type Default Description
items List<BulletListItem> Required List of bullet list items
spacing double 8.0 Spacing between bullet and content
itemSpacing double 4.0 Spacing between list items
alignment CrossAxisAlignment CrossAxisAlignment.start Alignment of bullet dots

BulletListItem

Property Type Description
bulletDot BulletDot Bullet dot for this item
child Widget Content of this item

Example

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

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Bullet Dots Example')),
      body: Padding(
        padding: EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text('Simple Bullet List:', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
            SizedBox(height: 8),
            BulletList(
              items: ['Feature 1', 'Feature 2', 'Feature 3'],
              bulletDot: BulletDot(color: Colors.blue, shape: BulletShape.circle),
            ),
            SizedBox(height: 24),
            Text('Custom Bullet List:', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
            SizedBox(height: 8),
            CustomBulletList(
              items: [
                BulletListItem(
                  bulletDot: BulletDot(color: Colors.green, shape: BulletShape.star),
                  child: Text('Important item'),
                ),
                BulletListItem(
                  bulletDot: BulletDot(color: Colors.orange, shape: BulletShape.triangle),
                  child: Text('Warning item'),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.