Is it possible to use a bar as an indicator instead of using a dot indicator with an image slider carousel flutter?.
Is it by using 2 containers in the stack widget? then how to animate it?
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
double progress = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const SizedBox(height: 45),
LinearProgressIndicator(
value: progress,
),
const SizedBox(height: 45),
OutlinedButton(
onPressed: () => setState(() => progress = 0.1),
child: const Text('Tap for progress')),
],
),
),
);
}
}