Skip to content

Commit

Permalink
Merge branch 'delta' of https://github.com/becooq81/PillKaBoo into delta
Browse files Browse the repository at this point in the history
  • Loading branch information
becooq81 committed Jun 9, 2024
2 parents 431874e + 15901c9 commit f90611e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/widgets.dart';
import 'package:pillkaboo/src/app/tts/tts_service.dart';

import '../../../../../app/global_audio_player.dart';
Expand Down Expand Up @@ -116,6 +115,15 @@ class _MedInfoPageWidgetState extends State<MedInfoPageWidget> {
double textFontSize = 30.0/892.0 * MediaQuery.of(context).size.height;
double paddingBelowAppBar = 25.0/892.0 * MediaQuery.of(context).size.height;

bool showChildText = false;
bool showExprDateText = false;
bool showIngredientText = false;
bool showUsageText = false;
bool showHowToTakeText = false;
bool showWarningText = false;
bool showComboText = false;
bool showSideEffectText = false;

return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
Expand Down Expand Up @@ -190,66 +198,85 @@ class _MedInfoPageWidgetState extends State<MedInfoPageWidget> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Semantics(
container: true,
label: childText,
child: ExcludeSemantics(
excluding: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, paddingBelowAppBar, 0, 0),
child: GestureDetector(
onTap: () {
if (!PKBAppState().useScreenReader) {
TtsService().speak(childText);
}
},
child: Row(
container: true,
label: childText,
child: ExcludeSemantics(
excluding: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, paddingBelowAppBar, 0, 0),
child: GestureDetector(
onTap: () {
if (!PKBAppState().useScreenReader) {
TtsService().speak(childText);
}
},
onDoubleTap: () {
setState(() {
showChildText = !showChildText;
});
},
child: Column(
children: [
Row(
mainAxisSize: MainAxisSize.max,
children: [
ExcludeSemantics(
excluding: true,
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(25.0, 0.0, 40.0, 0.0),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Container(
width: imageContainerSize,
height: imageContainerSize,
decoration: BoxDecoration(
color: PKBAppState().secondaryColor,
shape: BoxShape.circle,
),
child: SvgPicture.asset(
'assets/images/allergy.svg',
fit: BoxFit.contain,
colorFilter: ColorFilter.mode(
PKBAppState().tertiaryColor,
BlendMode.srcIn,
),
),
borderRadius: BorderRadius.circular(8.0),
child: Container(
width: imageContainerSize,
height: imageContainerSize,
decoration: BoxDecoration(
color: PKBAppState().secondaryColor,
shape: BoxShape.circle,
),
child: SvgPicture.asset(
'assets/images/allergy.svg',
fit: BoxFit.contain,
colorFilter: ColorFilter.mode(
PKBAppState().tertiaryColor,
BlendMode.srcIn,
),
),
),
),
),
),
ExcludeSemantics(
excluding: true,
child: Text(
'알러지',
style: PillKaBooTheme.of(context).titleMedium.override(
fontFamily:
PillKaBooTheme.of(context).titleMediumFamily,
fontSize: textFontSize,
color: PKBAppState().secondaryColor,
fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey(
PillKaBooTheme.of(context).titleMediumFamily),
),
'알러지',
style: PillKaBooTheme.of(context).titleMedium.override(
fontFamily: PillKaBooTheme.of(context).titleMediumFamily,
fontSize: textFontSize,
color: PKBAppState().secondaryColor,
fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey(
PillKaBooTheme.of(context).titleMediumFamily),
),
),
),
],
),
)
Visibility(
visible: showChildText,
child: Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Text(
childText,
style: TextStyle(fontSize: 14, color: PKBAppState().secondaryColor),
),
),
),
],
),
),
),),
),
),
),
Semantics(
container: true,
label: exprDateText,
Expand Down
1 change: 1 addition & 0 deletions lib/src/ui/pages/settings/help_page/help_page_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class _HelpPageWidgetState extends State<HelpPageWidget> {
late HelpPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();

// TODO: Add descriptions regarding TTS use
String howToRecognizeMedicine = "약 정보 인식 홈 화면에서 약 인식 버튼을 누르고, 카메라에서 30cm를 떨어져서 약의 곽을 천천히 돌려가며 비춰주세요. 약정보와 유통기한이 각각 인식이 되었을 때 진동이 울리고, 진동이 두번 울려 모두 인식이 완료되면 성공음과 함께 약의 이름을 읽어드립니다. 버튼을 넘겨가며 정보를 확인해보세요.";
String howToRecognizePrescribed = "처방약 인식 정확한 인식을 위해 처방약을 하나씩 분리해 보관해주세요. 홈 화면에서 처방약 인식 버튼을 누르고, 카메라에서 30cm 떨어져서 하나의 처방약을 비춰주세요. 잠시 후 뒤집어서 다시 비춰주세요. 인식이 되면 처방약을 먹어야 할 식사 시간을 알려드립니다.";
String howToAddAllergies = "알러지 성분 설정 홈 화면에서 환경 설정 버튼을 누르고, 다음 화면에서 알러지 성분 설정 버튼을 눌러주세요. 추가하기 버튼으로 알러지 성분을 등록하고 관리하세요. 등록된 성분은 인식된 약의 주성분일 경우에 아이 관련 주의사항으로 안내드립니다.";
Expand Down

0 comments on commit f90611e

Please sign in to comment.