Skip to content

Commit

Permalink
fix: Applying fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Aug 14, 2023
1 parent ce66d46 commit e6717e9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/presentation/views/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../blocs/blocs.dart';
import '../widgets/widgets.dart';
import 'new_todo.dart';

const textfieldKey = Key("textfieldKey");
const textfieldKey = Key('textfieldKey');

/// App's home page.
/// The person will be able to create a new todo item
Expand Down Expand Up @@ -105,7 +105,7 @@ class HomePage extends StatelessWidget {

// If the state of the TodoItemList is not loaded, we show error.ˆ
else {
return const Center(child: Text("Error loading items list."));
return const Center(child: Text('Error loading items list.'));
}
},
),
Expand Down
6 changes: 3 additions & 3 deletions lib/presentation/widgets/items.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class _ItemCardState extends State<ItemCard> {
final hours = (secs ~/ 3600).toString().padLeft(2, '0');
final minutes = ((secs % 3600) ~/ 60).toString().padLeft(2, '0');
final seconds = (secs % 60).toString().padLeft(2, '0');
return "$hours:$minutes:$seconds";
return '$hours:$minutes:$seconds';
}

// Start and stop timer button handler
Expand Down Expand Up @@ -94,9 +94,9 @@ class _ItemCardState extends State<ItemCard> {
// Set button text according to status of stopwatch
String _renderButtonText() {
if (_stopwatch.elapsedMilliseconds == 0) {
return "Start";
return 'Start';
} else {
return _stopwatch.isRunning ? "Stop" : "Resume";
return _stopwatch.isRunning ? 'Stop' : 'Resume';
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/widgets/navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NavBar extends StatelessWidget implements PreferredSizeWidget {
child:
// dwyl logo
Image.asset(
"assets/icon/icon.png",
'assets/icon/icon.png',
key: logoKey,
fit: BoxFit.fitHeight,
height: 30,
Expand Down
4 changes: 2 additions & 2 deletions test/bloc/todo_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void main() {
'emits [TodoListLoadedState] when RemoveTodoEvent is created',
build: () => TodoBloc()..add(TodoListStarted()),
act: (bloc) {
final newItem = Item(description: "todo description");
final newItem = Item(description: 'todo description');
bloc
..add(AddTodoEvent(newItem))
..add(RemoveTodoEvent(newItem)); // add and remove
Expand All @@ -47,7 +47,7 @@ void main() {
'emits [TodoListLoadedState] when ToggleTodoEvent is created',
build: () => TodoBloc()..add(TodoListStarted()),
act: (bloc) {
final newItem = Item(description: "todo description");
final newItem = Item(description: 'todo description');
bloc
..add(AddTodoEvent(newItem))
..add(ToggleTodoEvent(newItem));
Expand Down

0 comments on commit e6717e9

Please sign in to comment.