Author SHA1 Message Date
onasanya.lanre 558a28d12b . 2026-04-09 15:47:59 +01:00
onasanya.lanre 2033ad79e2 reinitialising project 2025-05-03 03:44:06 +01:00
27 changed files with 1901 additions and 248 deletions
+17 -17
View File
@@ -5,23 +5,27 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
.dart_tool/
macos/
test/
web/
linux/
windows/
.rmv/
*.metadeta
*main_sub_test*
*main_test*
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
.idea/
*.gitignore
*ios
*android
*.vscode
*pubspec.lock
*test/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
@@ -29,11 +33,8 @@ windows/
#.vscode/
# Flutter/Dart/Pub related
# **/doc/api/
# **/ios/Flutter/.last_build_id
*/doc/api/
ios/
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
@@ -48,7 +49,6 @@ app.*.symbols
app.*.map.json
# Android Studio will place build artifacts here
# android/app/debug
# android/app/profile
# android/app/release
android/
/android/app/debug
/android/app/profile
/android/app/release
+15 -15
View File
@@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
channel: "stable"
project_type: app
@@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: android
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: ios
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: linux
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: macos
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: web
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: windows
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
# User provided section
+3
View File
@@ -0,0 +1,3 @@
# NextCloudApp
Mobile Application for NextCloud
+15 -2
View File
@@ -1,3 +1,16 @@
# NextCloudApp
# nextcloudapp
Mobile Application for NextCloud
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

