mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
a54ca799b9
* update rules of analysis_options.yaml. and solved all problems * refactor: fix remaining problems --------- Co-authored-by: Ushie <ushiekane@gmail.com>
66 lines
2.1 KiB
Dart
66 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
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;
|
|
return Skeleton(
|
|
isLoading: true,
|
|
skeleton: ListView.builder(
|
|
shrinkWrap: true,
|
|
itemCount: 7,
|
|
itemBuilder: (context, index) => Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 8.0),
|
|
child: SkeletonItem(
|
|
child: Row(
|
|
children: <Widget>[
|
|
SkeletonAvatar(
|
|
style: SkeletonAvatarStyle(
|
|
width: screenWidth * 0.15,
|
|
height: screenWidth * 0.15,
|
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
|
),
|
|
),
|
|
const SizedBox(width: 16),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
color: Colors.white,
|
|
height: 34,
|
|
width: screenWidth * 0.4,
|
|
child: SkeletonParagraph(
|
|
style: const SkeletonParagraphStyle(
|
|
lines: 1,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 12),
|
|
Container(
|
|
margin: const EdgeInsets.only(bottom: 4),
|
|
color: Colors.white,
|
|
height: 34,
|
|
width: screenWidth * 0.6,
|
|
child: SkeletonParagraph(
|
|
style: const SkeletonParagraphStyle(
|
|
lines: 1,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
child: const Center(
|
|
child: Text('Content'),
|
|
),
|
|
);
|
|
}
|
|
}
|