Add beautiful containers to your Flutter app

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

Add the latest version of the package to your …


This content originally appeared on DEV Community and was authored by Aditya Thakur

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

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

dependencies:
  fancy_containers: ^0.0.4
  1. 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 Output

Find the package on pub.dev here.


This content originally appeared on DEV Community and was authored by Aditya Thakur


Print Share Comment Cite Upload Translate Updates
APA

Aditya Thakur | Sciencx (2021-07-26T10:12:52+00:00) Add beautiful containers to your Flutter app. Retrieved from https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/

MLA
" » Add beautiful containers to your Flutter app." Aditya Thakur | Sciencx - Monday July 26, 2021, https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/
HARVARD
Aditya Thakur | Sciencx Monday July 26, 2021 » Add beautiful containers to your Flutter app., viewed ,<https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/>
VANCOUVER
Aditya Thakur | Sciencx - » Add beautiful containers to your Flutter app. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/
CHICAGO
" » Add beautiful containers to your Flutter app." Aditya Thakur | Sciencx - Accessed . https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/
IEEE
" » Add beautiful containers to your Flutter app." Aditya Thakur | Sciencx [Online]. Available: https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/. [Accessed: ]
rf:citation
» Add beautiful containers to your Flutter app | Aditya Thakur | Sciencx | https://www.scien.cx/2021/07/26/add-beautiful-containers-to-your-flutter-app/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.