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.
115 lines
3.8 KiB
Dart
115 lines
3.8 KiB
Dart
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class AvailabilityInfo extends StatelessWidget {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BaseView<ProductDetailViewModel>(
|
|
onModelReady: (model) =>
|
|
model.getProductLocationData(),
|
|
builder: (_, model, wi) => model
|
|
.productLocationService
|
|
.length ==
|
|
0
|
|
? Container(
|
|
padding: EdgeInsets.all(15),
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
TranslationBase.of(context)
|
|
.noLocationAvailable,
|
|
),
|
|
// Text('No location Available'),
|
|
)
|
|
: ListView.builder(
|
|
physics: ScrollPhysics(),
|
|
scrollDirection: Axis.vertical,
|
|
shrinkWrap: true,
|
|
itemCount: model
|
|
.productLocationService
|
|
.length,
|
|
itemBuilder:
|
|
(BuildContext context,
|
|
int index) {
|
|
return Padding(
|
|
padding:
|
|
EdgeInsets.all(8.0),
|
|
child: Column(
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.start,
|
|
children: [
|
|
Expanded(
|
|
flex: 1,
|
|
child: Image.network(model
|
|
.productLocationService[
|
|
index]
|
|
.projectImageUrl),
|
|
),
|
|
SizedBox(
|
|
width: 10,
|
|
),
|
|
Expanded(
|
|
flex: 4,
|
|
child: Text(
|
|
model
|
|
.productLocationService[
|
|
index]
|
|
.locationDescription +
|
|
"\n" +
|
|
convertCityName(
|
|
model
|
|
.productLocationService[
|
|
0]
|
|
.cityName
|
|
.toString(),
|
|
),
|
|
style: TextStyle(
|
|
fontSize:
|
|
12),
|
|
),
|
|
),
|
|
Expanded(
|
|
flex: 1,
|
|
child: IconButton(
|
|
icon: Icon(Icons
|
|
.location_on),
|
|
color:
|
|
Colors.red,
|
|
onPressed:
|
|
() {},
|
|
),
|
|
),
|
|
Expanded(
|
|
flex: 1,
|
|
child: IconButton(
|
|
icon: Icon(Icons
|
|
.phone),
|
|
color:
|
|
Colors.red,
|
|
onPressed:
|
|
() {},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Divider(
|
|
height: 1.2,
|
|
color: Colors.grey)
|
|
],
|
|
),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|