mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-09 22:18:45 +02:00
refactor: enable strict analysis options and fix type safety across codebase
Enable strict-casts, strict-inference, and strict-raw-types in analysis_options.yaml. Add custom_lint with riverpod_lint. Fix all resulting type warnings with explicit type parameters and safer casts. Also improves APK update checker to detect device ABIs for correct variant selection and fixes Deezer artist name parsing edge case.
This commit is contained in:
@@ -252,7 +252,7 @@ void _pushViaPreferredNavigator(BuildContext context, WidgetBuilder builder) {
|
||||
identical(currentNavigator, rootNavigator) && activeTabNavigator != null;
|
||||
|
||||
if (!shouldRouteToTabNavigator) {
|
||||
currentNavigator.push(MaterialPageRoute(builder: builder));
|
||||
currentNavigator.push(MaterialPageRoute<void>(builder: builder));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -264,12 +264,12 @@ void _pushViaPreferredNavigator(BuildContext context, WidgetBuilder builder) {
|
||||
currentNavigator.pop();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!activeTabNavigator.mounted) return;
|
||||
activeTabNavigator.push(MaterialPageRoute(builder: builder));
|
||||
activeTabNavigator.push(MaterialPageRoute<void>(builder: builder));
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
activeTabNavigator.push(MaterialPageRoute(builder: builder));
|
||||
activeTabNavigator.push(MaterialPageRoute<void>(builder: builder));
|
||||
}
|
||||
|
||||
void _showLoadingSnackBar(BuildContext context, String message) {
|
||||
|
||||
@@ -179,15 +179,16 @@ class LogBuffer extends ChangeNotifier {
|
||||
final nextIndex = result['next_index'] as int? ?? _lastGoLogIndex;
|
||||
final keepNonErrorLogs = _loggingEnabled;
|
||||
|
||||
for (final log in logs) {
|
||||
final level = log['level'] as String? ?? 'INFO';
|
||||
for (final log in logs.whereType<Map<Object?, Object?>>()) {
|
||||
final logMap = Map<String, dynamic>.from(log);
|
||||
final level = logMap['level'] as String? ?? 'INFO';
|
||||
if (!keepNonErrorLogs && level != 'ERROR' && level != 'FATAL') {
|
||||
continue;
|
||||
}
|
||||
|
||||
final timestamp = log['timestamp'] as String? ?? '';
|
||||
final tag = log['tag'] as String? ?? 'Go';
|
||||
final message = log['message'] as String? ?? '';
|
||||
final timestamp = logMap['timestamp'] as String? ?? '';
|
||||
final tag = logMap['tag'] as String? ?? 'Go';
|
||||
final message = logMap['message'] as String? ?? '';
|
||||
|
||||
DateTime parsedTime = DateTime.now();
|
||||
if (timestamp.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user