Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormpp committed Dec 10, 2024
1 parent 9f22685 commit d175e90
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/uni_ui/lib/cards/course_grade_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ class CourseGradeCard extends StatelessWidget {
{required this.courseName,
required this.ects,
required this.grade,
required this.tooltip,
super.key});

final String courseName;
final double ects;
final double grade;
final String tooltip;

@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return GenericCard(
key: key,
tooltip: tooltip,
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.height * 0.09,
Expand Down
3 changes: 3 additions & 0 deletions packages/uni_ui/lib/cards/exam_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ExamCard extends StatelessWidget {
required this.acronym,
required this.rooms,
required this.type,
required this.tooltip,
this.startTime,
this.isInvisible = false,
this.showIcon = true,
Expand All @@ -20,6 +21,7 @@ class ExamCard extends StatelessWidget {
final String acronym;
final List<String> rooms;
final String type;
final String tooltip;
final String? startTime;
final bool isInvisible;
final bool showIcon;
Expand All @@ -31,6 +33,7 @@ class ExamCard extends StatelessWidget {
opacity: isInvisible ? 0.6 : 1.0,
child: GenericCard(
key: key,
tooltip: tooltip,
child: Row(
children: [
Expanded(
Expand Down
64 changes: 64 additions & 0 deletions packages/uni_ui/lib/cards/profile_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import 'package:flutter/material.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
import 'package:uni_ui/generic_card.dart';

class ProfileCard extends StatelessWidget {
const ProfileCard({
super.key,
required this.label,
required this.content,
required this.tooltip,
this.onClick,
});

final String label;
final String content;
final String tooltip;
final VoidCallback? onClick;

@override
Widget build(BuildContext context) {
return Stack(
clipBehavior: Clip.none,
children: [
GenericCard(
tooltip: tooltip,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
label,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.titleSmall!,
),
Text(
content,
overflow: TextOverflow.ellipsis,
),
],
),
),
if (onClick != null)
Positioned(
bottom: -4,
right: 2,
child: GestureDetector(
onTap: onClick,
child: Container(
child: PhosphorIcon(
PhosphorIcons.plus(PhosphorIconsStyle.light),
color: Colors.white,
size: 14,
),
padding: EdgeInsets.all(3.0),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.primary,
),
),
),
),
],
);
}
}
3 changes: 3 additions & 0 deletions packages/uni_ui/lib/cards/service_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ class ServiceCard extends StatelessWidget {
super.key,
required this.name,
required this.openingHours,
required this.tooltip,
});

final String name;
final List<String> openingHours;
final String tooltip;

@override
Widget build(BuildContext context) {
return GenericCard(
key: key,
tooltip: tooltip,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down

0 comments on commit d175e90

Please sign in to comment.