animated_splash_container 0.0.3
animated_splash_container: ^0.0.3 copied to clipboard
A Flutter widget that creates animated splash screens with customizable colors
import 'package:animated_splash_container/animated_splash_container.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Animated Container Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const SplashScreen(),
);
}
}
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
Widget build(BuildContext context) {
return const AnimatedSplashContainer(
color1: Colors.red,
color2: Colors.yellow,
containerType: ContainerType.circle);
}
}