forked from yaso_meth/mih-project
add title to Calculator
This commit is contained in:
@@ -25,6 +25,7 @@ class _MIHCalculatorState extends State<MIHCalculator> {
|
||||
appActionButton: getAction(),
|
||||
appTools: getTools(),
|
||||
appBody: getToolBody(),
|
||||
appToolTitles: getToolTitle(),
|
||||
selectedbodyIndex: _selectedIndex,
|
||||
onIndexChange: (newValue) {
|
||||
setState(() {
|
||||
@@ -71,4 +72,12 @@ class _MIHCalculatorState extends State<MIHCalculator> {
|
||||
];
|
||||
return toolBodies;
|
||||
}
|
||||
|
||||
List<String> getToolTitle() {
|
||||
List<String> toolTitles = [
|
||||
"Simple Calculator",
|
||||
"Tip Calculator",
|
||||
];
|
||||
return toolTitles;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: true,
|
||||
borderOn: false,
|
||||
bodyItem: getBody(),
|
||||
);
|
||||
}
|
||||
@@ -96,18 +96,6 @@ class _SimpleCalcState extends State<SimpleCalc> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"Simple Calculator",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||
const SizedBox(height: 10),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
alignment: Alignment.centerRight,
|
||||
|
||||
@@ -263,7 +263,7 @@ class _TipCalcState extends State<TipCalc> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: true,
|
||||
borderOn: false,
|
||||
bodyItem: getBody(),
|
||||
);
|
||||
}
|
||||
@@ -273,18 +273,6 @@ class _TipCalcState extends State<TipCalc> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"Tip Calculator",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||
const SizedBox(height: 10),
|
||||
MIHNumberField(
|
||||
controller: billAmountController,
|
||||
hintText: "Bill Amount",
|
||||
|
||||
Reference in New Issue
Block a user