Skip to content

Commit

Permalink
Merge pull request #31 from ajay963/homePage
Browse files Browse the repository at this point in the history
fixed an issue of overflow using expanded and textoverflow
  • Loading branch information
himanshusharma89 authored Feb 22, 2021
2 parents 86ae966 + 2a5e737 commit 3f92cd7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 48 deletions.
46 changes: 27 additions & 19 deletions lib/widgets/product/product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,45 +131,53 @@ class _ProductPageState extends State<ProductPage> {
height: height * 0.01,
),
Container(
width: width * 0.32,
width: width * 0.40,
// width: 100,
// height: 40,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
children: [
Text(
'height'.toUpperCase(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
// fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 11),
),
Text(
widget.prodHeight.toString(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16),
)
],
),
Column(
children: [
Text(
'sold by'.toUpperCase(),
style: TextStyle(
// fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 11),
),
Text(
widget.seller,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16),
)
],
Expanded(
child: Column(
children: [
Text(
'sold by'.toUpperCase(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
// fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 11),
),
Text(
widget.seller,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16),
)
],
),
)
],
),
Expand Down
55 changes: 26 additions & 29 deletions lib/widgets/splash.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:async';

import 'package:flutter/material.dart';

class Splash extends StatefulWidget {
Expand All @@ -8,7 +7,6 @@ class Splash extends StatefulWidget {
}

class _SplashState extends State<Splash> {

@override
void initState() {
super.initState();
Expand All @@ -23,36 +21,35 @@ class _SplashState extends State<Splash> {
void navigationPage() {
Navigator.of(context).pushReplacementNamed('/dashboard');
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/splash.png',
)
)
),
child: Stack(
children: [
Positioned(
top: MediaQuery.of(context).size.height*0.85,
left: MediaQuery.of(context).size.width*0.47,
child: Container(
height: 35,width: 35,
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.white),
backgroundColor: Colors.white,
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/splash.png',
))),
child: Stack(
children: [
Positioned(
top: MediaQuery.of(context).size.height * 0.85,
left: MediaQuery.of(context).size.width * 0.47,
child: Container(
height: 35,
width: 35,
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.white),
),
),
),
),
],
),
)
);
],
),
));
}
}
}

0 comments on commit 3f92cd7

Please sign in to comment.