Skip to content

Commit

Permalink
Merge pull request #1355 from nextcloud/chore/neon_framework/file-lev…
Browse files Browse the repository at this point in the history
…el-doc-ignores
  • Loading branch information
provokateurin authored Dec 25, 2023
2 parents 54070e2 + 130990b commit bcf6695
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 6 deletions.
2 changes: 0 additions & 2 deletions packages/neon_framework/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ include: package:neon_lints/flutter.yaml

linter:
rules:
# should be enabled for release. https://github.com/nextcloud/neon/issues/692
public_member_api_docs: false
# TODO: migrate package to new lint rules
prefer_final_parameters: true
avoid_final_parameters: false
Expand Down
1 change: 1 addition & 0 deletions packages/neon_framework/lib/src/bloc/result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class Result<T> {
/// Copies this Result in a loading state.
Result<T> asLoading() => copyWith(isLoading: true);

/// Copies this Result and optionally replaces the [data], [error], [isLoading] and [isCached].
Result<T> copyWith({
final T? data,
final Object? error,
Expand Down
2 changes: 2 additions & 0 deletions packages/neon_framework/lib/src/blocs/timer.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:ui';

Expand Down
2 changes: 2 additions & 0 deletions packages/neon_framework/lib/src/pages/login_qr_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ class _LoginQRcodePageState extends State<LoginQRcodePage> {
);
}

/// Exception which is thrown when an invalid QR code is encountered.
@immutable
class InvalidQRcodeException extends NeonException {
/// Creates a new [InvalidQRcodeException].
const InvalidQRcodeException();

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class SettingsCategory extends StatelessWidget {
}
}

@internal
class MaterialSettingsCategory extends StatelessWidget {
const MaterialSettingsCategory({
required this.children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';
import 'package:neon_framework/src/utils/adaptive.dart';
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:neon_framework/l10n/localizations.dart';
import 'package:neon_framework/src/theme/colors.dart';

/// Shows a dialog asking the user to confirm the question posed in the [title].
Future<bool> showConfirmationDialog(final BuildContext context, final String title) async =>
await showDialog<bool>(
context: context,
Expand Down
1 change: 1 addition & 0 deletions packages/neon_framework/lib/src/utils/findable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ abstract interface class Findable {
String get id;
}

/// An extension to find [Findable]s in an iterable.
extension FindExtension<T extends Findable> on Iterable<T> {
/// Returns the first element matching [id] by [Findable.id].
///
Expand Down
3 changes: 3 additions & 0 deletions packages/neon_framework/lib/src/utils/rename_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
import 'package:neon_framework/src/utils/validators.dart';
import 'package:neon_framework/src/widgets/dialog.dart';

/// Shows a dialog asking the user to rename the thing stated in the [title].
///
/// [value] describes the current name of the thing before renaming.
Future<String?> showRenameDialog({
required final BuildContext context,
required final String title,
Expand Down
2 changes: 2 additions & 0 deletions packages/neon_framework/lib/src/utils/request_manager.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:neon_framework/src/widgets/options_collection_builder.dart';
/// The background will be loaded from the server.
/// It might be a single color or a full image.
class NeonCustomBackground extends StatelessWidget {
/// Creates a new custom background.
const NeonCustomBackground({
required this.child,
super.key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:rxdart/subjects.dart';

@internal
typedef DestinationIconBuilder = Widget Function({double? size, Color color});

@internal
class NeonNavigationDestination {
const NeonNavigationDestination({
Expand All @@ -15,7 +12,7 @@ class NeonNavigationDestination {
});

final String label;
final DestinationIconBuilder icon;
final Widget Function({double? size, Color color}) icon;
final Widget? selectedIcon;
final BehaviorSubject<int>? notificationCount;
}
Expand Down
1 change: 1 addition & 0 deletions packages/neon_framework/lib/src/widgets/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class NeonCachedImage extends StatefulWidget {
);
}

/// The [CacheManager] instance.
@visibleForTesting
static DefaultCacheManager cacheManager = DefaultCacheManager();

Expand Down
2 changes: 2 additions & 0 deletions packages/neon_framework/lib/src/widgets/list_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';
import 'package:neon_framework/src/widgets/error.dart';
import 'package:neon_framework/src/widgets/linear_progress_indicator.dart';
Expand Down

0 comments on commit bcf6695

Please sign in to comment.