SHARE
TWEET

Untitled

a guest Apr 26th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'dart:ui';
  2. import 'package:flutter/material.dart';
  3.  
  4. void main() {
  5.   runApp(new MaterialApp(home: new FrostedDemo()));
  6. }
  7.  
  8. class FrostedDemo extends StatelessWidget {
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return new Scaffold(
  12.       body: new Stack(
  13.         children: <Widget>[
  14.           new ConstrainedBox(
  15.             constraints: const BoxConstraints.expand(),
  16.             child: new FlutterLogo()
  17.           ),
  18.           new Center(
  19.             child: new ClipRect(
  20.               child: new BackdropFilter(
  21.                 filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
  22.                 child: new Container(
  23.                   width: 200.0,
  24.                   height: 200.0,
  25.                   decoration: new BoxDecoration(
  26.                     color: Colors.grey.shade200.withOpacity(0.5)
  27.                   ),
  28.                   child: new Center(
  29.                     child: new Text(
  30.                       'Frosted',
  31.                       style: Theme.of(context).textTheme.display3
  32.                     ),
  33.                   ),
  34.                 ),
  35.               ),
  36.             ),
  37.           ),
  38.         ],
  39.       ),
  40.     );
  41.   }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top