-
-
Save hitherejoe/720dee7db8df4eb4b2647b4aec91247f to your computer and use it in GitHub Desktop.
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 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