-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(supabase): pub validation and doc fixes (#444)
- Loading branch information
Showing
43 changed files
with
378 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
**/ios/Flutter/.last_build_id | ||
.dart_tool/ | ||
.flutterplugins | ||
.flutterpluginsdependencies | ||
.pubcache/ | ||
.pub/ | ||
/build/ | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Android Studio will place build artifacts here | ||
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
windows/* | ||
web/* | ||
macos/* | ||
linux/* | ||
android/* | ||
ios/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" | ||
channel: "stable" | ||
|
||
project_type: app | ||
|
||
# Tracks metadata for the flutter migrate command | ||
migration: | ||
platforms: | ||
- platform: root | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: android | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: ios | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: linux | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: macos | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: web | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
- platform: windows | ||
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 | ||
|
||
# User provided section | ||
|
||
# List of Local paths (relative to this file) that should be | ||
# ignored by the migrate tool. | ||
# | ||
# Files that are not part of the templates will be ignored by default. | ||
unmanaged_files: | ||
- "lib/main.dart" | ||
- "ios/Runner.xcodeproj/project.pbxproj" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
# Brick with Supabase Example | ||
|
||
This minimal example demonstrates how to use Brick with [Supabase](https://supabase.com/). Follow the instructions below to get started. | ||
|
||
## Setting up the Supabase project | ||
|
||
1. **Create the table**: Run the following SQL command in your Supabase SQL editor to create the customers table: | ||
1. **Create the table**: Run the following SQL command in your Supabase SQL editor to create the customers and pizzas table: | ||
|
||
```sql | ||
CREATE TABLE customers ( | ||
id UUID PRIMARY KEY, | ||
first_name text NOT NULL, | ||
last_name text NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
id UUID PRIMARY KEY, | ||
first_name text NOT NULL, | ||
last_name text NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
CREATE TABLE pizzas ( | ||
id UUID PRIMARY KEY, | ||
frozen boolean NOT NULL DEFAULT false, | ||
customer_id UUID NOT NULL | ||
); | ||
|
||
ALTER TABLE pizzas ADD CONSTRAINT fk_customer FOREIGN KEY (customer_id) REFERENCES customers (id); | ||
``` | ||
|
||
2. **Insert Dummy Data**: Insert some dummy data into the customers table by running the following SQL command | ||
2. **Insert Dummy Data**: Insert some dummy data: | ||
|
||
```sql | ||
INSERT INTO customers (id, first_name, last_name, created_at) VALUES | ||
('a8098c1a-f86e-11da-bd1a-00112444be1e', 'Bruce', 'Fortner', NOW()), | ||
('b8098c1a-f86e-11da-bd1a-00112444be1e', 'Jane', 'Smith', NOW()), | ||
('c8098c1a-f86e-11da-bd1a-00112444be1e', 'Alice', 'Johnson', NOW()); | ||
('a8098c1a-f86e-11da-bd1a-00112444be1e', 'Bruce', 'Fortner', NOW()), | ||
('b8098c1a-f86e-11da-bd1a-00112444be1e', 'Jane', 'Smith', NOW()), | ||
('c8098c1a-f86e-11da-bd1a-00112444be1e', 'Alice', 'Johnson', NOW()); | ||
INSERT INTO pizzas (id, frozen, customer_id) VALUES | ||
('d8098c1a-f86e-11da-bd1a-00112444be1e', TRUE, 'a8098c1a-f86e-11da-bd1a-00112444be1e'), | ||
('e8098c1a-f86e-11da-bd1a-00112444be1e', FALSE, 'b8098c1a-f86e-11da-bd1a-00112444be1e'), | ||
('f8098c1a-f86e-11da-bd1a-00112444be1e', TRUE, 'c8098c1a-f86e-11da-bd1a-00112444be1e'); | ||
``` | ||
|
||
3. **Enable Anonymous Sign-Ins**: Go to your Supabase dashboard, navigate to Settings > Authentication > User Signups, and enable anonymous sign-ins. | ||
|
||
## Setting up the Flutter example project | ||
|
||
4. **Update Variables**: Update `main.dart` with your Supabase project URL and anonymous key. You can find these values in the Supabase dashboard under Settings > API. | ||
|
||
## Running the Flutter app | ||
|
||
5. **Run the Flutter Project**: This example supports iOS and Android. Make sure run `flutter create .` first. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.