Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine
Last active December 12, 2019 11:59
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 tirth-aubergine/dce00ec02a07062b0751fa38732b9343 to your computer and use it in GitHub Desktop.
Save tirth-aubergine/dce00ec02a07062b0751fa38732b9343 to your computer and use it in GitHub Desktop.
Platypus - Row widget in the body of the HomeScreen
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Consumer<HomeProvider>(
builder: (_, homeProvider, __) => Scaffold(
body: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// This expanded widget shows an editor.
Expanded(),
/*
* This expanded widget shows a list of widgets to change styling of the code.
* When share icon is clicked, screenshotMode is set to true & an empty container is placed.
* So the editor widget get expanded and a better screenshot can be generated.
*/
homeProvider.screenshotMode
? Container()
: Expanded(),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment