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

outdated

Customizable progress dialog package for Flutter.(Captures the progress value)

example/lib/main.dart

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

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

class MyExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Center(
          child: Text(
            'Sn Progress Example',
            style: TextStyle(
              fontWeight: FontWeight.bold,
            ),
          ),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.download_sharp),
        onPressed: () async {
          /// Create progress dialog
          ProgressDialog pd = ProgressDialog(context: context);

          /// Set options
          pd.show(max: 100, msg: 'File Downloading...');

          for (int i = 0; i <= 100; i++) {
            /// You don't need to update state, just pass the value.
            pd.update(i);
            i++;
            await Future.delayed(Duration(milliseconds: 100));
          }
        },
      ),
    );
  }
}
260
likes
0
pub points
97%
popularity

Publisher

verified publisheraemreesen.com

Customizable progress dialog package for Flutter.(Captures the progress value)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sn_progress_dialog