Skip to content

Instantly share code, notes, and snippets.

@scottbaggett
Created April 5, 2019 00:55
Show Gist options
  • Save scottbaggett/99f2b79878a2310136c76b16a3927a85 to your computer and use it in GitHub Desktop.
Save scottbaggett/99f2b79878a2310136c76b16a3927a85 to your computer and use it in GitHub Desktop.
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