Created
May 7, 2018 21:34
-
-
Save rahichesoft/8b240ce5ccc83c3060f5134cacdaf33c to your computer and use it in GitHub Desktop.
Revisions
-
rahichesoft created this gist
May 7, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ import 'package:flutter/material.dart'; import 'dart:ui' as ui; void main() => runApp(new MaterialApp( home: new MyApp(), )); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new Scaffold( body: new Stack( overflow: Overflow.visible, children: <Widget>[ new Container( decoration: new BoxDecoration( image: new DecorationImage( image: new ExactAssetImage('assets/pics/newbook.jpg'), fit: BoxFit.cover, ), ), child: new BackdropFilter( filter: new ui.ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0), child: new Container( decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)), ), ), ), new Positioned( top: 150.0, left: 60.0, child: new ClipPath( clipper: new customclipper(), child: new Container( height: 350.0, width: 300.0, color: Colors.white70, ), ), ), ], ), ); } } class customclipper extends CustomClipper<Path> { @override Path getClip(Size size) { var path = new Path(); path.lineTo(0.0, size.height - 20); path.quadraticBezierTo(0.0, size.height, 20.0, size.height); path.lineTo(size.width - 20.0, size.height); path.quadraticBezierTo(size.width, size.height, size.width, size.height - 20); path.lineTo(size.width, 50.0); path.quadraticBezierTo(size.width, 30.0, size.width - 20.0, 30.0); path.lineTo(20.0, 5.0); path.quadraticBezierTo(0.0, 0.0, 0.0, 20.0); return path; } @override bool shouldReclip(CustomClipper<Path> oldClipper) => false; }