Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerAdulu committed Nov 5, 2024
1 parent b2c66d7 commit 514d3cb
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 31 deletions.
3 changes: 2 additions & 1 deletion lib/features/feed/ui/feed_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class _FeedScreenState extends State<FeedScreen> {
height: 100,
width: double.infinity,
child: Center(
child: CircularProgressIndicator()),
child: CircularProgressIndicator(),
),
),
errorWidget: (_, __, ___) => const SizedBox(
height: 100,
Expand Down
2 changes: 1 addition & 1 deletion lib/features/home/widgets/organizers_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class _OrganizersCardState extends State<OrganizersCard> {
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) => Container(
height: size.height * .2,
padding: EdgeInsets.symmetric(horizontal: 8.w),
padding: EdgeInsets.symmetric(horizontal: 8.w),
decoration: BoxDecoration(
color: isLightMode
? colorScheme.secondaryContainer
Expand Down
1 change: 0 additions & 1 deletion lib/features/home/widgets/search_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class _SearchBarWidgetState extends State<SearchBarWidget> {
decoration: InputDecoration(
hintText: l10n.searchHint,
hintStyle: TextStyle(color: colorScheme.onSurfaceVariant),

border: InputBorder.none,
),
onChanged: _onSearchChanged,
Expand Down
36 changes: 22 additions & 14 deletions lib/features/home/widgets/sponsors_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ class _SponsorsCardState extends State<SponsorsCard> {
return Column(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w),
padding: EdgeInsets.symmetric(horizontal: 8.w),
decoration: BoxDecoration(
color: isLightMode ? colorScheme.secondaryContainer : Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color:isLightMode ? Colors.transparent : colorScheme.primary,
width: 2,
color: isLightMode
? colorScheme.secondaryContainer
: Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: isLightMode
? Colors.transparent
: colorScheme.primary,
width: 2,
),
),
),
child: ResolvedImage(
imageUrl: sponsors
.firstWhere(
Expand All @@ -86,13 +90,17 @@ class _SponsorsCardState extends State<SponsorsCard> {
itemBuilder: (context, index) => Container(
padding: EdgeInsets.symmetric(horizontal: 8.w),
decoration: BoxDecoration(
color: isLightMode ? colorScheme.secondaryContainer : Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: isLightMode ? Colors.transparent : colorScheme.primary,
width: 2,
),
),
color: isLightMode
? colorScheme.secondaryContainer
: Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: isLightMode
? Colors.transparent
: colorScheme.primary,
width: 2,
),
),
child: SizedBox(
width: size.width / 4,
child: ResolvedImage(
Expand Down
5 changes: 2 additions & 3 deletions lib/features/sessions/cubit/bookmark_session_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ class BookmarkSessionCubit extends Cubit<BookmarkSessionState> {
status: bookmarkStatus,
),
);
} on Failure catch(e) {
} on Failure catch (e) {
emit(BookmarkSessionState.error(e.message));
}
catch (e) {
} catch (e) {
emit(BookmarkSessionState.error(e.toString()));
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/features/sessions/cubit/fetch_grouped_sessions_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class FetchGroupedSessionsCubit extends Cubit<FetchGroupedSessionsState> {
);

emit(FetchGroupedSessionsState.loaded(groupedSessions: groupedEntries));
// await _networkFetch();
await _networkFetch();
return;
}

if (!hasSessions || forceRefresh) {
// await _networkFetch();
await _networkFetch();
final localSessions = await _dBRepository.fetchSessions(
sessionLevel: sessionLevel,
sessionType: sessionType,
Expand Down
7 changes: 1 addition & 6 deletions lib/features/sessions/ui/sessions_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:fluttercon/common/data/enums/bookmark_status.dart';
import 'package:fluttercon/common/repository/hive_repository.dart';
import 'package:fluttercon/common/utils/misc.dart';
import 'package:fluttercon/common/utils/router.dart';
import 'package:fluttercon/common/widgets/app_bar/app_bar.dart';
import 'package:fluttercon/core/di/injectable.dart';
import 'package:fluttercon/core/theme/theme_colors.dart';
import 'package:fluttercon/features/sessions/cubit/fetch_grouped_sessions_cubit.dart';
import 'package:fluttercon/features/sessions/ui/widgets/day_sessions_view.dart';
import 'package:fluttercon/features/sessions/ui/widgets/day_tab_view.dart';
import 'package:fluttercon/l10n/l10n.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:logger/logger.dart';

class SessionsScreen extends StatefulWidget {
const SessionsScreen({super.key});
Expand Down Expand Up @@ -174,7 +169,7 @@ class _SessionsScreenState extends State<SessionsScreen>
],
body: groupedSessions.isNotEmpty
? TabBarView(
physics: NeverScrollableScrollPhysics(),
physics: const NeverScrollableScrollPhysics(),
children: groupedSessions.values
.map(
(dailySessions) => DaySessionsView(
Expand Down
3 changes: 0 additions & 3 deletions lib/features/splash/splash_screen.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import 'package:flutter/material.dart';
import 'package:fluttercon/common/repository/hive_repository.dart';
import 'package:fluttercon/common/utils/constants/app_assets.dart';
import 'package:fluttercon/common/utils/misc.dart';
import 'package:fluttercon/common/utils/router.dart';
import 'package:fluttercon/core/di/injectable.dart';
import 'package:go_router/go_router.dart';
import 'package:logger/logger.dart';

class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
Expand Down

0 comments on commit 514d3cb

Please sign in to comment.