supa_manager library

Contains code to manage supabase databases.

Classes

AuthStorage
Configuration
In order to initialize the database you need the following:
DatabaseUser
Holds information about the currently logged in user
DatabaseUserBuilder
Class that uses the builder pattern to create new instances with added info
LoginState
Contains information on whether the user logged in and their user information
LoginStateNotifier
Notifies listeners of changes in the login state This needs to be a ChangeNotifier for GoRouter
Result<T>
Simple Result class with success, failure and errorMessage states.
SelectEntry
Describe a selection
SupaAuthManager
Class for handling Supabase Authorization
SupaDatabaseManager
Class for managing Supabase databases
TableData<T>
Holds the table name and a method to convert a json map to a class
TableDataImpl<T>
TableEntryImpl<T>

Enums

SelectType
Two different seleciton types: And and Or

Mixins

HasCopyWith<T>
hasCopyWith<T>
Mixin for a class that has a copyWith method
HasfromJson<T>
HasId
Mixin for a table id
HastoJson<T>
HasUserId
Mixin for a user id
TableEntry<T>
Implement this mixin to implement the toJson and addUserId methods If you do not use a user id, then just return the same class

Constants

idFieldName → const String
loggedInKey → const String
sessionKey → const String
tokenExpired → const String
userIdFieldName → const String
userKey → const String

Typedefs

CopyFunction<T> = T Function(String)
IDFunction = int Function()
SelectBuilder = PostgrestFilterBuilder Function(PostgrestFilterBuilder builder)
TableEntryCreator<T> = TableEntry<T> Function(T data)
Definition of a function that takes data and returns a TableEntry class
ToJsonFunction = Map<String, dynamic> Function()