Created
April 5, 2019 00:55
-
-
Save scottbaggett/99f2b79878a2310136c76b16a3927a85 to your computer and use it in GitHub Desktop.
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 characters
import 'package:flutter/material.dart'; | |
import 'package:mgm_resorts/ui/theme.dart'; | |
/// SEPARATOR WIDGET | |
/// Auxiliary widget used to separate other widgets. | |
class Separator extends StatelessWidget { | |
final Widget body; | |
Separator(this.body); | |
@override | |
Widget build(BuildContext context) { | |
return body; | |
} | |
/// Normal spacer | |
factory Separator.spacer({double height = 14, double width = 0}) { | |
return Separator(SizedBox(height: height, width: width)); | |
} | |
/// Card-only spacer | |
factory Separator.cardSpacer() { | |
return Separator(SizedBox(height: 8)); | |
} | |
/// It's a simple divider, you know | |
factory Separator.divider({double height = 28, double indent = 0}) { | |
return Separator(Divider(height: height, indent: indent, color: divider)); | |
} | |
/// Empty widget | |
factory Separator.none() { | |
return Separator(SizedBox()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment