Skip to content

Instantly share code, notes, and snippets.

@mhmzdev
Created June 25, 2020 03:07
Show Gist options
  • Save mhmzdev/74be31c15ecafe654e2899099ea85125 to your computer and use it in GitHub Desktop.
Save mhmzdev/74be31c15ecafe654e2899099ea85125 to your computer and use it in GitHub Desktop.
import 'package:al_quran/animations/entranceFader.dart';
import 'package:flutter/material.dart';
class Flare extends StatelessWidget {
final Offset offset;
final Color color;
final double top;
final double left;
final double right;
final double bottom;
final double height;
final double width;
final Duration flareDuration;
Flare(
{this.bottom,
this.height,
this.width,
this.top,
this.flareDuration,
this.color,
this.left,
this.right,
this.offset});
@override
Widget build(BuildContext context) {
return Positioned(
top: top,
left: left,
bottom: bottom,
right: right,
child: EntranceFader(
offset: offset,
duration: flareDuration,
delay: Duration(milliseconds: 100),
child: Container(
height: height,
width: width,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: RadialGradient(colors: [
color,
color.withAlpha(150),
color.withAlpha(100),
color.withAlpha(50),
color.withAlpha(5),
])),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment