Skip to content

Commit

Permalink
Yaru progress indicator (#116)
Browse files Browse the repository at this point in the history
* Add custom YaruProgressIndicator

* Adapt tests

* Adapt example

* Remove unused backgroundColor property

* Fix tests

* Fix comment (circular -> linear)

* Fix test

* Fix out of bound values drawing
  • Loading branch information
Jupi007 authored May 12, 2022
1 parent d6e41ec commit 1416b07
Show file tree
Hide file tree
Showing 7 changed files with 661 additions and 102 deletions.
25 changes: 21 additions & 4 deletions example/lib/example_page_items.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,30 @@ final examplePageItems = <YaruPageItem>[
builder: (_) => ExtraOptionRowPage(),
),
YaruPageItem(
titleBuilder: (context) => Text('YaruLinearProgressIndicator'),
titleBuilder: (context) => Text('YaruProgressIndicator'),
iconData: YaruIcons.download,
builder: (_) => YaruPage(
children: [
YaruLinearProgressIndicator(
value: 50 / 100,
)
Padding(
padding: const EdgeInsets.only(top: 25),
child: YaruCircularProgressIndicator(),
),
Padding(
padding: const EdgeInsets.only(top: 25),
child: YaruCircularProgressIndicator(
value: .75,
),
),
Padding(
padding: const EdgeInsets.only(top: 25),
child: YaruLinearProgressIndicator(),
),
Padding(
padding: const EdgeInsets.only(top: 25),
child: YaruLinearProgressIndicator(
value: .75,
),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/widgets/dummy_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DummySection extends StatelessWidget {
return YaruSection(
headline: 'Headline',
headerWidget: SizedBox(
child: CircularProgressIndicator(),
child: YaruCircularProgressIndicator(strokeWidth: 3),
height: 20,
width: 20,
),
Expand Down
91 changes: 0 additions & 91 deletions lib/src/yaru_linear_progress_indicator.dart

This file was deleted.

Loading

0 comments on commit 1416b07

Please sign in to comment.