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, ), ), ), ), ), ], ), ); } }