You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.1 KiB
69 lines
2.1 KiB
2 years ago
|
library neon_news;
|
||
2 years ago
|
|
||
|
import 'dart:async';
|
||
|
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/services.dart';
|
||
|
import 'package:flutter_html/flutter_html.dart';
|
||
|
import 'package:html/dom.dart' as html_dom;
|
||
|
import 'package:html/parser.dart' as html_parser;
|
||
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||
2 years ago
|
import 'package:neon/neon.dart';
|
||
2 years ago
|
import 'package:nextcloud/nextcloud.dart';
|
||
|
import 'package:provider/provider.dart';
|
||
|
import 'package:rxdart/rxdart.dart';
|
||
|
import 'package:settings/settings.dart';
|
||
|
import 'package:share_plus/share_plus.dart';
|
||
|
import 'package:sort_box/sort_box.dart';
|
||
|
import 'package:url_launcher/url_launcher_string.dart';
|
||
|
import 'package:wakelock/wakelock.dart';
|
||
|
import 'package:webview_flutter/webview_flutter.dart';
|
||
|
|
||
2 years ago
|
part 'blocs/article.dart';
|
||
|
part 'blocs/articles.dart';
|
||
|
part 'blocs/news.dart';
|
||
2 years ago
|
part 'dialogs/add_feed.dart';
|
||
|
part 'dialogs/create_folder.dart';
|
||
|
part 'dialogs/feed_show_url.dart';
|
||
|
part 'dialogs/feed_update_error.dart';
|
||
|
part 'dialogs/move_feed.dart';
|
||
|
part 'options.dart';
|
||
|
part 'pages/article.dart';
|
||
|
part 'pages/feed.dart';
|
||
|
part 'pages/folder.dart';
|
||
|
part 'pages/main.dart';
|
||
|
part 'sort/articles.dart';
|
||
|
part 'sort/feeds.dart';
|
||
|
part 'sort/folders.dart';
|
||
|
part 'widgets/articles_view.dart';
|
||
|
part 'widgets/feed_icon.dart';
|
||
|
part 'widgets/feeds_view.dart';
|
||
|
part 'widgets/folder_select.dart';
|
||
|
part 'widgets/folder_view.dart';
|
||
|
part 'widgets/folders_view.dart';
|
||
|
|
||
|
class NewsApp extends AppImplementation<NewsBloc, NewsAppSpecificOptions> {
|
||
2 years ago
|
NewsApp(super.sharedPreferences, super.requestManager, super.platform);
|
||
|
|
||
|
@override
|
||
|
String id = 'news';
|
||
|
|
||
|
@override
|
||
2 years ago
|
NewsAppSpecificOptions buildOptions(final AppStorage storage) => NewsAppSpecificOptions(storage, platform);
|
||
2 years ago
|
|
||
|
@override
|
||
2 years ago
|
NewsBloc buildBloc(final NextcloudClient client) => NewsBloc(
|
||
2 years ago
|
options,
|
||
|
requestManager,
|
||
|
client,
|
||
|
);
|
||
|
|
||
|
@override
|
||
2 years ago
|
Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => NewsMainPage(
|
||
2 years ago
|
bloc: appsBloc.getAppBloc(this),
|
||
2 years ago
|
);
|
||
2 years ago
|
|
||
|
@override
|
||
2 years ago
|
BehaviorSubject<int> getUnreadCounter(final AppsBloc appsBloc) => appsBloc.getAppBloc<NewsBloc>(this).unreadCounter;
|
||
2 years ago
|
}
|