better linting
This commit is contained in:
parent
c7324a6b19
commit
aa31a79d20
26 changed files with 163 additions and 131 deletions
|
@ -25,7 +25,7 @@ class AppLifecycleService with WidgetsBindingObserver {
|
|||
|
||||
late final StreamController<AppLifecycleState> _lifecycleStateStreamController =
|
||||
StreamController.broadcast();
|
||||
final Map<String, StreamSubscription> _appLifecycleSubscriptions = {};
|
||||
final Map<String, StreamSubscription<dynamic>> _appLifecycleSubscriptions = {};
|
||||
|
||||
AppLifecycleState? _appLifeCycleState;
|
||||
AppLifecycleState? get appLifeCycleState => _appLifeCycleState;
|
||||
|
|
|
@ -64,7 +64,7 @@ class ConnectionsService {
|
|||
static ConnectionsService get locate => Locator.locate();
|
||||
}
|
||||
|
||||
extension _connectionStatusEmojiExtension on InternetConnectionStatus {
|
||||
extension _ConnectionStatusEmojiExtension on InternetConnectionStatus {
|
||||
String get nameWithIcon {
|
||||
switch (this) {
|
||||
case InternetConnectionStatus.connected:
|
||||
|
@ -75,7 +75,7 @@ extension _connectionStatusEmojiExtension on InternetConnectionStatus {
|
|||
}
|
||||
}
|
||||
|
||||
extension _connectivityEmojiExtension on ConnectivityResult {
|
||||
extension _ConnectivityEmojiExtension on ConnectivityResult {
|
||||
String get nameWithIcon {
|
||||
switch (this) {
|
||||
case ConnectivityResult.bluetooth:
|
||||
|
|
|
@ -29,7 +29,7 @@ class LocalStorageService {
|
|||
}
|
||||
|
||||
void updateFavourite({
|
||||
required index,
|
||||
required int index,
|
||||
required bool newValue,
|
||||
}) {
|
||||
try {
|
||||
|
|
|
@ -15,8 +15,8 @@ class LoggingService {
|
|||
useHistory: false,
|
||||
),
|
||||
logger: TalkerLogger(
|
||||
formater:
|
||||
!Platform.isIOS ? const ColoredLoggerFormatter() : const ExtendedLoggerFormatter()),
|
||||
formater: !Platform.isIOS ? const ColoredLoggerFormatter() : const ExtendedLoggerFormatter(),
|
||||
),
|
||||
loggerSettings: TalkerLoggerSettings(
|
||||
enableColors: !Platform.isIOS,
|
||||
),
|
||||
|
@ -49,11 +49,10 @@ class LoggingService {
|
|||
TalkerDioLogger(
|
||||
talker: Talker(
|
||||
logger: TalkerLogger(
|
||||
formater: !Platform.isIOS
|
||||
? const ColoredLoggerFormatter()
|
||||
: const ExtendedLoggerFormatter()),
|
||||
formater:
|
||||
!Platform.isIOS ? const ColoredLoggerFormatter() : const ExtendedLoggerFormatter(),
|
||||
),
|
||||
settings: TalkerSettings(
|
||||
useConsoleLogs: true,
|
||||
useHistory: false,
|
||||
),
|
||||
loggerSettings: TalkerLoggerSettings(
|
||||
|
@ -63,7 +62,6 @@ class LoggingService {
|
|||
settings: const TalkerDioLoggerSettings(
|
||||
printRequestHeaders: true,
|
||||
printResponseHeaders: true,
|
||||
printResponseMessage: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -24,8 +24,9 @@ class OverlayService {
|
|||
//todo(mehul): Fix and not ignore Overlay building while Widget building error.
|
||||
} on FlutterError catch (_) {}
|
||||
_loggingService.info('Overlay inserted with tag: $tag');
|
||||
} else
|
||||
} else {
|
||||
_loggingService.info('Overlay with tag: $tag, NOT inserted');
|
||||
}
|
||||
}
|
||||
|
||||
void removeOverlayEntry({
|
||||
|
@ -37,10 +38,12 @@ class OverlayService {
|
|||
_overlayEntryMap[tag.hashCode]?.remove();
|
||||
_overlayEntryMap.remove(tag.hashCode);
|
||||
_loggingService.info('Overlay removed with tag: $tag');
|
||||
} else
|
||||
} else {
|
||||
_loggingService.info('Overlay with tag: $tag already mounted OR not found. Skipped');
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
_loggingService.info('Overlay with tag: $tag already exists. Skipped');
|
||||
}
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue