scaffold_gradient_background 1.0.2 copy "scaffold_gradient_background: ^1.0.2" to clipboard
scaffold_gradient_background: ^1.0.2 copied to clipboard

outdated

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,
          ),
        ),
      ),
    );
  }
}
58
likes
0
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

License

unknown (license)

Dependencies

flutter

More

Packages that depend on scaffold_gradient_background