Skip to content

Commit e389235

Browse files
Marcel PlochMarcel Ploch
authored andcommitted
Update for lint
1 parent 1752ab1 commit e389235

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

lib/src/app.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ class App extends StatefulWidget {
1919
}
2020
}
2121

22-
CounterRepository counterRepository =
23-
CounterRepository(counterApi: CounterFakeApi());
22+
CounterRepository counterRepository = CounterRepository(counterApi: CounterFakeApi());
2423

2524
@override
2625
State<App> createState() => AppState();
2726

28-
static AppState of(BuildContext context) =>
29-
context.findAncestorStateOfType<AppState>()!;
27+
static AppState of(BuildContext context) => context.findAncestorStateOfType<AppState>()!;
3028
}
3129

3230
class AppState extends State<App> {

lib/src/features/counter/presentation/edit/view/edit_counter.page.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ class CounterView extends StatelessWidget {
4949
appBar: AppBar(
5050
title: BlocBuilder<EditCounterBloc, EditCounterState>(
5151
builder: (context, state) {
52-
return state is EditCounterData
53-
? Text(state.counterModel.name)
54-
: const Text('');
52+
return state is EditCounterData ? Text(state.counterModel.name) : const Text('');
5553
},
5654
),
5755
),
@@ -105,15 +103,13 @@ class CounterView extends StatelessWidget {
105103
CustomCircularButton(
106104
icon: Icons.remove,
107105
onPressed: state is EditCounterData
108-
? () => editCounterBloc
109-
.add(CounterDecrementPressed(state.counterModel))
106+
? () => editCounterBloc.add(CounterDecrementPressed(state.counterModel))
110107
: null,
111108
),
112109
CustomCircularButton(
113110
icon: Icons.add,
114111
onPressed: state is EditCounterData
115-
? () => editCounterBloc
116-
.add(CounterIncrementPressed(state.counterModel))
112+
? () => editCounterBloc.add(CounterIncrementPressed(state.counterModel))
117113
: null,
118114
),
119115
],

lib/src/features/counter/presentation/edit/view/widgets/counter_text.widget.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import 'package:convenient_test/convenient_test.dart';
22
import 'package:flutter/material.dart';
33

44
class CounterText extends StatelessWidget {
5-
const CounterText(
6-
{super.key, required this.counterValue, required this.counterName});
5+
const CounterText({
6+
super.key,
7+
required this.counterValue,
8+
required this.counterName,
9+
});
710
final int counterValue;
811
final String counterName;
912

1013
@override
1114
Widget build(BuildContext context) {
12-
print('counter_text_$counterName');
1315
final theme = Theme.of(context);
1416
return Mark(
1517
name: 'counter_text_$counterName',

0 commit comments

Comments
 (0)