ringtone 0.0.2 copy "ringtone: ^0.0.2" to clipboard
ringtone: ^0.0.2 copied to clipboard

Ringtone plugin.

example/lib/main.dart

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

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin ringtone app'),
        ),
        body: new Center(
          child: new Text('Ringtone'),
        ),
        persistentFooterButtons: <Widget>[
          new FlatButton(
            onPressed: () {
              Ringtone.stop();
            },
            child: const Text('Stop')
          ),
          new FlatButton(
            onPressed: () {
              Ringtone.play();
            },
            child: const Text('Play')
          ),
        ],
      ),
    );
  }
}
2
likes
30
pub points
50%
popularity

Publisher

unverified uploader

Ringtone plugin.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ringtone