You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
87 lines
1.9 KiB
2 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class LoadingPageWidget extends StatelessWidget {
|
||
|
final String title;
|
||
|
final Color color;
|
||
|
final Size size;
|
||
|
final double fontSize;
|
||
|
final double circleSize;
|
||
|
const LoadingPageWidget({
|
||
|
Key? key,
|
||
|
required this.size,
|
||
|
required this.title,
|
||
|
this.color = Colors.blue,
|
||
|
required this.circleSize,
|
||
|
required this.fontSize,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Material(
|
||
|
child: Container(
|
||
|
height: size.height,
|
||
|
width: size.width,
|
||
|
color: Colors.white,
|
||
|
child: Align(
|
||
|
alignment: Alignment.center,
|
||
|
child: Column(children: [
|
||
|
SizedBox(
|
||
|
width: 32,
|
||
|
height: 32,
|
||
|
child: CircularProgressIndicator(color: color),
|
||
|
),
|
||
|
const SizedBox(height: 10),
|
||
|
Text(
|
||
|
title,
|
||
|
style: TextStyle(fontSize: fontSize, color: color),
|
||
|
),
|
||
|
]),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class FxLoadingWidget extends StatelessWidget {
|
||
|
final String title;
|
||
|
final Color color;
|
||
|
final double size;
|
||
|
final double fontSize;
|
||
|
const FxLoadingWidget({
|
||
|
Key? key,
|
||
|
required this.title,
|
||
|
this.color = Colors.blue,
|
||
|
this.fontSize = 16.0,
|
||
|
this.size = 48.0,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Material(
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
mainAxisSize: MainAxisSize.max,
|
||
|
children: [
|
||
|
SizedBox(
|
||
|
width: size,
|
||
|
height: size,
|
||
|
child: CircularProgressIndicator(
|
||
|
color: color,
|
||
|
),
|
||
|
),
|
||
|
const SizedBox(
|
||
|
height: 10,
|
||
|
),
|
||
|
Text(
|
||
|
title,
|
||
|
style: TextStyle(
|
||
|
fontSize: fontSize,
|
||
|
color: color,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|