Fix connection info ui

This commit is contained in:
problematicconsumer
2024-02-11 00:29:09 +03:30
parent 804d2ab19f
commit 0da4eced0a
5 changed files with 202 additions and 124 deletions

View File

@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:hiddify/core/widget/skeleton_widget.dart';
class ShimmerSkeleton extends StatelessWidget {
const ShimmerSkeleton({
this.width,
this.height,
this.widthFactor,
this.heightFactor,
this.color,
this.duration = const Duration(seconds: 1),
super.key,
});
final double? width;
final double? height;
final double? widthFactor;
final double? heightFactor;
final Color? color;
final Duration duration;
@override
Widget build(BuildContext context) {
return Skeleton(
width: width,
height: height,
widthFactor: widthFactor,
heightFactor: heightFactor,
)
.animate(
onPlay: (controller) => controller.loop(),
)
.shimmer(
duration: duration,
angle: 45,
color: color ?? Theme.of(context).colorScheme.secondary,
);
}
}