scaffold_gradient_background 1.0.3+1 copy "scaffold_gradient_background: ^1.0.3+1" to clipboard
scaffold_gradient_background: ^1.0.3+1 copied to clipboard

A widget that works like a scaffold, except that you can set a gradient as background.

example/main.dart

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


class LinearGradientScaffold extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GradientScaffold(
      gradient: LinearGradient(
        begin: Alignment.bottomLeft,
        end: Alignment.topRight,
        colors: [
          Color(0xFF8EC5FC),
          Color(0xFFE0C3FC),
        ],
      ),
      appBar: AppBar(
        title: Text('Linear Gradient Example'),
      ),
      body: Center(
        child: Text(
          'Hello ^^',
          style: TextStyle(
            color: Colors.white,
            fontSize: 30,
          ),
        ),
      ),
    );
  }
}

class RadialGradientScaffold extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GradientScaffold(
      gradient: RadialGradient(
        colors: [
          Color(0xFF8EC5FC),
          Color(0xFFE0C3FC),
        ],
      ),
      appBar: AppBar(
        title: Text('Linear Gradient Example'),
      ),
      body: Center(
        child: Text(
          'Hello ^^',
          style: TextStyle(
            color: Colors.white,
            fontSize: 30,
          ),
        ),
      ),
    );
  }
}

class SweepGradientScaffold extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GradientScaffold(
      gradient: SweepGradient(
        colors: [
          Color(0xFF8EC5FC),
          Color(0xFFE0C3FC),
        ],
      ),
      appBar: AppBar(
        title: Text('Linear Gradient Example'),
      ),
      body: Center(
        child: Text(
          'Hello ^^',
          style: TextStyle(
            color: Colors.white,
            fontSize: 30,
          ),
        ),
      ),
    );
  }
}
61
likes
160
pub points
87%
popularity

Publisher

unverified uploader

A widget that works like a scaffold, except that you can set a gradient as background.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on scaffold_gradient_background