mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Refactor: extract string utilities
This commit is contained in:
parent
2186cac470
commit
c1717a1f59
70 changed files with 98 additions and 72 deletions
|
@ -7,9 +7,8 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'account.g.dart';
|
||||
|
|
|
@ -17,8 +17,7 @@ import 'package:nc_photos/entity/tagged_file.dart';
|
|||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'entity_converter.g.dart';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'package:nc_photos/account.dart';
|
|||
import 'package:nc_photos/api/api_util.dart' as api_util;
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'app_password_exchange.g.dart';
|
||||
|
|
|
@ -17,7 +17,7 @@ import 'package:nc_photos/use_case/list_location_group.dart';
|
|||
import 'package:nc_photos/use_case/list_tag.dart';
|
||||
import 'package:nc_photos/use_case/person/list_person.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:woozy_search/woozy_search.dart';
|
||||
|
|
|
@ -15,7 +15,7 @@ import 'package:nc_photos/object_extension.dart';
|
|||
import 'package:nc_photos/use_case/list_share.dart';
|
||||
import 'package:nc_photos/use_case/list_sharee.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_album_share_outlier.g.dart';
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:woozy_search/woozy_search.dart';
|
||||
|
|
|
@ -4,8 +4,8 @@ import 'dart:convert';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:nc_photos/mobile/platform.dart'
|
||||
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_log/np_log.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
|
||||
class LogCapturer {
|
||||
|
|
|
@ -10,9 +10,9 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'album.g.dart';
|
||||
|
|
|
@ -3,9 +3,9 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'item.g.dart';
|
||||
|
|
|
@ -9,8 +9,8 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
part 'upgrader.g.dart';
|
||||
|
|
|
@ -20,9 +20,9 @@ import 'package:nc_photos/entity/collection_item/new_item.dart';
|
|||
import 'package:nc_photos/entity/collection_item/util.dart';
|
||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/sharee.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
abstract class CollectionAdapter {
|
||||
const CollectionAdapter();
|
||||
|
|
|
@ -6,9 +6,9 @@ import 'package:nc_photos/entity/collection_item.dart';
|
|||
import 'package:nc_photos/entity/collection_item/util.dart';
|
||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/sharee.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
/// A read-only collection that does not support modifying its items
|
||||
mixin CollectionAdapterReadOnlyTag implements CollectionAdapter {
|
||||
|
|
|
@ -32,9 +32,9 @@ import 'package:nc_photos/use_case/preprocess_album.dart';
|
|||
import 'package:nc_photos/use_case/unimport_shared_album.dart';
|
||||
import 'package:nc_photos/use_case/update_album_with_actual_items.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
part 'album.g.dart';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:collection/collection.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/entity/collection.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@ import 'package:nc_photos/entity/file_descriptor.dart';
|
|||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||
import 'package:nc_photos/json_util.dart' as json_util;
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'file.g.dart';
|
||||
|
|
|
@ -6,8 +6,7 @@ import 'package:nc_photos/entity/file_descriptor.dart';
|
|||
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
|
||||
bool isSupportedMime(String mime) => supportedFormatMimes.contains(mime);
|
||||
|
|
|
@ -2,9 +2,8 @@ import 'package:copy_with/copy_with.dart';
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'nc_album.g.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'nc_album_item.g.dart';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'recognize_face_item.g.dart';
|
||||
|
|
|
@ -16,7 +16,7 @@ import 'package:nc_photos/use_case/inflate_file_descriptor.dart';
|
|||
import 'package:nc_photos/use_case/list_tagged_file.dart';
|
||||
import 'package:nc_photos/use_case/person/list_person_face.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'data_source.g.dart';
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import 'package:nc_photos/exception.dart';
|
|||
import 'package:nc_photos/np_api_util.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'data_source.g.dart';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'sharee.g.dart';
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'package:nc_photos/exception.dart';
|
|||
import 'package:nc_photos/np_api_util.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'data_source.g.dart';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'package:drift/drift.dart';
|
|||
import 'package:nc_photos/account.dart' as app;
|
||||
import 'package:nc_photos/entity/sqlite/database.dart';
|
||||
import 'package:nc_photos/location_util.dart' as location_util;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
enum FilesQueryMode {
|
||||
file,
|
||||
|
|
|
@ -18,9 +18,9 @@ import 'package:nc_photos/entity/tag.dart';
|
|||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:np_api/np_api.dart' as api;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
extension SqlTagListExtension on List<sql.Tag> {
|
||||
Future<List<Tag>> convertToAppTag() {
|
||||
|
|
|
@ -19,8 +19,7 @@ import 'package:nc_photos/snack_bar_manager.dart';
|
|||
import 'package:nc_photos/url_launcher_util.dart';
|
||||
import 'package:nc_photos/use_case/ls_single_file.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'connect.g.dart';
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@ import 'package:nc_photos/url_launcher_util.dart';
|
|||
import 'package:nc_photos/widget/home.dart';
|
||||
import 'package:nc_photos/widget/root_picker.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'sign_in.g.dart';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
/// Convert a ISO 3166-1 alpha-2 code into country name
|
||||
String? alpha2CodeToName(String cc) => _ccMap.byCc(cc);
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:io';
|
|||
import 'dart:typed_data';
|
||||
|
||||
import 'package:nc_photos/platform/universal_storage.dart' as itf;
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:woozy_search/woozy_search.dart';
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import 'package:nc_photos/iterable_extension.dart';
|
|||
import 'package:nc_photos/use_case/create_share.dart';
|
||||
import 'package:nc_photos/use_case/update_album.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'share_album_with_user.g.dart';
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import 'package:nc_photos/use_case/list_share.dart';
|
|||
import 'package:nc_photos/use_case/remove_share.dart';
|
||||
import 'package:nc_photos/use_case/update_album.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'unshare_album_with_user.g.dart';
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import 'package:nc_photos/use_case/album/list_album.dart';
|
|||
import 'package:nc_photos/use_case/list_share.dart';
|
||||
import 'package:nc_photos/use_case/remove_share.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'unshare_file_from_album.g.dart';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:nc_photos/di_container.dart';
|
|||
import 'package:nc_photos/entity/collection.dart';
|
||||
import 'package:nc_photos/entity/collection/adapter.dart';
|
||||
import 'package:nc_photos/entity/collection/util.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
class UnshareCollection {
|
||||
const UnshareCollection(this._c);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
class Ls {
|
||||
Ls(this.fileRepo);
|
||||
|
|
|
@ -17,8 +17,8 @@ import 'package:nc_photos/use_case/album/remove_from_album.dart';
|
|||
import 'package:nc_photos/use_case/list_share.dart';
|
||||
import 'package:nc_photos/use_case/remove_share.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'remove.g.dart';
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@ import 'package:nc_photos/use_case/remove_share.dart';
|
|||
import 'package:nc_photos/widget/empty_list_indicator.dart';
|
||||
import 'package:nc_photos/widget/network_thumbnail.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:np_ui/np_ui.dart';
|
||||
|
||||
part 'album_share_outlier_browser.g.dart';
|
||||
|
|
|
@ -21,8 +21,7 @@ import 'package:nc_photos/url_launcher_util.dart';
|
|||
import 'package:nc_photos/use_case/ls_single_file.dart';
|
||||
import 'package:nc_photos/widget/cloud_progress_indicator.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'connect.g.dart';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import 'package:nc_photos/use_case/list_location_group.dart';
|
|||
import 'package:nc_photos/widget/collection_browser.dart';
|
||||
import 'package:nc_photos/widget/page_visibility_mixin.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'home_search_suggestion.g.dart';
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:nc_photos/app_localizations.dart';
|
||||
import 'package:nc_photos/double_extension.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:nc_photos/widget/image_editor/toolbar_button.dart';
|
||||
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:np_ui/np_ui.dart';
|
||||
|
||||
enum ColorToolType {
|
||||
|
|
|
@ -23,7 +23,7 @@ import 'package:nc_photos/k.dart' as k;
|
|||
import 'package:nc_photos/suggester.dart';
|
||||
import 'package:nc_photos/toast.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'share_collection_dialog.g.dart';
|
||||
|
|
|
@ -17,7 +17,7 @@ import 'package:nc_photos/widget/connect.dart';
|
|||
import 'package:nc_photos/widget/home.dart';
|
||||
import 'package:nc_photos/widget/root_picker.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
part 'sign_in.g.dart';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'package:nc_photos/exception_util.dart' as exception_util;
|
|||
import 'package:nc_photos/k.dart' as k;
|
||||
import 'package:nc_photos/snack_bar_manager.dart';
|
||||
import 'package:nc_photos/widget/dialog_scaffold.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
|
||||
class TagPickerDialog extends StatefulWidget {
|
||||
const TagPickerDialog({
|
||||
|
|
|
@ -11,7 +11,6 @@ import 'package:nc_photos/app_localizations.dart';
|
|||
import 'package:nc_photos/controller/account_controller.dart';
|
||||
import 'package:nc_photos/debug_util.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/double_extension.dart';
|
||||
import 'package:nc_photos/entity/collection.dart';
|
||||
import 'package:nc_photos/entity/collection/adapter.dart';
|
||||
import 'package:nc_photos/entity/collection_item.dart';
|
||||
|
@ -37,6 +36,7 @@ import 'package:nc_photos/widget/list_tile_center_leading.dart';
|
|||
import 'package:nc_photos/widget/photo_date_time_edit_dialog.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:np_ui/np_ui.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
|
|
@ -990,6 +990,13 @@ packages:
|
|||
relative: true
|
||||
source: path
|
||||
version: "1.0.0"
|
||||
np_string:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../np_string"
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.0.0"
|
||||
np_ui:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -107,6 +107,8 @@ dependencies:
|
|||
path: ../np_log
|
||||
np_math:
|
||||
path: ../np_math
|
||||
np_string:
|
||||
path: ../np_string
|
||||
np_ui:
|
||||
path: ../np_ui
|
||||
octo_image: any
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:nc_photos/account.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'package:bloc_test/bloc_test.dart';
|
|||
import 'package:nc_photos/bloc/list_album_share_outlier.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../mock_type.dart';
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'package:nc_photos/entity/album/sort_provider.dart';
|
|||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../../test_util.dart' as util;
|
||||
|
|
|
@ -11,8 +11,8 @@ import 'package:nc_photos/entity/album/upgrader.dart';
|
|||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/type.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../test_util.dart' as util;
|
||||
|
|
|
@ -2,8 +2,8 @@ import 'package:clock/clock.dart';
|
|||
import 'package:nc_photos/entity/exif.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
|
|
|
@ -19,8 +19,8 @@ import 'package:nc_photos/entity/sharee.dart';
|
|||
import 'package:nc_photos/entity/tag.dart';
|
||||
import 'package:nc_photos/exception_event.dart';
|
||||
import 'package:nc_photos/future_util.dart' as future_util;
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
|
||||
/// Mock of [AlbumRepo] where all methods will throw UnimplementedError
|
||||
|
|
|
@ -17,8 +17,8 @@ import 'package:nc_photos/entity/sharee.dart';
|
|||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:nc_photos/entity/sqlite/type_converter.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class FilesBuilder {
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'package:nc_photos/entity/pref.dart';
|
|||
import 'package:nc_photos/entity/pref/provider/memory.dart';
|
||||
import 'package:nc_photos/entity/sqlite/database.dart' as sql;
|
||||
import 'package:nc_photos/use_case/album/add_file_to_album.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../mock_type.dart';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:nc_photos/use_case/album/share_album_with_user.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../mock_type.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'package:event_bus/event_bus.dart';
|
|||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/use_case/album/unshare_album_with_user.dart';
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../mock_type.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:np_api/src/util.dart';
|
||||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/np_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'type.g.dart';
|
||||
|
|
|
@ -20,6 +20,8 @@ dependencies:
|
|||
path: ../np_common
|
||||
np_log:
|
||||
path: ../np_log
|
||||
np_string:
|
||||
path: ../np_string
|
||||
to_string:
|
||||
git:
|
||||
url: https://gitlab.com/nkming2/dart-to-string
|
||||
|
|
|
@ -18,7 +18,6 @@ dev_dependencies:
|
|||
build_runner: ^2.2.1
|
||||
np_lints:
|
||||
path: ../np_lints
|
||||
test: any
|
||||
to_string_build:
|
||||
git:
|
||||
url: https://gitlab.com/nkming2/dart-to-string
|
||||
|
|
7
np_string/.gitignore
vendored
Normal file
7
np_string/.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
# https://dart.dev/guides/libraries/private-files
|
||||
# Created by `dart pub`
|
||||
.dart_tool/
|
||||
|
||||
# Avoid committing pubspec.lock for library packages; see
|
||||
# https://dart.dev/guides/libraries/private-files#pubspeclock.
|
||||
pubspec.lock
|
1
np_string/analysis_options.yaml
Normal file
1
np_string/analysis_options.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
include: package:np_lints/np.yaml
|
5
np_string/lib/np_string.dart
Normal file
5
np_string/lib/np_string.dart
Normal file
|
@ -0,0 +1,5 @@
|
|||
library np_string;
|
||||
|
||||
export 'src/ci_string.dart';
|
||||
export 'src/double_extension.dart';
|
||||
export 'src/string_extension.dart';
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/src/string_extension.dart';
|
||||
|
||||
/// Case-insensitive string
|
||||
class CiString implements Comparable<Object> {
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/src/string_extension.dart';
|
||||
|
||||
extension DoubleExtension on double {
|
||||
/// Same as toStringAsFixed but with trailing zeros truncated
|
13
np_string/pubspec.yaml
Normal file
13
np_string/pubspec.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
name: np_string
|
||||
description: A starting point for Dart libraries or applications.
|
||||
version: 1.0.0
|
||||
# repository: https://github.com/my_org/my_repo
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.19.6 <3.0.0'
|
||||
|
||||
dev_dependencies:
|
||||
np_lints:
|
||||
path: ../np_lints
|
||||
test: ^1.21.0
|
|
@ -1,6 +1,6 @@
|
|||
// ignore_for_file: unrelated_type_equality_checks
|
||||
|
||||
import 'package:np_common/ci_string.dart';
|
||||
import 'package:np_string/src/ci_string.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:nc_photos/double_extension.dart';
|
||||
import 'package:np_string/src/double_extension.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:np_common/string_extension.dart';
|
||||
import 'package:np_string/src/string_extension.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
Loading…
Reference in a new issue