Flutter Gradient Containers

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

Installation

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  flutter_gradient_containers: ^0.0.3
  1. Import the package and use it in your Flutter App.
import 'package:flutter_gradient_containers/flutter_gradient_containers.dart';

Example

There are a number of properties that you can modify:

  • height
  • width
  • title
  • subtitle
  • gradient (color1 and color2)

class GradientContainer extends StatelessWidget {  
  const GradientContainer({Key? key}) : super(key: key);  
  
  @override  
  Widget build(BuildContext context) {  
    return Scaffold(  
      body: Center(  
        child: const GradientContainer(  
          onTap:(){},
          title: 'Hello World',  
          color1: Colors.lightGreenAccent,  
          color2: Colors.lightBlue,  
          subtitle: 'This is a new package',  
        ),  
      ),  
    );  
  }  
}

Contributors


Nikunj Chitroda

New Goals