|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
class HospitalsPage extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
_HospitalsPageState createState() => _HospitalsPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _HospitalsPageState extends State<HospitalsPage> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BaseView<FindusViewModel>(
|
|
|
|
onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(),
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
baseViewModel: model,
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(left: 15,right: 15,top: 70),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
...List.generate(model.FindusHospitalModelList.length, (index) => Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
border: Border.all(color: Colors.white, width: 0.5),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
// margin: EdgeInsets.all(4),
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
// SizedBox(height: 8,),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
width: 70,
|
|
|
|
height: 70,
|
|
|
|
// margin: EdgeInsets.only(right: 15),
|
|
|
|
child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())),
|
|
|
|
Container(child: Texts('${model.FindusHospitalModelList[index].locationName}')),//model.cOCItemList[index].cOCTitl
|
|
|
|
IconButton(
|
|
|
|
icon: Icon(Icons.person_pin_circle_outlined),
|
|
|
|
tooltip: 'Increase volume by 10',
|
|
|
|
onPressed: () {
|
|
|
|
setState(() {
|
|
|
|
MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName);
|
|
|
|
// _volume += 10;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
IconButton(
|
|
|
|
icon: Icon(Icons.phone),
|
|
|
|
tooltip: 'Increase volume by 10',
|
|
|
|
onPressed: () {
|
|
|
|
setState(() {
|
|
|
|
// _volume += 10;
|
|
|
|
launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
|
|
|
|
// Texts(
|
|
|
|
// 'Number :${model.FindusHospitalModelList[index].locationName}',
|
|
|
|
// variant: 'overline',
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// Texts('${model.FindusHospitalModelList[index].locationName}'),
|
|
|
|
Divider(height: 4.5,color: Colors.grey[500],)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
|
|
|
|
Container(width: double.infinity,
|
|
|
|
height: 45,color: Colors.red,),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|