Skip to content

Commit

Permalink
Fix after flutter upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodoering committed Oct 22, 2023
1 parent 3645723 commit f3d0843
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion lib/api/translate/data/languages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const kTranslateLanguages = {
'xh': 'Xhosa',
'yi': 'Yiddish',
'yo': 'Yoruba',
'zu': 'Zulu'
'zu': 'Zulu',
};

/// Returns the language code used by the translate service from the app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class HomeTabIconDialog extends StatelessWidget {
runSpacing: 4,
children: [
if (entry.name.isNotEmpty) _IconButton(iconName: entry.name[0]),
for (String iconName in HomeTabEntryIcon.iconNameMap.keys)
_IconButton(iconName: iconName)
for (final String iconName in HomeTabEntryIcon.iconNameMap.keys)
_IconButton(iconName: iconName),
],
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/home/widgets/home_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class _AuthenticatedUser extends ConsumerWidget {
),
],
),
)
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/components/list/show/widgets/twitter_lists.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void _showListActionBottomSheet(
queryParams: {'name': list.name},
);
},
)
),
],
);
}
2 changes: 1 addition & 1 deletion lib/components/retweeters/retweeters_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RetweetersPage extends ConsumerWidget {
child: LegacyUserList(
state.whenOrNull(data: (users) => users.toList()) ?? [],
beginSlivers: const [
HarpySliverAppBar(title: Text('retweeted by'))
HarpySliverAppBar(title: Text('retweeted by')),
],
endSlivers: [
...?state.whenOrNull(
Expand Down
2 changes: 1 addition & 1 deletion lib/components/search/tweet/tweet_search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _TweetSearchPageState extends ConsumerState<TweetSearchPage> {
notifier: notifier,
),
),
)
),
],
loading: (_) => const [
VerticalSpacer.normalSliver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class _InvalidFilterInfo extends StatelessWidget {
color: theme.colorScheme.onBackground.withOpacity(.7),
),
),
)
),
],
),
)
Expand Down
2 changes: 1 addition & 1 deletion lib/components/settings/display/display_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DisplaySettingsPage extends ConsumerWidget {
Padding(
padding: theme.spacing.edgeInsets.copyWith(top: 0),
child: const _DisplaySettingsList(),
)
),
]),
),
const SliverBottomPadding(),
Expand Down
2 changes: 1 addition & 1 deletion lib/components/settings/theme/theme_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class _LockedProThemes extends ConsumerWidget {
child: LockedProThemeCard(harpyTheme),
),
VerticalSpacer.small,
]
],
]),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/components/settings/theme/widgets/theme_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class _ThemeCardBase extends StatelessWidget {
? harpyTheme.colors.backgroundColors.toList()
: [
harpyTheme.colors.backgroundColors.first,
harpyTheme.colors.backgroundColors.first
harpyTheme.colors.backgroundColors.first,
],
);

Expand Down
2 changes: 1 addition & 1 deletion lib/components/setup/widgets/setup_appearance_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class _Layout extends ConsumerWidget {
),
),
],
)
),
],
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class _AppliedFiltersText extends StatelessWidget {
style: style,
),
if (filter != filters.last) TextSpan(text: ', ', style: style),
]
],
],
),
maxLines: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _LocationSelectionDialogState
padding: theme.spacing.edgeInsets,
alignment: AlignmentDirectional.center,
child: const CircularProgressIndicator(),
)
),
],
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/trends/widgets/trends_selection_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TrendsSelectionHeader extends ConsumerWidget {
UserScrollDirection.of(context)?.idle();
notifier.load();
},
)
),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class _LinkPreviewText extends StatelessWidget {
maxLines: 1,
overflow: TextOverflow.visible,
style: theme.textTheme.bodySmall?.apply(fontSizeDelta: -4),
)
),
],
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TweetCardName extends ConsumerWidget {
CupertinoIcons.checkmark_seal_fill,
size: 16 + style.sizeDelta,
),
]
],
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TweetCardTopRow extends ConsumerWidget {
),
],
),
)
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/components/tweet/widgets/media/tweet_images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Widget _flightShuttleBuilder(
animation: animation,
builder: (_, __) => ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: tween.evaluate(animation),
borderRadius: tween.evaluate(animation)!,
child: hero.child,
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/widgets/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class HarpyBadge extends StatelessWidget {
Transform.translate(
offset: offset,
child: IgnorePointer(child: badge),
)
),
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/components/widgets/filter/filter_list_entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class _FilterListEntryState extends ConsumerState<FilterListEntry> {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onDeleted: () => widget.onDeleted(i),
),
)
),
],
)
),
];
}

Expand Down
6 changes: 2 additions & 4 deletions lib/components/widgets/harpy_photo_gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Widget borderRadiusFlightShuttleBuilder(
animation: animation,
builder: (_, __) => ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: tween.evaluate(animation),
borderRadius: tween.evaluate(animation)!,
child: hero.child,
),
);
Expand All @@ -75,9 +75,7 @@ PhotoViewScaleState _scaleStateCycle(PhotoViewScaleState actual) {
case PhotoViewScaleState.covering:
case PhotoViewScaleState.originalSize:
case PhotoViewScaleState.zoomedOut:
return PhotoViewScaleState.zoomOne;
case PhotoViewScaleState.zoomOne:
case PhotoViewScaleState.zoomTwo:
return PhotoViewScaleState.zoomedIn;
case PhotoViewScaleState.zoomedIn:
return PhotoViewScaleState.initial;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/components/widgets/harpy_radio_dialog_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class HarpyRadioDialogTile<T> extends ConsumerWidget {
Navigator.of(context).pop();
if (value != groupValue) onChanged?.call(value);
},
)
),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TweetPlaceholder extends StatelessWidget {
PlaceholderBox(widthFactor: .5, height: 15),
],
),
)
),
],
),
VerticalSpacer.normal,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/widgets/tab_bar/harpy_tab_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class _HarpyTapBarState extends ConsumerState<HarpyTabBar> {
if (i != widget.tabs.length - 1) HorizontalSpacer.small,
],
if (widget.endWidgets != null) ...[
for (Widget widget in widget.endWidgets!) ...[
for (final Widget widget in widget.endWidgets!) ...[
HorizontalSpacer.small,
widget,
],
Expand Down
2 changes: 1 addition & 1 deletion test/api/twitter/handle_tweets_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void main() {
Tweet()
..idStr = '2'
..inReplyToStatusIdStr = '1',
Tweet()..idStr = '1'
Tweet()..idStr = '1',
]);

expect(tweets.length, equals(1));
Expand Down
2 changes: 1 addition & 1 deletion test/components/tweet/tweet_card_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ void main() {
..aspectRatio = [16, 9]
..variants = [])
..mediaUrlHttps = 'blue.png',
)
),
],
),
),
Expand Down

0 comments on commit f3d0843

Please sign in to comment.