Skip to content

Commit

Permalink
chore: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa committed Jan 19, 2024
1 parent 34dda98 commit 32f7114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
16 changes: 1 addition & 15 deletions uni/lib/model/providers/plausible/plausible_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _PlausibleProviderState extends State<PlausibleProvider> {
_batteryLevel > 20 &&
_connectivityResult == ConnectivityResult.wifi;

Logger().d("Plausible enabled: ${plausible.enabled}");
Logger().d('Plausible enabled: ${plausible.enabled}');
}
}

Expand All @@ -69,44 +69,30 @@ class _PlausibleProviderState extends State<PlausibleProvider> {
_batteryLevel = await battery.batteryLevel;
_isInBatterySaveMode = await battery.isInBatterySaveMode;

Logger().d("Battery level: $_batteryLevel");
Logger().d("Is in battery save mode: $_isInBatterySaveMode");

_updateAnalyticsState();
}

Future<void> _updateConnectivityState() async {
final connectivity = Connectivity();
_connectivityResult = await connectivity.checkConnectivity();

Logger().d("Connectivity result: $_connectivityResult");

_updateAnalyticsState();
}

Future<void> _updateUsageStatsState() async {
_isUsageStatsEnabled = PreferencesController.getUsageStatsToggle();

Logger().d("Usage stats enabled: $_isUsageStatsEnabled");

_updateAnalyticsState();
}

Future<void> _startListeners(Plausible plausible) async {
final connectivity = Connectivity();
connectivity.onConnectivityChanged.listen((result) {
_connectivityResult = result;

Logger().d("Connectivity result: $_connectivityResult");

_updateAnalyticsState();
});

PreferencesController.onStatsToggle.listen((event) {
_isUsageStatsEnabled = event;

Logger().d("Usage stats enabled: $_isUsageStatsEnabled");

_updateAnalyticsState();
});
}
Expand Down
7 changes: 3 additions & 4 deletions uni/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ environment:

dependencies:
add_2_calendar: ^3.0.1
battery_plus: ^5.0.2
cached_network_image: ^3.3.1
collection: ^1.16.0
connectivity_plus: ^5.0.2
Expand Down Expand Up @@ -45,18 +46,17 @@ dependencies:
path: ^1.8.0
path_provider: ^2.0.0
percent_indicator: ^4.2.2
plausible_analytics: ^0.3.0
provider: ^6.1.1
sentry_flutter: ^7.14.0
shared_preferences: ^2.2.2
plausible_analytics: ^0.3.0
shimmer: ^3.0.0
sqflite: ^2.0.3
synchronized: ^3.0.0
timelines: ^0.1.0
tuple: ^2.0.0
url_launcher: ^6.2.2
workmanager: ^0.5.2
battery_plus: ^5.0.2

dev_dependencies:
build_runner: ^2.4.7
Expand All @@ -72,8 +72,7 @@ flutter:
generate: true
uses-material-design: true
assets:
- assets/
- assets/env/.env
- assets/env/
- assets/images/
- assets/text/
- assets/text/locations/
Expand Down

0 comments on commit 32f7114

Please sign in to comment.