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.
PatientApp-KKUMC/lib/widgets/data_display/services)contaniner.dart

51 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
class ServicesContainer extends StatelessWidget {
final String title;
final String imageLocation;
final Function onTap;
ServicesContainer({this.title, this.imageLocation, this.onTap});
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () => onTap(),
child: Container(
height: 60,
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
children: [
Image.asset(
imageLocation,
height: 30,
width: 40,
),
SizedBox(
width: 20,
),
Texts(
title,
fontSize: 16,
),
],
),
],
),
),
),
);
}
}