Created
October 13, 2019 04:10
-
-
Save bsutton/7f6d7c009d73e21b1df109e6ff4b4523 to your computer and use it in GitHub Desktop.
This file contains 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 characters
import 'package:flutter/material.dart'; | |
class GrayedOut extends StatelessWidget { | |
final Widget child; | |
final bool grayedOut; | |
GrayedOut({@required this.child, this.grayedOut = true}); | |
@override | |
Widget build(BuildContext context) { | |
return grayedOut ? Opacity(opacity: 0.3, child: child) : child; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment