Skip to content

Commit

Permalink
Improve 2018 and 2021 terms in call to TextTheme constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Khen Solomon Lethil committed Feb 16, 2022
1 parent 26662ef commit 11e9546
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 624 deletions.
27 changes: 6 additions & 21 deletions lib/view/launch/album-list/sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.character.length > 6) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand All @@ -206,7 +204,7 @@ class _SheetFilterState extends State<_SheetFilter> {
margin: const EdgeInsets.all(2),
child: Text(
name,
style: Theme.of(context).textTheme.bodyText1!.copyWith(
style: Theme.of(context).textTheme.labelMedium!.copyWith(
color: (filter.character.isNotEmpty)
? (hasCharList(name))
? Theme.of(context).highlightColor
Expand Down Expand Up @@ -249,9 +247,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.language.length > 7) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand Down Expand Up @@ -287,7 +283,6 @@ class _SheetFilterState extends State<_SheetFilter> {
: null,
label: lang.name.toTitleCase(),
labelPadding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
labelStyle: Theme.of(context).textTheme.bodyText1,
softWrap: true,
maxLines: 3,
),
Expand Down Expand Up @@ -322,9 +317,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.genre.length > 1) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand Down Expand Up @@ -360,7 +353,6 @@ class _SheetFilterState extends State<_SheetFilter> {
: null,
label: genre.name,
labelPadding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
labelStyle: Theme.of(context).textTheme.bodyText1,
softWrap: true,
maxLines: 3,
),
Expand Down Expand Up @@ -421,16 +413,9 @@ class _SheetFilterState extends State<_SheetFilter> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
RichText(
strutStyle: const StrutStyle(
// height: 1,
fontFamily: 'Lato',
),
text: TextSpan(
Text.rich(
TextSpan(
text: 'Albums',
// style: TextStyle(color: Theme.of(context).textTheme.bodyText1!.color),
style: Theme.of(context).textTheme.headline5,
// style: Theme.of(context).textTheme.headline3!.copyWith(height: 1.4),
children: [
// const TextSpan(text: ' ('),
// TextSpan(
Expand Down
28 changes: 7 additions & 21 deletions lib/view/launch/artist-list/sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.character.length > 6) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand All @@ -212,7 +210,7 @@ class _SheetFilterState extends State<_SheetFilter> {
margin: const EdgeInsets.all(2),
child: Text(
name,
style: Theme.of(context).textTheme.bodyText1!.copyWith(
style: Theme.of(context).textTheme.labelMedium!.copyWith(
color: (filter.character.isNotEmpty)
? (hasCharList(name))
? Theme.of(context).highlightColor
Expand Down Expand Up @@ -255,9 +253,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.language.length > 7) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand Down Expand Up @@ -296,7 +292,6 @@ class _SheetFilterState extends State<_SheetFilter> {
iconColor: active ? null : Theme.of(context).focusColor,
label: lang.name.toTitleCase(),
labelPadding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
labelStyle: Theme.of(context).textTheme.bodyText1,
softWrap: true,
maxLines: 3,
),
Expand Down Expand Up @@ -336,9 +331,7 @@ class _SheetFilterState extends State<_SheetFilter> {
if (filter.gender.length > 1) const TextSpan(text: '...')
],
),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontWeight: FontWeight.w300,
),
style: Theme.of(context).textTheme.titleMedium,
),
),
Card(
Expand Down Expand Up @@ -377,7 +370,6 @@ class _SheetFilterState extends State<_SheetFilter> {
iconColor: active ? null : Theme.of(context).focusColor,
label: ob.name.toTitleCase(),
labelPadding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
labelStyle: Theme.of(context).textTheme.bodyText1,
softWrap: true,
maxLines: 3,
),
Expand Down Expand Up @@ -405,16 +397,10 @@ class _SheetFilterState extends State<_SheetFilter> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
RichText(
strutStyle: const StrutStyle(
// height: 1,
fontFamily: 'Lato',
),
text: TextSpan(
Text.rich(
TextSpan(
text: 'Artists',
// style: TextStyle(color: Theme.of(context).textTheme.bodyText1!.color),
style: Theme.of(context).textTheme.headline5,
// style: Theme.of(context).textTheme.headline3!.copyWith(height: 1.4),
style: Theme.of(context).textTheme.labelMedium,
children: [
// const TextSpan(text: ' ('),
// TextSpan(
Expand Down
20 changes: 8 additions & 12 deletions lib/view/launch/favorite_word/bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ mixin _Bar on _State {
// child: (align == 0)
// ? Hero(
// tag: 'appbar-left',
// child: CupertinoButton(
// child: WidgetButton(
// padding: EdgeInsets.zero,
// minSize: 30,
// onPressed: () => Navigator.of(context).pop(),
// child: WidgetLabel(
// icon: CupertinoIcons.left_chevron,
// icon: Icons.arrow_back_ios_new_rounded,
// label: translate.back,
// ),
// ),
// )
// : WidgetLabel(
// icon: CupertinoIcons.left_chevron,
// icon: Icons.arrow_back_ios_new_rounded,
// label: translate.back,
// ),
// ),
Expand All @@ -57,21 +57,19 @@ mixin _Bar on _State {
? (align == 0)
? Hero(
tag: 'appbar-left-$canPop',
child: CupertinoButton(
padding: EdgeInsets.zero,
minSize: 30,
child: WidgetButton(
onPressed: () {
arguments.navigator!.currentState!.maybePop();
},
child: WidgetLabel(
icon: CupertinoIcons.left_chevron,
icon: Icons.arrow_back_ios_new_rounded,
label: preference.text.back,
// label: AppLocalizations.of(context)!.back,
),
),
)
: WidgetLabel(
icon: CupertinoIcons.left_chevron,
icon: Icons.arrow_back_ios_new_rounded,
label: preference.text.back,
)
: const SizedBox(),
Expand All @@ -93,7 +91,7 @@ mixin _Bar on _State {
preference.text.favorite(false),
style: Theme.of(context)
.textTheme
.headline5!
.titleLarge!
.copyWith(fontSize: (30 * org.shrink).clamp(22, 30).toDouble()),
maxLines: 1,
softWrap: false,
Expand All @@ -109,9 +107,7 @@ mixin _Bar on _State {
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 12),
child: Hero(
tag: 'appbar-right',
child: CupertinoButton(
padding: EdgeInsets.zero,
minSize: 30,
child: WidgetButton(
child: const WidgetLabel(
icon: LideaIcon.trash,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/view/launch/library/detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class _DetailState extends State<_Detail> {
},
),
// SliverToBoxAdapter(
// child: CupertinoButton(
// child: WidgetButton(
// child: const Text('Delete'),
// onPressed: () {
// // box.deleteAt(index);
Expand Down
15 changes: 8 additions & 7 deletions lib/view/launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ class ScreenLauncher extends StatelessWidget {
text: TextSpan(
text: '"',
semanticsLabel: "open quotation mark",
style: TextStyle(
color: Theme.of(context).primaryTextTheme.button!.color,
fontSize: 25,
fontWeight: FontWeight.w200,
),
style: Theme.of(context).textTheme.labelLarge!.copyWith(
fontWeight: FontWeight.w300,
),
children: const <TextSpan>[
TextSpan(
text: 'Listen',
Expand All @@ -38,7 +36,10 @@ class ScreenLauncher extends StatelessWidget {
TextSpan(
text: 'Zaideih\n',
semanticsLabel: "Zaideih",
style: TextStyle(fontWeight: FontWeight.w300, fontSize: 47),
style: TextStyle(
fontSize: 50,
fontWeight: FontWeight.w200,
),
),
TextSpan(
text: 'Music ',
Expand All @@ -53,7 +54,7 @@ class ScreenLauncher extends StatelessWidget {
TextSpan(
text: '"',
semanticsLabel: "close quotation mark",
style: TextStyle(fontSize: 25),
style: TextStyle(fontSize: 23),
),
],
),
Expand Down
12 changes: 8 additions & 4 deletions lib/view/player/info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@ class _PlayerInfoState extends State<PlayerInfo> {
AudioTrackType track = tag.trackInfo;

return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 15),
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 15),
child: Column(
children: [
const Padding(
padding: EdgeInsets.symmetric(vertical: 15, horizontal: 25),
child: Divider(),
),
Text(
track.title,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headline3,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 7),
padding: const EdgeInsets.symmetric(vertical: 25),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
Expand All @@ -54,6 +57,7 @@ class _PlayerInfoState extends State<PlayerInfo> {
return WidgetButton(
child: WidgetLabel(
label: artist.name,
labelStyle: Theme.of(context).textTheme.labelLarge,
),
onPressed: () {
core.navigate(to: '/artist-info', args: artist, routePush: true);
Expand All @@ -66,7 +70,7 @@ class _PlayerInfoState extends State<PlayerInfo> {
child: Text(
tag.album,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.displaySmall,
),
onPressed: () {
core.navigate(to: '/album-info', args: tag.albumInfo);
Expand Down
Loading

0 comments on commit 11e9546

Please sign in to comment.