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.
59 lines
1.9 KiB
59 lines
1.9 KiB
3 years ago
|
library files;
|
||
|
|
||
|
import 'dart:async';
|
||
|
import 'dart:io';
|
||
|
import 'dart:math';
|
||
|
import 'dart:typed_data';
|
||
|
|
||
|
import 'package:collection/collection.dart';
|
||
|
import 'package:file_icons/file_icons.dart';
|
||
|
import 'package:file_picker/file_picker.dart';
|
||
|
import 'package:filesize/filesize.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_rx_bloc/flutter_rx_bloc.dart';
|
||
3 years ago
|
import 'package:image_picker/image_picker.dart';
|
||
3 years ago
|
import 'package:intersperse/intersperse.dart';
|
||
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||
3 years ago
|
import 'package:neon/src/apps/files/blocs/browser.dart';
|
||
|
import 'package:neon/src/neon.dart';
|
||
3 years ago
|
import 'package:nextcloud/nextcloud.dart';
|
||
3 years ago
|
import 'package:path/path.dart' as p;
|
||
3 years ago
|
import 'package:provider/provider.dart';
|
||
|
import 'package:rxdart/rxdart.dart';
|
||
|
import 'package:settings/settings.dart';
|
||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||
|
|
||
|
part 'dialogs/choose_create.dart';
|
||
|
part 'dialogs/choose_folder.dart';
|
||
|
part 'dialogs/create_folder.dart';
|
||
|
part 'models/file_details.dart';
|
||
|
part 'options.dart';
|
||
|
part 'pages/details.dart';
|
||
|
part 'pages/main.dart';
|
||
|
part 'utils/download_task.dart';
|
||
|
part 'utils/upload_task.dart';
|
||
|
part 'widgets/browser_view.dart';
|
||
|
part 'widgets/file_preview.dart';
|
||
|
|
||
|
class FilesApp extends AppImplementation<FilesBloc, FilesAppSpecificOptions> {
|
||
|
FilesApp(
|
||
|
final SharedPreferences sharedPreferences,
|
||
|
final RequestManager requestManager,
|
||
3 years ago
|
final NeonPlatform platform,
|
||
3 years ago
|
) : super(
|
||
|
'files',
|
||
|
(final context) => AppLocalizations.of(context).filesName,
|
||
|
sharedPreferences,
|
||
|
FilesAppSpecificOptions.new,
|
||
|
(final options, final client) => FilesBloc(
|
||
|
options,
|
||
|
requestManager,
|
||
|
client,
|
||
|
platform,
|
||
|
),
|
||
|
(final context, final bloc) => FilesMainPage(
|
||
|
bloc: bloc,
|
||
|
),
|
||
|
);
|
||
|
}
|