Rain OutLine Containers
Rain OutLine container package lets you add a beautiful gradient container to your Flutter app.
Installation
- Add the latest version of package to your pubspec.yaml (and run
dart pub get
):
dependencies:
rainbow_outline_container: ^0.0.3
- Import the package and use it in your Flutter App.
import 'package:fancy_containers/rainbow_outline_container.dart';
Example
There are a number of properties that you can modify:
class RainBow extends StatelessWidget {
const RainBow({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 10),
//padding: const EdgeInsets.all(15),
decoration: const BoxDecoration(boxShadow: [
BoxShadow(
offset: Offset(-20, 20),
color: Colors.red,
blurRadius: 15,
spreadRadius: -10,
),
BoxShadow(
offset: Offset(-20, -20),
color: Colors.orange,
blurRadius: 15,
spreadRadius: -10,
),
BoxShadow(
offset: Offset(20, -20),
color: Colors.blue,
blurRadius: 15,
spreadRadius: -10,
),
BoxShadow(
offset: Offset(20, 20),
color: Colors.deepPurple,
blurRadius: 15,
spreadRadius: -10,
)
]),
child: Container(
width: 200,
height: 200,
color: Colors.white,
child: const Center(
child: Text(
"this title",
)),
));
}
}
|
|
Next Goals
-
x
Add onTap for functions.
Now, you can specify the onTap and specify a function.
-
x
Change font and color style for text.
Change color by specifying textcolor
and subtitlecolor
properties.
-
Add more containers to the package.