Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine

tirth-aubergine/home.dart

Last active Dec 12, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.