inbuilt_container 0.0.2 copy "inbuilt_container: ^0.0.2" to clipboard
inbuilt_container: ^0.0.2 copied to clipboard

inbuilt_container flutter package.

Fancy Containers

Inbuilt container is a custom container which can be used in your Flutter app. Installation

Add the latest version of package to your pubspec.yaml (and rundart pub get):

dependencies: fancy_containers: ^0.0.2

Import the package and use it in your Flutter App.

import 'package:inbuilt_container/inbuilt_container.dart';

Example

There are a number of properties that you can modify:

height
width
background color
boarder radius
margin
padding
widget

Code

class _CustomContainerState extends State<CustomContainer> {
    @override
    Widget build(BuildContext context) {
        return Container(
            decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(widget.boarderRadius ?? 15),
                color: widget.bgColor ?? Colors.white,
                boxShadow: [
                    BoxShadow(
                        color: widget.bgBlurColor ?? Colors.greenAccent,
                        blurRadius: widget.boarderBlurRadius ?? 2)
                    ]),
            height: widget.height ?? MediaQuery.of(context).size.width/2,
            width: widget.width ?? MediaQuery.of(context).size.width,
            margin: EdgeInsets.all(widget.margin ?? 10),
            padding: EdgeInsets.all(widget.padding ?? 10), 
            child: widget.customWidget ?? Container(),
        );
    }
}

Alt text

2
likes
120
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

inbuilt_container flutter package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on inbuilt_container