-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ui/redesign' into ui/page-layouts
- Loading branch information
Showing
9 changed files
with
189 additions
and
642 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.10.0-beta.53+358 | ||
1.10.0-beta.54+359 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
**/ios/Flutter/.last_build_id | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Android Studio will place build artifacts here | ||
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
|
||
/lib/main.dart | ||
pubspec.lock |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:phosphor_flutter/phosphor_flutter.dart'; | ||
import 'package:uni_ui/cards/generic_card.dart'; | ||
import 'package:uni_ui/theme.dart'; | ||
|
||
class ScheduleCard extends StatelessWidget { | ||
const ScheduleCard( | ||
{super.key, | ||
required this.name, | ||
required this.acronym, | ||
required this.room, | ||
required this.type, | ||
// required this.badgeColor, | ||
this.isActive = false, | ||
this.teacherName, | ||
this.teacherPhoto}); | ||
|
||
final String name; | ||
final String acronym; | ||
final String room; | ||
final String type; | ||
// final BadgeColors badgeColor; | ||
final bool isActive; | ||
final String? teacherName; | ||
final String? teacherPhoto; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return GenericCard( | ||
gradient: isActive | ||
? RadialGradient( | ||
colors: [ | ||
Color(0xFF280709), | ||
Color(0xFF511515), | ||
], | ||
center: Alignment.topLeft, | ||
radius: 1.5, | ||
stops: [0, 1]) | ||
: null, | ||
key: key, | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Expanded( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [ | ||
if (isActive) ...[ | ||
PhosphorIcon( | ||
PhosphorIcons.clock(PhosphorIconsStyle.duotone), | ||
color: Theme.of(context).colorScheme.secondary, | ||
size: 20, | ||
), | ||
SizedBox(width: 5), | ||
], | ||
Text( | ||
acronym, | ||
overflow: TextOverflow.ellipsis, | ||
style: isActive | ||
? Theme.of(context).textTheme.titleLarge | ||
: Theme.of(context).textTheme.headlineSmall, | ||
), | ||
const SizedBox(width: 8), //TODO: Create a custom Gap()? | ||
Badge( | ||
label: Text(type), | ||
backgroundColor: BadgeColors.tp, | ||
textColor: Theme.of(context).colorScheme.surface, | ||
), | ||
], | ||
), | ||
Text( | ||
name, | ||
overflow: TextOverflow.ellipsis, | ||
style: isActive | ||
? Theme.of(context).textTheme.titleSmall | ||
: Theme.of(context).textTheme.bodySmall, | ||
), | ||
SizedBox(height: 5), | ||
if (isActive) | ||
Row(children: [ | ||
CircleAvatar( | ||
radius: 15, | ||
backgroundImage: AssetImage( | ||
teacherPhoto ?? | ||
'assets/images/profile_placeholder.png', // to change | ||
)), | ||
const SizedBox(width: 8), //TODO: create gap()? | ||
Text(teacherName!, | ||
style: Theme.of(context).textTheme.titleSmall), | ||
]) | ||
], | ||
), | ||
), | ||
Column( | ||
children: [ | ||
PhosphorIcon( | ||
PhosphorIcons.mapPin(PhosphorIconsStyle.duotone), | ||
color: isActive | ||
? Theme.of(context).colorScheme.secondary | ||
: Theme.of(context).iconTheme.color, | ||
size: 35, | ||
), | ||
Text(room, | ||
overflow: TextOverflow.ellipsis, | ||
style: TextStyle( | ||
color: isActive | ||
? Theme.of(context).colorScheme.secondary | ||
: Theme.of(context).colorScheme.primary)), | ||
], | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
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
Oops, something went wrong.