Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Commit 640ac2e

Browse files
committed
Retheme the dashboard
1 parent 2a504fb commit 640ac2e

7 files changed

Lines changed: 121 additions & 147 deletions

File tree

.flutter-plugins-dependencies

Lines changed: 5 additions & 1 deletion
Large diffs are not rendered by default.

lib/main.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ class MainApp extends StatelessWidget {
101101
return MaterialApp(
102102
title: kAppTitle,
103103
debugShowCheckedModeBanner: false,
104-
theme: kLightTheme,
105-
darkTheme: kDarkTheme,
104+
theme: kTheme,
106105
home: Provider.value(value: credManager, child: Home()),
107106
routes: <String, WidgetBuilder>{
108107
'/login': (BuildContext context) =>

lib/styles.dart

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ import 'package:flutter/material.dart';
3737

3838
abstract class HackRUColors {
3939
static const Color blue = Color(0xff1f6aa0);
40-
static const Color off_white_blue = Color(0xffd1e9ef);
41-
static const Color blue_grey = Colors.blueGrey;
40+
static const Color blue_grey = Color(0xffd1e9ef);
4241
static const LinearGradient loading_gradient = LinearGradient(colors: [
4342
Colors.black26,
4443
Colors.transparent,
@@ -124,124 +123,124 @@ ThemeData _buildTheme() {
124123
textTheme: const TextTheme(
125124
headline1: TextStyle(
126125
fontSize: 100.0,
127-
color: HackRUColors.off_white_blue,
126+
color: HackRUColors.white,
128127
fontWeight: FontWeight.w600,
129128
),
130129
headline2: TextStyle(
131130
fontSize: 90.0,
132-
color: HackRUColors.off_white_blue,
131+
color: HackRUColors.white,
133132
fontWeight: FontWeight.bold,
134133
),
135134
headline3: TextStyle(
136135
fontSize: 45.0,
137-
color: HackRUColors.off_white_blue,
136+
color: HackRUColors.white,
138137
),
139138
headline4: TextStyle(
140139
fontSize: 35.0,
141-
color: HackRUColors.off_white_blue,
140+
color: HackRUColors.white,
142141
),
143142
headline5: TextStyle(
144143
fontSize: 25.0,
145-
color: HackRUColors.off_white_blue,
144+
color: HackRUColors.charcoal_light,
146145
fontWeight: FontWeight.w700,
147146
),
148147
headline6: TextStyle(
149148
fontSize: 20.0,
150-
color: HackRUColors.off_white_blue,
149+
color: HackRUColors.charcoal_light,
151150
fontWeight: FontWeight.w700,
152151
),
153152
subtitle1: TextStyle(
154153
fontSize: 18.0,
155-
color: HackRUColors.off_white_blue,
154+
color: HackRUColors.charcoal_light,
156155
fontWeight: FontWeight.w700,
157156
),
158157
bodyText1: TextStyle(
159-
color: HackRUColors.off_white_blue,
158+
color: HackRUColors.charcoal_light,
160159
),
161160
bodyText2: TextStyle(
162-
color: HackRUColors.off_white_blue,
161+
color: HackRUColors.charcoal_light,
163162
),
164163
),
165164
primaryTextTheme: const TextTheme(
166165
headline1: TextStyle(
167166
fontSize: 100.0,
168-
color: HackRUColors.off_white_blue,
167+
color: HackRUColors.pink,
169168
fontWeight: FontWeight.w600,
170169
),
171170
headline2: TextStyle(
172171
fontSize: 90.0,
173-
color: HackRUColors.off_white_blue,
172+
color: HackRUColors.pink,
174173
fontWeight: FontWeight.bold,
175174
),
176175
headline3: TextStyle(
177176
fontSize: 45.0,
178-
color: HackRUColors.off_white_blue,
177+
color: HackRUColors.pink,
179178
),
180179
headline4: TextStyle(
181180
fontSize: 35.0,
182-
color: HackRUColors.off_white_blue,
181+
color: HackRUColors.pink,
183182
),
184183
headline5: TextStyle(
185184
fontSize: 25.0,
186-
color: HackRUColors.off_white_blue,
185+
color: HackRUColors.pink,
187186
fontWeight: FontWeight.w700,
188187
),
189188
headline6: TextStyle(
190189
fontSize: 20.0,
191-
color: HackRUColors.off_white_blue,
190+
color: HackRUColors.pink,
192191
fontWeight: FontWeight.w700,
193192
),
194193
subtitle1: TextStyle(
195194
fontSize: 18.0,
196-
color: HackRUColors.off_white_blue,
195+
color: HackRUColors.pink,
197196
fontWeight: FontWeight.w700,
198197
),
199198
bodyText1: TextStyle(
200-
color: HackRUColors.off_white_blue,
199+
color: HackRUColors.pink,
201200
),
202201
bodyText2: TextStyle(
203-
color: HackRUColors.off_white_blue,
202+
color: HackRUColors.pink,
204203
),
205204
),
206205
accentTextTheme: const TextTheme(
207206
headline1: TextStyle(
208207
fontSize: 100.0,
209-
color: HackRUColors.blue_grey,
208+
color: HackRUColors.yellow,
210209
fontWeight: FontWeight.w600,
211210
),
212211
headline2: TextStyle(
213212
fontSize: 90.0,
214-
color: HackRUColors.blue_grey,
213+
color: HackRUColors.yellow,
215214
fontWeight: FontWeight.bold,
216215
),
217216
headline3: TextStyle(
218217
fontSize: 45.0,
219-
color: HackRUColors.blue_grey,
218+
color: HackRUColors.yellow,
220219
),
221220
headline4: TextStyle(
222221
fontSize: 35.0,
223-
color: HackRUColors.blue_grey,
222+
color: HackRUColors.yellow,
224223
),
225224
headline5: TextStyle(
226225
fontSize: 25.0,
227-
color: HackRUColors.blue_grey,
226+
color: HackRUColors.charcoal_light,
228227
fontWeight: FontWeight.w700,
229228
),
230229
headline6: TextStyle(
231230
fontSize: 20.0,
232-
color: HackRUColors.blue_grey,
231+
color: HackRUColors.yellow,
233232
fontWeight: FontWeight.w700,
234233
),
235234
subtitle1: TextStyle(
236235
fontSize: 18.0,
237-
color: HackRUColors.blue_grey,
236+
color: HackRUColors.yellow,
238237
fontWeight: FontWeight.w700,
239238
),
240239
bodyText1: TextStyle(
241-
color: HackRUColors.blue_grey,
240+
color: HackRUColors.yellow,
242241
),
243242
bodyText2: TextStyle(
244-
color: HackRUColors.blue_grey,
243+
color: HackRUColors.yellow,
245244
),
246245
),
247246
);

lib/ui/pages/dashboard/dashboard.dart

Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class DashboardState extends State<Dashboard> {
247247
children: [
248248
Padding(
249249
padding: const EdgeInsets.symmetric(horizontal: 5.0),
250-
child: timerBanner(),
250+
child: timerBanner(Colors.black12, HackRUColors.blue_grey),
251251
),
252252
if (_hasAuthToken) ...[
253253
Padding(
@@ -257,7 +257,7 @@ class DashboardState extends State<Dashboard> {
257257
shape: RoundedRectangleBorder(
258258
borderRadius: BorderRadius.circular(15),
259259
),
260-
color: Colors.blueGrey[50],
260+
color: Colors.black12,
261261
child: Padding(
262262
padding: const EdgeInsets.all(16.0),
263263
child: _isLoading
@@ -268,12 +268,9 @@ class DashboardState extends State<Dashboard> {
268268
crossAxisAlignment: CrossAxisAlignment.start,
269269
children: [
270270
Shimmer(
271-
gradient: LinearGradient(colors: [
272-
Colors.white,
273-
Colors.blueGrey.withOpacity(0.2)
274-
]),
271+
gradient: HackRUColors.loading_gradient,
275272
child: Container(
276-
color: Colors.blueGrey.withOpacity(0.2),
273+
color: HackRUColors.blue_grey,
277274
height: 33.33,
278275
width:
279276
MediaQuery.of(context).size.width *
@@ -282,25 +279,23 @@ class DashboardState extends State<Dashboard> {
282279
height: 5,
283280
),
284281
Shimmer(
285-
gradient: LinearGradient(colors: [
286-
Colors.white,
287-
Colors.blueGrey.withOpacity(0.2)
288-
]),
282+
gradient: HackRUColors.loading_gradient,
289283
child: Container(
290-
color: Colors.blueGrey.withOpacity(0.2),
284+
color: HackRUColors.blue_grey,
291285
height: 28.33,
292286
width:
293287
MediaQuery.of(context).size.width *
294288
0.5))
295289
],
296290
),
297291
Shimmer(
298-
child: Container(
299-
height: 35,
300-
width: 35,
301-
color: Colors.blueGrey.withOpacity(0.2)),
302-
gradient: const LinearGradient(
303-
colors: [Colors.white, Colors.blueGrey]))
292+
child: Container(
293+
height: 35,
294+
width: 35,
295+
color: HackRUColors.blue_grey,
296+
),
297+
gradient: HackRUColors.loading_gradient,
298+
)
304299
],
305300
)
306301
: Row(
@@ -312,7 +307,10 @@ class DashboardState extends State<Dashboard> {
312307
Text(
313308
username,
314309
style: const TextStyle(
315-
fontFamily: 'newFont', fontSize: 25),
310+
fontFamily: 'titilliumWeb',
311+
fontSize: 25,
312+
color: HackRUColors.blue_grey,
313+
),
316314
),
317315
Row(
318316
mainAxisAlignment: MainAxisAlignment.start,
@@ -321,9 +319,11 @@ class DashboardState extends State<Dashboard> {
321319
alignment: Alignment.center,
322320
child: Text(
323321
userStatus,
324-
style: Theme.of(context)
325-
.textTheme
326-
.subtitle1,
322+
style: TextStyle(
323+
fontFamily: 'titilliumWeb',
324+
fontSize: 18,
325+
color: HackRUColors.blue_grey,
326+
),
327327
),
328328
),
329329
Padding(
@@ -365,13 +365,15 @@ class DashboardState extends State<Dashboard> {
365365
Expanded(
366366
child: DashboardButton(
367367
onPressed: _onLogin,
368-
color: HackRUColors.yellow,
368+
bgColor: HackRUColors.blue,
369+
textColor: HackRUColors.blue_grey,
369370
label: "Login"),
370371
),
371372
Expanded(
372373
child: DashboardButton(
373374
onPressed: _onHelp,
374-
color: HackRUColors.pink,
375+
bgColor: Colors.black12,
376+
textColor: HackRUColors.blue_grey,
375377
label: "Help"),
376378
)
377379
],
@@ -380,21 +382,26 @@ class DashboardState extends State<Dashboard> {
380382
const SizedBox(height: 5),
381383
DashboardButton(
382384
onPressed: _onScanner,
383-
color: HackRUColors.pink,
385+
bgColor: Colors.black12,
386+
textColor: HackRUColors.blue_grey,
384387
label: "QR Scanner")
385388
],
386-
if (_hasAuthToken) ...[
387-
const SizedBox(height: 5),
388-
DashboardButton(
389-
onPressed: _onLogout, color: HackRUColors.pink, label: "Logout")
390-
],
391389
if (credManager!.getAuthorization()) ...[
392390
const SizedBox(height: 5),
393391
DashboardButton(
394392
onPressed: _onGetAttending,
395-
color: HackRUColors.pink,
393+
bgColor: Colors.black12,
394+
textColor: HackRUColors.blue_grey,
396395
label: "Get Attending")
397396
],
397+
if (_hasAuthToken) ...[
398+
const SizedBox(height: 5),
399+
DashboardButton(
400+
onPressed: _onLogout,
401+
bgColor: Colors.black12,
402+
textColor: HackRUColors.blue_grey,
403+
label: "Logout")
404+
],
398405
Expanded(child: Container()),
399406
Row(
400407
crossAxisAlignment: CrossAxisAlignment.center,
@@ -404,18 +411,26 @@ class DashboardState extends State<Dashboard> {
404411
SocialMediaCard(
405412
onPressed: () => url_launcher.launch(HACK_RU_WEBSITE_URL),
406413
iconData: FontAwesomeIcons.link,
414+
iconColor: HackRUColors.blue_grey,
415+
bgColor: Colors.transparent,
407416
),
408417
SocialMediaCard(
409418
onPressed: () => url_launcher.launch(REPOSITORY_URL),
410419
iconData: FontAwesomeIcons.github,
420+
iconColor: HackRUColors.blue_grey,
421+
bgColor: Colors.transparent,
411422
),
412423
SocialMediaCard(
413424
onPressed: () => url_launcher.launch(FACEBOOK_PAGE_URL),
414425
iconData: FontAwesomeIcons.squareFacebook,
426+
iconColor: HackRUColors.blue_grey,
427+
bgColor: Colors.transparent,
415428
),
416429
SocialMediaCard(
417430
onPressed: () => url_launcher.launch(INSTAGRAM_PAGE_URL),
418431
iconData: FontAwesomeIcons.instagram,
432+
iconColor: HackRUColors.blue_grey,
433+
bgColor: Colors.transparent,
419434
),
420435
],
421436
),

lib/ui/widgets/dashboard_button.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import '../../styles.dart';
44

55
class DashboardButton extends StatelessWidget {
66
DashboardButton(
7-
{required this.onPressed, required this.color, required this.label});
7+
{required this.onPressed,
8+
required this.bgColor,
9+
required this.textColor,
10+
required this.label});
811
VoidCallback onPressed;
9-
Color color;
12+
Color bgColor;
13+
Color textColor;
1014
String label;
1115

1216
@override
@@ -17,7 +21,7 @@ class DashboardButton extends StatelessWidget {
1721
),
1822
child: ElevatedButton(
1923
style: ElevatedButton.styleFrom(
20-
primary: color,
24+
primary: bgColor,
2125
elevation: 0,
2226
shape: RoundedRectangleBorder(
2327
borderRadius: BorderRadius.circular(15),
@@ -29,10 +33,10 @@ class DashboardButton extends StatelessWidget {
2933
children: [
3034
Text(
3135
label,
32-
style: const TextStyle(
36+
style: TextStyle(
3337
fontSize: 30.0,
3438
fontWeight: FontWeight.bold,
35-
color: HackRUColors.white,
39+
color: textColor,
3640
),
3741
)
3842
],

0 commit comments

Comments
 (0)