Author SHA1 Message Date
onasanya.lanre fd16c79083 20240831 test commit 2024-08-31 23:39:10 +01:00
onasanya.lanre 7e5e2c46ff More Initial Setup 2024-07-16 01:54:43 +01:00
onasanya.lanre 0feda0bd3e More Initial Files Created 2024-07-16 01:54:11 +01:00
27 changed files with 341 additions and 1579 deletions
+18 -18
View File
@@ -5,27 +5,23 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
*.metadeta
*main_sub_test*
*main_test*
.dart_tool/
macos/
test/
web/
linux/
windows/
.rmv/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
*.gitignore
*ios
*android
*.vscode
*pubspec.lock
*test/
.idea/
# 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
@@ -33,14 +29,17 @@ migrate_working_dir/
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
# **/doc/api/
# **/ios/Flutter/.last_build_id
*/doc/api/
ios/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
build/
# Symbolication related
app.*.symbols
@@ -49,6 +48,7 @@ app.*.symbols
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# android/app/debug
# android/app/profile
# android/app/release
android/
+15 -15
View File
@@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable"
project_type: app
@@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: android
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: ios
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: linux
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: macos
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: web
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: windows
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
# User provided section
-3
View File
@@ -1,3 +0,0 @@
# NextCloudApp
Mobile Application for NextCloud
+2 -15
View File
@@ -1,16 +1,3 @@
# nextcloudapp
# NextCloudApp
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.
Mobile Application for NextCloud
Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

-3
View File
@@ -1,3 +0,0 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
-19
View File
@@ -1,19 +0,0 @@
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
@@ -1,104 +0,0 @@
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
@@ -1,51 +0,0 @@
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",
);
}
}
+54
View File
@@ -0,0 +1,54 @@
// import 'package:nextcloud/nextcloud.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart';
// import 'package:http/http.dart' as http;
const primaryColor = Color.fromARGB(255, 152, 120, 57);
const primaryLightColor = Color.fromARGB(150, 238, 224, 173);
const double defaultPadding = 15.0;
const timeout = 3;
// var client = http.Client();
// var client = NextcloudClient()
setSharedPref(String key, var value) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
switch (value.runtimeType.toString()) {
case 'String':
sharedPreferences.setString(key, value);
break;
case 'double':
sharedPreferences.setDouble(key, value);
break;
case 'int':
sharedPreferences.setInt(key, value);
break;
case 'bool':
sharedPreferences.setBool(key, value);
break;
}
}
getSharedPref(var key, var type) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
switch (type) {
case 'String':
return sharedPreferences.getString(key);
case 'double':
return sharedPreferences.getDouble(key);
case 'int':
return sharedPreferences.getInt(key);
case 'bool':
return sharedPreferences.getBool(key);
}
}
-15
View File
@@ -1,15 +0,0 @@
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
@@ -1,25 +0,0 @@
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
@@ -1,13 +0,0 @@
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(),
};
}
+42 -6
View File
@@ -1,11 +1,47 @@
import 'package:flutter/material.dart';
import 'package:nextcloudapp/app/nextcloud_app.dart';
import 'package:nextcloudapp/components/default_values.dart';
import 'package:nextcloudapp/screens/welcome/welcome_screen.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(
NextcloudApp(),
);
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(
debugShowCheckedModeBanner: false,
title: 'School Management System Demo',
theme: ThemeData(
primaryColor: primaryColor,
scaffoldBackgroundColor: Colors.white,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 0,
foregroundColor: Colors.white,
backgroundColor: primaryColor,
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',
),
home: const WelcomeScreen(),
);
}
}
-19
View File
@@ -1,19 +0,0 @@
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
@@ -1,53 +0,0 @@
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
@@ -1,182 +0,0 @@
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
@@ -1,252 +0,0 @@
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"),
);
;
}
},
),
);
}
}
View File
-220
View File
@@ -1,220 +0,0 @@
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,
),
),
),
);
}
}
+13
View File
@@ -0,0 +1,13 @@
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/provisioning_api.dart';
Future<void> main() async {
final client = NextcloudClient(
Uri.parse('https://storage.theonasanyas.com'),
loginName: 'theadmin',
password: '3Olademiwa@90.',
);
final response = await client.provisioningApi.users.getCurrentUser();
print(response.body.ocs.data.id); // Will print `admin`
}
+27
View File
@@ -0,0 +1,27 @@
import 'package:flutter/material.dart';
class WelcomeScreen extends StatefulWidget {
const WelcomeScreen({super.key});
@override
State<WelcomeScreen> createState() => _WelcomeScreenState();
}
class _WelcomeScreenState extends State<WelcomeScreen> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Column(
children: [
],
),
);
}
}
-29
View File
@@ -1,29 +0,0 @@
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
@@ -1,44 +0,0 @@
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,
),
);
}
}
+98 -466
View File
@@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.7.0"
version: "2.5.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
sha256: "1c296cd268f486cabcc3930e9b93a8133169305f18d722916e675959a88f6d2c"
sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda"
url: "https://pub.dev"
source: hosted
version: "1.5.9"
version: "1.5.3"
async:
dependency: transitive
description:
@@ -34,7 +34,7 @@ packages:
source: hosted
version: "2.1.1"
built_collection:
dependency: "direct main"
dependency: transitive
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
@@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4
sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb
url: "https://pub.dev"
source: hosted
version: "8.9.5"
version: "8.9.2"
characters:
dependency: transitive
description:
@@ -69,34 +69,34 @@ packages:
dependency: transitive
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.18.0"
convert:
dependency: transitive
description:
name: convert
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
cross_file:
version: "3.1.1"
cookie_jar:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
name: cookie_jar
sha256: a6ac027d3ed6ed756bfce8f3ff60cb479e266f3b0fdabd6242b804b6765e52de
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
version: "4.0.8"
crypto:
dependency: transitive
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.6"
version: "3.0.3"
crypton:
dependency: transitive
description:
@@ -113,30 +113,14 @@ 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"
sha256: d3a43d9ed21dcbb4d5a2f6dab894b14747838dbeb5a2f0eb49f882d36ad7aefb
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"
version: "0.4.0"
fake_async:
dependency: transitive
description:
@@ -149,148 +133,52 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.2"
file:
dependency: transitive
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
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"
version: "7.0.0"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.0"
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: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
url: "https://pub.dev"
source: hosted
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"
version: "4.0.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
url: "https://pub.dev"
source: hosted
version: "2.0.17"
version: "2.0.10+1"
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
@@ -300,90 +188,26 @@ packages:
dependency: "direct main"
description:
name: http
sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.2.2"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
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"
version: "4.0.2"
intl:
dependency: "direct main"
description:
name: intl
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.20.2"
version: "0.19.0"
js:
dependency: transitive
description:
@@ -392,22 +216,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.1"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
version: "10.0.7"
version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
@@ -420,18 +252,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
logging:
dependency: "direct main"
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "4.0.0"
matcher:
dependency: transitive
description:
@@ -444,42 +268,26 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
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"
version: "1.12.0"
nextcloud:
dependency: "direct main"
description:
name: nextcloud
sha256: db6ea63e8babb9cd2783ae16457762a2cd67eaecd229980be0521b07d57fa8b6
sha256: fe4b557fcd3587f70a6edbceb88eb228e7298c28d589fcae812116d13fd8a3ba
url: "https://pub.dev"
source: hosted
version: "8.1.0"
version: "6.1.0"
path:
dependency: transitive
description:
@@ -492,34 +300,10 @@ packages:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
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"
version: "1.0.1"
path_provider_linux:
dependency: transitive
description:
@@ -544,54 +328,6 @@ packages:
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:
@@ -604,10 +340,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
url: "https://pub.dev"
source: hosted
version: "3.1.6"
version: "3.1.5"
plugin_platform_interface:
dependency: transitive
description:
@@ -624,83 +360,75 @@ packages:
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
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
url: "https://pub.dev"
source: hosted
version: "3.2.2"
version: "3.2.1"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
url: "https://pub.dev"
source: hosted
version: "2.5.3"
version: "2.2.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad"
sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577"
url: "https://pub.dev"
source: hosted
version: "2.4.8"
version: "2.2.3"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
version: "2.4.0"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.3.2"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
sha256: "034650b71e73629ca08a0bd789fd1d83cc63c2d1e405946f7cef7bc37432f93a"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf
url: "https://pub.dev"
source: hosted
version: "2.4.3"
version: "2.2.1"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.3.2"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
version: "0.0.99"
source_span:
dependency: transitive
description:
@@ -713,10 +441,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
@@ -729,10 +457,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
@@ -745,18 +473,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.7.3"
timeago:
dependency: "direct main"
description:
name: timeago
sha256: b05159406a97e1cbb2b9ee4faa9fb096fe0e2dfcd8b08fcd2a00553450d3422e
url: "https://pub.dev"
source: hosted
version: "3.7.1"
version: "0.7.0"
timezone:
dependency: transitive
description:
@@ -769,18 +489,10 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
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"
version: "1.3.2"
universal_io:
dependency: transitive
description:
@@ -797,94 +509,30 @@ packages:
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"
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
url: "https://pub.dev"
source: hosted
version: "1.1.18"
version: "1.1.11+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.13"
version: "1.1.11+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.16"
version: "1.1.11+1"
vector_math:
dependency: transitive
description:
@@ -905,42 +553,26 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "14.3.0"
version: "14.2.1"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
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"
version: "1.0.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.0.4"
xml:
dependency: transitive
description:
@@ -958,5 +590,5 @@ packages:
source: hosted
version: "2.4.0"
sdks:
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.27.0"
dart: ">=3.4.3 <4.0.0"
flutter: ">=3.22.0"
+72 -27
View File
@@ -1,55 +1,100 @@
name: nextcloudapp
description: "A new Flutter project."
description: "NextCloud App."
# 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.
version: 1.0.0+1
environment:
sdk: ^3.6.0
sdk: ">=3.4.3 <4.0.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
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
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
flutter_svg: ^2.0.9
http: ^1.2.0
intl: ^0.19.0
shared_preferences: ^2.2.3
nextcloud: ^6.1.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
# 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: ^4.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# 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: