sa_progress_bar 0.0.3 copy "sa_progress_bar: ^0.0.3" to clipboard
sa_progress_bar: ^0.0.3 copied to clipboard

outdated

A progress bar controller

example/lib/main.dart

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

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

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

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  double progress = 0.0;
  final ProgressController _controller = ProgressController();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Material(
        child: Container(
          height: 45,
          padding: EdgeInsets.symmetric(horizontal: 45),
          child: SaProgressBar(
            controller: _controller,
            onMoved: (value) {
              // progress on moved callback
              _controller.moveTo(value);
              //print('onMove: $value');
            },
            onTap: (value) {
              // progress on tap callback
              _controller.moveTo(value);
              print('onTap: $value');
            },
          ),
        ),
      ),
    );
  }
}
2
likes
0
pub points
48%
popularity

Publisher

unverified uploader

A progress bar controller

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sa_progress_bar