Skip to content

Instantly share code, notes, and snippets.

@pologonzalo
Created September 12, 2018 16:17
Show Gist options
  • Save pologonzalo/7328194151209355db47b38860f48aa6 to your computer and use it in GitHub Desktop.
Save pologonzalo/7328194151209355db47b38860f48aa6 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'dart:ui';
class SplashButton extends StatelessWidget {
// Variables
final Function onClick;
final String text;
SplashButton({
this.onClick,
this.text,
});
// Build
@override
Widget build(BuildContext context) {
return new GestureDetector(
onTap: onClick,
child: new ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
child: new BackdropFilter(
filter: new ImageFilter.blur(sigmaX: 2.0, sigmaY: 2.0),
child: new Container(
width: 150.0,
height: 50.0,
decoration: new BoxDecoration(
color: Colors.black.withOpacity(0.2),
),
child: new Center(
child: Text(
text,
style: TextStyle(color: Colors.white),
),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment