@ -11,19 +11,20 @@ import 'package:flutter/material.dart';
import ' package:provider/provider.dart ' ;
import ' ../../../soap_update/shared_soap_widgets/SOAP_open_items.dart ' ;
import ' ../chief_complaint/widgets/add_chief_complaint.dart ' ;
import ' add_allergies.dart ' ;
/ / ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget {
class UpdateAllergiesWidget VidaPlus extends StatefulWidget {
List < MySelectedAllergy > ? myAllergiesList ;
UpdateAllergiesWidget ( { Key ? key , this . myAllergiesList } ) ;
UpdateAllergiesWidget VidaPlus ( { Key ? key , this . myAllergiesList } ) ;
@ override
_UpdateAllergiesWidgetState createState ( ) = > _UpdateAllergiesWidgetState ( ) ;
}
class _UpdateAllergiesWidgetState extends State < UpdateAllergiesWidget > {
bool noKnownAllergies = false ;
class _UpdateAllergiesWidgetState extends State < UpdateAllergiesWidget VidaPlus > {
@ override
Widget build ( BuildContext context ) {
ProjectViewModel projectViewModel = Provider . of ( context ) ;
@ -35,15 +36,39 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
return Column (
children: [
SOAPOpenItems (
label: " ${ TranslationBase . of ( context ) . addAllergies } " ,
onTap: ( ) {
SizedBox (
height: 20 ,
) ,
AddSoapItem (
title: " ${ TranslationBase . of ( context ) . addAllergies } " ,
onAddSoapItemClicked: ( ) {
openAllergiesList ( context , changeAllState , removeAllergy ) ;
} ,
) ,
SizedBox (
height: 20 ,
) ,
Row (
mainAxisSize: MainAxisSize . max ,
children: [
Checkbox (
value: noKnownAllergies ,
checkColor: Colors . white ,
activeColor: Colors . red ,
onChanged: ( value ) {
noKnownAllergies = value ! ;
setState ( ( ) { } ) ;
} ,
materialTapTargetSize: MaterialTapTargetSize . shrinkWrap , / / Reduces padding around checkbox
visualDensity: VisualDensity . compact , / / Minimizes size further
) ,
AppText ( TranslationBase . of ( context ) . noKnownAllergies )
] ,
) ,
Container (
margin: EdgeInsets . only ( left: 15 , right: 15 , top: 15 ) ,
child: Column (
@ -190,4 +215,8 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
} ) ;
} ) ;
}
loadPatientAllergies ( ) {
}
}