import 'dart:async'; import 'package:flutter/material.dart'; class LoadingScreen5 extends StatefulWidget { const LoadingScreen5({super.key}); @override State createState() => _LoadingScreen5State(); } class _LoadingScreen5State extends State with TickerProviderStateMixin { late final AnimationController _controller=AnimationController( vsync: this, duration: const Duration(seconds: 1), )..repeat(); @override Widget build(BuildContext context) { Size scrSize=MediaQuery.of(context).size; return Scaffold( body: SafeArea( child: ListView.builder( itemCount: 8, itemBuilder: (context,index){ return Stack( children: [ Container( alignment: Alignment.centerLeft, height: 120, child: Padding( padding: const EdgeInsets.only(top: 15.0,left: 15), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: 100,width: 100,color: Colors.grey.withOpacity(.5),), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( margin: EdgeInsets.only(left: 10,top: 5), height: 10,width: scrSize.width*.6,color: Colors.grey.withOpacity(.5),), Container( margin: EdgeInsets.only(left: 10,top: 10), height: 10,width: scrSize.width*.4,color: Colors.grey.withOpacity(.5),), Container( margin: EdgeInsets.only(left: 10,top: 10), height: 10,width: scrSize.width*.5,color: Colors.grey.withOpacity(.5),), Container( margin: EdgeInsets.only(left: 10,top: 10), height: 10,width: scrSize.width*.3,color: Colors.grey.withOpacity(.5),), Container( margin: EdgeInsets.only(left: 10,top: 10), height: 10,width: scrSize.width*.35,color: Colors.grey.withOpacity(.5),), ], ), ], ), ), ), AnimatedBuilder( animation: _controller, child: Container( width: 20,height:100 , transform: Matrix4.skew(-.3, 0), decoration: BoxDecoration( color: Colors.white.withOpacity(.4), boxShadow: [BoxShadow( color: Colors.white.withOpacity(.7), spreadRadius: 20, blurRadius: 20 )] ), ), builder: (context,child){ return Transform.translate( offset: Offset(_controller.value*600, 0), child: child, ); }, ), ], ); }) ), ); } }