fix stepper labels and translate it.
parent
8a69becab3
commit
88b04a8f5d
@ -0,0 +1,22 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StepDetailsWidget extends StatelessWidget {
|
||||
final String stepLabel;
|
||||
final double marginLeft;
|
||||
|
||||
const StepDetailsWidget({
|
||||
Key key, this.stepLabel, this.marginLeft = 0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppText(
|
||||
stepLabel,
|
||||
fontWeight: FontWeight.bold,
|
||||
marginLeft: marginLeft,
|
||||
fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * 3.5 //12,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class StatusLabel extends StatelessWidget {
|
||||
const StatusLabel({
|
||||
Key key,
|
||||
this.stepId,
|
||||
this.selectedStepId,
|
||||
}) : super(key: key);
|
||||
|
||||
final int stepId;
|
||||
final int selectedStepId;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: SizeConfig.getTextMultiplierBasedOnWidth() * 18.5,
|
||||
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFF1E9D3)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFFD8E8DB)
|
||||
: Color(0xFFCCCCCC),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.0),
|
||||
),
|
||||
border: Border.all(color: HexColor('#707070'), width: 0.30),
|
||||
),
|
||||
child: Center(
|
||||
child: AppText(
|
||||
stepId == selectedStepId
|
||||
? TranslationBase.of(context).inProgress
|
||||
: stepId < selectedStepId
|
||||
? TranslationBase.of(context).completed
|
||||
: TranslationBase.of(context).locked,
|
||||
fontWeight: FontWeight.bold,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFCC9B14)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFF969696),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue