Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Sep 26, 2024
1 parent 6a69294 commit e2d5dea
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/cv/lib/src/cv_model_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ List<T> cvNewModelList<T extends CvModel>({bool lazy = true}) =>
List<T> cvTypeNewModelList<T extends CvModel>(Type type, {bool lazy = true}) =>
cvEmptyMapList.cvType(type, lazy: lazy);

/// List<CvModel> convenient extensions.
/// `List<CvModel>` convenient extensions.
extension CvModelReadListExt<T extends CvModelRead> on List<T> {
/// Convert to model list
List<Model> toMapList(
Expand Down
4 changes: 2 additions & 2 deletions packages/cv/lib/src/cv_model_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ T? _rawMapGetValueAtPath<T extends Object?>(
return null;
}

/// Get a value at a given path - internal, handle CvField, CvModel (toMap), List<CvModel> (toMapList)
/// Get a value at a given path - internal, handle CvField, CvModel (toMap), `List<CvModel>` (toMapList)
/// other types are returned as is for now (this might change in the future)
T? rawGetValueAtPath<T extends Object?>(Object rawValue, List<Object> parts) {
var value = (rawValue is CvField) ? rawValue.v : rawValue;
Expand Down Expand Up @@ -372,7 +372,7 @@ extension CvModelReadExt on CvModelRead {
}

/// Get a value at a given path
/// fields value is returned. CvModel/List<CvModel> are converted to map/mapList.
/// fields value is returned. `CvModel/List<CvModel>` are converted to map/mapList.
T? valueAtPath<T extends Object?>(List<Object> parts) {
var path = parts.first;
if (path is String) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cv/lib/src/field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ mixin CvFieldMixin<T> implements CvField<T> {
CvField<T> withParent(String parent) => CvFieldWithParentImpl(this, parent);
}

/// List<Column> helpers
/// `List<Column>` helpers
extension CvColumnExtension on List<CvColumn> {
/// Column names.
List<String> get names => map((c) => c.name).toList();
Expand Down
2 changes: 1 addition & 1 deletion packages/cv/lib/src/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class ModelBase with MapMixin<String, Object?> {
Object? remove(Object? key) => _map.remove(key);
}

/// List class to use as a [List<dynamic>].
/// List class to use as a `[List<dynamic>]`.
class ModelListImpl extends ModelListBase {
/// Create a model. If list is null, the model
/// is an empty list
Expand Down
2 changes: 1 addition & 1 deletion packages/cv/lib/src/object_ext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:cv/src/map_ext.dart';
/// Global extension on any object.
extension ModelRawObjectExt on Object {
/// Convert any object to a specific type.
/// Example: anyAs<Map> or anyAs<List> or anyAs<Map?> to support nullable types.
/// Example: `anyAs<Map>` or `anyAs<List>` or `anyAs<Map?>` to support nullable types.
T anyAs<T>() {
if (this is T) {
return this as T;
Expand Down
8 changes: 4 additions & 4 deletions packages/cv/lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ Object? _nonNullBasicTypeCastType(Type type, Object value) {

/// Handle int, num, double, String, bool
///
/// <bool>
/// [bool]
/// non 0/null nom value are converted to true
/// <int>, <double>
/// [int], [double]
/// num are rounder to int if needed
T? basicTypeCast<T extends Object?>(Object? value) {
Expand All @@ -222,9 +222,9 @@ T? basicTypeCast<T extends Object?>(Object? value) {

/// Handle int, num, double, String, bool
///
/// <bool>
/// [bool]
/// non 0/null nom value are converted to true
/// <int>, <double>
/// [int], [double]
/// num are rounder to int if needed
Object? basicTypeCastType(Type type, Object? value) {
Expand Down

0 comments on commit e2d5dea

Please sign in to comment.