Skip to content

Commit

Permalink
fix ui on mobile device
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidatorCoder committed Nov 22, 2021
1 parent ed1c74e commit 857ace4
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ class _HomePageState extends State<HomePage>
child: ClipRRect(
borderRadius: BorderRadius.circular(500),
child: SizedBox(
width:
MediaQuery.of(context).size.width * 0.25,
width: (Platform.isWindows ||
Platform.isMacOS)
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.4,
child: LinearProgressIndicator(
backgroundColor:
Colors.white.withOpacity(0.1),
Expand All @@ -241,7 +243,9 @@ class _HomePageState extends State<HomePage>
Container(
padding: const EdgeInsets.fromLTRB(12, 4, 12, 4),
margin: const EdgeInsets.only(bottom: 24.0),
width: MediaQuery.of(context).size.width * 0.25,
width: (Platform.isWindows || Platform.isMacOS)
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.4,
height: 48,
decoration: BoxDecoration(
color: Colors.white12,
Expand Down Expand Up @@ -283,10 +287,16 @@ class _HomePageState extends State<HomePage>
MainAxisAlignment.center,
children: [
SizedBox(
width: (MediaQuery.of(context)
.size
.width *
0.25) -
width: ((Platform.isWindows ||
Platform.isMacOS)
? MediaQuery.of(context)
.size
.width *
0.25
: MediaQuery.of(context)
.size
.width *
0.4) -
24 -
38,
child: Text(
Expand All @@ -305,10 +315,16 @@ class _HomePageState extends State<HomePage>
borderRadius:
BorderRadius.circular(500),
child: SizedBox(
width: (MediaQuery.of(context)
.size
.width *
0.25) -
width: ((Platform.isWindows ||
Platform.isMacOS)
? MediaQuery.of(context)
.size
.width *
0.25
: MediaQuery.of(context)
.size
.width *
0.4) -
24 -
38,
child: LinearProgressIndicator(
Expand Down

0 comments on commit 857ace4

Please sign in to comment.