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:
shenlong
2025-06-25 13:06:24 +05:30
committed by GitHub
parent 05064f87f0
commit 5b0575b956
130 changed files with 338 additions and 264 deletions
@@ -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 = [
+6 -6
View File
@@ -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,
),
-1
View File
@@ -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);
}