Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit d9623e9

Browse files
committed
fix(uiux): add circular radius to linear progression bars
1 parent 958e6f1 commit d9623e9

File tree

5 files changed

+133
-8
lines changed

5 files changed

+133
-8
lines changed

.vscode/cspell.json

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"prefill",
5656
"Radarr",
5757
"Riverpod",
58+
"roboto",
5859
"SABnzbd",
5960
"scrollview",
6061
"sksl",
@@ -66,6 +67,7 @@
6667
"Tautulli",
6768
"TestFlight",
6869
"Trakt",
70+
"typescale",
6971
"unencrypted",
7072
"unignore",
7173
"Weblate",

lib/widgets/ui/linear_indicator.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ class LunaLinearPercentIndicator extends StatelessWidget {
2424
alignment: Alignment.bottomCenter,
2525
child: LinearPercentIndicator(
2626
percent: percent!,
27-
padding: const EdgeInsets.symmetric(horizontal: 2.0),
27+
padding: EdgeInsets.zero,
2828
lineHeight: 4.0,
2929
progressColor: progressColor,
30+
barRadius: const Radius.circular(LunaUI.BORDER_RADIUS),
3031
backgroundColor:
3132
backgroundColor ?? progressColor.withOpacity(LunaUI.OPACITY_SPLASH),
3233
),

lib/widgets/ui/text_style.dart

+121-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,124 @@
11
import 'package:flutter/material.dart';
2+
import 'package:google_fonts/google_fonts.dart';
23

3-
class LunaTextStyle extends TextStyle {
4-
const LunaTextStyle.labelMedium()
5-
: super(
6-
fontSize: 12.0, // md.sys.typescale.label-medium.size
7-
fontWeight: FontWeight.w500, // md.sys.typescale.label-medium.weight
8-
height: 16.0 / 12.0, // md.sys.typescale.label-medium.line-height
9-
);
4+
class LunaTextStyle {
5+
static TextStyle bodySmall() {
6+
return GoogleFonts.robotoFlex(
7+
height: 16.0, // md.sys.typescale.body-small.line-height
8+
fontSize: 12.0, // md.sys.typescale.body-small.size
9+
fontWeight: FontWeight.w400, // md.sys.typescale.body-small.weight
10+
);
11+
}
12+
13+
static TextStyle bodyMedium() {
14+
return GoogleFonts.robotoFlex(
15+
height: 20.0, // md.sys.typescale.body-medium.line-height
16+
fontSize: 14.0, // md.sys.typescale.body-medium.size
17+
fontWeight: FontWeight.w400, // md.sys.typescale.body-medium.weight
18+
);
19+
}
20+
21+
static TextStyle bodyLarge() {
22+
return GoogleFonts.robotoFlex(
23+
height: 24.0, // md.sys.typescale.body-large.line-height
24+
fontSize: 16.0, // md.sys.typescale.body-large.size
25+
fontWeight: FontWeight.w400, // md.sys.typescale.body-large.weight
26+
);
27+
}
28+
29+
static TextStyle displaySmall() {
30+
return GoogleFonts.robotoFlex(
31+
height: 44.0, // md.sys.typescale.display-small.line-height
32+
fontSize: 36.0, // md.sys.typescale.display-small.size
33+
fontWeight: FontWeight.w400, // md.sys.typescale.display-small.weight
34+
);
35+
}
36+
37+
static TextStyle displayMedium() {
38+
return GoogleFonts.robotoFlex(
39+
height: 52.0, // md.sys.typescale.display-medium.line-height
40+
fontSize: 45.0, // md.sys.typescale.display-medium.size
41+
fontWeight: FontWeight.w400, // md.sys.typescale.display-medium.weight
42+
);
43+
}
44+
45+
static TextStyle displayLarge() {
46+
return GoogleFonts.robotoFlex(
47+
height: 64.0, // md.sys.typescale.display-large.line-height
48+
fontSize: 57.0, // md.sys.typescale.display-large.size
49+
fontWeight: FontWeight.w400, // md.sys.typescale.display-large.weight
50+
);
51+
}
52+
53+
static TextStyle headlineSmall() {
54+
return GoogleFonts.robotoFlex(
55+
height: 40.0, // md.sys.typescale.headline-small.line-height
56+
fontSize: 32.0, // md.sys.typescale.headline-small.size
57+
fontWeight: FontWeight.w400, // md.sys.typescale.headline-small.weight
58+
);
59+
}
60+
61+
static TextStyle headlineMedium() {
62+
return GoogleFonts.robotoFlex(
63+
height: 36.0, // md.sys.typescale.headline-medium.line-height
64+
fontSize: 28.0, // md.sys.typescale.headline-medium.size
65+
fontWeight: FontWeight.w400, // md.sys.typescale.headline-medium.weight
66+
);
67+
}
68+
69+
static TextStyle headlineLarge() {
70+
return GoogleFonts.robotoFlex(
71+
height: 32.0, // md.sys.typescale.headline-large.line-height
72+
fontSize: 24.0, // md.sys.typescale.headline-large.size
73+
fontWeight: FontWeight.w400, // md.sys.typescale.headline-large.weight
74+
);
75+
}
76+
77+
static TextStyle labelSmall() {
78+
return GoogleFonts.robotoFlex(
79+
height: 16.0, // md.sys.typescale.label-small.line-height
80+
fontSize: 11.0, // md.sys.typescale.label-small.size
81+
fontWeight: FontWeight.w500, // md.sys.typescale.label-small.weight
82+
);
83+
}
84+
85+
static TextStyle labelMedium() {
86+
return GoogleFonts.robotoFlex(
87+
height: 16.0, // md.sys.typescale.label-medium.line-height
88+
fontSize: 12.0, // md.sys.typescale.label-medium.size
89+
fontWeight: FontWeight.w500, // md.sys.typescale.label-medium.weight
90+
);
91+
}
92+
93+
static TextStyle labelLarge() {
94+
return GoogleFonts.robotoFlex(
95+
height: 20.0, // md.sys.typescale.label-large.line-height
96+
fontSize: 14.0, // md.sys.typescale.label-large.size
97+
fontWeight: FontWeight.w500, // md.sys.typescale.label-large.weight
98+
);
99+
}
100+
101+
static TextStyle titleSmall() {
102+
return GoogleFonts.robotoFlex(
103+
height: 20.0, // md.sys.typescale.title-small.line-height
104+
fontSize: 14.0, // md.sys.typescale.title-small.size
105+
fontWeight: FontWeight.w500, // md.sys.typescale.title-small.weight
106+
);
107+
}
108+
109+
static TextStyle titleMedium() {
110+
return GoogleFonts.robotoFlex(
111+
height: 24.0, // md.sys.typescale.title-medium.line-height
112+
fontSize: 16.0, // md.sys.typescale.title-medium.size
113+
fontWeight: FontWeight.w500, // md.sys.typescale.title-medium.weight
114+
);
115+
}
116+
117+
static TextStyle titleLarge() {
118+
return GoogleFonts.robotoFlex(
119+
height: 28.0, // md.sys.typescale.title-large.line-height
120+
fontSize: 22.0, // md.sys.typescale.title-large.size
121+
fontWeight: FontWeight.w400, // md.sys.typescale.title-large.weight
122+
);
123+
}
10124
}

pubspec.lock

+7
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,13 @@ packages:
560560
url: "https://pub.dartlang.org"
561561
source: hosted
562562
version: "5.0.1"
563+
google_fonts:
564+
dependency: "direct main"
565+
description:
566+
name: google_fonts
567+
url: "https://pub.dartlang.org"
568+
source: hosted
569+
version: "3.0.1"
563570
google_nav_bar:
564571
dependency: "direct main"
565572
description:

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies:
3131
flutter_riverpod: ^2.0.0-dev.9
3232
flutter_spinkit: ^5.1.0
3333
go_router: ^5.0.1
34+
google_fonts: ^3.0.1
3435
google_nav_bar: ^5.0.6
3536
hive: ^2.2.3
3637
hive_flutter: ^1.1.0

0 commit comments

Comments
 (0)