Skip to main content

flutter_circle_of_fifths 1.1.1 copy "flutter_circle_of_fifths: ^1.1.1" to clipboard
flutter_circle_of_fifths: ^1.1.1 copied to clipboard

An interactive, customizable, Material 3 Circle of Fifths widget library for Flutter with support for Major and Minor keys, diatonic scale breakdown, and theme adaptation.

flutter_circle_of_fifths #

An interactive, customizable, Material 3 Circle of Fifths widget library for Flutter. Supports Major and Minor modes, diatonic scale breakdown, dark/light theme adaptation, and touch-based circular navigation.

pub package License: MIT Flutter


🌐 Languages / Idiomas: Español | English


β˜• Support the Project / Apoya el Proyecto #

If this package has been helpful and you'd like to support its ongoing development and maintenance, feel free to contribute:

Your support is greatly appreciated to keep this project 100% free, open-source, and constantly evolving!


🌟 Features #

  • 🎑 Interactive 12-Sector Wheel: Tap the outer ring for Major keys or the middle ring for Relative Minor keys.
  • πŸ”„ Dynamic 12:00 Rotation: Smoothly centers the selected key at the top of the wheel.
  • 🎨 Material 3 Theme Adaptive: Inherits application Light & Dark theme colors out of the box using .withValues(alpha: ...).
  • 🎡 Diatonic Scale Breakdown: Shows Major and Natural Minor scale formulas (2-2-1-2-2-2-1 and 2-1-2-2-1-2-2), note degree numbers (1-8), and chord variations.
  • 🌈 Degree Highlight Colors: Distinct semantic highlights for Tonic ($I / i$), Subdominant ($IV / iv$), Dominant ($V / v$), and Diminished ($vii^\circ / ii^\circ$).
  • 🏷️ Customizable Theme & Logo: Set custom brand text (e.g. 'NyK') or degree colors via CircleOfFifthsTheme.
  • πŸ“± Modal BottomSheet Ready: Display as a bottom sheet with interactive wheel and summary grid modes in a single function call.

πŸš€ Getting Started #

Add the dependency to your pubspec.yaml:

dependencies:
  flutter_circle_of_fifths: ^1.1.1

Run:

flutter pub get

πŸ’» Usage #

1. Show as a Modal BottomSheet (One Line) #

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

void openCircleOfFifths(BuildContext context) {
  CircleOfFifthsSheet.show(
    context,
    customTheme: const CircleOfFifthsTheme(
      centerLabel: 'NyK',
    ),
  );
}

2. Standalone Interactive Wheel Widget #

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

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

  @override
  State<MyPage> createState() => _MyPageState();
}

class _MyPageState extends State<MyPage> {
  int _selectedIndex = 0; // 0 = 'C'
  bool _isMinorMode = false;

  @override
  Widget build(BuildContext context) {
    final selectedModel = CircleOfFifthsModel.defaultKeys[_selectedIndex];

    return Scaffold(
      appBar: AppBar(title: const Text('Circle of Fifths')),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(16),
        child: Column(
          children: [
            CircleOfFifthsWheelWidget(
              selectedIndex: _selectedIndex,
              isMinorMode: _isMinorMode,
              onKeySelected: (index, isMinor) {
                setState(() {
                  _selectedIndex = index;
                  _isMinorMode = isMinor;
                });
              },
            ),
            const SizedBox(height: 20),
            ScaleDetailCard(
              model: selectedModel,
              isMinorMode: _isMinorMode,
            ),
          ],
        ),
      ),
    );
  }
}

🎨 Custom Theme Configuration #

Customize colors and brand center text easily:

CircleOfFifthsTheme(
  centerLabel: 'NyK',
  tonicColor: Colors.amber,
  subdominantDominantColor: Colors.deepOrange,
  minorChordsColor: Colors.teal,
  diminishedColor: Colors.indigo,
)

πŸ“‚ Project Structure #

lib/
β”œβ”€β”€ flutter_circle_of_fifths.dart       # Main package exports
└── src/
    β”œβ”€β”€ models/
    β”‚   └── circle_of_fifths_model.dart # Music theory model & 12 key definitions
    β”œβ”€β”€ theme/
    β”‚   └── circle_of_fifths_theme.dart # Color palette & label configuration
    └── widgets/
        β”œβ”€β”€ circle_of_fifths_sheet.dart # Draggable Modal Sheet with Wheel & Summary Grid
        β”œβ”€β”€ circle_of_fifths_wheel.dart # Interactive Canvas Wheel widget
        └── scale_detail_card.dart     # Diatonic scale breakdown card

πŸ“„ License #

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

0
likes
0
points
1.49k
downloads

Publisher

unverified uploader

Weekly Downloads

An interactive, customizable, Material 3 Circle of Fifths widget library for Flutter with support for Major and Minor keys, diatonic scale breakdown, and theme adaptation.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

paypal.me
www.patreon.com

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_circle_of_fifths