diff --git a/assets/GemunuLibre-Medium.ttf b/assets/GemunuLibre-Medium.ttf
new file mode 100644
index 0000000..45495d9
Binary files /dev/null and b/assets/GemunuLibre-Medium.ttf differ
diff --git a/assets/Gemunu_Libre/GemunuLibre-VariableFont_wght.ttf b/assets/Gemunu_Libre/GemunuLibre-VariableFont_wght.ttf
new file mode 100644
index 0000000..d5a75c6
Binary files /dev/null and b/assets/Gemunu_Libre/GemunuLibre-VariableFont_wght.ttf differ
diff --git a/assets/Gemunu_Libre/OFL.txt b/assets/Gemunu_Libre/OFL.txt
new file mode 100644
index 0000000..f22fa7f
--- /dev/null
+++ b/assets/Gemunu_Libre/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2021 The Gemunu Libre Project Authors (https://github.com/mooniak/gemunu-libre-font/)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/assets/Gemunu_Libre/README.txt b/assets/Gemunu_Libre/README.txt
new file mode 100644
index 0000000..74d310b
--- /dev/null
+++ b/assets/Gemunu_Libre/README.txt
@@ -0,0 +1,69 @@
+Gemunu Libre Variable Font
+==========================
+
+This download contains Gemunu Libre as both a variable font and static fonts.
+
+Gemunu Libre is a variable font with this axis:
+ wght
+
+This means all the styles are contained in a single file:
+ GemunuLibre-VariableFont_wght.ttf
+
+If your app fully supports variable fonts, you can now pick intermediate styles
+that aren’t available as static fonts. Not all apps support variable fonts, and
+in those cases you can use the static font files for Gemunu Libre:
+ static/GemunuLibre-ExtraLight.ttf
+ static/GemunuLibre-Light.ttf
+ static/GemunuLibre-Regular.ttf
+ static/GemunuLibre-Medium.ttf
+ static/GemunuLibre-SemiBold.ttf
+ static/GemunuLibre-Bold.ttf
+ static/GemunuLibre-ExtraBold.ttf
+
+Get started
+-----------
+
+1. Install the font files you want to use
+
+2. Use your app's font picker to view the font family and all the
+available styles
+
+Learn more about variable fonts
+-------------------------------
+
+ https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
+ https://variablefonts.typenetwork.com
+ https://medium.com/variable-fonts
+
+In desktop apps
+
+ https://theblog.adobe.com/can-variable-fonts-illustrator-cc
+ https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
+
+Online
+
+ https://developers.google.com/fonts/docs/getting_started
+ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
+ https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
+
+Installing fonts
+
+ MacOS: https://support.apple.com/en-us/HT201749
+ Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
+ Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
+
+Android Apps
+
+ https://developers.google.com/fonts/docs/android
+ https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
+
+License
+-------
+Please read the full license text (OFL.txt) to understand the permissions,
+restrictions and requirements for usage, redistribution, and modification.
+
+You can use them in your products & projects – print or digital,
+commercial or otherwise.
+
+This isn't legal advice, please consider consulting a lawyer and see the full
+license for all details.
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-Bold.ttf b/assets/Gemunu_Libre/static/GemunuLibre-Bold.ttf
new file mode 100644
index 0000000..6c76c4b
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-Bold.ttf differ
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-ExtraBold.ttf b/assets/Gemunu_Libre/static/GemunuLibre-ExtraBold.ttf
new file mode 100644
index 0000000..56644ff
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-ExtraBold.ttf differ
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-ExtraLight.ttf b/assets/Gemunu_Libre/static/GemunuLibre-ExtraLight.ttf
new file mode 100644
index 0000000..81d19e3
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-ExtraLight.ttf differ
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-Light.ttf b/assets/Gemunu_Libre/static/GemunuLibre-Light.ttf
new file mode 100644
index 0000000..4d4088f
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-Light.ttf differ
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-Regular.ttf b/assets/Gemunu_Libre/static/GemunuLibre-Regular.ttf
new file mode 100644
index 0000000..fea9e4b
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-Regular.ttf differ
diff --git a/assets/Gemunu_Libre/static/GemunuLibre-SemiBold.ttf b/assets/Gemunu_Libre/static/GemunuLibre-SemiBold.ttf
new file mode 100644
index 0000000..8771b94
Binary files /dev/null and b/assets/Gemunu_Libre/static/GemunuLibre-SemiBold.ttf differ
diff --git a/assets/HF2021_Logo_1.svg b/assets/HF2021_Logo_1.svg
new file mode 100644
index 0000000..e0345e6
--- /dev/null
+++ b/assets/HF2021_Logo_1.svg
@@ -0,0 +1,44 @@
+
diff --git a/assets/Roboto_Condensed/LICENSE.txt b/assets/Roboto_Condensed/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/assets/Roboto_Condensed/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/assets/Roboto_Condensed/RobotoCondensed-Bold.ttf b/assets/Roboto_Condensed/RobotoCondensed-Bold.ttf
new file mode 100644
index 0000000..c807004
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-Bold.ttf differ
diff --git a/assets/Roboto_Condensed/RobotoCondensed-BoldItalic.ttf b/assets/Roboto_Condensed/RobotoCondensed-BoldItalic.ttf
new file mode 100644
index 0000000..6d3e4fb
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-BoldItalic.ttf differ
diff --git a/assets/Roboto_Condensed/RobotoCondensed-Italic.ttf b/assets/Roboto_Condensed/RobotoCondensed-Italic.ttf
new file mode 100644
index 0000000..0668a58
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-Italic.ttf differ
diff --git a/assets/Roboto_Condensed/RobotoCondensed-Light.ttf b/assets/Roboto_Condensed/RobotoCondensed-Light.ttf
new file mode 100644
index 0000000..9418633
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-Light.ttf differ
diff --git a/assets/Roboto_Condensed/RobotoCondensed-LightItalic.ttf b/assets/Roboto_Condensed/RobotoCondensed-LightItalic.ttf
new file mode 100644
index 0000000..24737d7
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-LightItalic.ttf differ
diff --git a/assets/Roboto_Condensed/RobotoCondensed-Regular.ttf b/assets/Roboto_Condensed/RobotoCondensed-Regular.ttf
new file mode 100644
index 0000000..17e8ea5
Binary files /dev/null and b/assets/Roboto_Condensed/RobotoCondensed-Regular.ttf differ
diff --git a/assets/X - 7.png b/assets/X - 7.png
new file mode 100644
index 0000000..da788fa
Binary files /dev/null and b/assets/X - 7.png differ
diff --git a/lib/constants/strings.dart b/lib/constants/strings.dart
new file mode 100644
index 0000000..6a7c910
--- /dev/null
+++ b/lib/constants/strings.dart
@@ -0,0 +1,2 @@
+const splash = 'assets/X - 7.png';
+const set= 'assets/HF2021_Logo_1.svg';
\ No newline at end of file
diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart
index 6d54b72..ae41ff7 100644
--- a/lib/screens/home_screen.dart
+++ b/lib/screens/home_screen.dart
@@ -2,94 +2,110 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hacktoberfest_checker/blocs/userdata/userdata_bloc.dart';
+import 'package:hacktoberfest_checker/screens/set_user.dart';
import 'package:hacktoberfest_checker/widgets/hf_progress_indicator.dart';
import 'package:hacktoberfest_checker/widgets/pr_list.dart';
import 'package:shared_preferences/shared_preferences.dart';
class HomeScreen extends StatelessWidget {
-
-
@override
Widget build(BuildContext context) {
-
return Scaffold(
- appBar: AppBar(
- title: Text("Hacktoberfest Checker"),
- actions: [
- Padding(
- padding: EdgeInsets.only(right: 20),
- child: GestureDetector(
- onTap: () async {
- SharedPreferences sp = await SharedPreferences.getInstance();
- UserdataBloc udb = BlocProvider.of(context);
- udb.add(RequestSetUser(username: sp.getString("github_username")));
- },
- child: Icon(
- Icons.refresh,
+ appBar: AppBar(
+ title: Text(
+ "Hacktoberfest Checker",
+ style: TextStyle(
+ fontFamily: 'Gemunu', color: Colors.white, fontSize: 30),
+ ),
+ backgroundColor: Color(0xFFFF7643),
+ actions: [
+ Padding(
+ padding: EdgeInsets.only(right: 20),
+ child: GestureDetector(
+ onTap: () async {
+ SharedPreferences sp = await SharedPreferences.getInstance();
+ UserdataBloc udb = BlocProvider.of(context);
+ udb.add(RequestSetUser(
+ username: sp.getString("github_username")));
+ },
+ child: Icon(
+ Icons.refresh
+ ),
),
),
- )
- // TODO Add a "change user" button.
- // The button should redirect to the SetUserScreen and remove the old username from SP.
- ],
- ),
- body: BlocBuilder(
- builder: (context, state) {
- if (state is UserDataLoading){
- return Center(
- child: CircularProgressIndicator(),
- );
- }
- if (state is UserDataError){
- // TODO Implement...
- }
+ Padding(
+ padding: EdgeInsets.only(right: 20),
+ child: GestureDetector(
+ onTap: () async {
+ // SharedPreferences sp = await SharedPreferences.getInstance();
+ // UserdataBloc udb = BlocProvider.of(context);
+ // udb.add(RequestSetUser(
+ // username: sp.getString("github_username")));
+ SharedPreferences userData = await SharedPreferences.getInstance();
+ await userData.clear();
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (BuildContext context) => SetUserScreen(),
+ ));
+ },
+ child: Icon(
+ Icons.logout,
+ ),
+ ),
+ )
+ // TODO Add a "change user" button.
+ // The button should redirect to the SetUserScreen and remove the old username from SP.
+ ],
+ ),
+ body: BlocBuilder(
+ builder: (context, state) {
+ if (state is UserDataLoading) {
+ return Center(
+ child: CircularProgressIndicator(),
+ );
+ }
+ if (state is UserDataError) {
+ // TODO Implement...
+ }
- // TODO Fix user is null error thrown sometimes. Needs testing.
- UserDataLoaded st = state;
- return Container(
- padding: EdgeInsets.only(top: 10),
- height: double.infinity,
- child: Center(
- child: Column(
- children: [
- Expanded(
- flex: 4,
- child: Padding(
- padding: const EdgeInsets.all(12.0),
- child: SvgPicture.asset(
- "assets/HF2021_Logo.svg",
- semanticsLabel: 'Hacktoberfest 2021 Logo'
- ),
- )
- ),
- Expanded(
- flex: 4,
- child: HacktoberfestProgressIndicator(user: st.user, pull_requests: st.prs)
- ),
- Expanded(
- flex: 1,
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 10),
- child: Text(
- "Pull Requests for user ${st.user.username}:",
- style: TextStyle(
- fontSize: 18,
- fontWeight: FontWeight.bold
- ),
+ // TODO Fix user is null error thrown sometimes. Needs testing.
+ UserDataLoaded st = state;
+ return Container(
+ padding: EdgeInsets.only(top: 10),
+ height: double.infinity,
+ child: Center(
+ child: Column(
+ children: [
+ Expanded(
+ flex: 4,
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: SvgPicture.asset("assets/HF2021_Logo.svg",
+ semanticsLabel: 'Hacktoberfest 2021 Logo'),
+ )),
+ Expanded(
+ flex: 4,
+ child: HacktoberfestProgressIndicator(
+ user: st.user, pull_requests: st.prs)),
+ Expanded(
+ flex: 1,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 10),
+ child: Text(
+ "Pull Requests for user ${st.user.username}:",
+ style: TextStyle(
+ fontSize: 18,
+ fontFamily: 'Gemunu',
+ fontWeight: FontWeight.bold)),
),
),
- ),
-
- Flexible(
- flex: 4,
- child:PRList(pullRequests: st.prs)
- ),
- ],
+ Flexible(flex: 4, child: PRList(pullRequests: st.prs)),
+ ],
+ ),
),
- ),
- );
- },
- )
- );
+ );
+ },
+ ));
}
}
diff --git a/lib/screens/set_user.dart b/lib/screens/set_user.dart
index bf0067b..ee0f9d6 100644
--- a/lib/screens/set_user.dart
+++ b/lib/screens/set_user.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hacktoberfest_checker/blocs/userdata/userdata_bloc.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -27,71 +28,115 @@ class _SetUserScreenState extends State {
child: ListView(
shrinkWrap: true,
children: [
- Text(
- "Set your Username:",
+ Text("Set your Username:",
textAlign: TextAlign.center,
style: TextStyle(
- fontSize: 20,
- fontWeight: FontWeight.bold,
- )
+ fontSize: 25,
+ fontFamily: "Robotocondensed",
+ fontWeight: FontWeight.w900,
+ )),
+ SizedBox(
+ width: double.infinity,
+ height: 50,
+ ),
+ Text(
+ "Type your GitHub Username in\n the field below.",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Robotocondensed',
+ fontSize: 18,
+ ),
),
SizedBox(
width: double.infinity,
height: 50,
),
- Text("Type your GitHub Username in the field below."),
BlocListener(
listener: (context, state) async {
- if (state is UserDataLoaded){
+ if (state is UserDataLoaded) {
SharedPreferences sp = await SharedPreferences.getInstance();
- sp.setString("github_username", _usernameController.value.text);
- Navigator.of(context).pushNamedAndRemoveUntil("/home", (route) => false);
+ sp.setString(
+ "github_username", _usernameController.value.text);
+ Navigator.of(context)
+ .pushNamedAndRemoveUntil("/home", (route) => false);
}
},
- child: BlocBuilder (
+ child: BlocBuilder(
builder: (context, state) {
return Form(
key: _formKey,
- child: Column(
- children: [
- TextFormField(
- controller: _usernameController,
- decoration: InputDecoration(
- hintText: "Username (eg. kerk12)",
- labelText: "Username"
+ child: SizedBox(
+ height: 200,
+ child: Column(
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(
+ vertical: 10.0, horizontal: 0),
+ child: TextFormField(
+ controller: _usernameController,
+ style: TextStyle(
+ fontSize: 15.0, fontWeight: FontWeight.w900),
+ decoration: InputDecoration(
+ hintText: "Username (eg. kerk12)",
+ labelText: "Username",
+ fillColor: Colors.black,
+ focusColor: Colors.black,
+ prefixIcon: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: FaIcon(
+ FontAwesomeIcons.github,
+ size: 40.0,
+ color: Colors.black,
+ ),
+ ),
+ hoverColor: Colors.blue,
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.all(
+ Radius.circular(4.0)),
+ borderSide: BorderSide(width: 20.0))),
+ // TODO Check if username is empty
+ ),
),
- // TODO Check if username is empty
- ),
- SizedBox(
- width: double.infinity,
- height: (state is UserDataError && state.error == UserDataErrorType.userNotFound) ? 10 : 0,
- ),
- Opacity(
- child: Text("Invalid username provided",
- style: TextStyle(
- color: Colors.red
- )
+ SizedBox(
+ width: double.infinity,
+ height: (state is UserDataError &&
+ state.error ==
+ UserDataErrorType.userNotFound)
+ ? 10
+ : 0,
),
- opacity: (state is UserDataError && state.error == UserDataErrorType.userNotFound) ? 1 : 0,
- ),
- SizedBox(
- width: double.infinity,
- height: 50,
- ),
- ElevatedButton.icon(
- onPressed:() async {
- if (state is UserDataLoading)
- return;
- if (_formKey.currentState.validate()){
- final userdatabloc = BlocProvider.of(context);
- userdatabloc.add(RequestSetUser(username:_usernameController.value.text));
- }
- },
-
- icon: Icon(Icons.save),
- label: Text("Set"),
- )
- ],
+ Opacity(
+ child: Text("Invalid username provided",
+ style: TextStyle(color: Colors.red)),
+ opacity: (state is UserDataError &&
+ state.error ==
+ UserDataErrorType.userNotFound)
+ ? 1
+ : 0,
+ ),
+ SizedBox(
+ width: double.infinity,
+ height: 50,
+ ),
+ ElevatedButton.icon(
+ onPressed: () async {
+ if (state is UserDataLoading) return;
+ if (_formKey.currentState.validate()) {
+ var userdatabloc =
+ BlocProvider.of(context);
+ userdatabloc.add(RequestSetUser(
+ username: _usernameController.value.text));
+ }
+ },
+ style: ButtonStyle(
+ backgroundColor: MaterialStateProperty.all(
+ Color(0xFFFF7643),
+ )),
+ icon: Icon(Icons.save),
+ label: Text("Set"),
+ )
+ ],
+ ),
),
);
},
diff --git a/lib/screens/splash_screen.dart b/lib/screens/splash_screen.dart
index 9b38882..da4ac3d 100644
--- a/lib/screens/splash_screen.dart
+++ b/lib/screens/splash_screen.dart
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hacktoberfest_checker/blocs/splash/splash_bloc.dart';
import 'package:hacktoberfest_checker/blocs/userdata/userdata_bloc.dart';
+import 'package:hacktoberfest_checker/constants/strings.dart';
import 'package:shared_preferences/shared_preferences.dart';
class SplashScreen extends StatefulWidget {
@@ -39,7 +40,18 @@ class _SplashScreenState extends State {
child: Scaffold(
body: Container(
// TODO Make a proper splash screen.
- child: Center(child: Text("This is where the Splash Screen should go.")),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Center(child: Text("This is where the Splash Screen should go.")),
+ Center(
+ child: Image.asset(
+ splash,
+ scale: 0.2,
+ ),
+ ),
+ ],
+ ),
),
),
);
diff --git a/lib/widgets/hf_progress_indicator.dart b/lib/widgets/hf_progress_indicator.dart
index ae4c13c..c3eed5c 100644
--- a/lib/widgets/hf_progress_indicator.dart
+++ b/lib/widgets/hf_progress_indicator.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:hacktoberfest_checker/models/pull_request.dart';
import 'package:hacktoberfest_checker/models/user.dart';
+import 'package:step_progress_indicator/step_progress_indicator.dart';
import 'package:syncfusion_flutter_gauges/gauges.dart';
import 'package:auto_size_text/auto_size_text.dart';
@@ -11,41 +12,62 @@ class HacktoberfestProgressIndicator extends StatelessWidget {
Widget _makeProgressBar() {
int currentPR = this.pull_requests.length;
currentPR = currentPR > 4 ? 4 : currentPR;
- return SfRadialGauge(
- axes: [
- RadialAxis(
- minimum: 0,
- maximum: 4,
- showLabels: false,
- showTicks: false,
- axisLineStyle: AxisLineStyle(
- thickness: 0.2,
- cornerStyle: CornerStyle.bothCurve,
- color: Color.fromRGBO(43, 53, 49, 1),
- thicknessUnit: GaugeSizeUnit.factor,
- ),
- pointers: [
- RangePointer(
- color: currentPR < 4 ? Color.fromRGBO(103, 118, 98, 1) :
- Color.fromRGBO(247, 71, 0, 1),
- value: currentPR.toDouble(),
- cornerStyle: CornerStyle.bothCurve,
- width: 0.2,
- sizeUnit: GaugeSizeUnit.factor,
- )
- ],
- annotations: [
- GaugeAnnotation(
- positionFactor: 0,
- angle: 90,
- widget: Text(
- currentPR.toStringAsFixed(0) +
- '/4',
- style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
- ),
+ // return SfRadialGauge(
+ // axes: [
+ // RadialAxis(
+ // minimum: 0,
+ // maximum: 4,
+ // showLabels: false,
+ // showTicks: false,
+ // axisLineStyle: AxisLineStyle(
+ // thickness: 0.2,
+ // cornerStyle: CornerStyle.bothCurve,
+ // color: Color.fromRGBO(43, 53, 49, 1),
+ // thicknessUnit: GaugeSizeUnit.factor,
+ // ),
+ // pointers: [
+ // RangePointer(
+ // color: currentPR < 4 ? Color.fromRGBO(103, 118, 98, 1) :
+ // Color.fromRGBO(247, 71, 0, 1),
+ // value: currentPR.toDouble(),
+ // cornerStyle: CornerStyle.bothCurve,
+ // width: 0.2,
+ // sizeUnit: GaugeSizeUnit.factor,
+ // )
+ // ],
+ // annotations: [
+ // GaugeAnnotation(
+ // positionFactor: 0,
+ // angle: 90,
+ // widget: Text(
+ // currentPR.toStringAsFixed(0) +
+ // '/4',
+ // style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
+ // ),
+ // ),
+ // ])
+ // ],
+ // );
+ return StepProgressIndicator(
+ totalSteps: 4,
+ currentStep: currentPR,
+ size: 60,
+ selectedColor: Colors.black,
+ unselectedColor: Colors.grey[200],
+ customStep: (index, color, _) => color == Colors.black
+ ? Container(
+ color: color,
+ child: Icon(
+ Icons.check,
+ color: Colors.white,
+ ),
+ )
+ : Container(
+ color: color,
+ child: Icon(
+ Icons.remove,
),
- ])
- ],
+ ),
);
}
@@ -56,23 +78,43 @@ class HacktoberfestProgressIndicator extends StatelessWidget {
Widget build(BuildContext context) {
final int completedPRs = this.pull_requests.length;
// final int completedPRs = 3;
- String completedPRsText;
+ String completedPRsText1, completedPRsText2;
switch (completedPRs) {
case 0:
- completedPRsText = "Start Hacking! 0/4 Completed!";
+ {
+ completedPRsText1 = "Start Hacking!";
+ completedPRsText2 = " 0/4 Completed!";
+ }
break;
case 1:
- completedPRsText = "Well done! 1/4 Completed!";
+ {
+ completedPRsText1 = "Well done! ";
+ completedPRsText2 = "1/4 Completed!";
+ }
break;
case 2:
- completedPRsText = "Halfway done! 2/4 Completed!";
+ {
+ completedPRsText1 = "Halfway done!";
+ completedPRsText2 = " 2/4 Completed!";
+ }
break;
case 3:
- completedPRsText = "Almost There! 3/4 Completed!";
+ {
+ completedPRsText1 = "Almost There!";
+ completedPRsText2 = "3/4 Completed!";
+ }
break;
case 4:
- completedPRsText = "You have completed the Hacktoberfest !";
+ {
+ completedPRsText1 = " ";
+ completedPRsText2 = "You have completed the Hacktoberfest !";
+ }
break;
+ default:
+ {
+ completedPRsText1 = " ";
+ completedPRsText2 = "You have completed the Hacktoberfest ! ";
+ }
}
int indicatedPRs;
if (completedPRs > 4) {
@@ -88,9 +130,18 @@ class HacktoberfestProgressIndicator extends StatelessWidget {
horizontal: MediaQuery.of(context).size.width * 0.1),
decoration: BoxDecoration(
border: Border.all(color: Colors.purple[50]),
- color: Color.fromRGBO(219, 232, 217, 1),
+ color: Color(0xFFFF7643),
borderRadius: BorderRadius.all(Radius.circular(10))),
child: Stack(children: [
+ Align(
+ alignment: Alignment.topCenter,
+ child: AutoSizeText(
+ completedPRsText1,
+ style: TextStyle(
+ fontSize: 20, color: Colors.white, fontFamily: 'Gemunu'),
+ textAlign: TextAlign.center,
+ maxLines: 2,
+ )),
Align(
alignment: Alignment.topCenter,
child: Container(
@@ -100,8 +151,9 @@ class HacktoberfestProgressIndicator extends StatelessWidget {
Align(
alignment: Alignment.bottomCenter,
child: AutoSizeText(
- completedPRsText,
- style: TextStyle(fontSize: 15),
+ completedPRsText2,
+ style: TextStyle(
+ fontSize: 20, color: Colors.white, fontFamily: 'Gemunu'),
textAlign: TextAlign.center,
maxLines: 2,
))
diff --git a/lib/widgets/pr_list.dart b/lib/widgets/pr_list.dart
index 23a3d9c..fa67b62 100644
--- a/lib/widgets/pr_list.dart
+++ b/lib/widgets/pr_list.dart
@@ -9,19 +9,21 @@ class _PRListItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget prStatus;
- if (pullRequest.belongsToHFRepo) {
+ if (pullRequest.belongsToHFRepo) {
if (pullRequest.prState == PullRequestState.open) {
prStatus = Text(
"Open/Pending",
style: TextStyle(
- color: Colors.grey,
+ color: Colors.blue,
+ fontFamily: 'Gemunu',
),
);
- } else if (pullRequest.hasMatured()){
+ } else if (pullRequest.hasMatured()) {
prStatus = Text(
"Accepted",
style: TextStyle(
- color: Colors.purpleAccent,
+ color: Colors.yellow,
+ fontFamily: 'Gemunu',
),
);
} else {
@@ -29,6 +31,7 @@ class _PRListItem extends StatelessWidget {
"In Review/Not Mature",
style: TextStyle(
color: Colors.orange,
+ fontFamily: 'Gemunu',
),
);
}
@@ -38,11 +41,13 @@ class _PRListItem extends StatelessWidget {
"Ineligible Repository",
style: TextStyle(
color: Colors.grey,
+ fontFamily: 'Gemunu',
),
);
}
return Card(
+ color: Color(0xFFFF7643),
child: ListTile(
// TODO Add Repo Image
// TODO On Click, open up a browser window and show the PR to the user.
@@ -52,7 +57,9 @@ class _PRListItem extends StatelessWidget {
Text(
"Status: ",
style: TextStyle(
- fontWeight: FontWeight.bold
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ fontFamily: 'Gemunu',
),
),
prStatus
@@ -71,11 +78,20 @@ class PRList extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return ListView.builder(
- itemBuilder: (context, index) {
- return _PRListItem(pullRequest: pullRequests[index]);
- },
- itemCount: pullRequests.length,
+ return Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.only(
+ topRight: Radius.circular(10.0),
+ topLeft: Radius.circular(10.0),
+ ),
+ color: Color(0xFFFF7643),
+ ),
+ child: ListView.builder(
+ itemBuilder: (context, index) {
+ return _PRListItem(pullRequest: pullRequests[index]);
+ },
+ itemCount: pullRequests.length,
+ ),
);
}
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 52c1d4a..6825d87 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -2,6 +2,7 @@ name: hacktoberfest_checker
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
version: 1.0.0+1
environment:
@@ -18,7 +19,12 @@ dependencies:
auto_size_text: ^2.1.0
flutter_svg: ^0.22.0
- cupertino_icons: ^1.0.0
+ cupertino_icons: ^1.0.0
+ font_awesome_flutter: ^10.2.1
+ material: ^1.0.0+2
+ step_progress_indicator: ^0.2.5+8
+
+
dev_dependencies:
flutter_test:
@@ -26,8 +32,20 @@ dev_dependencies:
flutter_lints: ^2.0.0
flutter:
+
+
+
uses-material-design: true
assets:
- - assets/
-
\ No newline at end of file
+
+ - assets/
+
+ fonts:
+ - family: Gemunu
+ fonts:
+ - asset: assets/GemunuLibre-Medium.ttf
+ - family: Robotocondensed
+ fonts:
+ - asset: assets/Roboto_Condensed/RobotoCondensed-Regular.ttf
+