20240831 test commit

This commit is contained in:
2024-08-31 23:39:10 +01:00
parent 7e5e2c46ff
commit fd16c79083
7 changed files with 242 additions and 73 deletions
+4 -2
View File
@@ -1,6 +1,7 @@
// import 'package:nextcloud/nextcloud.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:http/http.dart' as http; // import 'package:http/http.dart' as http;
@@ -8,7 +9,8 @@ const primaryColor = Color.fromARGB(255, 152, 120, 57);
const primaryLightColor = Color.fromARGB(150, 238, 224, 173); const primaryLightColor = Color.fromARGB(150, 238, 224, 173);
const double defaultPadding = 15.0; const double defaultPadding = 15.0;
const timeout = 3; const timeout = 3;
var client = http.Client(); // var client = http.Client();
// var client = NextcloudClient()
setSharedPref(String key, var value) async { setSharedPref(String key, var value) async {
+31 -57
View File
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:nextcloudapp/components/default_values.dart';
import 'package:nextcloudapp/screens/welcome/welcome_screen.dart';
void main() {
runApp(const MyApp()); void main() => runApp(const MyApp());
}
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({super.key}); const MyApp({super.key});
@@ -11,63 +12,36 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
title: 'Next Cloud Demo', debugShowCheckedModeBanner: false,
title: 'School Management System Demo',
theme: ThemeData( theme: ThemeData(
primaryColor: primaryColor,
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), scaffoldBackgroundColor: Colors.white,
useMaterial3: true, elevatedButtonTheme: ElevatedButtonThemeData(
), style: ElevatedButton.styleFrom(
home: const MyHomePage(title: 'Flutter Demo Home Page'), elevation: 0,
); foregroundColor: Colors.white,
} backgroundColor: primaryColor,
} shape: const StadiumBorder(),
maximumSize: const Size(double.infinity, 56),
class MyHomePage extends StatefulWidget { minimumSize: const Size(double.infinity, 56),
const MyHomePage({super.key, required this.title}); ),
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
), ),
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',
), ),
floatingActionButton: FloatingActionButton( home: const WelcomeScreen(),
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
); );
} }
} }
View File
+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: [
],
),
);
}
}
+164 -12
View File
@@ -9,6 +9,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.0" version: "2.5.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda"
url: "https://pub.dev"
source: hosted
version: "1.5.3"
async: async:
dependency: transitive dependency: transitive
description: description:
@@ -25,6 +33,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.1"
built_collection:
dependency: transitive
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: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb
url: "https://pub.dev"
source: hosted
version: "8.9.2"
characters: characters:
dependency: transitive dependency: transitive
description: description:
@@ -49,6 +73,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.18.0" version: "1.18.0"
convert:
dependency: transitive
description:
name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
cookie_jar:
dependency: transitive
description:
name: cookie_jar
sha256: a6ac027d3ed6ed756bfce8f3ff60cb479e266f3b0fdabd6242b804b6765e52de
url: "https://pub.dev"
source: hosted
version: "4.0.8"
crypto:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.3"
crypton:
dependency: transitive
description:
name: crypton
sha256: "17b6631fbf89e389d421b46629132287ed37d601b2ad1357445826ab85022271"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -57,6 +113,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.8" version: "1.0.8"
dynamite_runtime:
dependency: transitive
description:
name: dynamite_runtime
sha256: d3a43d9ed21dcbb4d5a2f6dab894b14747838dbeb5a2f0eb49f882d36ad7aefb
url: "https://pub.dev"
source: hosted
version: "0.4.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@@ -81,6 +145,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.0" version: "7.0.0"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@@ -90,10 +162,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "4.0.0"
flutter_svg: flutter_svg:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -116,10 +188,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: http name: http
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.1" version: "1.2.2"
http_parser: http_parser:
dependency: transitive dependency: transitive
description: description:
@@ -136,6 +208,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.19.0" version: "0.19.0"
js:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
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: leak_tracker:
dependency: transitive dependency: transitive
description: description:
@@ -164,10 +252,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: lints name: lints
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.0" version: "4.0.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@@ -192,6 +280,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.12.0" version: "1.12.0"
nextcloud:
dependency: "direct main"
description:
name: nextcloud
sha256: fe4b557fcd3587f70a6edbceb88eb228e7298c28d589fcae812116d13fd8a3ba
url: "https://pub.dev"
source: hosted
version: "6.1.0"
path: path:
dependency: transitive dependency: transitive
description: description:
@@ -256,6 +352,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.8" version: "2.1.8"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.dev"
source: hosted
version: "3.9.1"
quiver:
dependency: transitive
description:
name: quiver
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
url: "https://pub.dev"
source: hosted
version: "3.2.1"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -292,18 +404,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_platform_interface name: shared_preferences_platform_interface
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" sha256: "034650b71e73629ca08a0bd789fd1d83cc63c2d1e405946f7cef7bc37432f93a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.2" version: "2.4.0"
shared_preferences_web: shared_preferences_web:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_web name: shared_preferences_web
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.0" version: "2.2.1"
shared_preferences_windows: shared_preferences_windows:
dependency: transitive dependency: transitive
description: description:
@@ -365,6 +477,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.0"
timezone:
dependency: transitive
description:
name: timezone
sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d"
url: "https://pub.dev"
source: hosted
version: "0.9.4"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@@ -373,6 +493,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" version: "1.3.2"
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"
vector_graphics: vector_graphics:
dependency: transitive dependency: transitive
description: description:
@@ -405,6 +541,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
version:
dependency: transitive
description:
name: version
sha256: "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
vm_service: vm_service:
dependency: transitive dependency: transitive
description: description:
@@ -417,10 +561,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "1.0.0"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@@ -437,6 +581,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.5.0" 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: sdks:
dart: ">=3.4.3 <4.0.0" dart: ">=3.4.3 <4.0.0"
flutter: ">=3.22.0" flutter: ">=3.22.0"
+3 -2
View File
@@ -1,5 +1,5 @@
name: nextcloudapp name: nextcloudapp
description: "A new Flutter project." description: "NextCloud App."
# The following line prevents the package from being accidentally published to # The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages. # 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 publish_to: "none" # Remove this line if you wish to publish to pub.dev
@@ -38,6 +38,7 @@ dependencies:
http: ^1.2.0 http: ^1.2.0
intl: ^0.19.0 intl: ^0.19.0
shared_preferences: ^2.2.3 shared_preferences: ^2.2.3
nextcloud: ^6.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
@@ -48,7 +49,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your # activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # rules and activating additional ones.
flutter_lints: ^3.0.0 flutter_lints: ^4.0.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec