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

flutter_piano_pro is a Flutter package that provides a customizable piano widget.

Flutter Piano Pro #

pub package GitHub stars GitHub issues

A Flutter widget package to generate a piano with customizable options.

Example image of Flutter Piano Pro

Installation #

Add flutter_piano_pro as a dependency in your pubspec.yaml file:

dependencies:
  flutter_piano_pro: ^1.0.0

Usage #

To use the piano widget, import flutter_piano_pro and use the pianoWidget method:

import 'package:flutter_piano_pro/flutter_piano_pro.dart';

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Flutter Piano Pro Example'),
      ),
      body: Center(
        child: PianoPro.pianoWidget(
          buttonCount: 14,
          expandHorizontal: true,
          buttonHeight: 250,
          showNames: true,
          firstNote: NoteNames.noteDo,
        ),
      ),
    );
  }
}

Customization Options #

The pianoWidget method accepts the following parameters:

Parameter Type Default Description
buttonCount int Required Number of white keys to display
totalWidth double? null Total width of the piano. Defaults to maximum width available
expandHorizontal bool true Determines whether the piano should expand horizontally to fill available space
buttonHeight double 250 Height of the white keys
showNames bool true Determines whether the note names should be displayed
firstNote NoteNames NoteNames.noteDo The first note to display. Other options are NoteNames.noteRe, NoteNames.noteMi, NoteNames.noteFa, NoteNames.noteSol, NoteNames.noteLa, and NoteNames.noteSi

Contributions #

Contributions are welcome! Please feel free to submit a PR or open an issue.

License #

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

9
likes
0
pub points
68%
popularity

Publisher

verified publishermelihhakanpektas.com

flutter_piano_pro is a Flutter package that provides a customizable piano widget.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_piano_pro