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.
96 lines
3.0 KiB
Dart
96 lines
3.0 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:diplomaticquarterapp/models/hmg_services.dart';
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
class ServicesView extends StatelessWidget {
|
|
HmgServices hmgServices;
|
|
|
|
ServicesView(this.hmgServices);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor),
|
|
child: Stack(
|
|
children: [
|
|
Container(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
mFlex(1),
|
|
Flexible(
|
|
flex: 8,
|
|
child: Column(
|
|
children: [
|
|
Flexible(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(12.0),
|
|
child: Opacity(
|
|
opacity: 0.07,
|
|
child: SvgPicture.asset(
|
|
hmgServices.icon,
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
mFlex(1),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Container(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
padding: EdgeInsets.all(MediaQuery.of(context).size.width / 30),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
mFlex(1),
|
|
SvgPicture.asset(hmgServices.icon),
|
|
mFlex(2),
|
|
Text(
|
|
hmgServices.title,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
Container(
|
|
width: double.infinity,
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: AutoSizeText(
|
|
hmgServices.subTitle,
|
|
maxLines: 1,
|
|
style: TextStyle(
|
|
fontSize: 10,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
mFlex(1),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|