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

A new Flutter package which helps develop to user container with gradient.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:gradient_with_container/gradient_with_container.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {



  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Container with gradient',style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18),
            ),
            Padding(
              padding: const EdgeInsets.only(top:15.0),
              child: const GradientContainerScreen(
                title: "Title",
                subtitle: "Subtitle",
                color1: Colors.deepOrange,
                color2:Colors.orange ,
              ),
            )

          ],
        ),
      ),
     // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
1
likes
140
points
55
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package which helps develop to user container with gradient.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on gradient_with_container