SimpleCloudNotifier/flutter/lib/components/layout/app_bar_progress_indicator.dart

20 lines
509 B
Dart
Raw Permalink Normal View History

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;
@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
}
}
}