Created
December 12, 2019 11:25
-
-
Save tirth-aubergine/be39b28125dd8f906bd9975adbfb95d3 to your computer and use it in GitHub Desktop.
Platypus - First Expanded widget (Editor)
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
Expanded( | |
child: SingleChildScrollView( | |
child: Container( | |
margin: EdgeInsets.all(12), | |
child: Screenshot( | |
controller: homeProvider.codeScreenshotController, | |
child: Container( | |
color: homeProvider.codeBackgroundColor, | |
padding: EdgeInsets.symmetric( | |
vertical: homeProvider | |
.verticalPaddingBetweenCodeAndBackground, | |
horizontal: homeProvider | |
.horizontalPaddingBetweenCodeAndBackground, | |
), | |
child: Container( | |
decoration: BoxDecoration( | |
boxShadow: [ | |
homeProvider.showShadow | |
? BoxShadow( | |
color: Colors.black, | |
spreadRadius: 2, | |
blurRadius: 20, | |
) | |
: BoxShadow(), | |
], | |
color: themeMap[homeProvider.codeHighlightTheme] | |
['root'] | |
.backgroundColor, | |
), | |
padding: EdgeInsets.all(16), | |
child: SingleChildScrollView( | |
child: Column( | |
children: <Widget>[ | |
ThreeCircles(), | |
homeProvider.isPreview | |
? Align( | |
alignment: Alignment.centerLeft, | |
child: HighlightView( | |
homeProvider | |
.codeTextEditingController.text, | |
language: homeProvider | |
.codeProgrammingLanguage, | |
theme: themeMap[ | |
homeProvider.codeHighlightTheme], | |
padding: EdgeInsets.only( | |
top: 12, bottom: 12), | |
textStyle: TextStyle( | |
height: | |
homeProvider.codeLineHeight > 0 | |
? homeProvider.codeLineHeight | |
: null, | |
fontSize: homeProvider.codeFontSize, | |
), | |
), | |
) | |
: TextFormField( | |
keyboardAppearance: Brightness.dark, | |
style: TextStyle( | |
height: homeProvider.codeLineHeight > 0 | |
? homeProvider.codeLineHeight | |
: null, | |
fontSize: homeProvider.codeFontSize, | |
color: Colors.white, | |
fontFamily: 'monospace', | |
), | |
controller: homeProvider | |
.codeTextEditingController, | |
maxLines: 15, | |
), | |
], | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment