-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_loading.dart
46 lines (40 loc) · 1.14 KB
/
custom_loading.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import 'package:flutter/material.dart';
import 'package:futara/controller/constants/app_images.dart';
import 'package:futara/controller/constants/change_lang.dart';
import 'package:futara/controller/resources/theme/colors_manager.dart';
import 'package:im_animations/im_animations.dart';
class AppLoading extends StatelessWidget {
const AppLoading({super.key});
@override
Widget build(BuildContext context) {
return const Center(
child: CircularProgressIndicator(color: AppColors.primaryColor),
);
}
}
class AnimatedLoading extends StatelessWidget {
final String? img;
const AnimatedLoading({super.key, this.img});
@override
Widget build(BuildContext context) {
return Center(
child: HeartBeat(
child: Image.asset(
img ?? (langPathKey == 'ar' ? AppImages.logo : AppImages.logoEn),
scale: 1,
),
),
);
}
}
class OverlayLoading extends StatelessWidget {
final double? height;
const OverlayLoading({super.key, this.height});
@override
Widget build(BuildContext context) {
return SizedBox(
height: height ?? 400,
child: const AppLoading(),
);
}
}