square_progress_bar 1.0.2
square_progress_bar: ^1.0.2 copied to clipboard
A square progress bar that you can use easily, Just provide the progress percentage in a range from 0.0 to 1.0 and you are set to go.
import 'package:flutter/material.dart';
import 'package:square_progress_bar/square_progress_bar.dart';
const LinearGradient gradient = LinearGradient(
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: <Color>[Colors.red, Colors.amber],
tileMode: TileMode.repeated,
);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Square Progress Bar Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Container(
width: double.infinity,
height: double.infinity,
color: Colors.white,
child: Center(
child: SizedBox(
width: 100,
height: 100,
child: SquareProgressBar(
percentage: 0.7,
isAnimation: true,
gradientBarColor: const LinearGradient(
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: <Color>[Colors.red, Colors.amber],
tileMode: TileMode.repeated,
),
),
),
),
),
);
}
}