colorful_progress_indicators 1.0.2 colorful_progress_indicators: ^1.0.2 copied to clipboard
A package that provides user defined colorful progress indicators.
import 'package:colorful_progress_indicators/colorful_progress_indicators.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('App Bar'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
ColorfulCircularProgressIndicator(
colors: [
Colors.red,
Colors.green,
Colors.blue,
Colors.yellow,
Colors.purple,
Colors.orange,
],
duration: Duration(milliseconds: 500),
initialColor: Colors.red,
),
SizedBox(height: 20),
ColorfulLinearProgressIndicator(
colors: [
Colors.red,
Colors.green,
Colors.blue,
Colors.yellow,
Colors.purple,
Colors.orange,
],
duration: Duration(milliseconds: 500),
initialColor: Colors.red,
),
],
),
),
);
}
}