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: Theme.of(context).textTheme.headline2.color, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(7), ), child: Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ Row( children: [ Image.asset( imageLocation, height: 30, width: 40, ), SizedBox( width: 20, ), Texts( title, fontSize: 16, color: Colors.black, ), ], ), ], ), ), ), ); } }