flutter_piano_pro 0.1.3 copy "flutter_piano_pro: ^0.1.3" to clipboard
flutter_piano_pro: ^0.1.3 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.

Flutter Piano Pro Example

Installation #

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

dependencies:
  flutter_piano_pro: ^0.1.3

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.

Contact #

If you have any questions or suggestions, feel free to contact the package maintainer, Melih Hakan Pektas, via email or through GitHub.

Melih Hakan Pektas

Thank you for contributing to flutter_piano_pro!

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