Code:
import 'package:animated_background/animated_background.dart';
import 'package:animation_playstore/constant.dart';
import 'package:flutter/material.dart';
class Background7 extends StatefulWidget {
@override
_Background7State createState() => _Background7State();
}
class _Background7State extends State<Background7>
with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return AnimatedBackground(
behaviour: RandomParticleBehaviour(
options: ParticleOptions(
image: Image.asset("assets/logo.png"),
baseColor: dColor,
spawnOpacity: 0.0,
opacityChangeRate: 0.25,
minOpacity: 0.1,
maxOpacity: 0.4,
spawnMinSpeed: 60.0,
spawnMaxSpeed: 90.0,
spawnMinRadius: 15.0,
spawnMaxRadius: 25.0,
particleCount: 25,
),
),
vsync: this,
child: Center(child: Text('Flutter Animation Zone')),
);
}
}
0 Comments