Add beautiful containers to your Flutter app

Aditya Thakur
2 min readJul 26, 2021
fancy_containers: ^0.0.4

Fancy Containers package lets you add a beautiful gradient container to your Flutter app.

These can be used to:

  • Share announcements,
  • Showcase information,
  • Highlight features,

Installation

  1. Add the latest version of the package to your pubspec.yaml (and rundart pub get):
dependencies:
fancy_containers: ^0.0.4

2. Import the package and use it in your Flutter App.

import 'package:fancy_containers/fancy_containers.dart';

Example

There are a number of properties that you can modify:

  • height
  • width
  • title
  • titlecolor
  • subtitle
  • subtitlecolor
  • gradient (color1 and color2)
  • onTap (for function callback)
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: FancyContainer(
onTap: (){
print("Hello World");
},
color1: Colors.lightGreenAccent,
color2: Colors.lightBlue,
title: 'Hello World',
textcolor: Colors.white,
subtitle: 'This is a new package',
subtitlecolor: Colors.white,
),
),
);

Output

FancyContainers Example

Find the package on pub.dev here.

Hi 👋 I am Aditya Thakur, a Flutter developer and YouTuber with 4K subscribers. I make videos on Flutter and Python. I also have an around 300 member community of devs on Discord. Join me on my journey!

--

--