Skip to content

Commit

Permalink
Merge branch 'develop' into ui/exam_card
Browse files Browse the repository at this point in the history
  • Loading branch information
thePeras authored Aug 21, 2024
2 parents b718ebb + 418b9b2 commit 8a9b185
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/uni_app/app_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0-beta.23+286
1.9.0-beta.24+287
2 changes: 1 addition & 1 deletion packages/uni_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish_to: "none" # We do not publish to pub.dev
# To change it manually, override the value in app_version.txt.
# The app version code is automatically also bumped by CI.
# Do not change it manually.
version: 1.9.0-beta.23+286
version: 1.9.0-beta.24+287

environment:
sdk: ">=3.4.0 <4.0.0"
Expand Down
28 changes: 28 additions & 0 deletions packages/uni_ui/lib/modal/modal.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:figma_squircle/figma_squircle.dart';
import 'package:flutter/material.dart';

class ModalDialog extends StatelessWidget {
const ModalDialog({
required this.children,
});

final List<Widget> children;

@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Colors.transparent,
child: ClipSmoothRect(
radius: SmoothBorderRadius(cornerRadius: 30, cornerSmoothing: 1),
child: Container(
padding: const EdgeInsets.all(20.0),
color: Theme.of(context).colorScheme.surface,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: children,
),
)),
);
}
}
57 changes: 57 additions & 0 deletions packages/uni_ui/lib/modal/widgets/enrollment_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:uni_ui/theme.dart';

class ModalEnrollementInfo extends StatelessWidget {
const ModalEnrollementInfo({required this.enrollements});

final Map<String, String> enrollements;

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(top: 10.0),
width: double.infinity,
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Theme.of(context).dividerColor, width: 1))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Enrollments", style: Theme.of(context).textTheme.bodyMedium),
Wrap(
spacing: 1,
direction: Axis.horizontal,
children: enrollements.entries.map((entry) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(entry.key,
style: Theme.of(context)
.textTheme
.labelLarge
?.copyWith(
color: Theme.of(context).primaryColor)),
Container(
padding: const EdgeInsets.all(4.0),
margin: const EdgeInsets.all(3.0),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(20)),
color: Theme.of(context).primaryColor),
child: Text(
entry.value,
style: Theme.of(context)
.textTheme
.labelSmall
?.copyWith(
color: pureWhite,
),
))
],
);
}).toList())
],
));
}
}
45 changes: 45 additions & 0 deletions packages/uni_ui/lib/modal/widgets/info_row.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';

class ModalInfoRow extends StatelessWidget {
const ModalInfoRow(
{super.key,
required this.title,
required this.description,
required this.icon,
this.onPressed});

final String title;
final String description;
final IconData icon;
final void Function()? onPressed;

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(3.0),
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Theme.of(context).dividerColor, width: 1))),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.bodyMedium,
),
Text(description,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).secondaryHeaderColor)),
],
),
),
IconButton(onPressed: onPressed, icon: PhosphorIcon(icon))
],
));
}
}
28 changes: 28 additions & 0 deletions packages/uni_ui/lib/modal/widgets/person_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';

class ModalPersonInfo extends StatelessWidget {
const ModalPersonInfo({this.image, required this.name});

final Image? image;
final String name;

@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: 20.0),
child: Column(
children: [
CircleAvatar(
radius: 60.0,
backgroundImage: image?.image,
backgroundColor: Colors.green,
),
Text(
name,
style: Theme.of(context).textTheme.displaySmall,
)
],
),
);
}
}
42 changes: 42 additions & 0 deletions packages/uni_ui/lib/modal/widgets/service_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
import 'package:uni_ui/theme.dart';

class ModalServiceInfo extends StatelessWidget {
const ModalServiceInfo({required this.name, required this.durations});

final String name;
final List<String> durations;

@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: 20.0),
child: Column(
children: [
Text(
name,
style: TextStyle(
fontSize: 25.0, color: Theme.of(context).primaryColor),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
PhosphorIcon(
PhosphorIcons.clock(PhosphorIconsStyle.duotone),
color: darkGray,
duotoneSecondaryColor: normalGray,
),
Column(
children: durations.map((duration) {
return Text(duration,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).secondaryHeaderColor));
}).toList(),
)
],
),
],
));
}
}
1 change: 1 addition & 0 deletions packages/uni_ui/lib/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ThemeData lightTheme = ThemeData(
dividerColor: lightGray,
hintColor: lightGray,
indicatorColor: darkRed,
secondaryHeaderColor: normalGray,
iconTheme: const IconThemeData(color: darkRed),
);

Expand Down

0 comments on commit 8a9b185

Please sign in to comment.