12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import 'package:flutter/material.dart';
- import 'package:flyinsonolite/infrastructure/scale.dart';
- import 'package:flyinsonolite/infrastructure/storage.dart';
- class VideoLoadingWidget extends StatefulWidget {
- const VideoLoadingWidget({Key? key}) : super(key: key);
- @override
- VideoLoadingWidgetState createState() => VideoLoadingWidgetState();
- }
- class VideoLoadingWidgetState extends State<VideoLoadingWidget>
- with SingleTickerProviderStateMixin {
- late final AnimationController _controller = AnimationController(
- vsync: this,
- duration: const Duration(milliseconds: 1500),
- )..repeat();
- @override
- Widget build(BuildContext context) {
- return Center(
- child: RotationTransition(
- turns: Tween(begin: 0.0, end: 1.0).animate(_controller),
- child: SizedBox(
- width: 50.s,
- height: 50.s,
- child: CircularProgressIndicator(
- strokeWidth: 2.s,
- valueColor: AlwaysStoppedAnimation<Color>(
- Storage.currentTheme.videoLoadingColor,
- ),
- ),
- ),
- ),
- );
- }
- @override
- void dispose() {
- _controller.dispose();
- super.dispose();
- }
- }
|