1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-25 23:34:01 +01:00
git-touch-android-ios-app/lib/widgets/border_view.dart

49 lines
1.1 KiB
Dart
Raw Normal View History

2019-10-02 08:58:11 +02:00
import 'package:flutter/material.dart';
2019-11-05 14:22:41 +01:00
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
2019-10-02 08:58:11 +02:00
class BorderView extends StatelessWidget {
final double height;
final double leftPadding;
2019-11-05 14:22:41 +01:00
BorderView({
2019-10-02 08:58:11 +02:00
this.height = 1,
this.leftPadding = 0,
});
@override
Widget build(BuildContext context) {
2019-11-05 14:22:41 +01:00
final theme = Provider.of<ThemeModel>(context);
2019-10-02 08:58:11 +02:00
return Row(
children: <Widget>[
SizedBox(
width: leftPadding,
height: height,
child: DecoratedBox(
2019-11-05 14:22:41 +01:00
decoration: BoxDecoration(color: theme.palette.background),
),
),
Expanded(
child: SizedBox(
height: height,
child: DecoratedBox(
decoration: BoxDecoration(color: theme.palette.border),
),
2019-10-02 08:58:11 +02:00
),
),
],
);
// Physical pixel
// return Container(
// margin: EdgeInsets.only(left: leftPadding),
// decoration: BoxDecoration(
// border: Border(
// top: BorderSide(color: color, width: height),
// ),
// ),
// );
}
}