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

98 lines
2.8 KiB
Dart

import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
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) {
return showRow();
}
Widget showRow() {
return Container(
width: double.infinity,
child: Row(
children: [
InkWell(
onTap: () => changeCurrentTab(0),
child: Container(
width: 35,
height: 35,
decoration: containerColorRadiusBorder(
index == 0
? CustomColors.accentColor
: index > 0
? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center(
child: Text(
"1",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
),
Expanded(child: mDivider(Colors.grey)),
InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container(
width: 35,
height: 35,
decoration: containerColorRadiusBorder(
index == 1
? CustomColors.accentColor
: index > 1
? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center(
child: Text(
"2",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
),
Expanded(child: mDivider(Colors.grey)),
InkWell(
onTap: () => index == 2 ? changeCurrentTab(3) : null,
child: Container(
width: 35,
height: 35,
decoration: containerColorRadiusBorder(
index == 2 ? CustomColors.accentColor : Colors.white,
2000,
Colors.black,
),
child: Center(
child: Text(
"3",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
),
],
),
);
}
}