refactor: DCM - const border radius, constructor & switch expressions (#19515)
* enable border radius, switch exp, const constructor * regenerate provider * more formatting --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -121,7 +121,6 @@ void main() {
|
||||
time.elapse(const Duration(seconds: 6));
|
||||
final insert = verify(() => mockLogRepo.insertAll(captureAny()));
|
||||
insert.called(1);
|
||||
// ignore: prefer-correct-json-casts
|
||||
final captured = insert.captured.firstOrNull as List<LogMessage>;
|
||||
expect(captured.firstOrNull?.message, _kInfoLog.message);
|
||||
expect(captured.firstOrNull?.logger, _kInfoLog.logger);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// ignore_for_file: avoid-declaring-call-method, avoid-unnecessary-futures
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
@@ -46,7 +44,6 @@ void main() {
|
||||
|
||||
when(() => mockSyncApiRepo.streamChanges(any()))
|
||||
.thenAnswer((invocation) async {
|
||||
// ignore: avoid-unsafe-collection-methods
|
||||
handleEventsCallback = invocation.positionalArguments.first;
|
||||
});
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ void main() {
|
||||
});
|
||||
|
||||
setUp(() async {
|
||||
mapState = MapState(themeMode: ThemeMode.dark);
|
||||
mapState = const MapState(themeMode: ThemeMode.dark);
|
||||
mapStateNotifier = MockMapStateNotifier(mapState);
|
||||
await StoreService.init(storeRepository: IsarStoreRepository(db));
|
||||
overrides = [
|
||||
|
||||
@@ -187,7 +187,7 @@ void main() {
|
||||
when(() => authRepository.getPreferredWifiName())
|
||||
.thenReturn('DifferentWifi');
|
||||
when(() => authRepository.getExternalEndpointList()).thenReturn([
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
@@ -214,11 +214,11 @@ void main() {
|
||||
when(() => authRepository.getPreferredWifiName())
|
||||
.thenReturn('DifferentWifi');
|
||||
when(() => authRepository.getExternalEndpointList()).thenReturn([
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint2',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
@@ -249,11 +249,11 @@ void main() {
|
||||
when(() => authRepository.getPreferredWifiName())
|
||||
.thenReturn('DifferentWifi');
|
||||
when(() => authRepository.getExternalEndpointList()).thenReturn([
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint2',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
@@ -302,7 +302,7 @@ void main() {
|
||||
when(() => authRepository.getPreferredWifiName())
|
||||
.thenReturn('DifferentWifi');
|
||||
when(() => authRepository.getExternalEndpointList()).thenReturn([
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: 'https://external.endpoint',
|
||||
status: AuxCheckStatus.valid,
|
||||
),
|
||||
|
||||
@@ -24,7 +24,6 @@ import 'mock_http_override.dart';
|
||||
|
||||
// Listener Mock to test when a provider notifies its listeners
|
||||
class ListenerMock<T> extends Mock {
|
||||
// ignore: avoid-declaring-call-method
|
||||
void call(T? previous, T next);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user