custom_snowfall_effect 0.1.5
custom_snowfall_effect: ^0.1.5 copied to clipboard
A Flutter package that creates a beautiful snowfall effect with customizable flake size, and color and widgets.
example/example.dart
import 'package:flutter/material.dart';
import 'package:custom_snowfall_effect/custom_snowfall.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Stack(
children: [
Snowfall(
numberOfFlakes: 150,
minSize: 2.0,
maxSize: 6.0,
minSpeed: 1.0,
maxSpeed: 3.0,
color: Colors.blueAccent,
//if needed custom widgets
snowflakeWidgets: [Text("❄️", style: TextStyle(fontSize: 30))],
),
Center(
child: Text(
"Let it snow!",
style: TextStyle(
fontSize: 24,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
);
}
}