I was inspired by the work/volunteering that I had been doing for Illumination Repairs C.I.C. to attempt to create a contact app and I decided to create it in Flutter so that eventually it would work on both Android and iOS without having to write the whole thing twice – there are pros and cons to this approach which I hope to cover in another post.
I opened up Android Studio on my Development Laptop and set to work….
I first of all I discovered how to create three tabs within the AppBar which would enable me to switch between three pages easily. They were “Home”, “Email” and “Website”. I used the artwork from the Illumination Repairs Instagram posts – cheeky I know but I was hoping that the company would benefit from my efforts so it was justified. The colour scheme that they had chosen was black and white so I felt that I had to keep it as it is part of their “brand” – I would have much rather used a more colourful palate.
Here you can clearly see the tabs (set on Home). The artwork is the first page of a video presentation which they created to “tell their story”. The next images are some of the “slides” in the video presentation.
It took me a while to work out how to have a mpg4 run in the app but I succeeded. I will leave a link to my GitHub Repo for this app at the end so you can see how I did it rather than explain here.
Next is the “Email” tab which leads to an email based enquiry form which sends an email to a designated address.
Finally, there is the “Website” tab which has a link to email (blank) but again to a designated email address. I later considered this surplus to requirements because the form on the email tab form was sufficient.
It also has a link to Illumination Repairs Facebook page and the Illumination Repairs website.
The biggest flaw with this app is that for all of the people who approach us for a repair it is a one-off contact – who would download an app just to get one or two things repaired, so it will never go into production in it’s current form. All is not lost – I know a little more about how to embed a video into a Flutter app, I have more of an idea about how to create an email enquiry form in Flutter, I can put links into buttons to webpages and email (the second email code works a bit different to the first) and the links to the webpages including Facebook/Meta can be done several ways – I tried the most common way (according to Stack Overflow) and it didn’t work as it was trying to parse ipv6 addresses and I think that that particular method was best suited to ipv4 addresses and so I found another method much better. I will use what I have learned in other apps and it has opened my horizons to the possibility of other apps.
That link to my GitHub Repository containing the code for this app:-
Hello and welcome back. My latest Flutter and Dart project is my body mass index calculator or as some know it BMI. Body mass index is a somewhat out of vogue way of assessing if someone is of a healthy weight for their height and quite rightly so, many a professional Rugby player will have a BMI of 35 or above, particularly those forwards who are all muscle and muscle weighs more than fat. A safer option would be to assess %fat content but that is more difficult so I think that BMI calculation will be around for a bit longer yet so this app may well prove helpful. The calculation for body mass index is:-
BMI = weight in kilograms / (height in metres x height in metres) (substitute * for x if you prefer!).
My app also has a calculator for conversion of imperial weights (stones and pounds – British not US) to metric (kg), and another for imperial height or length (feet and inches) to metric (metres) which can them be used for the BMI calculator. I have included a calculate button for each calculation and a reset button to clear all of the boxes.
It is the Flutter version of part of a previous Android app with several calculators within it. My intention is to ask those to whom I show all of these Flutter calculation apps which ones they would like to see as a suite and which would not be useful to them. I intend to have several sites; perhaps a paediatric suite and an adult based suite and target them at appropriate audiences. If you have any thoughts on the matter, please feel free to share them with me. Thank you.
It is probably not on your usual list of daily considerations but for some people it is. Those people are very talented doctors who treat children and in particular very small children as this calculation is used to decide what dose of drugs to give to these children and to decide on other very critical treatments.
The calculation is:-
Body Surface area = the square root of ((weight in kilograms x length in centimetres)/3600)
The method is known as the Mosteller method.
Users type in the weight and length and press ‘Calculate’ then to reset the app press ‘Reset’ – simples…
Again, this app is quite niche but may prove useful if this is your line of work. The final outcome is likely to be that this will be included as part of a suite of specialist applications. In this form I hope to make it available for both Android and iOS. See you soon…
You have recently read about how I spent a bit of time studying Flutter and Dart with a free course from Udemy. The first personal project that I have commenced is to convert a medical calculations app that I initially created in Android. It included an app to calculate drug and fluid doses used in paediatric cardiac arrest, a body mass index calculator, a fluid infusion rate calculator, a body surface area calculator (used to calculate drug doses for babies), and two metric unit calculators which work in different ways (volumes and lengths). In it’s original form, the app would only work on Android devices. I wanted to present an app or a series of apps that can be used on both Android and iOS so to recreate them in Flutter would be one way of achieving that.
I decided to convert each part of the original Android app separately and I started with the Paediatric Resuscitation dose calculator.
When children get sick it is often not serious but they can deteriorate very quickly and when they do it is important to recognise the signs and act upon then quickly. Often it is to do with dehydration, sepsis due to infection, a low blood sugar or trauma and the story with which they present may give you clues as to what the problem is. A thorough assessment of the patency of their airway, their work of breathing, their circulation, their level of consciousness and any injuries over the whole of their bodies – correcting problems as you go in this priority order is the way to go – not leaving ‘any stone unturned!’. Hopefully, you can reverse the decline and make the child well again. This is the best outcome. Sick children tend to be very resilient to a point and it is up to this point that you have the best chance of success and this success comes by good assessment as above BUT if that window of opportunity is missed the sick child will ‘crash’ quickly and may even go into cardiac arrest. The calculations made by this app are those taught to Doctors, Nurses and other healthcare professionals in how to deal with very sick children and those who have gone into cardiac arrest. The Resuscitation Council UK and the European Resuscitation Council Paediatric resuscitation courses teach these calculations in the case of Paediatric Cardiac arrest. In practice, paediatric resuscitation teams are calculating these numbers as they chase down the hospital corridors to respond to the emergency but my motivation for writing this particular app was for the paediatric ward nurses and doctors who would be involved with resuscitating the child so that they can be be better prepared with drugs and fluids when the ‘team’ arrives. In my experience of being an instructor on Paediatric Resuscitation courses it seemed to me that whilst the attendees were able to do the calculations, they had to have a refresher about what formulae to use as they were not using them all of the time so if it were used it might save them preparation time and stress.
All of the calculations are based on the child’s age as this is reckoned to provide to most accurate calculations in this situation. Users of this app just type in the child’s age and the app will calculate the child’s (likely) weight, the size of uncuffed endotracheal tube (for those under 8years old), the size of cuffed endotracheal tube (for those 8 and over), how much of a DC electrical shock to give them – measured in joules and based on their calculated weight, how much crystalloid fluid to give as a bolus (isotonic sodium chloride or compound sodium lactate) which can be repeated if necessary, how much adrenaline to give as a bolus (which can be repeated every three to five minutes), how much amiodarone could be given if necessary and how much glucose can be given if necessary for very low blood sugar.
Not all of these calculations will be needed but by the same token some of the calculations would be appropriate for emergency treatment of very sick children, not just those in cardiac arrest. Young children particularly will collapse and even arrest due to low fluid volume – dehydration (due to diarrhoea, vomiting, haemorrhage or severe sepsis – the fluid calculation will be of particular importance), low blood sugar (so the glucose calculation will be important). It is unusual for a young child to suffer from a primary cardiac cause unless they were born with it. With severe dehydration there can be a salt imbalance which can cause cardiac problems. It is with older ‘children’ that a primarily cardiac cause might be suspected as adolescents and young adults can suffer from sudden arrhythmias which can cause collapse and cardiac arrest. This is mainly where the DC Shock and amiodarone calculations come into play most frequently as they are used to correct these arrhythmias. The DC shock is delivered by a defibrillator (in manual mode usually by a medical professional with proven rhythm recognition skills.
It is a bit niche but I think that it could be useful for those less familiar with the calculations but may be called to assist in the ‘resuscitation’ (including fluid resuscitation) of a child in a non-critical care healthcare environment such as a standard children’s ward. Once I finish the whole suite of calculation apps in Flutter, I will consult with a former colleague of mine from when I was a Resuscitation Officer who is Lead Paediatric Officer at my local (large) NHS Trust to see what she thinks about it. I showed her photos of the original Android version and she expressed an interest so we will see. Wish me luck!
For those of you that want to see pictures of Android Studio:-