diff --git a/packages/dynamite/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/dynamite/lib/src/openapi_builder.dart index fbe065e1..fc541c86 100644 --- a/packages/dynamite/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/dynamite/lib/src/openapi_builder.dart @@ -477,17 +477,14 @@ class OpenAPIBuilder implements Builder { code.write( "path = path.replaceAll('{${parameter.name}}', Uri.encodeQueryComponent($value));", ); - break; case 'query': code.write( "queryParameters['${parameter.name}'] = $value;", ); - break; case 'header': code.write( "headers['${parameter.name}'] = $value;", ); - break; default: throw Exception('Can not work with parameter in "${parameter.in_}"'); } @@ -549,7 +546,6 @@ class OpenAPIBuilder implements Builder { if (dartParameterNullable) { code.write('}'); } - break; default: throw Exception('Can not parse mime type "$mimeType"'); } @@ -1547,19 +1543,16 @@ TypeResult resolveType( 'bool', nullable: nullable, ); - break; case 'integer': result = TypeResultBase( 'int', nullable: nullable, ); - break; case 'number': result = TypeResultBase( 'num', nullable: nullable, ); - break; case 'string': switch (schema.format) { case 'binary': @@ -1567,14 +1560,12 @@ TypeResult resolveType( 'Uint8List', nullable: nullable, ); - break; } result = TypeResultBase( 'String', nullable: nullable, ); - break; case 'array': if (schema.items != null) { final subResult = resolveType( @@ -1596,7 +1587,6 @@ TypeResult resolveType( nullable: nullable, ); } - break; case 'object': if (schema.properties == null) { if (schema.additionalProperties != null) { @@ -1645,7 +1635,6 @@ TypeResult resolveType( schema, nullable: nullable, ); - break; } } diff --git a/packages/dynamite/dynamite/lib/src/type_result/base.dart b/packages/dynamite/dynamite/lib/src/type_result/base.dart index 13c2218e..cec6ccef 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/base.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/base.dart @@ -3,7 +3,7 @@ part of 'type_result.dart'; @immutable class TypeResultBase extends TypeResult { TypeResultBase( - super.name, { + super.className, { super.nullable, }); @@ -47,7 +47,6 @@ class TypeResultBase extends TypeResult { switch (name) { case 'JsonObject': dartName = 'dynamic'; - break; default: dartName = name; } diff --git a/packages/dynamite/dynamite/lib/src/type_result/enum.dart b/packages/dynamite/dynamite/lib/src/type_result/enum.dart index 9aab53c1..805f9253 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/enum.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/enum.dart @@ -3,7 +3,7 @@ part of 'type_result.dart'; @immutable class TypeResultEnum extends TypeResult { TypeResultEnum( - super.name, + super.className, this.subType, { super.nullable, }); diff --git a/packages/dynamite/dynamite/lib/src/type_result/list.dart b/packages/dynamite/dynamite/lib/src/type_result/list.dart index 01230c91..c56f2731 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/list.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/list.dart @@ -3,7 +3,7 @@ part of 'type_result.dart'; @immutable class TypeResultList extends TypeResult { TypeResultList( - super.name, + super.className, final TypeResult subType, { super.nullable, }) : super(generics: [subType]); diff --git a/packages/dynamite/dynamite/lib/src/type_result/map.dart b/packages/dynamite/dynamite/lib/src/type_result/map.dart index 683ff9b1..ce18b15b 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/map.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/map.dart @@ -3,7 +3,7 @@ part of 'type_result.dart'; @immutable class TypeResultMap extends TypeResult { TypeResultMap( - super.name, + super.className, final TypeResult subType, { super.nullable, }) : super(generics: [TypeResultBase('String'), subType]); diff --git a/packages/neon/neon_files/lib/widgets/actions.dart b/packages/neon/neon_files/lib/widgets/actions.dart index 59896af1..334228e6 100644 --- a/packages/neon/neon_files/lib/widgets/actions.dart +++ b/packages/neon/neon_files/lib/widgets/actions.dart @@ -23,7 +23,6 @@ class FileActions extends StatelessWidget { } else { bloc.addFavorite(details.path); } - break; case FilesFileAction.details: await Navigator.of(context).push( MaterialPageRoute( @@ -33,7 +32,6 @@ class FileActions extends StatelessWidget { ), ), ); - break; case FilesFileAction.rename: final result = await showRenameDialog( context: context, @@ -44,7 +42,6 @@ class FileActions extends StatelessWidget { if (result != null) { bloc.rename(details.path, result); } - break; case FilesFileAction.move: final b = bloc.getNewFilesBrowserBloc(); final originalPath = details.path.sublist(0, details.path.length - 1); @@ -61,7 +58,6 @@ class FileActions extends StatelessWidget { if (result != null) { bloc.move(details.path, result..add(details.name)); } - break; case FilesFileAction.copy: final b = bloc.getNewFilesBrowserBloc(); final originalPath = details.path.sublist(0, details.path.length - 1); @@ -78,7 +74,6 @@ class FileActions extends StatelessWidget { if (result != null) { bloc.copy(details.path, result..add(details.name)); } - break; case FilesFileAction.sync: final sizeWarning = browserBloc.options.downloadSizeWarning.value; if (sizeWarning != null && details.size != null && details.size! > sizeWarning) { @@ -93,7 +88,6 @@ class FileActions extends StatelessWidget { } } bloc.syncFile(details.path); - break; case FilesFileAction.delete: if (await showConfirmationDialog( context, @@ -103,7 +97,6 @@ class FileActions extends StatelessWidget { )) { bloc.delete(details.path); } - break; } } diff --git a/packages/neon/neon_news/lib/blocs/articles.dart b/packages/neon/neon_news/lib/blocs/articles.dart index af014c09..210a2492 100644 --- a/packages/neon/neon_news/lib/blocs/articles.dart +++ b/packages/neon/neon_news/lib/blocs/articles.dart @@ -31,7 +31,7 @@ abstract class NewsArticlesBlocStates { class NewsMainArticlesBloc extends NewsArticlesBloc { NewsMainArticlesBloc( - super.newsBloc, + super._newsBloc, super.options, super.requestManager, super.account, @@ -98,7 +98,6 @@ class NewsArticlesBloc extends InteractiveBloc implements NewsArticlesBlocEvents break; case FilterType.unread: getRead = false; - break; default: throw Exception('FilterType ${filterType.value} not allowed'); } @@ -106,23 +105,17 @@ class NewsArticlesBloc extends InteractiveBloc implements NewsArticlesBlocEvents switch (listType) { case ListType.feed: type = NewsListType.feed; - break; case ListType.folder: type = NewsListType.folder; - break; case null: switch (filterType.value) { case FilterType.starred: type = NewsListType.starred; - break; case FilterType.all: type = NewsListType.allItems; - break; case FilterType.unread: type = NewsListType.unread; - break; } - break; } await requestManager.wrapNextcloud, NewsListArticles>( diff --git a/packages/neon/neon_news/lib/widgets/articles_view.dart b/packages/neon/neon_news/lib/widgets/articles_view.dart index acd85c21..1c63cf79 100644 --- a/packages/neon/neon_news/lib/widgets/articles_view.dart +++ b/packages/neon/neon_news/lib/widgets/articles_view.dart @@ -70,13 +70,10 @@ class _NewsArticlesViewState extends State { switch (a) { case FilterType.all: label = AppLocalizations.of(context).articlesFilterAll; - break; case FilterType.unread: label = AppLocalizations.of(context).articlesFilterUnread; - break; case FilterType.starred: label = AppLocalizations.of(context).articlesFilterStarred; - break; default: throw Exception('FilterType $a should not be shown'); } diff --git a/packages/neon/neon_news/lib/widgets/feeds_view.dart b/packages/neon/neon_news/lib/widgets/feeds_view.dart index 850e5e83..ddebd570 100644 --- a/packages/neon/neon_news/lib/widgets/feeds_view.dart +++ b/packages/neon/neon_news/lib/widgets/feeds_view.dart @@ -111,7 +111,6 @@ class NewsFeedsView extends StatelessWidget { feed: feed, ), ); - break; case NewsFeedAction.delete: if (await showConfirmationDialog( context, @@ -119,7 +118,6 @@ class NewsFeedsView extends StatelessWidget { )) { bloc.removeFeed(feed.id); } - break; case NewsFeedAction.rename: final result = await showRenameDialog( context: context, @@ -129,7 +127,6 @@ class NewsFeedsView extends StatelessWidget { if (result != null) { bloc.renameFeed(feed.id, result); } - break; case NewsFeedAction.move: final result = await showDialog>( context: context, @@ -141,7 +138,6 @@ class NewsFeedsView extends StatelessWidget { if (result != null) { bloc.moveFeed(feed.id, result[0]); } - break; } }, ), diff --git a/packages/neon/neon_news/lib/widgets/folders_view.dart b/packages/neon/neon_news/lib/widgets/folders_view.dart index 9fafc7e7..5b308663 100644 --- a/packages/neon/neon_news/lib/widgets/folders_view.dart +++ b/packages/neon/neon_news/lib/widgets/folders_view.dart @@ -92,7 +92,6 @@ class NewsFoldersView extends StatelessWidget { )) { bloc.deleteFolder(folder.id); } - break; case NewsFolderAction.rename: final result = await showRenameDialog( context: context, @@ -102,7 +101,6 @@ class NewsFoldersView extends StatelessWidget { if (result != null) { bloc.renameFolder(folder.id, result); } - break; } }, ),