Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityDarkLab committed Feb 7, 2024
1 parent 0d39c1c commit 3dc47d3
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lib/base/networking/api/handler/auth_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AuthHandler {
.i('Received HTTP response with status code: ${response.statusCode}');
} catch (e) {
_logger.e(
'Error during basic authentication for user: $username, Error: $e');
'Error during basic authentication for user: $username, Error: $e',);
throw AppError.userError();
}
try {
Expand Down
6 changes: 3 additions & 3 deletions lib/view_models/chat_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ChatViewModel extends StateNotifier<ChatState> {
final messages =
await ChatHandlers(_grpcHandler).getChatMessages(streamId);
state = state.copyWith(
messages: messages, isLoading: false, accessDenied: false);
messages: messages, isLoading: false, accessDenied: false,);
} catch (e) {
state = state.copyWith(
error: e as AppError,
Expand All @@ -39,9 +39,9 @@ class ChatViewModel extends StateNotifier<ChatState> {
await ChatHandlers(_grpcHandler).getChatMessages(streamId);
final combinedMessages = List<ChatMessage>.from(state.messages ?? [])
..addAll(messages
.where((newMessage) => !state.messages!.contains(newMessage)));
.where((newMessage) => !state.messages!.contains(newMessage)),);
state = state.copyWith(
messages: combinedMessages, isLoading: false, accessDenied: false);
messages: combinedMessages, isLoading: false, accessDenied: false,);
} catch (e) {
state = state.copyWith(
error: e as AppError,
Expand Down
4 changes: 2 additions & 2 deletions lib/view_models/download_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DownloadViewModel extends StateNotifier<DownloadState> {
}

Future<String> downloadVideo(String videoUrl, Stream stream,
String streamName, String streamDate) async {
String streamName, String streamDate,) async {
try {
final directory = await getApplicationDocumentsDirectory();
final filePath =
Expand All @@ -63,7 +63,7 @@ class DownloadViewModel extends StateNotifier<DownloadState> {
'duration': Tools.formatDuration(stream.end
.toDateTime()
.difference(stream.start.toDateTime())
.inMinutes),
.inMinutes,),
'description': stream.description,
'date': streamDate,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/views/chat_view/chat_view_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ChatViewState extends ConsumerState<ChatView> {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
'You are sending messages too fast. Please wait a 60 seconds.'),
'You are sending messages too fast. Please wait a 60 seconds.',),
),
);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/views/chat_view/poll_view_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class PollViewState extends ConsumerState<PollView> {

return Padding(
padding: const EdgeInsets.all(
8.0), // Consistent padding with the rest of the layout
8.0,), // Consistent padding with the rest of the layout
child: ElevatedButton(
onPressed: selectedOptions.containsKey(poll.id)
? () {
Expand Down
2 changes: 1 addition & 1 deletion lib/views/chat_view/suggested_streams_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SuggestedStreamsWidget extends StatelessWidget {
leading: const Icon(Icons.play_circle_outline),
title: Text(stream.name != ''
? stream.name
: 'Lecture: ${DateFormat('EEEE. dd', Localizations.localeOf(context).toString()).format(stream.start.toDateTime())}'),
: 'Lecture: ${DateFormat('EEEE. dd', Localizations.localeOf(context).toString()).format(stream.start.toDateTime())}',),
subtitle: Text(
DateFormat('dd MMMM yyyy').format(stream.start.toDateTime()),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/course_view/components/course_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class CourseCard extends StatelessWidget {
),
if (isPinned)
Icon(Icons.push_pin,
color: themeData.primaryColor, size: 16),
color: themeData.primaryColor, size: 16,),
],
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/views/course_view/components/small_stream_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ class SmallStreamCard extends StatelessWidget {
}

Widget _buildStreamCard(
BuildContext context, ThemeData themeData, double cardWidth) {
BuildContext context, ThemeData themeData, double cardWidth,) {
return (isDownloaded != null && showDeleteConfirmationDialog != null)
? _buildDownloadedCard(context, themeData, cardWidth)
: _buildLiveCard(themeData, cardWidth);
}

Widget _buildDownloadedCard(
BuildContext context, ThemeData themeData, double cardWidth) {
BuildContext context, ThemeData themeData, double cardWidth,) {
return Slidable(
key: Key(courseId.toString()),
closeOnScroll: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/course_view/components/stream_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class StreamCardState extends ConsumerState<StreamCard> {
Tools.formatDuration(widget.stream.end
.toDateTime()
.difference(widget.stream.start.toDateTime())
.inMinutes),
.inMinutes,),
style: themeData.textTheme.labelSmall?.copyWith(
fontSize: 12,
color: Colors.white,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DownloadCoursesContentView extends ConsumerWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 295.0),
child: Text(AppLocalizations.of(context)!
.no_downloaded_courses),
.no_downloaded_courses,),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class DownloadedCoursesState extends ConsumerState<DownloadedCourses> {
title: AppLocalizations.of(context)!.download,
filterOptions: [
AppLocalizations.of(context)!.newest_first,
AppLocalizations.of(context)!.oldest_first
AppLocalizations.of(context)!.oldest_first,
],
onClick: (String choice) {
// Handle filter option click
Expand Down
8 changes: 4 additions & 4 deletions lib/views/notifications_view/notifications_screen_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ class NotificationsScreen extends ConsumerWidget {
scrollDirection: Axis.vertical,
children: [
_buildSectionHeader(
AppLocalizations.of(context)!.banner_notification),
AppLocalizations.of(context)!.banner_notification,),
for (var alert in bannerAlerts) _buildBannerAlert(alert),
_buildSectionHeader(
AppLocalizations.of(context)!.feature_notifications),
AppLocalizations.of(context)!.feature_notifications,),
for (var notification in featureNotifications)
_buildFeatureNotification(notification),
_buildSectionHeader(
AppLocalizations.of(context)!.recent_uploads),
AppLocalizations.of(context)!.recent_uploads,),
for (var notification in pushNotifications)
_buildPushNotification(notification),
],
Expand Down Expand Up @@ -77,7 +77,7 @@ class NotificationsScreen extends ConsumerWidget {
Expanded(
child: Center(
child: Text(AppLocalizations.of(context)!
.no_notifications_found)),
.no_notifications_found,),),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/settings_view/edit_profile_screen_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class EditProfileScreenState extends ConsumerState<EditProfileScreen> {
title: const Text("Error"),
content: Text(errorMessage == '3 months'
? AppLocalizations.of(context)!.name_change_limitation
: errorMessage),
: errorMessage,),
actions: <Widget>[
TextButton(
child: const Text("OK"),
Expand Down
4 changes: 2 additions & 2 deletions lib/views/settings_view/settings_screen_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
_buildProfileTile(userState),
const Divider(),
_buildSectionTitle(
AppLocalizations.of(context)!.account_settings),
AppLocalizations.of(context)!.account_settings,),
_buildEditableListTile(AppLocalizations.of(context)!.edit_profile,
() async {
bool isAuthenticated =
Expand Down Expand Up @@ -90,7 +90,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
const Divider(),
_buildSectionTitle(AppLocalizations.of(context)!.more),
_buildNavigableListTile(
AppLocalizations.of(context)!.about_us, ""),
AppLocalizations.of(context)!.about_us, "",),
_buildNavigableListTile(
AppLocalizations.of(context)!.privacy_policy,
"https://live.rbg.tum.de/privacy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class OfflineVideoPlayerPageState
// Initialize the controller manager.
void _initializeControllerManager() {
_controllerManager = OfflineVideoPlayerControllerManager(
localPath: widget.videoDetails.filePath);
localPath: widget.videoDetails.filePath,);
}

// Initialize the video player and seek to the last progress.
Expand Down
4 changes: 2 additions & 2 deletions lib/views/video_view/utils/download_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DownloadService {
});

Future<void> downloadVideo(
Stream stream, String type, String streamName, String streamDate) async {
Stream stream, String type, String streamName, String streamDate,) async {
bool canDownload = await _handleDownloadConnectivity(stream, type);
if (!canDownload) return;

Expand All @@ -56,7 +56,7 @@ class DownloadService {
if (!isWidgetMounted()) return;
onShowSnackBar(localPath.isNotEmpty
? downloadCompletedMessage
: downloadFailedMessage);
: downloadFailedMessage,);
});
}

Expand Down

0 comments on commit 3dc47d3

Please sign in to comment.