flutter_clip_shadow 1.0.0 copy "flutter_clip_shadow: ^1.0.0" to clipboard
flutter_clip_shadow: ^1.0.0 copied to clipboard

A shadow cast by a clipped box. Support all BoxShadow class properties!

example/lib/main.dart

import 'package:flutter_clip_shadow/flutter_clip_shadow.dart';
import './clipper.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text('example'),
        ),
        body: Container(
          width: 375.0,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              SizedBox(height: 30.0),
              Container(
                height: 100.0,
                decoration: BoxDecoration(color: Colors.blueAccent, boxShadow: [
                  BoxShadow(
                    offset: Offset(0.0, 0.0),
                    blurRadius: 10.0,
                    spreadRadius: 10.0,
                    color: Color.fromRGBO(196, 196, 196, 1),
                  )
                ]),
                child: Text(
                  'normal box shadow',
                  style: TextStyle(fontSize: 30.0),
                ),
              ),
              SizedBox(height: 30.0),
              ClipShadow(
                clipper: TicketClipper(20.0),
                boxShadow: [
                  BoxShadow(
                    offset: Offset(0.0, 0.0),
                    blurRadius: 10.0,
                    spreadRadius: 10.0,
                    color: Color.fromRGBO(196, 196, 196, 1),
                  )
                ],
                child: Container(
                  color: Colors.redAccent,
                  height: 100.0,
                  child: Text(
                    'clip shadow example',
                    style: TextStyle(
                      fontSize: 30.0,
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
160
pub points
70%
popularity

Publisher

verified publisherfreya-hidroponia.ga

A shadow cast by a clipped box. Support all BoxShadow class properties!

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_clip_shadow