You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart

209 lines
7.5 KiB
Dart

// import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
// import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
// import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
//
// const activeCardColor = Color(0xff70777A);
// const inactiveCardColor = Color(0xffFAFAFd);
//
// class BloodSugar extends StatefulWidget {
// @override
// _BloodSugarState createState() => _BloodSugarState();
// }
//
// Color color;
//
// class _BloodSugarState extends State<BloodSugar> {
// Color cardMGColor = inactiveCardColor;
// Color cardMMOLColor = inactiveCardColor;
//
// void updateColor(int type) {
// //MG/DLT card
// if (type == 1) {
// if (cardMGColor == inactiveCardColor) {
// cardMGColor = activeCardColor;
// cardMMOLColor = inactiveCardColor;
// } else {
// cardMGColor = inactiveCardColor;
// }
// }
// if (type == 2) {
// if (cardMMOLColor == inactiveCardColor) {
// cardMMOLColor = activeCardColor;
// cardMGColor = inactiveCardColor;
// } else {
// cardMMOLColor = inactiveCardColor;
// }
// }
// }
//
// bool _visible = false;
//
// TextEditingController textController = new TextEditingController();
// String finalValue;
//
// @override
// Widget build(BuildContext context) {
// return AppScaffold(
// isShowAppBar: true,
// appBarTitle: 'Blood Sugar Conversion',
// body: Padding(
// padding: const EdgeInsets.all(16.0),
// child: Column(
// //crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// width: 350.0,
// child: Text(
// 'Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.',
// //textAlign: TextAlign.center,
// style: TextStyle(fontSize: 20.0),
// ),
// ),
// SizedBox(
// height: 15.0,
// ),
// Container(
// color: Colors.white,
// height: 120.0,
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// //crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 15.0),
// child: Row(
// children: [
// Texts(
// 'Convert from',
// )
// ],
// ),
// ),
// SizedBox(
// height: 9.0,
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: [
// GestureDetector(
// onTap: () {
// setState(() {
// updateColor(1);
// finalValue = textController.text * 3;
// });
// },
// child: Container(
// height: 55.0,
// width: 150.0,
// decoration: BoxDecoration(
// color: cardMGColor,
// borderRadius: BorderRadius.circular(10.0),
// ),
// child: Padding(
// padding: const EdgeInsets.symmetric(
// vertical: 0.0, horizontal: 18.0),
// child: Texts('MG/DLt TO \nMMOL/L'),
// ),
// ),
// ),
// GestureDetector(
// onTap: () {
// setState(() {
// updateColor(2);
// finalValue = textController.text * 6;
// });
// },
// child: Container(
// height: 55.0,
// width: 150.0,
// decoration: BoxDecoration(
// color: cardMMOLColor,
// borderRadius: BorderRadius.circular(10.0),
// ),
// child: Padding(
// padding:
// const EdgeInsets.symmetric(horizontal: 16.0),
// child: Texts('MG/DLt TO\n MMOL/L'),
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// ),
// SizedBox(
// height: 25.0,
// ),
// Container(
// height: 55.0,
// color: Colors.white,
// child: TextFormField(
// controller: textController,
// inputFormatters: <TextInputFormatter>[
// FilteringTextInputFormatter.digitsOnly
// ],
// keyboardType: TextInputType.number,
// decoration: InputDecoration(
// labelText: " Enter the reading value",
// ),
// ),
// ),
// SizedBox(
// height: 5.0,
// ),
// Visibility(
// visible: _visible,
// child: Container(
// height: 95.0,
// width: 350.0,
// decoration: BoxDecoration(
// color: Colors.white,
// border: Border.all(color: Colors.black),
// borderRadius: BorderRadius.circular(15.0),
// ),
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Texts('Result:'),
// Text(
// finalValue.toString(),
// style: TextStyle(fontSize: 35.0),
// ),
// ],
// ),
// ),
// ),
// ),
// SizedBox(
// height: 15.0,
// ),
// Flexible(
// child: Container(
// height: 100.0,
// width: 150.0,
// child: Button(
// label: 'CALCULATE',
// onTap: () {
// setState(() {
// _visible = !_visible;
// });
// },
// ),
// ),
// ),
// ],
// ),
// ),
// );
// }
// }