liquid_progress_indicator_v2 0.5.0 liquid_progress_indicator_v2: ^0.5.0 copied to clipboard
Based on https://pub.dev/packages/liquid_progress_indicator to fix a issue after Flutter 3.10 A progress indicator with water-like effect in Flutter. Works similarly to Flutters own ProgressIndicator.
import 'package:flutter/material.dart';
import 'liquid_circular_progress_indicator_page.dart';
import 'liquid_custom_progress_indicator_page.dart';
import 'liquid_linear_progress_indicator_page.dart';
void main() => runApp(MaterialApp(home: Example()));
class Example extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Liquid Progress Indicator Examples"),
),
body: Padding(
padding: const EdgeInsets.all(28.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
TextButton(
child: Text("Circular"),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(Colors.grey.shade300),
),
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => LiquidCircularProgressIndicatorPage(),
),
),
),
TextButton(
child: Text("Linear"),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(Colors.grey.shade300),
),
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => LiquidLinearProgressIndicatorPage(),
),
),
),
TextButton(
child: Text("Custom"),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(Colors.grey.shade300),
),
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => LiquidCustomProgressIndicatorPage(),
),
),
),
],
),
),
);
}
}