Skip to content

Commit

Permalink
fixing_container_overflowing
Browse files Browse the repository at this point in the history
  • Loading branch information
linnkhantthu committed Aug 29, 2021
1 parent 5efe6c1 commit b774d43
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/MainScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class _MainScreenState extends State<MainScreen> {
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height
];
double weightAgeFontSize = screenSize[1] * 0.05;
return Scaffold(
appBar: AppBar(
title: Text(
Expand Down Expand Up @@ -75,8 +76,8 @@ class _MainScreenState extends State<MainScreen> {
image: AssetImage(
"assets/images/gender_male.png",
),
width: 100,
height: 100,
width: screenSize[1] * 0.1,
height: screenSize[1] * 0.1,
),
Text(
"MALE",
Expand Down Expand Up @@ -122,8 +123,8 @@ class _MainScreenState extends State<MainScreen> {
image: AssetImage(
"assets/images/gender_female.png",
),
width: 100,
height: 100,
width: screenSize[1] * 0.1,
height: screenSize[1] * 0.1,
),
Text(
"FEMALE",
Expand Down Expand Up @@ -156,7 +157,7 @@ class _MainScreenState extends State<MainScreen> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(0, 15, 0, 0),
padding: EdgeInsets.fromLTRB(0, screenSize[1]*0.02, 0, 0),
child: Text(
"HEIGHT $_currentHeight cm",
style: TextStyle(
Expand Down Expand Up @@ -255,10 +256,12 @@ class _MainScreenState extends State<MainScreen> {
"-",
style: TextStyle(
color: Colors.white,
fontSize: 25,
fontSize: weightAgeFontSize,
),
),
))),
)
)
),
),
)),
Flexible(
Expand Down Expand Up @@ -297,7 +300,7 @@ class _MainScreenState extends State<MainScreen> {
"+",
style: TextStyle(
color: Colors.white,
fontSize: 25,
fontSize: weightAgeFontSize,
),
),
))),
Expand Down Expand Up @@ -383,7 +386,7 @@ class _MainScreenState extends State<MainScreen> {
"-",
style: TextStyle(
color: Colors.white,
fontSize: 25,
fontSize: weightAgeFontSize,
),
),
))),
Expand Down Expand Up @@ -425,7 +428,7 @@ class _MainScreenState extends State<MainScreen> {
"+",
style: TextStyle(
color: Colors.white,
fontSize: 25,
fontSize: weightAgeFontSize,
),
),
))),
Expand Down

0 comments on commit b774d43

Please sign in to comment.