add border and remove padding

This commit is contained in:
2025-03-12 10:20:06 +02:00
parent 13291c5fb8
commit 8eccbf4479
2 changed files with 281 additions and 299 deletions

View File

@@ -54,7 +54,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
@override
Widget build(BuildContext context) {
return MihAppToolBody(
borderOn: false,
borderOn: true,
bodyItem: getBody(),
);
}
@@ -73,9 +73,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
calcWidth = 300;
}
}
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
return Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
@@ -88,8 +86,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
Container(
//color: Colors.white,
@@ -112,8 +109,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
answer,
style: TextStyle(
fontSize: 30,
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
fontWeight: FontWeight.bold),
),
),
@@ -152,9 +148,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.messageTextColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -173,9 +168,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.messageTextColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -193,9 +187,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.messageTextColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -213,9 +206,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonText: buttons[index],
buttonColor:
MzanziInnovationHub.of(context)!.theme.errorColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -230,12 +222,10 @@ class _SimpleCalcState extends State<SimpleCalc> {
});
},
buttonText: buttons[index],
buttonColor: MzanziInnovationHub.of(context)!
.theme
.successColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
buttonColor:
MzanziInnovationHub.of(context)!.theme.successColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -267,9 +257,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.messageTextColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -287,9 +276,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
);
}
@@ -298,7 +286,6 @@ class _SimpleCalcState extends State<SimpleCalc> {
),
),
],
),
);
}
}

View File

@@ -262,15 +262,13 @@ class _TipCalcState extends State<TipCalc> {
@override
Widget build(BuildContext context) {
return MihAppToolBody(
borderOn: false,
borderOn: true,
bodyItem: getBody(),
);
}
Widget getBody() {
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
return Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(
@@ -282,8 +280,7 @@ class _TipCalcState extends State<TipCalc> {
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
MIHNumberField(
controller: billAmountController,
@@ -338,8 +335,7 @@ class _TipCalcState extends State<TipCalc> {
validateInput();
},
buttonText: "Calculate",
buttonColor:
MzanziInnovationHub.of(context)!.theme.successColor(),
buttonColor: MzanziInnovationHub.of(context)!.theme.successColor(),
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
),
@@ -357,7 +353,6 @@ class _TipCalcState extends State<TipCalc> {
),
),
],
),
);
}
}