Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created December 17, 2018 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitherejoe/720dee7db8df4eb4b2647b4aec91247f to your computer and use it in GitHub Desktop.
Save hitherejoe/720dee7db8df4eb4b2647b4aec91247f to your computer and use it in GitHub Desktop.
class LoadingWidget extends StatelessWidget {
final String document;
LoadingWidget({this.document});
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.all(32.0),
child: Center(
child: Text(
_buildQuote(),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w400),
)),
),
PlatformProgress()
],
);
}
String _buildQuote() {
if (this.document == Keys.DOCUMENT_ANIMAL_RIGHTS) {
return Strings.quote_animal_rights;
} else if (this.document == Keys.DOCUMENT_SAB_GROUPS) {
return Strings.quote_hunt_sabs;
} else if (this.document == Keys.DOCUMENT_SHELTERS) {
return Strings.quote_shelters;
} else {
return Strings.quote_orgs;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment