Created
June 17, 2020 07:33
-
-
Save flutter-clutter/85b2620a93af4b509c74bf680f228a7f to your computer and use it in GitHub Desktop.
Progress indicator, used here: https://www.flutterclutter.dev/flutter/tutorials/displaying-a-prorgess-indicator/2020/37/
This file contains hidden or 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
Container( | |
padding: EdgeInsets.all(16), | |
color: Colors.black.withOpacity(0.8), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
_getLoadingIndicator(), | |
_getHeading(), | |
_getText('Text') | |
] | |
) | |
) | |
Widget _getLoadingIndicator() { | |
return Padding( | |
child: Container( | |
child: CircularProgressIndicator( | |
strokeWidth: 3 | |
), | |
width: 32, | |
height: 32 | |
), | |
padding: EdgeInsets.only(bottom: 16) | |
); | |
} | |
Widget _getHeading() { | |
return Padding( | |
child: Text( | |
'Please wait …', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 16 | |
), | |
textAlign: TextAlign.center, | |
), | |
padding: EdgeInsets.only(bottom: 4) | |
); | |
} | |
Widget _getText(String displayedText) { | |
return Text( | |
displayedText, | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 14 | |
), | |
textAlign: TextAlign.center, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment