Skip to content

Commit

Permalink
Replace all Material icons with Yaru ones (#292)
Browse files Browse the repository at this point in the history
* Replace all Material icons with Yaru ones
Fixes #288

* Apply analyze
  • Loading branch information
Jupi007 authored Oct 12, 2022
1 parent 4194d3c commit 2665e8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions example/lib/pages/carousel_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class _CarouselPageState extends State<CarouselPage> {
children: _getCarouselChildren(),
height: 400,
navigationControls: true,
previousIcon: const Icon(YaruIcons.go_previous),
nextIcon: const Icon(YaruIcons.go_next),
),
],
),
Expand Down
3 changes: 0 additions & 3 deletions example/lib/pages/expandable_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:yaru_icons/yaru_icons.dart';
import 'package:yaru_widgets/yaru_widgets.dart';

const _lorem =
Expand All @@ -19,7 +18,6 @@ class ExpandablePage extends StatelessWidget {
'Lorem ipsum dolor sit amet',
style: TextStyle(fontWeight: FontWeight.bold),
),
expandIcon: Icon(YaruIcons.pan_end),
),
YaruExpandable(
isExpanded: true,
Expand All @@ -33,7 +31,6 @@ class ExpandablePage extends StatelessWidget {
'Lorem ipsum dolor sit amet',
style: TextStyle(fontWeight: FontWeight.bold),
),
expandIcon: Icon(YaruIcons.pan_end),
)
],
);
Expand Down
5 changes: 3 additions & 2 deletions lib/src/utilities/yaru_carousel.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:yaru_icons/yaru_icons.dart';

class YaruCarousel extends StatefulWidget {
const YaruCarousel({
Expand Down Expand Up @@ -131,12 +132,12 @@ class _YaruCarouselState extends State<YaruCarousel> {
_buildNavigationButton(
Alignment.centerLeft,
_isFirstPage() ? null : () => widget.controller.previousPage(),
widget.previousIcon ?? const Icon(Icons.arrow_back),
widget.previousIcon ?? const Icon(YaruIcons.go_previous),
),
_buildNavigationButton(
Alignment.centerRight,
_isLastPage() ? null : () => widget.controller.nextPage(),
widget.nextIcon ?? const Icon(Icons.arrow_forward),
widget.nextIcon ?? const Icon(YaruIcons.go_next),
),
],
),
Expand Down
3 changes: 2 additions & 1 deletion lib/src/utilities/yaru_expandable.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:yaru_icons/yaru_icons.dart';
import '../../yaru_widgets.dart';

const _kAnimationDuration = Duration(milliseconds: 250);
Expand Down Expand Up @@ -67,7 +68,7 @@ class _YaruExpandableState extends State<YaruExpandable> {
turns: _isExpanded ? .25 : 0,
duration: _kAnimationDuration,
curve: _kAnimationCurve,
child: widget.expandIcon ?? const Icon(Icons.arrow_right),
child: widget.expandIcon ?? const Icon(YaruIcons.pan_end),
),
),
],
Expand Down

0 comments on commit 2665e8a

Please sign in to comment.