|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class CustomRadio extends StatefulWidget {
|
|
|
|
@ -21,17 +22,23 @@ class CustomRadioState extends State<CustomRadio> {
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
|
|
if (widget.requestData != null) {
|
|
|
|
|
widget.requestData.forEach((element) {
|
|
|
|
|
sampleData.add(
|
|
|
|
|
new RadioModel(false, element.description, element.parameterCode));
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
sampleData.add(new RadioModel(false, "Before 30 Mins", 30));
|
|
|
|
|
sampleData.add(new RadioModel(false, 'Before 1 Hour', 60));
|
|
|
|
|
sampleData.add(new RadioModel(false, 'Before 2 Hours', 120));
|
|
|
|
|
sampleData.add(new RadioModel(false, 'Before 4 Hours', 240));
|
|
|
|
|
}
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
if (widget.requestData != null) {
|
|
|
|
|
widget.requestData.forEach((element) {
|
|
|
|
|
sampleData.add(new RadioModel(
|
|
|
|
|
false, element.description, element.parameterCode));
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
sampleData.add(new RadioModel(
|
|
|
|
|
false, TranslationBase.of(context).appoReminder30, 30));
|
|
|
|
|
sampleData.add(new RadioModel(
|
|
|
|
|
false, TranslationBase.of(context).appoReminder60, 60));
|
|
|
|
|
sampleData.add(new RadioModel(
|
|
|
|
|
false, TranslationBase.of(context).appoReminder90, 90));
|
|
|
|
|
sampleData.add(new RadioModel(
|
|
|
|
|
false, TranslationBase.of(context).appoReminder120, 120));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@ -96,7 +103,7 @@ class RadioItem extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
margin: new EdgeInsets.only(left: 15.0),
|
|
|
|
|
margin: new EdgeInsets.only(left: 15.0, right: 15.0),
|
|
|
|
|
child: new Text(_item.text, style: TextStyle(fontSize: 16.0)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|