2022-09-02 19:12:16 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2023-06-15 11:57:39 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
|
2022-09-02 19:12:16 +02:00
|
|
|
import 'package:skeletons/skeletons.dart';
|
|
|
|
|
|
|
|
class AppSkeletonLoader extends StatelessWidget {
|
|
|
|
const AppSkeletonLoader({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final screenWidth = MediaQuery.of(context).size.width;
|
2023-06-15 11:57:39 +02:00
|
|
|
return ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: 7,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
itemBuilder: (context, index) => Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12.0),
|
|
|
|
child: CustomCard(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
SkeletonAvatar(
|
|
|
|
style: SkeletonAvatarStyle(
|
|
|
|
width: screenWidth * 0.10,
|
|
|
|
height: screenWidth * 0.10,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
2022-09-02 19:12:16 +02:00
|
|
|
),
|
2023-06-15 11:57:39 +02:00
|
|
|
),
|
|
|
|
const SizedBox(width: 16),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
width: screenWidth * 0.4,
|
|
|
|
child: SkeletonLine(
|
|
|
|
style: SkeletonLineStyle(
|
|
|
|
height: 20,
|
|
|
|
width: screenWidth * 0.4,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
2022-09-02 19:12:16 +02:00
|
|
|
),
|
|
|
|
),
|
2023-06-15 11:57:39 +02:00
|
|
|
),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
SizedBox(
|
|
|
|
width: screenWidth * 0.6,
|
|
|
|
child: SkeletonLine(
|
|
|
|
style: SkeletonLineStyle(
|
|
|
|
height: 15,
|
|
|
|
width: screenWidth * 0.6,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
2022-09-02 19:12:16 +02:00
|
|
|
),
|
|
|
|
),
|
2023-06-15 11:57:39 +02:00
|
|
|
),
|
|
|
|
const SizedBox(height: 5),
|
|
|
|
SizedBox(
|
|
|
|
width: screenWidth * 0.5,
|
|
|
|
child: SkeletonLine(
|
|
|
|
style: SkeletonLineStyle(
|
|
|
|
height: 15,
|
|
|
|
width: screenWidth * 0.5,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
2022-09-02 19:12:16 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|