1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-01 15:11:21 +01:00

Rounds the edges of the progress bar

This commit is contained in:
Marty Fuhry 2024-02-02 09:32:59 -05:00
parent edba462faf
commit fde8026253
No known key found for this signature in database
GPG key ID: E2AB6392D894D900

View file

@ -15,32 +15,36 @@ class MemoryProgressIndicator extends StatelessWidget {
return LayoutBuilder( return LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
final tickWidth = constraints.maxWidth / ticks; final tickWidth = constraints.maxWidth / ticks;
return Stack( return ClipRRect(
children: [ borderRadius: const BorderRadius.all(Radius.circular(2.0)),
LinearProgressIndicator( child: Stack(
value: value, children: [
), LinearProgressIndicator(
Row( value: value,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, ),
children: List.generate( Row(
ticks, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
(i) => Container( children: List.generate(
width: tickWidth, ticks,
height: 4, (i) => Container(
decoration: BoxDecoration( width: tickWidth,
border: i == 0 height: 4,
? null decoration: BoxDecoration(
: Border( border: i == 0
left: BorderSide( ? null
color: Theme.of(context).scaffoldBackgroundColor, : Border(
width: 1, left: BorderSide(
color:
Theme.of(context).scaffoldBackgroundColor,
width: 1,
),
), ),
), ),
), ),
), ),
), ),
), ],
], ),
); );
}, },
); );