diff --git a/README copy.md b/README copy.md new file mode 100644 index 0000000..a4c78dc --- /dev/null +++ b/README copy.md @@ -0,0 +1,3 @@ +# NextCloudApp + +Mobile Application for NextCloud \ No newline at end of file diff --git a/README.md b/README.md index a4c78dc..562a906 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ -# NextCloudApp +# nextcloudapp -Mobile Application for NextCloud \ No newline at end of file +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. diff --git a/fonts/Poppins-Bold.ttf b/fonts/Poppins-Bold.ttf new file mode 100644 index 0000000..b94d47f Binary files /dev/null and b/fonts/Poppins-Bold.ttf differ diff --git a/fonts/Poppins-Medium.ttf b/fonts/Poppins-Medium.ttf new file mode 100644 index 0000000..e90e87e Binary files /dev/null and b/fonts/Poppins-Medium.ttf differ diff --git a/fonts/Poppins-Regular.ttf b/fonts/Poppins-Regular.ttf new file mode 100644 index 0000000..be06e7f Binary files /dev/null and b/fonts/Poppins-Regular.ttf differ diff --git a/fonts/Poppins-SemiBold.ttf b/fonts/Poppins-SemiBold.ttf new file mode 100644 index 0000000..dabf7c2 Binary files /dev/null and b/fonts/Poppins-SemiBold.ttf differ diff --git a/lib/api/login_api.dart b/lib/api/login_api.dart new file mode 100644 index 0000000..1be1cda --- /dev/null +++ b/lib/api/login_api.dart @@ -0,0 +1,29 @@ +import 'package:nextcloud/nextcloud.dart'; +import 'package:nextcloud/provisioning_api.dart'; + +Future login(String uri, String username, String password) async { + try { + + final client = NextcloudClient( + Uri.parse(uri), + loginName: username, + password: password, + ); + + + final response = + await client.provisioningApi.users.getUser(userId: username); + + if (response.statusCode == 200) { + print(response.body); + return "successful|$response.body.ocs.data."; + } else { + return "failed|$response.body.ocs.data"; + } + } catch (e) { + print(""); + print("$e"); + print(""); + return "$e"; + } +} diff --git a/lib/components/default_values.dart b/lib/components/default_values.dart new file mode 100644 index 0000000..98888c7 --- /dev/null +++ b/lib/components/default_values.dart @@ -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, 26, 26, 74); +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); + } +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 8e94089..a862a85 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:nextcloudapp/components/default_values.dart'; +import 'package:nextcloudapp/screens/login_screen.dart'; -void main() { - runApp(const MyApp()); -} +void main() => runApp( + const MyApp(), + ); class MyApp extends StatelessWidget { const MyApp({super.key}); @@ -11,115 +13,36 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo', + debugShowCheckedModeBanner: false, + title: 'Nextcloud', 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 createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - 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: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], + 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', ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. + home: const LoginScreen(), ); } } diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart new file mode 100644 index 0000000..43b73c9 --- /dev/null +++ b/lib/screens/login_screen.dart @@ -0,0 +1,196 @@ +import 'package:flutter/material.dart'; +import 'package:nextcloudapp/api/login_api.dart'; +import 'package:nextcloudapp/components/default_values.dart'; +import 'package:nextcloudapp/screens/welcome_screen.dart'; +import 'package:nextcloudapp/service/snackbar_service.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({super.key}); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + var _deviceHeight; + var _deviceWidth; + var urlController; + var usernameController; + var passwordController; + + final GlobalKey _formKey = GlobalKey(); + + var checked = false; + var obscureText = true; + + @override + Widget build(BuildContext context) { + SnackBarService.instance.buildContext = context; + _deviceHeight = MediaQuery.of(context).size.height; + _deviceWidth = MediaQuery.of(context).size.width; + + return Scaffold( + body: Align( + child: Container( + height: _deviceHeight * 0.60, + padding: EdgeInsets.symmetric(horizontal: _deviceWidth * 0.05), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _inputField(), + _passwordSaveField(), + _signInField(), + ], + ), + ), + ), + ); + } + + Widget _inputField() { + return SizedBox( + height: _deviceHeight * 0.25, + child: Form( + key: _formKey, + onChanged: () { + _formKey.currentState?.save(); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextFormField( + keyboardType: TextInputType.url, + textInputAction: TextInputAction.next, + cursorColor: Colors.white, + style: TextStyle( + color: Colors.black, + ), + onSaved: (_input) { + setState(() { + urlController = _input!; + }); + }, + validator: (_input) { + return null; + }, + decoration: const InputDecoration( + hintText: "hosting URL", + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white) + ), + prefixIcon: Padding( + padding: EdgeInsets.all(defaultPadding), + child: Icon(Icons.computer_outlined), + ), + ), + ), + TextFormField( + keyboardType: TextInputType.emailAddress, + textInputAction: TextInputAction.next, + style: TextStyle( + color: Colors.black, + ), + onSaved: (_input) { + setState(() { + usernameController = _input!; + }); + }, + decoration: const InputDecoration( + hintText: "username", + prefixIcon: Padding( + padding: EdgeInsets.all(defaultPadding), + child: Icon(Icons.person), + ), + ), + ), + TextFormField( + keyboardType: TextInputType.visiblePassword, + textInputAction: TextInputAction.done, + obscureText: obscureText, + onSaved: (_input) { + setState(() { + passwordController = _input!; + }); + }, + cursorColor: primaryColor, + decoration: InputDecoration( + hintText: "Password", + prefixIcon: const Padding( + padding: EdgeInsets.all(defaultPadding), + 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: checked, + onChanged: (value) { + setState(() { + checked = value!; + }); + }), + const Text('Save Password'), + ], + ); + } + + Widget _signInField() { + return ElevatedButton( + onPressed: () { + login(urlController.value.text, usernameController.value.text, + passwordController.value.text) + .then(( + status, + ) { + if (status.startsWith('successful')) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) { + return const WelcomeScreen(); + }, + ), + ); + + SnackBarService.instance.showSnackBarSuccess(status); + } else { + SnackBarService.instance.showSnackBarError(status); + } + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "sign in".toUpperCase(), + ), + const SizedBox(width: 10), + const Icon(Icons.login) + ], + ), + ); + } +} diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart new file mode 100644 index 0000000..e69de29 diff --git a/lib/screens/welcome_screen.dart b/lib/screens/welcome_screen.dart new file mode 100644 index 0000000..c072817 --- /dev/null +++ b/lib/screens/welcome_screen.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; + +class WelcomeScreen extends StatefulWidget { + const WelcomeScreen({super.key}); + + @override + State createState() => _WelcomeScreenState(); +} + +class _WelcomeScreenState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: Column( + children: [ + + + ], + ), + ); + } +} diff --git a/lib/service/navigation_service.dart b/lib/service/navigation_service.dart new file mode 100644 index 0000000..b0bab56 --- /dev/null +++ b/lib/service/navigation_service.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +class NavigationService { + // + static NavigationService instance = NavigationService(); + + GlobalKey? navigatorKey; + + NavigationService() { + navigatorKey = GlobalKey(); + } + + Future? navigateToReplacement(String _routeName) { + return navigatorKey!.currentState!.pushReplacementNamed(_routeName); + } + + Future? navigateTo(String _routeName) { + return navigatorKey!.currentState!.pushNamed(_routeName); + } + + Future? navigateToRoute(MaterialPageRoute _route) { + return navigatorKey!.currentState!.push(_route); + } + + // Manually Call Function + void goBack() { + return navigatorKey!.currentState!.pop(); + } +} diff --git a/lib/service/snackbar_service.dart b/lib/service/snackbar_service.dart new file mode 100644 index 0000000..7375cda --- /dev/null +++ b/lib/service/snackbar_service.dart @@ -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, + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index ed4160b..8ffa3ec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: 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: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + url: "https://pub.dev" + source: hosted + version: "8.9.5" characters: dependency: transitive description: @@ -37,10 +69,34 @@ 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" + 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 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dynamite_runtime: + dependency: transitive + description: + name: dynamite_runtime + sha256: "4027734d43e2f31e2733a845cbd732889faf4f8e2705df5b561443eddcac2d1f" + url: "https://pub.dev" + source: hosted + version: "0.5.0+1" fake_async: dependency: transitive description: @@ -57,6 +121,30 @@ 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" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -66,31 +154,76 @@ packages: 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_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_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" + 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 +236,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: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" matcher: dependency: transitive description: @@ -119,18 +260,26 @@ 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" + 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 +288,139 @@ 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_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" + 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" + 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: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" + url: "https://pub.dev" + source: hosted + version: "2.5.2" + 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 +433,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 +449,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 +465,66 @@ 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" + 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" + 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: + 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 +533,54 @@ 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" + 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" diff --git a/pubspec.yaml b/pubspec.yaml index 744e1fa..e4754ec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,90 +1,48 @@ 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 + intl: ^0.20.2 + shared_preferences: ^2.5.2 + nextcloud: ^8.1.0 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