Skip to content

Instantly share code, notes, and snippets.

@flutter-clutter
Created June 17, 2020 07:33
Show Gist options
  • Save flutter-clutter/85b2620a93af4b509c74bf680f228a7f to your computer and use it in GitHub Desktop.
Save flutter-clutter/85b2620a93af4b509c74bf680f228a7f to your computer and use it in GitHub Desktop.
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