fix: physical pixel border
This commit is contained in:
parent
891ca417cd
commit
42f67c3ed1
|
@ -113,7 +113,7 @@ class ThemeModel with ChangeNotifier {
|
|||
tertiaryText: PrimerColors.gray500,
|
||||
background: PrimerColors.white,
|
||||
grayBackground: PrimerColors.gray100,
|
||||
border: PrimerColors.gray100,
|
||||
border: Colors.grey.shade400,
|
||||
);
|
||||
case Brightness.dark:
|
||||
return Palette(
|
||||
|
@ -123,7 +123,7 @@ class ThemeModel with ChangeNotifier {
|
|||
tertiaryText: PrimerColors.gray500,
|
||||
background: PrimerColors.black,
|
||||
grayBackground: PrimerColors.gray800,
|
||||
border: PrimerColors.gray900,
|
||||
border: Colors.grey.shade600,
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
|
|
|
@ -7,7 +7,7 @@ class BorderView extends StatelessWidget {
|
|||
final double leftPadding;
|
||||
|
||||
BorderView({
|
||||
this.height = 1,
|
||||
this.height,
|
||||
this.leftPadding = 0,
|
||||
});
|
||||
|
||||
|
@ -15,6 +15,18 @@ class BorderView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
|
||||
if (height == null) {
|
||||
// Physical pixel
|
||||
return Container(
|
||||
margin: EdgeInsets.only(left: leftPadding),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(color: theme.palette.border, width: 0),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
|
@ -34,15 +46,5 @@ class BorderView extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
);
|
||||
|
||||
// Physical pixel
|
||||
// return Container(
|
||||
// margin: EdgeInsets.only(left: leftPadding),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border(
|
||||
// top: BorderSide(color: color, width: height),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue