Skip to content

Commit

Permalink
Hide StudentCard Text on Tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber committed Dec 10, 2024
1 parent d16a995 commit f0da98d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
19 changes: 11 additions & 8 deletions lib/homeComponent/view/contactCard/contact_card_loading_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'package:campus_flutter/base/enums/device.dart';
import 'package:campus_flutter/base/services/device_type_service.dart';
import 'package:campus_flutter/base/util/placeholder_text.dart';
import 'package:campus_flutter/base/util/shimmer_view.dart';
import 'package:campus_flutter/homeComponent/view/contactCard/contact_card_view.dart';
Expand All @@ -20,15 +22,16 @@ class ContactCardLoadingView extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ShimmerView(
child: PlaceholderText(
text: "StudentCard".toUpperCase(),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Colors.grey,
fontWeight: FontWeight.w700,
),
if (DeviceService.getType(context) == Device.phone)
ShimmerView(
child: PlaceholderText(
text: "StudentCard".toUpperCase(),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Colors.grey,
fontWeight: FontWeight.w700,
),
),
),
),
ShimmerView(
child: PlaceholderText(
text: "Max Mustermann",
Expand Down
17 changes: 10 additions & 7 deletions lib/homeComponent/view/contactCard/contact_card_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:campus_flutter/base/enums/device.dart';
import 'package:campus_flutter/base/extensions/base_64_decode_image_data.dart';
import 'package:campus_flutter/base/services/device_type_service.dart';
import 'package:campus_flutter/base/util/delayed_loading_indicator.dart';
import 'package:campus_flutter/homeComponent/view/contactCard/contact_card_loading_view.dart';
import 'package:campus_flutter/navigation_service.dart';
Expand Down Expand Up @@ -67,13 +69,14 @@ class _ContactCardViewState extends ConsumerState<ContactCardView> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"StudentCard".toUpperCase(),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Colors.grey,
fontWeight: FontWeight.w700,
),
),
if (DeviceService.getType(context) == Device.phone)
Text(
"StudentCard".toUpperCase(),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Colors.grey,
fontWeight: FontWeight.w700,
),
),
Text(
data?.fullName ?? profile.fullName,
style: Theme.of(context).textTheme.headlineSmall,
Expand Down

0 comments on commit f0da98d

Please sign in to comment.