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.
51 lines
1.6 KiB
Dart
51 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:hmg_nurses/extensions/int_extensions.dart';
|
|
import 'package:hmg_nurses/extensions/string_extensions.dart';
|
|
import 'package:hmg_nurses/model/patient/patient_file_information_prm_list.dart';
|
|
import 'package:hmg_nurses/model/patient_profile_card_model.dart';
|
|
import 'package:sizer/sizer.dart';
|
|
|
|
class PatientProfileButton extends StatelessWidget {
|
|
GetPatientFileInformationPrmList patient;
|
|
PatientProfileCardModel model;
|
|
|
|
PatientProfileButton({super.key, required this.patient, required this.model});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: () {
|
|
Navigator.pushNamed(context, model.route, arguments: patient);
|
|
},
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
|
border: Border.fromBorderSide(
|
|
BorderSide(
|
|
color: Colors.grey.withOpacity(0.4),
|
|
width: 1,
|
|
),
|
|
),
|
|
),
|
|
padding: const EdgeInsets.all(12),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
SvgPicture.asset(
|
|
model.icon,
|
|
width: 30,
|
|
height: 30,
|
|
),
|
|
12.height,
|
|
model.nameLine1.toTextAuto(fontSize: 10),
|
|
model.nameLine2.toTextAuto(fontSize: 10),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|