Skip to content

Commit

Permalink
Merge pull request #426 from hpi-dhc/380-rename-pharmeapp
Browse files Browse the repository at this point in the history
Rename PharMeApp
  • Loading branch information
Benjamin-Frost authored Jul 26, 2022
2 parents 93fdcc5 + d7021fe commit 54d03d9
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion app/lib/common/l10n.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

extension PharmeL10nContext on BuildContext {
extension PharMeL10nContext on BuildContext {
AppLocalizations get l10n => AppLocalizations.of(this)!;
}

Expand Down
8 changes: 4 additions & 4 deletions app/lib/common/pages/medications/medication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ class MedicationPage extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(medication.name, style: PharmeTheme.textTheme.displaySmall),
Text(medication.name, style: PharMeTheme.textTheme.displaySmall),
IconButton(
onPressed: () => sharePdf(medication),
icon: Icon(
Icons.ios_share,
size: 32,
color: PharmeTheme.primaryColor,
color: PharMeTheme.primaryColor,
),
),
],
Expand All @@ -88,12 +88,12 @@ class MedicationPage extends StatelessWidget {
Container(
padding: EdgeInsets.all(6),
decoration: BoxDecoration(
color: PharmeTheme.onSurfaceColor,
color: PharMeTheme.onSurfaceColor,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Text(
medication.drugclass!,
style: PharmeTheme.textTheme.titleMedium!.copyWith(
style: PharMeTheme.textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w100,
),
),
Expand Down
6 changes: 3 additions & 3 deletions app/lib/common/pages/medications/widgets/annotation_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ClinicalAnnotationCard extends StatelessWidget {
child: Text(
medication.guidelines[0].implication ??
medication.guidelines[0].cpicImplication!,
style: PharmeTheme.textTheme.bodySmall,
style: PharMeTheme.textTheme.bodySmall,
),
),
]);
Expand All @@ -76,14 +76,14 @@ class ClinicalAnnotationCard extends StatelessWidget {
context.l10n.medications_page_gene_name(
medication.guidelines[0].phenotype.geneSymbol.name,
),
style: PharmeTheme.textTheme.bodyLarge!.copyWith(
style: PharMeTheme.textTheme.bodyLarge!.copyWith(
color: Colors.black.withOpacity(0.5),
),
),
Row(children: [
Text(
medication.guidelines[0].cpicClassification!.toUpperCase(),
style: PharmeTheme.textTheme.bodyLarge!.copyWith(
style: PharMeTheme.textTheme.bodyLarge!.copyWith(
fontWeight: FontWeight.bold,
color: Colors.black.withOpacity(0.7),
),
Expand Down
8 changes: 4 additions & 4 deletions app/lib/common/pages/medications/widgets/disclaimer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class Disclaimer extends StatelessWidget {
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
color: PharmeTheme.surfaceColor,
border: Border.all(color: PharmeTheme.errorColor, width: 1.2),
color: PharMeTheme.surfaceColor,
border: Border.all(color: PharMeTheme.errorColor, width: 1.2),
),
child: Row(children: [
Icon(
Icons.warning_rounded,
size: 52,
color: PharmeTheme.errorColor,
color: PharMeTheme.errorColor,
),
SizedBox(width: 8),
Flexible(
child: Text(
context.l10n.medications_page_disclaimer,
style: PharmeTheme.textTheme.labelMedium!.copyWith(
style: PharMeTheme.textTheme.labelMedium!.copyWith(
fontWeight: FontWeight.w100,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class RecommendationCard extends StatelessWidget {
Text(
medication.guidelines[0].recommendation ??
medication.guidelines[0].cpicRecommendation!,
style: PharmeTheme.textTheme.bodyLarge,
style: PharMeTheme.textTheme.bodyLarge,
),
]),
),
Expand Down
8 changes: 4 additions & 4 deletions app/lib/common/pages/medications/widgets/source_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class SourceCard extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
gradient: LinearGradient(colors: [
PharmeTheme.primaryColor.withOpacity(0.8),
PharmeTheme.secondaryColor.withOpacity(0.8),
PharMeTheme.primaryColor.withOpacity(0.8),
PharMeTheme.secondaryColor.withOpacity(0.8),
]),
),
child: Padding(
Expand All @@ -32,7 +32,7 @@ class SourceCard extends StatelessWidget {
flex: 3,
child: Text(
name,
style: PharmeTheme.textTheme.bodyMedium!.copyWith(
style: PharMeTheme.textTheme.bodyMedium!.copyWith(
color: Colors.white,
),
),
Expand All @@ -42,7 +42,7 @@ class SourceCard extends StatelessWidget {
flex: 10,
child: Text(
description,
style: PharmeTheme.textTheme.bodySmall!.copyWith(
style: PharMeTheme.textTheme.bodySmall!.copyWith(
color: Colors.white,
),
),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/pages/medications/widgets/sub_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SubHeader extends StatelessWidget {
children: [
Text(
title.toUpperCase(),
style: PharmeTheme.textTheme.bodySmall!.copyWith(letterSpacing: 2),
style: PharMeTheme.textTheme.bodySmall!.copyWith(letterSpacing: 2),
),
if (tooltip.isNotNullOrBlank) ...[
SizedBox(width: 8),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:black_hole_flutter/black_hole_flutter.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class PharmeTheme {
class PharMeTheme {
static ThemeData get light {
return ThemeData(
colorScheme: ColorScheme(
Expand Down
6 changes: 3 additions & 3 deletions app/lib/common/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import '../models/metadata.dart';
import '../module.dart' hide MetaData;

class PharmeApp extends StatelessWidget {
PharmeApp({Key? key}) : super(key: key);
class PharMeApp extends StatelessWidget {
PharMeApp({Key? key}) : super(key: key);

final _appRouter = AppRouter();
final _isLoggedIn = MetaData.instance.isLoggedIn ?? false;
Expand All @@ -16,7 +16,7 @@ class PharmeApp extends StatelessWidget {
routerDelegate: _appRouter.delegate(
initialDeepLink: _isLoggedIn ? 'main' : 'onboarding',
),
theme: PharmeTheme.light,
theme: PharMeTheme.light,
localizationsDelegates: [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/widgets/headings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class Heading extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Text(text, style: PharmeTheme.textTheme.titleMedium);
return Text(text, style: PharMeTheme.textTheme.titleMedium);
}
}
8 changes: 4 additions & 4 deletions app/lib/faq/pages/faq.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class FaqPage extends StatelessWidget {
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
PharmeTheme.primaryColor.shade500,
PharmeTheme.primaryColor.shade800,
PharMeTheme.primaryColor.shade500,
PharMeTheme.primaryColor.shade800,
],
),
borderRadius: BorderRadius.circular(16),
Expand All @@ -49,13 +49,13 @@ class FaqPage extends StatelessWidget {
children: [
Text(
context.l10n.faq_pharmacogenomics,
style: PharmeTheme.textTheme.titleLarge!
style: PharMeTheme.textTheme.titleLarge!
.copyWith(color: Colors.white),
),
SizedBox(height: 8),
Text(
context.l10n.faq_page_description,
style: PharmeTheme.textTheme.bodyMedium!
style: PharMeTheme.textTheme.bodyMedium!
.copyWith(color: Colors.white),
),
],
Expand Down
2 changes: 1 addition & 1 deletion app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import 'common/module.dart';
Future<void> main() async {
await initServices();
await fetchAndSaveLookups();
runApp(PharmeApp());
runApp(PharMeApp());
await cleanupServices();
}
10 changes: 5 additions & 5 deletions app/lib/onboarding/pages/onboarding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class OnboardingPage extends HookWidget {
height: 8,
width: isActive ? 24 : 16,
decoration: BoxDecoration(
color: isActive ? Colors.white : PharmeTheme.onSurfaceColor,
color: isActive ? Colors.white : PharMeTheme.onSurfaceColor,
borderRadius: BorderRadius.all(Radius.circular(12)),
),
);
Expand Down Expand Up @@ -165,7 +165,7 @@ class OnboardingPage extends HookWidget {
isLastPage
? context.l10n.onboarding_get_started
: context.l10n.onboarding_next,
style: PharmeTheme.textTheme.headlineSmall!
style: PharMeTheme.textTheme.headlineSmall!
.copyWith(color: Colors.white),
),
SizedBox(width: 8),
Expand Down Expand Up @@ -215,14 +215,14 @@ class OnboardingSubPage extends StatelessWidget {
SizedBox(height: 32),
Text(
getHeader(context),
style: PharmeTheme.textTheme.headlineLarge!.copyWith(
style: PharMeTheme.textTheme.headlineLarge!.copyWith(
color: Colors.white,
),
),
SizedBox(height: 16),
Text(
getText(context),
style: PharmeTheme.textTheme.bodyMedium!.copyWith(
style: PharMeTheme.textTheme.bodyMedium!.copyWith(
color: Colors.white,
),
),
Expand Down Expand Up @@ -253,7 +253,7 @@ class BottomCard extends StatelessWidget {
Expanded(
child: Text(
getText(context),
style: PharmeTheme.textTheme.bodyMedium,
style: PharMeTheme.textTheme.bodyMedium,
textAlign: (icon != null) ? TextAlign.start : TextAlign.center,
),
),
Expand Down
10 changes: 5 additions & 5 deletions app/lib/reports/pages/reports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,23 @@ class SliverReportsHeaderDelegate extends SliverPersistentHeaderDelegate {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
color: PharmeTheme.secondaryColor,
color: PharMeTheme.secondaryColor,
clipBehavior: Clip.hardEdge,
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(children: [
Text(
context.l10n.reports_page_disclaimer_title,
style:
PharmeTheme.textTheme.titleLarge!.copyWith(color: Colors.white),
PharMeTheme.textTheme.titleLarge!.copyWith(color: Colors.white),
),
SizedBox(height: 8),
Expanded(
child: Row(children: [
Flexible(
child: Text(
context.l10n.reports_page_disclaimer_text,
style: PharmeTheme.textTheme.bodyMedium!
style: PharMeTheme.textTheme.bodyMedium!
.copyWith(color: Colors.white),
),
),
Expand Down Expand Up @@ -164,14 +164,14 @@ class ReportCard extends StatelessWidget {
SizedBox(width: 12),
Text(
medicationName,
style: PharmeTheme.textTheme.titleMedium,
style: PharMeTheme.textTheme.titleMedium,
),
]),
if (medicationIndication.isNotNullOrBlank) ...[
SizedBox(height: 12),
Text(
medicationIndication!,
style: PharmeTheme.textTheme.titleSmall,
style: PharMeTheme.textTheme.titleSmall,
),
]
],
Expand Down
10 changes: 5 additions & 5 deletions app/lib/search/pages/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class SearchPage extends HookWidget {
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
PharmeTheme.primaryColor,
PharmeTheme.secondaryColor,
PharMeTheme.primaryColor,
PharMeTheme.secondaryColor,
],
),
),
Expand All @@ -37,7 +37,7 @@ class SearchPage extends HookWidget {
SvgPicture.asset('assets/images/logo.svg'),
Text(
context.l10n.search_page_typeInMedication,
style: PharmeTheme.textTheme.bodyLarge!.copyWith(
style: PharMeTheme.textTheme.bodyLarge!.copyWith(
color: Colors.white,
),
),
Expand Down Expand Up @@ -145,7 +145,7 @@ class MedicationCard extends StatelessWidget {
Flexible(
child: Text(
medicationName,
style: PharmeTheme.textTheme.titleMedium,
style: PharMeTheme.textTheme.titleMedium,
),
),
Icon(Icons.arrow_forward_ios),
Expand All @@ -155,7 +155,7 @@ class MedicationCard extends StatelessWidget {
if (medicationDescription.isNotNullOrBlank)
Text(
medicationDescription!,
style: PharmeTheme.textTheme.titleSmall,
style: PharMeTheme.textTheme.titleSmall,
)
],
),
Expand Down
4 changes: 2 additions & 2 deletions app/lib/settings/pages/about_us.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class AboutUsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: PharmeTheme.backgroundColor,
color: PharMeTheme.backgroundColor,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
Expand All @@ -16,7 +16,7 @@ class AboutUsPage extends StatelessWidget {
margin: EdgeInsets.only(bottom: 16),
child: Text(
context.l10n.settings_page_about_us,
style: PharmeTheme.textTheme.headlineSmall,
style: PharMeTheme.textTheme.headlineSmall,
),
),
Text(context.l10n.settings_page_about_us_text)
Expand Down
4 changes: 2 additions & 2 deletions app/lib/settings/pages/privacy_policy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class PrivacyPolicyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: PharmeTheme.backgroundColor,
color: PharMeTheme.backgroundColor,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
Expand All @@ -16,7 +16,7 @@ class PrivacyPolicyPage extends StatelessWidget {
margin: EdgeInsets.only(bottom: 16),
child: Text(
context.l10n.settings_page_privacy_policy,
style: PharmeTheme.textTheme.headlineSmall,
style: PharMeTheme.textTheme.headlineSmall,
),
),
Text(context.l10n.settings_page_privacy_policy_text)
Expand Down
4 changes: 2 additions & 2 deletions app/lib/settings/pages/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SettingsPage extends StatelessWidget {
ListTile(
title: Text(
context.l10n.settings_page_account_settings,
style: PharmeTheme.textTheme.bodyLarge,
style: PharMeTheme.textTheme.bodyLarge,
),
),
ListTile(
Expand All @@ -25,7 +25,7 @@ class SettingsPage extends StatelessWidget {
ListTile(
title: Text(
context.l10n.settings_page_more,
style: PharmeTheme.textTheme.bodyLarge,
style: PharMeTheme.textTheme.bodyLarge,
),
),
ListTile(
Expand Down
Loading

0 comments on commit 54d03d9

Please sign in to comment.