Skip to content

Commit

Permalink
Reformat code in files
Browse files Browse the repository at this point in the history
  • Loading branch information
alinbabu2010 committed Apr 30, 2023
1 parent bb0905b commit a511c92
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
1 change: 1 addition & 0 deletions lib/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import 'package:intl/src/intl_helpers.dart';
import 'messages_en.dart' as messages_en;

typedef Future<dynamic> LibraryLoader();

Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new SynchronousFuture(null),
};
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class MessageLookup extends MessageLookupByLibrary {
"${Intl.plural(count, one: '1 task', other: '${count} tasks')}";

final messages = _notInlinedMessages(_notInlinedMessages);

static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"appName": MessageLookupByLibrary.simpleMessage("Tasks App"),
"appTitle": MessageLookupByLibrary.simpleMessage("Flutter Tasks App"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class TasksApp extends StatelessWidget {
child: BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
final customThemeMode =
state.isDarkTheme ? ThemeMode.dark : ThemeMode.light;
state.isDarkTheme ? ThemeMode.dark : ThemeMode.light;
final themeMode =
state.isSystemTheme ? ThemeMode.system : customThemeMode;
state.isSystemTheme ? ThemeMode.system : customThemeMode;
return MaterialApp(
onGenerateTitle: (context) => S.of(context).appTitle,
theme: AppThemes.appThemeData[AppTheme.lightTheme],
Expand Down
1 change: 0 additions & 1 deletion lib/screens/tasks_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TasksScreen extends StatelessWidget {
final appLocale = S.of(context);
return BlocBuilder<TasksBloc, TasksState>(
builder: (context, state) {

var tasks = isCompleted == true
? state.completedTasks
: isFavorite == true
Expand Down
36 changes: 18 additions & 18 deletions lib/widgets/popup_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@ class PopupMenu extends StatelessWidget {
),
),
PopupMenuItem(
onTap: favoriteOrUnfavoriteCallback,
child: PopupTextButton(
icon:
onTap: favoriteOrUnfavoriteCallback,
child: PopupTextButton(
icon:
task.isFavorite! ? Icons.favorite_border : Icons.favorite,
label: task.isFavorite!
? appLocale.labelUnfavorite
: appLocale.labelFavorite,
),
),
PopupMenuItem(
onTap: cancelOrDeleteCallback,
child: PopupTextButton(
),
PopupMenuItem(
onTap: cancelOrDeleteCallback,
child: PopupTextButton(
icon: Icons.delete,
label: appLocale.labelDelete,
),
),
]
),
]
: [
PopupMenuItem(
onTap: restoreCallback,
child: PopupTextButton(
PopupMenuItem(
onTap: restoreCallback,
child: PopupTextButton(
icon: Icons.restore_from_trash,
label: appLocale.labelRestore,
),
),
PopupMenuItem(
onTap: cancelOrDeleteCallback,
child: PopupTextButton(
),
PopupMenuItem(
onTap: cancelOrDeleteCallback,
child: PopupTextButton(
icon: Icons.delete_forever,
label: appLocale.labelDeleteForever,
),
),
],
),
],
onSelected: (value) {
context.showAddOrEditTaskBottomSheet(task: task);
},
Expand Down

0 comments on commit a511c92

Please sign in to comment.