glorylab / wave

A Flutter package for displaying waves.
https://wave.glorylab.xyz
MIT License
1.11k stars 96 forks source link

How to make Wave Widget Take full Height of Screen , i tried all ways, its Starting from around bottom Center of Screen ? i am using to this in a timer it will animate to top to bottom with timer running out ! #32

Open kafil27 opened 3 years ago

kafil27 commented 3 years ago

here is the Code -

_buildCard({ required Config config, Color backgroundColor = Colors.transparent, DecorationImage? backgroundImage, double height = double.infinity, }) { return Expanded( child: WaveWidget( heightPercentange: double.infinity, config: config, backgroundColor: backgroundColor, backgroundImage: backgroundImage, size: Size( double.infinity, controller.value * MediaQuery.of(context).size.height, ), waveAmplitude: 0, ), ); }

//////// here is the Scaffold //////////////////

Widget build(BuildContext context) { ThemeData themeData = Theme.of(context); return Scaffold( backgroundColor: Colors.black26, floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, body: AnimatedBuilder( animation: controller, builder: (context, child) { return Stack( fit: StackFit.expand, children: [ Align( alignment: Alignment.bottomCenter, child: _buildCard( height: double.maxFinite, backgroundColor: Colors.transparent, config: CustomConfig( gradients: [ [Colors.red, Color(0xEEF44336)], [Colors.pinkAccent, Color(0x77E57373)], [Colors.deepPurple, Color(0x66FF9800)], [Colors.deepPurpleAccent, Color(0x55FFEB3B)] ], durations: [35000, 19440, 10800, 6000], heightPercentages: [0.20, 0.23, 0.25, 0.30], gradientBegin: Alignment.bottomLeft, gradientEnd: Alignment.topRight, ), ), // Container( // color: Colors.deepPurpleAccent, // height: // controller.value * MediaQuery.of(context).size.height, // ), ),

imwolfmoon commented 2 years ago

same problem

imwolfmoon commented 2 years ago

@kafil27 Did you solve this issues ?