audio_slider 0.0.1 copy "audio_slider: ^0.0.1" to clipboard
audio_slider: ^0.0.1 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

import 'dart:async';
import 'dart:math';

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Timer? timer;
  List<double> valueData = <double>[];
  @override
  void initState() {
    super.initState();
    timer = Timer.periodic(const Duration(milliseconds: 400), (timer) {
      valueData.add(20+Random().nextInt(5).toDouble());
      setState(() {});
    });
  }

  @override
  void dispose() {
    super.dispose();
    timer?.cancel();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: CopyXiaoMiSliderWidget(
            datas: valueData,
            isPlayer: true,
            duration: const Duration(milliseconds: 333),
          ),
          //  child: SimpleWaveSliderAnimation(
          //   datas: valueData,
          //   isPlayer: true,
          //   duration: const Duration(milliseconds: 333),
          // ),
        ),
      ),
    );
  }
}
5
likes
75
pub points
59%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on audio_slider