+3
View File
@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
import 'dart:io';
import 'package:http/io_client.dart';
import 'package:nextcloud/nextcloud.dart';
extension NextcloudClientExtension on NextcloudClient {
//
static final userAgent = 'NextCloud App'
'(${Platform.operatingSystem}) ';
// 'Dart/${Platform.version.split(' ').first}';
//
static IOClient newHttpClient() => IOClient(
HttpClient()..userAgent = userAgent,
);
}
+104
View File
@@ -0,0 +1,104 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter_web_auth_2/flutter_web_auth_2.dart';
import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';
import 'package:nextcloud/core.dart';
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloudapp/app/extension.dart';
import 'package:url_launcher/url_launcher.dart';
class SaberLoginFlow {
SaberLoginFlow.start({
required this.serverUrl,
}) {
// NcHttpOverrides.tempAcceptBadCertificateFrom(serverUrl);
unawaited(_run());
}
final Uri serverUrl;
final log = Logger('SaberLoginFlow');
Timer? _pollTimer;
final completer = Completer<LoginFlowV2Credentials>();
late final future = completer.future;
LoginFlowV2? init;
Future<void> openLoginUrl() async {
final init = this.init;
if (init == null) return;
if (Platform.isMacOS || Platform.isIOS || Platform.isAndroid) {
// Use FlutterWebAuth2 which returns to Saber when authenticated
log.info('Opening login link in-app: ${init.login}');
await FlutterWebAuth2.authenticate(
url: init.login,
callbackUrlScheme: 'nc',
);
} else {
// Use url_launcher to open the link in the default browser
log.info('Opening login link in browser: ${init.login}');
final loginLink = Uri.parse(init.login);
await launchUrl(loginLink);
}
}
Future<void> _run() async {
_catchHttpError(() async {
final client = NextcloudClient(serverUrl,
httpClient: NextcloudClientExtension.newHttpClient());
final flowClient = client.core.clientFlowLoginV2;
init = await flowClient.init().then((response) => response.body);
log.info('init: $init');
openLoginUrl();
_pollTimer?.cancel();
_pollTimer = Timer.periodic(
const Duration(seconds: 1),
(_) => _catch404Error(() async {
// Throws 404 if not logged in yet
final poll = await flowClient.poll(
$body: ClientFlowLoginV2PollRequestApplicationJson(
(b) => b..token = init!.poll.token,
),
);
_pollTimer?.cancel();
if (!completer.isCompleted) completer.complete(poll.body);
}),
);
});
}
Future<T?> _catchHttpError<T>(Future<T> Function() fn) async {
try {
return await fn();
} on http.ClientException catch (error, stackTrace) {
log.severe('Error while polling the login flow.', error, stackTrace);
if (!completer.isCompleted) completer.completeError(error, stackTrace);
return null;
}
}
Future<T?> _catch404Error<T>(Future<T> Function() fn) async {
try {
return await fn();
} on DynamiteStatusCodeException catch (error) {
if (error.statusCode != 404) rethrow;
log.fine('Login flow not found or completed yet, will repoll');
return null;
}
}
void dispose() {
_pollTimer?.cancel();
if (!completer.isCompleted) {
completer.completeError(TimeoutException('Login flow was disposed'));
}
}
}
+51
View File
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import 'package:nextcloudapp/components/nextcloud_routes.dart';
import 'package:nextcloudapp/service/navigation_service.dart';
class NextcloudApp extends StatelessWidget {
NextcloudApp({
super.key,
});
final NextcloudAppRoutes _nextcloudAppRoutes = NextcloudAppRoutes.instance;
final NavigationService _navigationService = NavigationService.instance;
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Nextcloud App',
navigatorKey: _navigationService.navigatorKey,
theme: ThemeData(
primaryColor: Color.fromARGB(255, 152, 120, 57),
scaffoldBackgroundColor: Colors.white,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 0,
foregroundColor: Colors.white,
backgroundColor: Color.fromARGB(255, 152, 120, 57),
shape: const StadiumBorder(),
maximumSize: const Size(double.infinity, 56),
minimumSize: const Size(double.infinity, 56),
),
),
// inputDecorationTheme: const InputDecorationTheme(
// filled: true,
// fillColor: primaryLightColor,
// iconColor: primaryColor,
// prefixIconColor: primaryColor,
// contentPadding: EdgeInsets.symmetric(
// horizontal: defaultPadding, vertical: defaultPadding),
// border: OutlineInputBorder(
// borderRadius: BorderRadius.all(Radius.circular(30)),
// borderSide: BorderSide.none,
// ),
// ),
fontFamily: 'Poppins',
),
routes: _nextcloudAppRoutes.routes,
initialRoute: "login",
);
}
}
+15
View File
@@ -0,0 +1,15 @@
import 'dart:math';
class FileSize {
static FileSize instance = FileSize();
String getFileSizeString({required int bytes, int decimals = 0}) {
const suffixes = ["Bytes", "KB", "MB", "GB", "TB"];
if (bytes == 0) return '0 ${suffixes[0]}';
var i = (log(bytes) / log(1024)).floor();
return "${(bytes / pow(1024, i)).toStringAsFixed(
i == 0 ? 0 : decimals,
)} ${suffixes[i]}";
}
}
+25
View File
@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
class MimetypeIcon {
static MimetypeIcon instance = MimetypeIcon();
IconData getIconForMimeType(String mimeType) {
if (mimeType.startsWith('image/')) {
return Icons.image;
} else if (mimeType.startsWith('video/')) {
return Icons.video_file;
} else if (mimeType.startsWith('audio/')) {
return Icons.audiotrack;
} else if (mimeType == 'application/pdf') {
return Icons.picture_as_pdf;
} else if (mimeType.startsWith('text/')) {
return Icons.text_snippet;
} else if (mimeType.contains("application/octet-stream")) {
return Icons.disc_full_rounded;
} else if (mimeType.contains("application/zip")) {
return Icons.folder_zip;
} else {
return Icons.folder; // Default icon
}
}
}
+13
View File
@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';
import 'package:nextcloudapp/screens/login_screen.dart';
import 'package:nextcloudapp/screens/home_screen.dart';
class NextcloudAppRoutes {
//
static NextcloudAppRoutes instance = NextcloudAppRoutes();
Map<String, WidgetBuilder> get routes => {
"login": (BuildContext _context) => LoginScreen(),
"home": (BuildContext _context) => HomeSceen(),
};
}
+7 -121
View File
@@ -1,125 +1,11 @@
import 'package:flutter/material.dart';
import 'package:nextcloudapp/app/nextcloud_app.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// TRY THIS: Try running your application with "flutter run". You'll see
// the application has a purple toolbar. Then, without quitting the app,
// try changing the seedColor in the colorScheme below to Colors.green
// and then invoke "hot reload" (save your changes or press the "hot
// reload" button in a Flutter-supported IDE, or press "r" if you used
// the command line to start the app).
//
// Notice that the counter didn't reset back to zero; the application
// state is not lost during the reload. To reset the state, use hot
// restart instead.
//
// This works for code too, not just values: Most code changes can be
// tested with just a hot reload.
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
//
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
// action in the IDE, or press "p" in the console), to see the
// wireframe for each widget.
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
WidgetsFlutterBinding.ensureInitialized();
runApp(
NextcloudApp(),
);
}
+19
View File
@@ -0,0 +1,19 @@
import 'package:nextcloud/nextcloud.dart';
class ServerDetails {
String name;
String description;
ServerDetails({
required this.name,
required this.description,
});
factory ServerDetails.fromTheme(Map _themeValues) {
//
DynamiteResponse icon = _themeValues['icon'];
DynamiteResponse theme = _themeValues['systemtheme'];
return ServerDetails(name: '', description: '');
}
}
+53
View File
@@ -0,0 +1,53 @@
import 'package:nextcloud/webdav.dart';
class Files {
String? path;
String? name;
String? resourceType;
String? contentType;
DateTime? creationDate;
DateTime? modifiedDate;
int? size;
Files({
required this.path,
required this.name,
required this.resourceType,
required this.contentType,
required this.creationDate,
required this.modifiedDate,
required this.size,
});
factory Files.fromWebDavResponse(WebDavResponse _response) {
//
var _name;
var _resourceType;
var _size;
var _tempPath = _response.href!.split("/");
var _length = _tempPath.length;
var _collection = _response.propstats[0].prop.davResourcetype!.collection;
if (_collection == null) {
_resourceType = 'file';
_name = _tempPath[_length - 1];
_size = _response.propstats[0].prop.davGetcontentlength;
} else {
_resourceType = 'folder';
_name = _tempPath[_length - 2].contains("dav")
? ".."
: _tempPath[_length - 2];
_size = _response.propstats[0].prop.davQuotaUsedBytes;
}
return Files(
path: _response.href ?? '',
name: Uri.decodeFull(_name),
contentType: _response.propstats[0].prop.davGetcontenttype ?? '',
creationDate: DateTime.now(),
modifiedDate: _response.propstats[0].prop.davGetlastmodified,
size: _size,
resourceType: _resourceType,
);
}
}
+182
View File
@@ -0,0 +1,182 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:nextcloud/core.dart';
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/provisioning_api.dart';
import 'package:nextcloud/theming.dart';
import 'package:nextcloud/webdav.dart';
import 'package:nextcloudapp/app/extension.dart';
import 'package:nextcloudapp/models/details.dart';
import 'package:nextcloudapp/models/files.dart';
import 'package:nextcloudapp/service/navigation_service.dart';
import 'package:nextcloudapp/service/snackbar_service.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
enum AuthStatus {
notAuthenticated,
authenticated,
authenticating,
userNotFound,
error,
}
class NextcloudProvider extends ChangeNotifier {
//
//
static NextcloudProvider instance = NextcloudProvider();
final NavigationService _navigationService = NavigationService.instance;
late NextcloudClient client;
final SharedPreferencesAsync _sharedPreferences = SharedPreferencesAsync();
// SharedPreferences? _sharedPreferences;
AuthStatus? status;
UserDetails? userDetails;
NextcloudProvider() {
// _init();
_checkLogin();
}
// void _init() async {
// _sharedPreferences = SharedPreferencesAsync();
// }
void _checkLogin() async {
await Future.delayed(Duration(milliseconds: 300));
try {
String? _appPassword = await _sharedPreferences.getString('apppassword');
print(_appPassword);
String? _uri = await _sharedPreferences.getString('uri');
if (_appPassword != null && _uri != null) {
client = NextcloudClient(
Uri.parse(_uri),
appPassword: _appPassword,
httpClient: NextcloudClientExtension.newHttpClient(),
);
var _user = await client.provisioningApi.users.getCurrentUser();
userDetails = _user.body.ocs.data;
status = AuthStatus.authenticated;
_navigationService.navigateToReplacement("home");
} else {
status = AuthStatus.notAuthenticated;
}
} on Exception catch (e) {
status = AuthStatus.notAuthenticated;
SnackBarService.instance.showSnackBarError("$e");
}
}
Future<ServerDetails> envData() async {
Map _themeValues = {};
_themeValues['icon'] = await client.theming.icon.getFavicon();
_themeValues['systemtheme'] = await client.theming.theming.getManifest();
return ServerDetails.fromTheme(_themeValues);
}
Future<void> login(String _uri, String _username, String _password,
bool _savePassword) async {
notifyListeners();
status = AuthStatus.error;
try {
status = AuthStatus.authenticating;
client = NextcloudClient(
Uri.parse(_uri),
loginName: _username,
password: _password,
httpClient: NextcloudClientExtension.newHttpClient(),
);
var _user = await client.provisioningApi.users.getCurrentUser();
userDetails = _user.body.ocs.data;
client.core.appPassword.getAppPassword().then((_response) async {
await _sharedPreferences.setString(
'apppassword', _response.body.ocs.data.apppassword);
await _sharedPreferences.setString('uri', _uri);
await _sharedPreferences.setString('username', _username);
if (_savePassword) {
await _sharedPreferences.setString('password', _password);
}
});
status = AuthStatus.authenticated;
SnackBarService.instance.showSnackBarSuccess('successfully logged in');
_navigationService.navigateToReplacement("home");
} on ClientException catch (e) {
SnackBarService.instance.showSnackBarError("$e");
status = AuthStatus.error;
} on Exception catch (e) {
status = AuthStatus.error;
SnackBarService.instance.showSnackBarError("$e");
}
notifyListeners();
}
void logout() async {
try {
var _resp = await client.core.appPassword.deleteAppPassword();
if (_resp.statusCode == 200) {
_sharedPreferences.remove('apppassword');
SnackBarService.instance.showSnackBarSuccess("succssfully loggedout");
_navigationService.navigateToReplacement("login");
} else {
SnackBarService.instance
.showSnackBarError(_resp.body.ocs.meta.message!);
}
} on Exception catch (e) {
SnackBarService.instance.showSnackBarError("$e");
}
}
Future<List<Files>> listDirectory(String _cd) async {
List<Files> _fileList = [];
try {
WebDavClient _client = client.webdav;
var _returnVal = await _client.propfind(
PathUri.parse(Uri.decodeFull(_cd)),
prop: WebDavPropWithoutValues(),
depth: WebDavDepth.one,
);
_fileList = _returnVal.responses.map((_value) {
return Files.fromWebDavResponse(_value);
}).toList();
_fileList[0].name = "..";
_fileList[0].size = 0;
_fileList[0].resourceType = 'folder';
List<Files> filteredList = List.from(_fileList)..removeAt(0);
filteredList.sort((a, b) => b.resourceType!.compareTo(a.resourceType!));
filteredList.insert(0, _fileList[0]);
return filteredList;
} on Exception catch (e) {
print(e.toString());
return Future.delayed(Duration.zero);
}
}
Future<void> getIt() async {
Directory? storageDirectory = await getApplicationDocumentsDirectory();
String _sdPath = storageDirectory.path;
var d = Directory(_sdPath);
if (!d.existsSync()) {
d.createSync(recursive: true);
File _fileTemp = File("$_sdPath/.nomedia");
_fileTemp.writeAsString('');
}
// File temp = File('$_sdPath/temp.png');
// await _client.getFile(
// PathUri.parse("/files/${userDetails!.id}/Nextcloud.png"), temp);
}
}
+252
View File
@@ -0,0 +1,252 @@
import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:intl/intl.dart';
import 'package:nextcloud/webdav.dart';
import 'package:nextcloudapp/components/file_size.dart';
import 'package:nextcloudapp/models/files.dart';
import 'package:nextcloudapp/provider/nextcloud_provider.dart';
import 'package:nextcloudapp/service/snackbar_service.dart';
import 'package:nextcloudapp/components/mime_type.dart';
import 'package:file_icon/file_icon.dart';
class HomeSceen extends StatefulWidget {
const HomeSceen({super.key});
@override
State<HomeSceen> createState() => _HomeSceenState();
}
class _HomeSceenState extends State<HomeSceen> {
//
var _deviceHeight;
var _deviceWidth;
var _percentage;
var _usedMemory;
var _totalMemory;
var _cwd;
List<String> _temp = [];
List<Files>? _data = [];
final MimetypeIcon _mimetypeIcon = MimetypeIcon.instance;
final FileSize _fileSize = FileSize.instance;
final NextcloudProvider _provider = NextcloudProvider.instance;
final ScrollController _scrollController = ScrollController();
_HomeSceenState() {
_cwd = "";
}
@override
Widget build(BuildContext context) {
_deviceHeight = MediaQuery.of(context).size.height;
_deviceWidth = MediaQuery.of(context).size.width;
SnackBarService.instance.buildContext = context;
return Scaffold(
appBar: AppBar(
title: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Container(
height: _deviceHeight * 0.10,
width: _deviceWidth * 0.20,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
image: DecorationImage(
image: AssetImage('assets/images/nextcloud_logo.png'),
),
),
),
Text("NextCloud"),
],
),
),
drawer: _appDrawerUI(),
body: _appBodyUI(),
floatingActionButton: _floatingButton());
}
Widget _floatingButton() {
return SpeedDial(
closeManually: true,
animatedIcon: AnimatedIcons.menu_arrow,
children: [
SpeedDialChild(
label: "File Upload",
child: Icon(Icons.upload),
),
SpeedDialChild(
label: "Folder Upload",
child: Icon(Icons.upload),
),
],
);
}
Widget _appDrawerUI() {
_totalMemory = _provider.userDetails!.quota.total;
_usedMemory = _provider.userDetails!.quota.used;
_percentage = (_usedMemory / _totalMemory);
return NavigationDrawer(
backgroundColor: Color.fromARGB(255, 72, 160, 232),
children: [
Stack(
clipBehavior: Clip.none,
children: [
SizedBox(
height: _deviceHeight * 0.05,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: [
Text(_provider.userDetails!.displayName),
IconButton(
onPressed: () {
_provider.logout();
},
icon: Icon(Icons.logout_sharp),
),
],
),
),
SizedBox(
height: _deviceHeight * 0.20,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Text(
'Memory Usage',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
SizedBox(height: 10),
LinearProgressIndicator(
value: _percentage,
backgroundColor: Colors.grey[300],
valueColor: AlwaysStoppedAnimation<Color>(
_percentage > 0.80 ? Colors.red : Colors.green,
),
),
SizedBox(height: 10),
Text(
'${(_percentage * 100).toStringAsFixed(2)}% used',
style: TextStyle(fontSize: 14),
),
Text(
'${_fileSize.getFileSizeString(
bytes: _usedMemory,
decimals: 1,
)} of ${_fileSize.getFileSizeString(
bytes: _totalMemory,
decimals: 1,
)}',
style: TextStyle(fontSize: 14),
),
],
),
)
],
),
],
);
}
Widget _appBodyUI() {
return SizedBox(
height: _deviceHeight * 0.80,
child: FutureBuilder(
future: _provider.listDirectory(_cwd),
builder: (context, _snapshot) {
_data = _snapshot.data;
if (_data != null) {
// WidgetsBinding.instance.addPostFrameCallback(
// (_) {
// if (_scrollController.hasClients) {
// _scrollController
// .jumpTo(_scrollController.position.minScrollExtent);
// }
// },
// );
return Scrollbar(
controller: _scrollController,
child: ListView.builder(
controller: _scrollController,
itemCount: _data!.length,
itemBuilder: (BuildContext _context, int _index) {
return ListTile(
onLongPress: () {},
onTap: () {
setState(() {
if (_data![_index].resourceType! == "folder") {
if (_index == 0) {
_temp.removeAt(_temp.length - 2);
_cwd = _temp
.join("/")
.replaceAll(webdavBase.toString(), '');
} else {
_cwd = _data![_index]
.path!
.replaceAll(webdavBase.toString(), '');
_temp = _data![_index].path!.split("/");
}
}
});
},
leading: _data![_index].resourceType! == 'folder'
? Icon(_mimetypeIcon
.getIconForMimeType(_data![_index].contentType!))
: FileIcon(
_data![_index].name!,
size: 32.0,
),
title: Text(
_data![_index].name!,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 15),
),
subtitle: Text(
_index == 0
? ''
: DateFormat('dd MMM, yyyy hh:mm a')
.format(_data![_index].modifiedDate!),
style: TextStyle(
fontSize: 12,
),
),
trailing: Text(
_index != 0
? _fileSize.getFileSizeString(
bytes: _data![_index].size!,
decimals: 2,
)
: '',
),
);
},
),
);
} else if (_snapshot.hasError) {
return Align(
child: Text("No Data"),
);
} else if (_snapshot.connectionState == ConnectionState.waiting) {
return Align(
child: CircularProgressIndicator(),
);
} else {
return Align(
child: Text("Undecided"),
);
;
}
},
),
);
}
}
+220
View File
@@ -0,0 +1,220 @@
import 'package:flutter/material.dart';
import 'package:nextcloudapp/provider/nextcloud_provider.dart';
import 'package:nextcloudapp/service/snackbar_service.dart';
import 'package:provider/provider.dart';
class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});
@override
State<LoginScreen> createState() => _LoginScreenState();
}
class _LoginScreenState extends State<LoginScreen> {
var _deviceHeight;
var _deviceWidth;
var _url;
var _username;
var _password;
var enableInput = true;
var savePassword = false;
var obscureText = true;
NextcloudProvider _provider = NextcloudProvider.instance;
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
_deviceHeight = MediaQuery.of(context).size.height;
_deviceWidth = MediaQuery.of(context).size.width;
return Scaffold(
body: Align(
child: ChangeNotifierProvider<NextcloudProvider>.value(
value: _provider,
child: _loginPage(),
),
),
);
}
Widget _loginPage() {
return Builder(builder: (BuildContext _context) {
SnackBarService.instance.buildContext = _context;
_provider = Provider.of<NextcloudProvider>(_context);
return Container(
height: _deviceHeight * 0.80,
padding: EdgeInsets.symmetric(horizontal: _deviceWidth * 0.05),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_inputForm(),
_passwordSaveField(),
_signInButton(_context),
],
),
);
});
}
Widget _inputForm() {
return SizedBox(
height: _deviceHeight * 0.27,
child: Form(
key: _formKey,
onChanged: () {
_formKey.currentState?.save();
},
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextFormField(
initialValue: "https://storage.theonasanyas.com",
enabled: enableInput,
keyboardType: TextInputType.url,
textInputAction: TextInputAction.next,
cursorColor: Colors.black,
style: TextStyle(
color: Colors.black,
),
onSaved: (_input) {
setState(() {
_url = _input!;
});
},
validator: (_input) {
return _input!.isNotEmpty ? null : "nnnns";
},
decoration: InputDecoration(
hintText: "hosting URL",
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white)),
prefixIcon: Padding(
padding: EdgeInsets.all(15.0),
child: Icon(Icons.computer_outlined),
),
),
),
TextFormField(
initialValue: "fluttertest",
enabled: enableInput,
keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.next,
cursorColor: Colors.black,
style: TextStyle(
color: Colors.black,
),
onSaved: (_input) {
if (_input == null) {}
setState(() {
_username = _input!;
});
},
validator: (_input) {
return _input!.isNotEmpty ? null : "nnnns";
},
decoration: InputDecoration(
hintText: "username",
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white)),
prefixIcon: Padding(
padding: EdgeInsets.all(15.0),
child: Icon(Icons.person),
),
),
),
TextFormField(
initialValue: "9tWx8XAv545+ijnBxOrh",
enabled: enableInput,
keyboardType: TextInputType.visiblePassword,
textInputAction: TextInputAction.done,
cursorColor: Colors.black,
style: TextStyle(
color: Colors.black,
),
obscureText: obscureText,
onSaved: (_input) {
setState(() {
_password = _input!;
});
},
validator: (_input) {
return _input!.isNotEmpty ? null : "nnnns";
},
decoration: InputDecoration(
hintText: "password",
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white)),
prefixIcon: const Padding(
padding: EdgeInsets.all(15.0),
child: Icon(Icons.lock),
),
suffixIcon: IconButton(
icon: Icon(
obscureText ? Icons.visibility : Icons.visibility_off),
onPressed: () {
setState(
() {
obscureText = !obscureText;
},
);
},
)),
),
],
),
),
);
}
Widget _passwordSaveField() {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: savePassword,
onChanged: (value) {
setState(() {
savePassword = value!;
});
}),
const Text('save password'),
],
);
}
Widget _signInButton(BuildContext _context) {
return _provider.status == AuthStatus.authenticating
? Align(
alignment: Alignment.center,
child: CircularProgressIndicator(),
)
: SizedBox(
height: _deviceHeight * 0.06,
width: _deviceWidth * 0.30,
child: MaterialButton(
onPressed: () async {
enableInput = !enableInput;
if (_formKey.currentState!.validate()) {
//Login User
await _provider.login(
_url, _username, _password, savePassword);
}
enableInput = !enableInput;
},
color: Colors.grey,
child: Text(
'login',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w700,
),
),
),
);
}
}
View File
+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
class NavigationService {
//
static NavigationService instance = NavigationService();
GlobalKey<NavigatorState>? navigatorKey;
NavigationService() {
navigatorKey = GlobalKey<NavigatorState>();
}
Future<dynamic> navigateToReplacement(String _routeName) {
return navigatorKey!.currentState!.pushReplacementNamed(_routeName);
}
Future<dynamic>? navigateTo(String _routeName) {
return navigatorKey!.currentState!.pushNamed(_routeName);
}
Future<dynamic>? navigateToRoute(MaterialPageRoute _route) {
return navigatorKey!.currentState!.push(_route);
}
// Manually Call Function
void goBack() {
return navigatorKey!.currentState!.pop();
}
}
+44
View File
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
class SnackBarService {
//
BuildContext? _buildContext;
static SnackBarService instance = SnackBarService();
set buildContext(BuildContext _context) {
_buildContext = _context;
}
void showSnackBarError(String _message) {
ScaffoldMessenger.of(_buildContext!).showSnackBar(
SnackBar(
duration: Duration(seconds: 2),
content: Text(
_message,
style: TextStyle(
color: Colors.white,
fontSize: 15,
),
),
backgroundColor: Colors.red,
),
);
}
void showSnackBarSuccess(String _message) {
ScaffoldMessenger.of(_buildContext!).showSnackBar(
SnackBar(
duration: Duration(seconds: 2),
content: Text(
_message,
style: TextStyle(
color: Colors.white,
fontSize: 15,
),
),
backgroundColor: Colors.green,
),
);
}
}
+774 -25
View File
@@ -1,6 +1,22 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
args:
dependency: transitive
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.7.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
sha256: "1c296cd268f486cabcc3930e9b93a8133169305f18d722916e675959a88f6d2c"
url: "https://pub.dev"
source: hosted
version: "1.5.9"
async:
dependency: transitive
description:
@@ -17,6 +33,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
built_collection:
dependency: "direct main"
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
built_value:
dependency: transitive
description:
name: built_value
sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4
url: "https://pub.dev"
source: hosted
version: "8.9.5"
characters:
dependency: transitive
description:
@@ -37,10 +69,42 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
convert:
dependency: transitive
description:
name: convert
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.dev"
source: hosted
version: "3.1.2"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
crypto:
dependency: transitive
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
crypton:
dependency: transitive
description:
name: crypton
sha256: "17b6631fbf89e389d421b46629132287ed37d601b2ad1357445826ab85022271"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
cupertino_icons:
dependency: "direct main"
description:
@@ -49,6 +113,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.8"
desktop_webview_window:
dependency: transitive
description:
name: desktop_webview_window
sha256: "57cf20d81689d5cbb1adfd0017e96b669398a669d927906073b0e42fc64111c0"
url: "https://pub.dev"
source: hosted
version: "0.2.3"
dynamite_runtime:
dependency: transitive
description:
name: dynamite_runtime
sha256: "4027734d43e2f31e2733a845cbd732889faf4f8e2705df5b561443eddcac2d1f"
url: "https://pub.dev"
source: hosted
version: "0.5.0+1"
easy_image_viewer:
dependency: "direct main"
description:
name: easy_image_viewer
sha256: fb6cb123c3605552cc91150dcdb50ca977001dcddfb71d20caa0c5edc9a80947
url: "https://pub.dev"
source: hosted
version: "1.5.1"
fake_async:
dependency: transitive
description:
@@ -57,40 +145,269 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
file:
dependency: transitive
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "7.0.1"
file_icon:
dependency: "direct main"
description:
name: file_icon
sha256: c46b6c24d9595d18995758b90722865baeda407f56308eadd757e1ab913f50a1
url: "https://pub.dev"
source: hosted
version: "1.0.0"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: "77f8e81d22d2a07d0dee2c62e1dda71dc1da73bf43bb2d45af09727406167964"
url: "https://pub.dev"
source: hosted
version: "10.1.9"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33"
url: "https://pub.dev"
source: hosted
version: "0.9.3+2"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc"
url: "https://pub.dev"
source: hosted
version: "0.9.4+2"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
url: "https://pub.dev"
source: hosted
version: "2.6.2"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
url: "https://pub.dev"
source: hosted
version: "0.9.3+4"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_context_menu:
dependency: "direct main"
description:
name: flutter_context_menu
sha256: "5e9c62a5937aba135e3787711b04c73b78729a9751c6c71c2bece4ed9a480d76"
url: "https://pub.dev"
source: hosted
version: "0.2.4"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "5.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e
url: "https://pub.dev"
source: hosted
version: "2.0.28"
flutter_speed_dial:
dependency: "direct main"
description:
name: flutter_speed_dial
sha256: "698a037274a66dbae8697c265440e6acb6ab6cae9ac5f95c749e7944d8f28d41"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
flutter_spinkit:
dependency: "direct main"
description:
name: flutter_spinkit
sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
url: "https://pub.dev"
source: hosted
version: "2.0.17"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_auth_2:
dependency: "direct main"
description:
name: flutter_web_auth_2
sha256: "3c14babeaa066c371f3a743f204dd0d348b7d42ffa6fae7a9847a521aff33696"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
flutter_web_auth_2_platform_interface:
dependency: transitive
description:
name: flutter_web_auth_2_platform_interface
sha256: c63a472c8070998e4e422f6b34a17070e60782ac442107c70000dd1bed645f4d
url: "https://pub.dev"
source: hosted
version: "4.1.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: "direct main"
description:
name: http
sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f
url: "https://pub.dev"
source: hosted
version: "1.3.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "317a5d961cec5b34e777b9252393f2afbd23084aa6e60fcf601dcf6341b9ebeb"
url: "https://pub.dev"
source: hosted
version: "0.8.12+23"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100"
url: "https://pub.dev"
source: hosted
version: "0.8.12+2"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9"
url: "https://pub.dev"
source: hosted
version: "0.2.1+2"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
url: "https://pub.dev"
source: hosted
version: "0.2.1+2"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0"
url: "https://pub.dev"
source: hosted
version: "2.10.1"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
intl:
dependency: "direct main"
description:
name: intl
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
url: "https://pub.dev"
source: hosted
version: "0.20.2"
js:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.7.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.4"
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
@@ -103,10 +420,18 @@ packages:
dependency: transitive
description:
name: lints
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "5.1.1"
logging:
dependency: "direct main"
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.3.0"
matcher:
dependency: transitive
description:
@@ -119,18 +444,42 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.15.0"
mime:
dependency: "direct main"
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
nextcloud:
dependency: "direct main"
description:
name: nextcloud
sha256: db6ea63e8babb9cd2783ae16457762a2cd67eaecd229980be0521b07d57fa8b6
url: "https://pub.dev"
source: hosted
version: "8.1.0"
path:
dependency: transitive
description:
@@ -139,11 +488,219 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9
url: "https://pub.dev"
source: hosted
version: "2.2.17"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
url: "https://pub.dev"
source: hosted
version: "2.3.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849"
url: "https://pub.dev"
source: hosted
version: "11.4.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
url: "https://pub.dev"
source: hosted
version: "12.1.0"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.dev"
source: hosted
version: "9.4.7"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.dev"
source: hosted
version: "4.3.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.0.2"
platform:
dependency: transitive
description:
name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.dev"
source: hosted
version: "3.9.1"
provider:
dependency: "direct main"
description:
name: provider
sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84"
url: "https://pub.dev"
source: hosted
version: "6.1.5"
quiver:
dependency: transitive
description:
name: quiver
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
url: "https://pub.dev"
source: hosted
version: "3.2.2"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
url: "https://pub.dev"
source: hosted
version: "2.5.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad"
url: "https://pub.dev"
source: hosted
version: "2.4.8"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
url: "https://pub.dev"
source: hosted
version: "2.4.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
@@ -156,10 +713,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
@@ -172,10 +729,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
term_glyph:
dependency: transitive
description:
@@ -188,10 +745,146 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
version: "0.7.3"
timeago:
dependency: "direct main"
description:
name: timeago
sha256: b05159406a97e1cbb2b9ee4faa9fb096fe0e2dfcd8b08fcd2a00553450d3422e
url: "https://pub.dev"
source: hosted
version: "3.7.1"
timezone:
dependency: transitive
description:
name: timezone
sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d"
url: "https://pub.dev"
source: hosted
version: "0.9.4"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
units_converter:
dependency: "direct main"
description:
name: units_converter
sha256: dfb40a9bd0df48701466ae17fd9a763eed3abe9b98b97be1d04a2fecb99673a6
url: "https://pub.dev"
source: hosted
version: "3.0.3"
universal_io:
dependency: transitive
description:
name: universal_io
sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
uri:
dependency: transitive
description:
name: uri
sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
url: "https://pub.dev"
source: hosted
version: "6.3.16"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
url: "https://pub.dev"
source: hosted
version: "6.3.3"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de"
url: "https://pub.dev"
source: hosted
version: "1.1.18"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
url: "https://pub.dev"
source: hosted
version: "1.1.16"
vector_math:
dependency: transitive
description:
@@ -200,14 +893,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version:
dependency: transitive
description:
name: version
sha256: "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.3.0"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
win32:
dependency: transitive
description:
name: win32
sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
url: "https://pub.dev"
source: hosted
version: "5.10.1"
window_to_front:
dependency: transitive
description:
name: window_to_front
sha256: "7aef379752b7190c10479e12b5fd7c0b9d92adc96817d9e96c59937929512aee"
url: "https://pub.dev"
source: hosted
version: "0.0.3"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
xml_annotation:
dependency: transitive
description:
name: xml_annotation
sha256: fb421dd15816c45b7c004b38cadb1d00fcf72549899ce6ab61ed1738e1f13cb1
url: "https://pub.dev"
source: hosted
version: "2.4.0"
sdks:
dart: ">=3.4.3 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.27.0"
+41 -68
View File
@@ -1,90 +1,63 @@
name: nextcloudapp
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=3.4.3 <4.0.0'
sdk: ^3.6.0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
cupertino_icons: ^1.0.8
flutter_svg: ^2.0.17
http: ^1.3.0
shared_preferences: ^2.5.3
nextcloud: ^8.1.0
provider: ^6.1.2
image_picker: ^1.1.2
timeago: ^3.7.0
easy_image_viewer: ^1.5.1
permission_handler: ^11.4.0
path_provider: ^2.1.5
mime: ^2.0.0
built_collection: ^5.1.1
flutter_web_auth_2: ^4.1.0
logging: ^1.3.0
url_launcher: ^6.3.1
flutter_spinkit: ^5.2.1
units_converter: ^3.0.3
file_icon: ^1.0.0
intl: ^0.20.2
flutter_speed_dial: ^7.0.0
file_picker: ^10.1.9
flutter_context_menu: ^0.2.4
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
flutter_lints: ^5.0.0
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- assets/icons/
- assets/images/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
fonts:
- family: Poppins
fonts:
- asset: fonts/Poppins-Bold.ttf
weight: 700
- asset: fonts/Poppins-Medium.ttf
weight: 500
- asset: fonts/Poppins-Regular.ttf
weight: 400
- asset: fonts/Poppins-SemiBold.ttf
weight: 600