crisp_notation 0.4.4 copy "crisp_notation: ^0.4.4" to clipboard
crisp_notation: ^0.4.4 copied to clipboard

Music notation rendering for Flutter with first-class interactivity - staves, notes, chords, hit-testing, selection and drag. Bundles the Bravura SMuFL font (OFL).

example/lib/main.dart

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

import 'gallery.dart';
import 'interactive.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Bravura.load();
  runApp(const CrispNotationExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'crisp_notation demo',
      theme: ThemeData(colorSchemeSeed: const Color(0xFF1E88E5)),
      home: const HomeScreen(),
    );
  }
}

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

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  var _index = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('crisp_notation')),
      body: switch (_index) {
        0 => const GalleryScreen(),
        _ => const InteractiveScreen(),
      },
      bottomNavigationBar: NavigationBar(
        selectedIndex: _index,
        onDestinationSelected: (i) => setState(() => _index = i),
        destinations: const [
          NavigationDestination(
            icon: Icon(Icons.grid_view),
            label: 'Gallery',
          ),
          NavigationDestination(
            icon: Icon(Icons.touch_app),
            label: 'Interactive',
          ),
        ],
      ),
    );
  }
}
0
likes
160
points
254
downloads

Documentation

API reference

Publisher

verified publishercrispstro.be

Weekly Downloads

Music notation rendering for Flutter with first-class interactivity - staves, notes, chords, hit-testing, selection and drag. Bundles the Bravura SMuFL font (OFL).

Repository (GitHub)
View/report issues

Topics

#music #music-notation #sheet-music #smufl

License

MIT (license)

Dependencies

crisp_notation_core, flutter

More

Packages that depend on crisp_notation