Skip to content

Instantly share code, notes, and snippets.

@Rahiche
Created December 13, 2018 19:49
Show Gist options
  • Save Rahiche/e1c458935881db5038656883fe72805f to your computer and use it in GitHub Desktop.
Save Rahiche/e1c458935881db5038656883fe72805f to your computer and use it in GitHub Desktop.
static Widget defaultLayoutBuilder(Widget currentChild, List<Widget> previousChildren) {
List<Widget> children = previousChildren;
if (currentChild != null)
children = children.toList()..add(currentChild);
return Stack(
children: children,
alignment: Alignment.center,
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment