Skip to content

Instantly share code, notes, and snippets.

@collinjackson
Created May 9, 2017 21:40
Show Gist options
  • Save collinjackson/321ee23b25e409d8747b623c97afa1d5 to your computer and use it in GitHub Desktop.
Save collinjackson/321ee23b25e409d8747b623c97afa1d5 to your computer and use it in GitHub Desktop.
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(home: new FrostedDemo()));
}
class FrostedDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Stack(
children: [
new Scaffold(
body: new ConstrainedBox(
constraints: const BoxConstraints.expand(),
child: new FlutterLogo(),
),
),
new BackdropFilter(
filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.grey[200].withOpacity(0.1)),
),
),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment