containergrad 0.0.1

SDKflutter
Platformandroidioswindowslinuxmacosweb

Have you been turned into a newt? Would you like to be? This package can help. It has all of the newt-container functionality you have been looking for.

Good container with customization and liner gradiant.

Features

Colorfull widget container.

Getting started

Just add the package to pubspec.yaml

Usage

add in your pubspec

class _FancyContainerState extends State { @override Widget build(BuildContext context) { return GestureDetector( onTap: (){}, child: Container( width: widget.width ?? MediaQuery.of(context).size.width * 0.90, height: widget.height, decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(20.0)), gradient: LinearGradient(colors: [ widget.color1 ?? const Color(0xFFCB1841), widget.color2 ?? const Color(0xFF2604DE) ], begin: Alignment.topLeft, end: Alignment.bottomRight), boxShadow: const [ BoxShadow( color: Colors.grey, blurRadius: 12, offset: Offset(0, 6), ), ], ), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.all(5.0), child: Text( widget.title, style: widget.titleStyle ?? TextStyle( color: widget.textColor, fontSize: 20.0, fontWeight: FontWeight.bold, ), ), ), widget.subtitle != null ? Padding( padding: const EdgeInsets.all(5.0), child: Text( widget.subtitle ?? "", style: widget.subtitleStyle ?? TextStyle( color: widget.subtitleColor, fontSize: 15.0, ), ), ) : Container(), ], ), ), ); } }

Additional information

Compactible