When dragging the thumb of the progress bar, the progress section of the progress bar is not redrawn.
This results in the thumb 'disconnecting' from the progress part.
import 'package:flutter/material.dart';
// copied from the sources, didn't add it as a dependency
import 'package:myapp/audio_video_progress_bar.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
Duration _progress = const Duration(seconds: 5);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ProgressBar(
total: const Duration(seconds: 30),
progress: _progress,
onSeek: (value) {
setState(() {
_progress = value;
});
},
),
),
);
}
}