2024-06-13 17:00:08 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class AppBarProgressIndicator extends StatelessWidget implements PreferredSizeWidget {
|
2024-06-16 00:46:46 +02:00
|
|
|
AppBarProgressIndicator({required this.show});
|
|
|
|
|
|
|
|
final bool show;
|
|
|
|
|
2024-06-13 17:00:08 +02:00
|
|
|
@override
|
|
|
|
Size get preferredSize => Size(double.infinity, 1.0);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-06-16 00:46:46 +02:00
|
|
|
if (show) {
|
|
|
|
return LinearProgressIndicator(value: null);
|
|
|
|
} else {
|
|
|
|
return SizedBox.square(dimension: 4); // 4 height is the same as the LinearProgressIndicator
|
|
|
|
}
|
2024-06-13 17:00:08 +02:00
|
|
|
}
|
|
|
|
}
|