mirror of
https://github.com/tommyxchow/frosty.git
synced 2025-08-06 00:41:07 +08:00

- 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
30 lines
754 B
Dart
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,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|