fix: contributions bar padding
This commit is contained in:
parent
a1182ed6a5
commit
d86229e367
|
@ -9,19 +9,6 @@ import 'package:provider/provider.dart';
|
||||||
const contributionEmptyColor = '#ebedf0';
|
const contributionEmptyColor = '#ebedf0';
|
||||||
const contributionColors = ['#9be9a8', '#40c463', '#30a14e', '#216e39'];
|
const contributionColors = ['#9be9a8', '#40c463', '#30a14e', '#216e39'];
|
||||||
|
|
||||||
class HideScrollbar extends StatelessWidget {
|
|
||||||
const HideScrollbar({super.key, this.child});
|
|
||||||
final Widget? child;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return NotificationListener<ScrollNotification>(
|
|
||||||
onNotification: (_) => true,
|
|
||||||
child: child!,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ContributionDay {
|
class ContributionDay {
|
||||||
ContributionDay({this.hexColor, this.count})
|
ContributionDay({this.hexColor, this.count})
|
||||||
: assert(hexColor != null || count != null);
|
: assert(hexColor != null || count != null);
|
||||||
|
@ -63,13 +50,11 @@ class ContributionWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = context.watch<ThemeModel>();
|
final theme = context.watch<ThemeModel>();
|
||||||
return Container(
|
return SingleChildScrollView(
|
||||||
alignment: Alignment.center,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: CommonStyle.padding,
|
reverse: true,
|
||||||
child: HideScrollbar(
|
child: Padding(
|
||||||
child: SingleChildScrollView(
|
padding: CommonStyle.padding,
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
reverse: true,
|
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
|
@ -93,7 +78,7 @@ class ContributionWidget extends StatelessWidget {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue