Files
frosty/lib/widgets/loading_indicator.dart
Tommy Chow 3a5f883b1f Overhaul alert and error messages (#90)
- Added new `AlertMessage` widget that displays an alert/error message
with an icon.
- Added some new error
messages for followed, search, chatters, etc.
- Changed various error messages to make them all consistent in style
2022-06-28 10:32:16 -04:00

30 lines
754 B
Dart

import 'package:flutter/material.dart';
class LoadingIndicator extends StatelessWidget {
final String? subtitle;
final double spacing;
const LoadingIndicator({Key? key, this.subtitle, this.spacing = 10.0}) : super(key: key);
@override
Widget build(BuildContext context) {
if (subtitle == null) {
return const Center(child: CircularProgressIndicator.adaptive());
}
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const CircularProgressIndicator.adaptive(),
SizedBox(height: spacing),
Text(
subtitle!,
style: const TextStyle(
fontWeight: FontWeight.w500,
color: Colors.grey,
),
),
],
);
}
}