|
|
|
|
@ -1,21 +1,91 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
// class MethodTypeCard extends StatelessWidget {
|
|
|
|
|
// const MethodTypeCard({
|
|
|
|
|
// Key key,
|
|
|
|
|
// this.assetPath,
|
|
|
|
|
// this.onTap,
|
|
|
|
|
// this.label, this.height = 20, this.isSvg = true,
|
|
|
|
|
// }) : super(key: key);
|
|
|
|
|
// final String assetPath;
|
|
|
|
|
// final Function onTap;
|
|
|
|
|
// final String label;
|
|
|
|
|
// final double height;
|
|
|
|
|
// final bool isSvg;
|
|
|
|
|
//
|
|
|
|
|
// @override
|
|
|
|
|
// Widget build(BuildContext context) {
|
|
|
|
|
// return InkWell(
|
|
|
|
|
// onTap: onTap,
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.all(10),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
// Radius.circular(10),
|
|
|
|
|
// ),
|
|
|
|
|
// border: Border.all(
|
|
|
|
|
// color: HexColor('#707070'),
|
|
|
|
|
// width: 0.1),
|
|
|
|
|
// ),
|
|
|
|
|
// height: 170,
|
|
|
|
|
// child: Padding(
|
|
|
|
|
// padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// isSvg?SvgPicture.asset(assetPath, height: 60,
|
|
|
|
|
// width: 60,):Image.asset(
|
|
|
|
|
// assetPath,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// width: 60,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height:height ,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// label,
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// color: Color(0xFF2E303A),
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// )),
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
class MethodTypeCard extends StatelessWidget {
|
|
|
|
|
const MethodTypeCard({
|
|
|
|
|
Key key,
|
|
|
|
|
this.assetPath,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.label, this.height = 20,
|
|
|
|
|
this.assetPath,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.label,
|
|
|
|
|
this.height = 20, this.isSvg = true,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
final String assetPath;
|
|
|
|
|
final Function onTap;
|
|
|
|
|
final GestureTapCallback onTap;
|
|
|
|
|
final String label;
|
|
|
|
|
final double height;
|
|
|
|
|
final bool isSvg;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double cardHeight = SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort? 22 : SizeConfig.isHeightLarge?25:20);
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: onTap,
|
|
|
|
|
child: Container(
|
|
|
|
|
@ -25,38 +95,37 @@ class MethodTypeCard extends StatelessWidget {
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: HexColor('#707070'),
|
|
|
|
|
width: 0.1),
|
|
|
|
|
border: Border.all(color: HexColor('#707070'), width: 0.1),
|
|
|
|
|
),
|
|
|
|
|
height: 170,
|
|
|
|
|
height: cardHeight,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(
|
|
|
|
|
assetPath,
|
|
|
|
|
height: 60,
|
|
|
|
|
width: 60,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height:height ,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
label,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
isSvg?SvgPicture.asset(assetPath, width: SizeConfig.widthMultiplier* (14),
|
|
|
|
|
height: cardHeight * 0.20): Image.asset(
|
|
|
|
|
assetPath,
|
|
|
|
|
width: SizeConfig.widthMultiplier* (12),
|
|
|
|
|
height: cardHeight * 0.35,
|
|
|
|
|
// height: ,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: height,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
label,
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* (SizeConfig.isHeightVeryShort?3:3.7),
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|