Experiment: Start integrating supabase

This commit is contained in:
Vishesh Handa
2021-08-16 12:44:29 +02:00
parent c7fb3b792e
commit f631b99aa5
6 changed files with 108 additions and 4 deletions

View File

@ -78,12 +78,20 @@ limitations under the License.
android:name=".UriReceiverActivity" android:name=".UriReceiverActivity"
android:parentActivityName=".MainActivity"> android:parentActivityName=".MainActivity">
<intent-filter> <intent-filter>
<!-- Used for "Automatic Git Setup" -->
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="gitjournal" android:host="login.oauth2" /> <data android:scheme="gitjournal" android:host="login.oauth2" />
<!-- Triggering URI would be gitjournal://login.oauth2 --> <!-- Triggering URI would be gitjournal://login.oauth2 -->
</intent-filter> </intent-filter>
<intent-filter>
<!-- Used for logging into the App -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="gitjournal-identity" android:host="login-callback" />
</intent-filter>
</activity> </activity>
<meta-data android:name="flutterEmbedding" android:value="2" /> <meta-data android:name="flutterEmbedding" android:value="2" />

View File

@ -46,6 +46,7 @@
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>gitjournal</string> <string>gitjournal</string>
<string>gitjournal-identity</string>
</array> </array>
</dict> </dict>
<dict> <dict>

View File

@ -12,6 +12,7 @@ import 'package:stack_trace/stack_trace.dart';
import 'package:gitjournal/app.dart'; import 'package:gitjournal/app.dart';
import 'package:gitjournal/error_reporting.dart'; import 'package:gitjournal/error_reporting.dart';
import 'package:gitjournal/settings/app_settings.dart'; import 'package:gitjournal/settings/app_settings.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
@ -21,6 +22,14 @@ void main() async {
LevelMessages.warning, LevelMessages.warning,
]; ];
// FIXME: Does this need to be done over here?
await Supabase.initialize(
url: 'https://tefpmcttotopcptdivsj.supabase.co',
anonKey:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyODA2NDAyNiwiZXhwIjoxOTQzNjQwMDI2fQ.xAN-giE3m1MPjoRkkdcg_0NJueLH0_L-Wu-V0TSnpwU',
authCallbackUrlHostname: 'login-callback',
);
var pref = await SharedPreferences.getInstance(); var pref = await SharedPreferences.getInstance();
AppSettings.instance.load(pref); AppSettings.instance.load(pref);

View File

@ -26,6 +26,7 @@
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>gitjournal</string> <string>gitjournal</string>
<string>gitjournal-identity</string>
</array> </array>
</dict> </dict>
</array> </array>

View File

@ -605,6 +605,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
gotrue:
dependency: transitive
description:
name: gotrue
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
graphs: graphs:
dependency: transitive dependency: transitive
description: description:
@ -626,6 +633,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.7.0" version: "0.7.0"
hive:
dependency: transitive
description:
name: hive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
hive_flutter:
dependency: transitive
description:
name: hive_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
http: http:
dependency: "direct main" dependency: "direct main"
description: description:
@ -740,6 +761,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.1" version: "4.0.1"
jwt_decode:
dependency: transitive
description:
name: jwt_decode
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
launch_review: launch_review:
dependency: "direct main" dependency: "direct main"
description: description:
@ -923,7 +951,7 @@ packages:
name: path_provider name: path_provider
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.2"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
@ -1015,6 +1043,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.0" version: "1.5.0"
postgrest:
dependency: transitive
description:
name: postgrest
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
process: process:
dependency: transitive dependency: transitive
description: description:
@ -1071,6 +1106,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.0.1"
realtime_client:
dependency: transitive
description:
name: realtime_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.8"
recase: recase:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1286,6 +1328,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0" version: "1.10.0"
storage_client:
dependency: transitive
description:
name: storage_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -1307,6 +1356,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
supabase:
dependency: transitive
description:
name: supabase
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
supabase_flutter:
dependency: "direct main"
description:
name: supabase_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
synchronized: synchronized:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1384,6 +1447,27 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
uni_links:
dependency: transitive
description:
name: uni_links
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.1"
uni_links_platform_interface:
dependency: transitive
description:
name: uni_links_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
uni_links_web:
dependency: transitive
description:
name: uni_links_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
universal_io: universal_io:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1397,7 +1481,7 @@ packages:
name: url_launcher name: url_launcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.3" version: "6.0.9"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@ -1418,7 +1502,7 @@ packages:
name: url_launcher_platform_interface name: url_launcher_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.4"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
@ -1467,7 +1551,7 @@ packages:
name: web_socket_channel name: web_socket_channel
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.1.0"
webkit_inspection_protocol: webkit_inspection_protocol:
dependency: transitive dependency: transitive
description: description:

View File

@ -83,6 +83,7 @@ dependencies:
universal_io: ^2.0.4 universal_io: ^2.0.4
sprintf: ^6.0.0 sprintf: ^6.0.0
recase: ^4.0.0 recase: ^4.0.0
supabase_flutter: ^0.1.0
dev_dependencies: dev_dependencies:
#flutter_driver: #flutter_driver: