Skip to content

Instantly share code, notes, and snippets.

@letsar
Created May 6, 2020 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letsar/484532b378876ee4548fbb426f45d3bb to your computer and use it in GitHub Desktop.
Save letsar/484532b378876ee4548fbb426f45d3bb to your computer and use it in GitHub Desktop.
Gap
class Gap extends LeafRenderObjectWidget {
const Gap(
this.mainAxisExtent, {
Key key,
}) : assert(mainAxisExtent != null &&
mainAxisExtent >= 0 &&
mainAxisExtent < double.infinity),
super(key: key);
final double mainAxisExtent;
@override
RenderObject createRenderObject(BuildContext context) {
return _RenderGap(mainAxisExtent: mainAxisExtent);
}
@override
void updateRenderObject(BuildContext context, _RenderGap renderObject) {
renderObject.mainAxisExtent = mainAxisExtent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment