Skip to content

Commit

Permalink
Merge pull request #499 from provokateurin/cleanup/mutability
Browse files Browse the repository at this point in the history
refactor(neon): make stuff immutable
  • Loading branch information
Leptopoda authored Jul 29, 2023
2 parents e0319e1 + b528063 commit f1e62dd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/neon/neon/lib/src/utils/account_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:neon/src/settings/models/select_option.dart';
import 'package:neon/src/settings/models/storage.dart';

@internal
@immutable
class AccountSpecificOptions {
AccountSpecificOptions(
this._storage,
Expand Down
1 change: 1 addition & 0 deletions packages/neon/neon/lib/src/utils/app_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:go_router/go_router.dart';
/// [RouteData] for the initial page of an app.
///
/// Subclasses must override one of [build] or [redirect].
@immutable
abstract class NeonAppRoute extends GoRouteData {
const NeonAppRoute();

Expand Down
1 change: 1 addition & 0 deletions packages/neon/neon/lib/src/utils/global_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import 'package:shared_preferences/shared_preferences.dart';
const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush';

@internal
@immutable
class GlobalOptions {
GlobalOptions(
this._sharedPreferences,
Expand Down
1 change: 1 addition & 0 deletions packages/neon/neon/lib/src/utils/push_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import 'package:nextcloud/nextcloud.dart';
import 'package:shared_preferences/shared_preferences.dart';

@internal
@immutable
class PushUtils {
static Future<RSAKeypair> loadRSAKeypair(final AppStorage storage) async {
const keyDevicePrivateKey = 'device-private-key';
Expand Down
3 changes: 2 additions & 1 deletion packages/neon/neon/lib/src/utils/request_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import 'package:rxdart/rxdart.dart';
import 'package:sqflite/sqflite.dart';
import 'package:xml/xml.dart' as xml;

@immutable
class RequestManager {
RequestManager([
const RequestManager([
this.cache,
]);

Expand Down

0 comments on commit f1e62dd

Please sign in to comment.