simple_ripple_animation 0.1.1
simple_ripple_animation: ^0.1.1 copied to clipboard
A highly customizable Flutter ripple and pulse animation widget for creating beautiful glowing waves, radar effects, and pulsing buttons across all platforms.
import 'package:example/demo.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
/// Main material app of the demo
class MyApp extends StatefulWidget {
/// Initialize the material app
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
ThemeMode _themeMode = ThemeMode.light;
void _toggleTheme() {
setState(() {
_themeMode =
_themeMode == ThemeMode.dark ? ThemeMode.light : ThemeMode.dark;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Simple Ripple Animation Demo & Playground',
debugShowCheckedModeBanner: false,
themeMode: _themeMode,
theme: ThemeData(
useMaterial3: true,
brightness: Brightness.light,
colorSchemeSeed: const Color(0xFF8B5CF6),
scaffoldBackgroundColor: const Color(0xFFF8FAFC),
cardColor: Colors.white,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
foregroundColor: Color(0xFF0F172A),
elevation: 0,
),
),
darkTheme: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: const Color(0xFF8B5CF6),
scaffoldBackgroundColor: const Color(0xFF0F172A),
cardColor: const Color(0xFF1E293B),
),
home: MyHomePage(
title: 'Simple Ripple Animation',
onToggleTheme: _toggleTheme,
isDarkMode: _themeMode == ThemeMode.dark,
),
);
}
}