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

98 lines
2.8 KiB
Dart

4 years ago
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/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;
StepsWidget({Key key, this.index, this.changeCurrentTab});
@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(
5 years ago
onTap: () => changeCurrentTab(0),
child: Container(
width: 35,
height: 35,
4 years ago
decoration: containerColorRadiusBorder(
index == 0
? CustomColors.accentColor
: index > 0
? Colors.green[700]
: 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(
5 years ago
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container(
width: 35,
height: 35,
4 years ago
decoration: containerColorRadiusBorder(
index == 1
? CustomColors.accentColor
: index > 1
? Colors.green[700]
: 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
);
}
}