Last active
December 12, 2019 11:59
-
-
Save tirth-aubergine/dce00ec02a07062b0751fa38732b9343 to your computer and use it in GitHub Desktop.
Platypus - Row widget in the body of the HomeScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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