ripple_container 0.0.1 ripple_container: ^0.0.1 copied to clipboard
RippleContainer provides a versatile Box widget that can apply a ripple effect in Flutter applications. This package offers various customization options to help you create attractive and dynamic UIs. [...]
import 'package:flutter/material.dart';
import 'package:ripple_container/ripple_container.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: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RippleContainer(
width: 200,
height: 100,
backgroundColor: Colors.blueAccent,
child: Text('Hi'),
),
Container(
width: 200,
height: 100,
child: Text('Hi'),
)
],
),
),
);
}
}