diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/lib/login.dart b/lib/login.dart new file mode 100644 index 0000000..f49ba4f --- /dev/null +++ b/lib/login.dart @@ -0,0 +1,230 @@ + + +import 'package:flutter/material.dart'; +import 'package:supabase_flutter/supabase_flutter.dart'; +import '/main.dart'; + +class Loginscreen extends StatefulWidget { + @override + _Loginscreen createState() => _Loginscreen(); +} + +class _Loginscreen extends State { + final _formKey = GlobalKey(); + final _emailController = TextEditingController(); + final _passwordController = TextEditingController(); + final _usernameController = TextEditingController(); + + bool _isLogin = true; + bool _obscurePassword = true; + bool _isLoading = false; + + Future _authenticate() async { + if (!_formKey.currentState!.validate()) return; + + final email = _emailController.text.trim(); + final password = _passwordController.text.trim(); + final username = _usernameController.text.trim(); + + setState(() => _isLoading = true); + + try { + if (_isLogin) { + final response = await Supabase.instance.client.auth + .signInWithPassword(email: email, password: password); + if (response.user != null) { + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => MainScreen()), + ); + } + } else { + final response = await Supabase.instance.client.auth.signUp( + email: email, + password: password, + data: {'username': username}, + ); + if (response.user != null) { + setState(() => _isLogin = true); + } + } + } catch (e) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('Invalid credentials or error occurred.')), + ); + } finally { + setState(() => _isLoading = false); + } + } + + Widget _buildForm() { + return Form( + key: _formKey, + child: Column( + key: ValueKey(_isLogin), + children: [ + TextFormField( + controller: _emailController, + decoration: InputDecoration( + labelText: 'Email', + border: OutlineInputBorder(), + prefixIcon: Icon(Icons.email), + ), + validator: (value) { + if (value == null || value.isEmpty || !value.contains('@')) { + return 'Enter a valid email'; + } + return null; + }, + ), + SizedBox(height: 16), + TextFormField( + controller: _passwordController, + obscureText: _obscurePassword, + decoration: InputDecoration( + labelText: 'Password', + border: OutlineInputBorder(), + prefixIcon: Icon(Icons.lock), + suffixIcon: IconButton( + icon: Icon( + _obscurePassword ? Icons.visibility_off : Icons.visibility, + ), + onPressed: () { + setState(() => _obscurePassword = !_obscurePassword); + }, + ), + ), + validator: (value) { + if (value == null || value.length < 6) { + return 'Password must be at least 6 characters'; + } + return null; + }, + ), + if (!_isLogin) ...[ + SizedBox(height: 16), + TextFormField( + controller: _usernameController, + decoration: InputDecoration( + labelText: 'Username', + border: OutlineInputBorder(), + prefixIcon: Icon(Icons.person), + ), + validator: (value) { + if (!_isLogin && (value == null || value.isEmpty)) { + return 'Please enter a username'; + } + return null; + }, + ), + ], + SizedBox(height: 24), + AnimatedOpacity( + opacity: _isLoading ? 0.6 : 1, + duration: Duration(milliseconds: 300), + child: ElevatedButton.icon( + onPressed: _isLoading ? null : _authenticate, + icon: _isLoading + ? SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : Icon(_isLogin ? Icons.login : Icons.person_add), + label: Text( + _isLogin ? 'Login' : 'Sign Up', + style: TextStyle(fontSize: 18), + ), + style: ElevatedButton.styleFrom( + backgroundColor: _isLogin ? Colors.indigo : Colors.green[600], + padding: EdgeInsets.symmetric(horizontal: 32, vertical: 14), + foregroundColor: Colors.white, + ), + ), + ), + SizedBox(height: 12), + TextButton( + onPressed: () { + setState(() => _isLogin = !_isLogin); + }, + child: Text( + _isLogin + ? "Don't have an account? Sign Up" + : "Already have an account? Login", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w500, + color: _isLogin ? Colors.indigo : Colors.green[800], + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.indigo[50], + appBar: AppBar( + backgroundColor: _isLogin ? Colors.indigo : Colors.green[600], + title: Text( + _isLogin ? 'Login' : 'Sign Up', + style: TextStyle( + fontSize: 26, + fontWeight: FontWeight.bold, + color: Colors.white, + letterSpacing: 1.2, + ), + ), + centerTitle: true, + ), + body: Center( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 500), + child: Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16)), + elevation: 8, + child: Padding( + padding: const EdgeInsets.all(24.0), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ShaderMask( + shaderCallback: (bounds) => LinearGradient( + colors: _isLogin + ? [Colors.indigo, Colors.blue] + : [Colors.green, Colors.lightGreen], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ).createShader( + Rect.fromLTWH(0, 0, bounds.width, bounds.height), + ), + child: Text( + 'Student Grievance Portal', + style: TextStyle( + fontSize: 26, + fontWeight: FontWeight.bold, + color: Colors.white, + letterSpacing: 1.3, + ), + ), + ), + SizedBox(height: 20), + _buildForm(), + ], + ), + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index 50a19ec..e7c7a6b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,19 +1,27 @@ import 'package:flutter/material.dart'; - -void main() { +import '/login.dart'; +import 'package:supabase_flutter/supabase_flutter.dart'; +void main() async{ + WidgetsFlutterBinding.ensureInitialized(); + await Supabase.initialize( + url: 'https://ogmrativhpdzvrvqvfmo.supabase.co', + anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9nbXJhdGl2aHBkenZydnF2Zm1vIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTIzODY3MTMsImV4cCI6MjA2Nzk2MjcxM30.ynw-574IbsZCyL7U1FJuqWce7HNEsviEjP2k_g4tMSk', + ); runApp(CollegeGrievanceApp()); } class CollegeGrievanceApp extends StatelessWidget { @override Widget build(BuildContext context) { + final user = Supabase.instance.client.auth.currentUser; return MaterialApp( title: 'College Grievance System', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), - home: MainScreen(), + home: user==null ? Loginscreen(): MainScreen(), + debugShowCheckedModeBanner: false, ); } } @@ -25,16 +33,14 @@ class MainScreen extends StatefulWidget { class _MainScreenState extends State { int _currentIndex = 0; - final List _screens = [ HomeScreen(), SubmitGrievanceScreen(), MyGrievancesScreen(), ProfileScreen(), ]; - - @override - Widget build(BuildContext context) { + + Widget build(BuildContext context) { return Scaffold( body: _screens[_currentIndex], bottomNavigationBar: BottomNavigationBar( @@ -76,7 +82,42 @@ class HomeScreen extends StatelessWidget { title: Text('College Grievance System'), backgroundColor: Colors.blue[600], foregroundColor: Colors.white, + centerTitle: true, + actions: [ + IconButton( + icon: Icon(Icons.logout), + tooltip: 'Logout', + onPressed: () async { + final shouldLogout = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Confirm Logout'), + content: Text('Do you really want to log out?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('Cancel'), + ), + ElevatedButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('Logout'), + ), + ], + ), + ); + + if (shouldLogout ?? false) { + await Supabase.instance.client.auth.signOut(); + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => Loginscreen()), + ); + } + }, + ), + ], ), + + body: SingleChildScrollView( padding: EdgeInsets.all(16.0), child: Column( @@ -222,7 +263,7 @@ class HomeScreen extends StatelessWidget { class SubmitGrievanceScreen extends StatefulWidget { final String? category; - + SubmitGrievanceScreen({this.category}); @override @@ -296,6 +337,38 @@ class _SubmitGrievanceScreenState extends State { title: Text('Submit Grievance'), backgroundColor: Colors.blue[600], foregroundColor: Colors.white, + actions: [ + IconButton( + icon: Icon(Icons.logout), + tooltip: 'Logout', + onPressed: () async { + final shouldLogout = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Confirm Logout'), + content: Text('Do you really want to log out?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('Cancel'), + ), + ElevatedButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('Logout'), + ), + ], + ), + ); + + if (shouldLogout ?? false) { + await Supabase.instance.client.auth.signOut(); + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => Loginscreen()), + ); + } + }, + ), + ], ), body: SingleChildScrollView( padding: EdgeInsets.all(16.0), @@ -577,6 +650,39 @@ class MyGrievancesScreen extends StatelessWidget { title: Text('My Grievances'), backgroundColor: Colors.blue[600], foregroundColor: Colors.white, + centerTitle: true, + actions: [ + IconButton( + icon: Icon(Icons.logout), + tooltip: 'Logout', + onPressed: () async { + final shouldLogout = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Confirm Logout'), + content: Text('Do you really want to log out?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('Cancel'), + ), + ElevatedButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('Logout'), + ), + ], + ), + ); + + if (shouldLogout ?? false) { + await Supabase.instance.client.auth.signOut(); + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => Loginscreen()), + ); + } + }, + ), + ], ), body: ListView.builder( padding: EdgeInsets.all(16.0), @@ -687,6 +793,38 @@ class GrievanceDetailScreen extends StatelessWidget { title: Text('Grievance #$grievanceId'), backgroundColor: Colors.blue[600], foregroundColor: Colors.white, + actions: [ + IconButton( + icon: Icon(Icons.logout), + tooltip: 'Logout', + onPressed: () async { + final shouldLogout = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Confirm Logout'), + content: Text('Do you really want to log out?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('Cancel'), + ), + ElevatedButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('Logout'), + ), + ], + ), + ); + + if (shouldLogout ?? false) { + await Supabase.instance.client.auth.signOut(); + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => Loginscreen()), + ); + } + }, + ), + ], ), body: SingleChildScrollView( padding: EdgeInsets.all(16.0), @@ -834,14 +972,61 @@ class GrievanceDetailScreen extends StatelessWidget { } } -class ProfileScreen extends StatelessWidget { +class ProfileScreen extends StatefulWidget { + @override + _Profilescreen createState() => _Profilescreen(); +} + +class _Profilescreen extends State { + String? email; + String? username; @override + void initState() { + super.initState(); + final user = Supabase.instance.client.auth.currentUser; + setState(() { + email = user?.email ?? 'No email found'; + username = user?.userMetadata?['username'] ?? 'No name'; }); + } + Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Profile'), backgroundColor: Colors.blue[600], foregroundColor: Colors.white, + actions: [ + IconButton( + icon: Icon(Icons.logout), + tooltip: 'Logout', + onPressed: () async { + final shouldLogout = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Confirm Logout'), + content: Text('Do you really want to log out?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('Cancel'), + ), + ElevatedButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('Logout'), + ), + ], + ), + ); + + if (shouldLogout ?? false) { + await Supabase.instance.client.auth.signOut(); + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => Loginscreen()), + ); + } + }, + ), + ], ), body: SingleChildScrollView( padding: EdgeInsets.all(16.0), @@ -858,7 +1043,7 @@ class ProfileScreen extends StatelessWidget { ), SizedBox(height: 16), Text( - 'John Doe', + username??'No Name', style: TextStyle( fontSize: 24, fontWeight: FontWeight.bold, @@ -886,7 +1071,7 @@ class ProfileScreen extends StatelessWidget { ), ), SizedBox(height: 16), - _buildInfoRow('Email:', 'john.doe@college.edu'), + _buildInfoRow('Email:',email ?? 'Not Available'), _buildInfoRow('Phone:', '+1 234 567 8900'), _buildInfoRow('Department:', 'Computer Science'), _buildInfoRow('Year:', '3rd Year'), diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..3792af4 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,14 @@ #include "generated_plugin_registrant.h" +#include +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) gtk_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); + gtk_plugin_register_with_registrar(gtk_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..5d07423 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + gtk + url_launcher_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..92b6497 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,14 @@ import FlutterMacOS import Foundation +import app_links +import path_provider_foundation +import shared_preferences_foundation +import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index d993b91..db184ea 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,14 +1,46 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + app_links: + dependency: transitive + description: + name: app_links + sha256: "85ed8fc1d25a76475914fff28cc994653bd900bc2c26e4b57a49e097febb54ba" + url: "https://pub.dev" + source: hosted + version: "6.4.0" + app_links_linux: + dependency: transitive + description: + name: app_links_linux + sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81 + url: "https://pub.dev" + source: hosted + version: "1.0.3" + app_links_platform_interface: + dependency: transitive + description: + name: app_links_platform_interface + sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + app_links_web: + dependency: transitive + description: + name: app_links_web + sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555 + url: "https://pub.dev" + source: hosted + version: "1.0.4" async: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" boolean_selector: dependency: transitive description: @@ -41,6 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -53,10 +93,26 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" flutter: dependency: "direct main" description: flutter @@ -75,14 +131,67 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + functions_client: + dependency: transitive + description: + name: functions_client + sha256: "91bd57c5ee843957bfee68fdcd7a2e8b3c1081d448e945d33ff695fb9c2a686c" + url: "https://pub.dev" + source: hosted + version: "2.4.3" + gotrue: + dependency: transitive + description: + name: gotrue + sha256: "941694654ab659990547798569771d8d092f2ade84a72e75bb9bbca249f3d3b1" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + gtk: + dependency: transitive + description: + name: gtk + sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c + url: "https://pub.dev" + source: hosted + version: "2.1.0" + http: + dependency: transitive + description: + name: http + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + jwt_decode: + dependency: transitive + description: + name: jwt_decode + sha256: d2e9f68c052b2225130977429d30f187aa1981d789c76ad104a32243cfdebfbb + url: "https://pub.dev" + source: hosted + version: "0.3.1" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: @@ -107,6 +216,14 @@ packages: url: "https://pub.dev" source: hosted 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: @@ -131,6 +248,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" path: dependency: transitive description: @@ -139,6 +264,158 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9 + url: "https://pub.dev" + source: hosted + version: "2.2.17" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + 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" + postgrest: + dependency: transitive + description: + name: postgrest + sha256: "10b81a23b1c829ccadf68c626b4d66666453a1474d24c563f313f5ca7851d575" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + realtime_client: + dependency: transitive + description: + name: realtime_client + sha256: b6a825a4c80f2281ebfbbcf436a8979ae9993d4a30dbcf011b7d2b82ddde9edd + url: "https://pub.dev" + source: hosted + version: "2.5.1" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" + url: "https://pub.dev" + source: hosted + version: "2.5.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac" + url: "https://pub.dev" + source: hosted + version: "2.4.10" + 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 @@ -160,6 +437,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.12.1" + storage_client: + dependency: transitive + description: + name: storage_client + sha256: "09bac4d75eea58e8113ca928e6655a09cc8059e6d1b472ee801f01fde815bcfc" + url: "https://pub.dev" + source: hosted + version: "2.4.0" stream_channel: dependency: transitive description: @@ -176,6 +461,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" + supabase: + dependency: transitive + description: + name: supabase + sha256: "56c3493114caac8ef0dc3cac5fa24a9edefeb8c22d45794814c0fe3d2feb1a98" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + supabase_flutter: + dependency: "direct dev" + description: + name: supabase_flutter + sha256: "66b8d0a7a31f45955b11ad7b65347abc61b31e10f8bdfa4428501b81f5b30fa5" + url: "https://pub.dev" + source: hosted + version: "2.9.1" term_glyph: dependency: transitive description: @@ -192,6 +493,78 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.4" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 + url: "https://pub.dev" + source: hosted + version: "6.3.2" + 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_math: dependency: transitive description: @@ -204,10 +577,50 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yet_another_json_isolate: + dependency: transitive + description: + name: yet_another_json_isolate + sha256: fe45897501fa156ccefbfb9359c9462ce5dec092f05e8a56109db30be864f01e url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "2.1.0" sdks: dart: ">=3.7.2 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 163790f..74e4370 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,7 @@ dependencies: 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 @@ -45,6 +46,7 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^5.0.0 + supabase_flutter: ^2.9.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..785a046 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,12 @@ #include "generated_plugin_registrant.h" +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + AppLinksPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("AppLinksPluginCApi")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..8f8ee4f 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + app_links + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST