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.
HMG_Patient_App/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart

98 lines
2.8 KiB
Dart

7 months ago
import 'package:hmg_patient_app/theme/colors.dart';
import 'package:hmg_patient_app/uitl/utils_new.dart';
5 years ago
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class StepsWidget extends StatelessWidget {
final int? index;
final Function? changeCurrentTab;
5 years ago
StepsWidget({Key? key, this.index, this.changeCurrentTab});
5 years ago
@override
Widget build(BuildContext context) {
4 years ago
return showRow();
}
5 years ago
4 years ago
Widget showRow() {
return Container(
width: double.infinity,
child: Row(
children: [
InkWell(
onTap: () => changeCurrentTab!(0),
5 years ago
child: Container(
width: 35,
height: 35,
4 years ago
decoration: containerColorRadiusBorder(
index == 0
? CustomColors.accentColor
: index! > 0
? Colors.green[700]!
4 years ago
: Colors.white,
2000,
Colors.black),
5 years ago
child: Center(
4 years ago
child: Text(
"1",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
5 years ago
),
),
),
),
4 years ago
Expanded(child: mDivider(Colors.grey)),
InkWell(
onTap: () => index! >= 2 ? changeCurrentTab!(1) : null,
5 years ago
child: Container(
width: 35,
height: 35,
4 years ago
decoration: containerColorRadiusBorder(
index == 1
? CustomColors.accentColor
: index! > 1
? Colors.green[700]!
4 years ago
: Colors.white,
2000,
Colors.black),
5 years ago
child: Center(
4 years ago
child: Text(
"2",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
5 years ago
),
),
),
),
4 years ago
Expanded(child: mDivider(Colors.grey)),
InkWell(
onTap: () => index == 2 ? changeCurrentTab!(3) : null,
5 years ago
child: Container(
width: 35,
height: 35,
4 years ago
decoration: containerColorRadiusBorder(
index == 2 ? CustomColors.accentColor : Colors.white,
2000,
Colors.black,
5 years ago
),
child: Center(
4 years ago
child: Text(
"3",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
5 years ago
),
),
),
),
4 years ago
],
),
5 years ago
);
}
}