-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c78cb1
commit 754772b
Showing
9 changed files
with
160 additions
and
107 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
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
44 changes: 44 additions & 0 deletions
44
...imetable_page/features/lesson_card/ui/widgets/info_panel/lesson_card_info_panel_chip.dart
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,44 @@ | ||
part of 'package:cube_system/features/timetable_page/features/lesson_card/ui/lesson_card.dart'; | ||
|
||
class LessonCardInfoPanelChip extends ConsumerWidget { | ||
final Widget text; | ||
final bool isDestructive; | ||
final double minWidth; | ||
final Color? color; | ||
|
||
const LessonCardInfoPanelChip({ | ||
super.key, | ||
required this.text, | ||
this.isDestructive = false, | ||
this.minWidth = 0, | ||
this.color, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
final backgroundColor = isDestructive | ||
? context.colors.destructive | ||
: color ?? | ||
ref.watch(appLessonColorByLesson(ref.read(_lessonInLessonCard))); | ||
|
||
return Container( | ||
margin: const EdgeInsets.only(right: 4), | ||
padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 6), | ||
constraints: BoxConstraints(minWidth: minWidth), | ||
decoration: BoxDecoration( | ||
color: backgroundColor, | ||
borderRadius: const BorderRadius.all(Radius.circular(16)), | ||
), | ||
child: Center( | ||
child: Padding( | ||
padding: const EdgeInsets.only(top: 0.5, left: 0), | ||
child: DefaultTextStyle( | ||
style: context.textStyles.chipLabel | ||
.copyWith(color: context.colors.white), | ||
child: text, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...imetable_page/features/lesson_card/ui/widgets/info_panel/lesson_card_info_panel_icon.dart
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,50 @@ | ||
part of 'package:cube_system/features/timetable_page/features/lesson_card/ui/lesson_card.dart'; | ||
|
||
class LessonCardInfoPanelIcon extends ConsumerWidget { | ||
final Widget icon; | ||
final bool isDestructive; | ||
final Color? color; | ||
|
||
const LessonCardInfoPanelIcon({ | ||
super.key, | ||
required this.icon, | ||
this.isDestructive = false, | ||
this.color, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
final backgroundColor = isDestructive | ||
? context.colors.destructive | ||
: color ?? | ||
ref.watch(appLessonColorByLesson(ref.read(_lessonInLessonCard))); | ||
|
||
return Container( | ||
margin: const EdgeInsets.only(right: 4), | ||
width: 18, | ||
height: 18, | ||
decoration: BoxDecoration( | ||
color: backgroundColor, | ||
shape: BoxShape.circle, | ||
), | ||
child: Center( | ||
child: DefaultTextStyle( | ||
style: context.textStyles.chipLabel | ||
.copyWith(color: context.colors.white), | ||
child: IconTheme( | ||
data: Theme.of(context).iconTheme.copyWith( | ||
size: 13.5, | ||
color: context.colors.white, | ||
), | ||
child: Padding( | ||
padding: icon is Text | ||
? const EdgeInsets.only(left: 0.4) | ||
: const EdgeInsets.only(bottom: 1, right: 0.2), | ||
child: icon, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
63 changes: 0 additions & 63 deletions
63
lib/features/timetable_page/features/lesson_card/ui/widgets/lesson_card_icons_icon.dart
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.