Home > Blockchain >  Is it possible to make progress bar as indicator instead of dot indicator with image slider carousel
Is it possible to make progress bar as indicator instead of dot indicator with image slider carousel

Time:10-25

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?

tap button for linear progress indicator progress

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')),
          ],
        ),
      ),
    );
  }
}
  • Related