Skip to content

Commit

Permalink
feat: add supabase and dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
luisburgos committed Sep 24, 2022
1 parent 143f7fa commit 5244e74
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 3 deletions.
1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
*.env
11 changes: 10 additions & 1 deletion example/lib/bootstrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ import 'dart:async';
import 'dart:developer';

import 'package:flutter/widgets.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:supabase_flutter/supabase_flutter.dart';

void bootstrap(Widget app) {
Future bootstrap(Widget app) async {
//WidgetsFlutterBinding.ensureInitialized();

await dotenv.load(fileName: ".env");

await Supabase.initialize(
url: dotenv.env['SUPABASE_URL'],
anonKey: dotenv.env['SUPABASE_ANNON_KEY'],
);

runZonedGuarded(
() => runApp(app),
(error, stackTrace) => log(error.toString(), stackTrace: stackTrace),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/get/get_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../shared/not_found_page.dart';
import 'overrides/app_navigator.dart';
import 'overrides/feedbacks_executor.dart';

void main() {
Future main() async {
Buzz.init(
withDebugDashboard: true,
rootAppRoute: '/',
Expand Down
2 changes: 1 addition & 1 deletion example/lib/modular/modular_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../bootstrap.dart';
import 'core_module.dart';
import 'overrides/app_navigator.dart';

void main() {
Future main() async {
Buzz.init(
navigator: ModularAppNavigator(),
/*registries: [
Expand Down
173 changes: 173 additions & 0 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ 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
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1-dev.5"
get:
dependency: "direct main"
description:
Expand All @@ -158,6 +170,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
gotrue:
dependency: transitive
description:
name: gotrue
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.3"
hive:
dependency: transitive
description:
name: hive
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.3"
hive_flutter:
dependency: transitive
description:
name: hive_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
html:
dependency: transitive
description:
Expand All @@ -179,6 +212,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
jwt_decode:
dependency: transitive
description:
name: jwt_decode
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -207,6 +254,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
modular_core:
dependency: transitive
description:
Expand Down Expand Up @@ -298,13 +352,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
postgrest:
dependency: transitive
description:
name: postgrest
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.11"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
realtime_client:
dependency: transitive
description:
name: realtime_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.15"
rxdart:
dependency: transitive
description:
Expand Down Expand Up @@ -338,6 +406,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
storage_client:
dependency: transitive
description:
name: storage_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.6+2"
stream_channel:
dependency: transitive
description:
Expand All @@ -352,6 +427,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
supabase:
dependency: transitive
description:
name: supabase
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.6"
supabase_flutter:
dependency: "direct main"
description:
name: supabase_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
term_glyph:
dependency: transitive
description:
Expand All @@ -373,6 +462,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
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_html:
dependency: "direct main"
description:
Expand All @@ -387,13 +497,76 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher:
dependency: transitive
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.19"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
win32:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
flutter_modular: 5.0.2
get_storage: 2.0.3
scrollable_positioned_list: 0.3.4
supabase_flutter: 0.3.3
universal_html: 2.0.8
flutter_dotenv: 5.0.2
core:
Expand All @@ -29,3 +30,5 @@ dev_dependencies:

flutter:
uses-material-design: true
assets:
- .env

0 comments on commit 5244e74

Please sign in to comment.