Skip to content

Commit f4a4588

Browse files
committed
Merge branch 'main' of github.com:bulgariamitko/flutterflowtutorials
2 parents fa4f370 + 052b5a5 commit f4a4588

File tree

2 files changed

+17
-27
lines changed

2 files changed

+17
-27
lines changed

Source-Code/ff_source_code/lib/backend/supabase/database/table.dart

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,32 @@ abstract class SupabaseTable<T extends SupabaseDataRow> {
44
String get tableName;
55
T createRow(Map<String, dynamic> data);
66

7-
PostgrestFilterBuilder<T> _select<T>() =>
8-
SupaFlow.client.from(tableName).select<T>();
7+
PostgrestFilterBuilder _select() => SupaFlow.client.from(tableName).select();
98

109
Future<List<T>> queryRows({
1110
required PostgrestTransformBuilder Function(PostgrestFilterBuilder) queryFn,
1211
int? limit,
1312
}) {
14-
final select = _select<PostgrestList>();
13+
final select = _select();
1514
var query = queryFn(select);
1615
query = limit != null ? query.limit(limit) : query;
17-
return query
18-
.select<PostgrestList>()
19-
.then((rows) => rows.map(createRow).toList());
16+
return query.select().then((rows) => rows.map(createRow).toList());
2017
}
2118

2219
Future<List<T>> querySingleRow({
2320
required PostgrestTransformBuilder Function(PostgrestFilterBuilder) queryFn,
2421
}) =>
25-
queryFn(_select<PostgrestMap>())
22+
queryFn(_select())
2623
.limit(1)
27-
.select<PostgrestMap?>()
24+
.select()
2825
.maybeSingle()
2926
.catchError((e) => print('Error querying row: $e'))
3027
.then((r) => [if (r != null) createRow(r)]);
3128

3229
Future<T> insert(Map<String, dynamic> data) => SupaFlow.client
3330
.from(tableName)
3431
.insert(data)
35-
.select<PostgrestMap>()
32+
.select()
3633
.limit(1)
3734
.single()
3835
.then(createRow);
@@ -48,9 +45,7 @@ abstract class SupabaseTable<T extends SupabaseDataRow> {
4845
await update;
4946
return [];
5047
}
51-
return update
52-
.select<PostgrestList>()
53-
.then((rows) => rows.map(createRow).toList());
48+
return update.select().then((rows) => rows.map(createRow).toList());
5449
}
5550

5651
Future<List<T>> delete({
@@ -63,9 +58,7 @@ abstract class SupabaseTable<T extends SupabaseDataRow> {
6358
await delete;
6459
return [];
6560
}
66-
return delete
67-
.select<PostgrestList>()
68-
.then((rows) => rows.map(createRow).toList());
61+
return delete.select().then((rows) => rows.map(createRow).toList());
6962
}
7063
}
7164

Source-Code/ff_source_code/pubspec.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ dependencies:
2727
sdk: flutter
2828
flutter_web_plugins:
2929
sdk: flutter
30-
app_links: 3.4.1
31-
app_links_platform_interface: 1.1.0
30+
app_links: 6.3.2
31+
app_links_platform_interface: 2.0.2
3232
assets_audio_player: 3.1.1
3333
assets_audio_player_web: 3.1.1
3434
auto_size_text: 3.0.0
@@ -63,15 +63,15 @@ dependencies:
6363
flutter_plugin_android_lifecycle: 2.0.20
6464
font_awesome_flutter: 10.7.0
6565
from_css_color: 2.0.0
66-
functions_client: 1.3.2
66+
functions_client: 2.3.2
6767
go_router: 12.1.3
6868
google_fonts: 6.1.0
6969
google_sign_in: 6.2.1
7070
google_sign_in_android: 6.1.30
7171
google_sign_in_ios: 5.7.7
7272
google_sign_in_platform_interface: 2.4.5
7373
google_sign_in_web: 0.12.4+2
74-
gotrue: 1.12.6
74+
gotrue: 2.8.4
7575
hive: 2.2.3
7676
html: 0.15.4
7777
http: 1.2.2
@@ -94,9 +94,9 @@ dependencies:
9494
path_provider_platform_interface: 2.1.2
9595
path_provider_windows: 2.2.1
9696
plugin_platform_interface: 2.1.8
97-
postgrest: 1.5.2
97+
postgrest: 2.1.4
9898
provider: 6.1.2
99-
realtime_client: 1.4.0
99+
realtime_client: 2.2.1
100100
rxdart: 0.27.7
101101
shared_preferences: 2.3.2
102102
shared_preferences_android: 2.3.2
@@ -110,10 +110,10 @@ dependencies:
110110
sign_in_with_apple_web: 2.1.0
111111
sqflite: 2.3.3+1
112112
sqflite_common: 2.5.4+3
113-
storage_client: 1.5.4
113+
storage_client: 2.0.3
114114
stream_transform: 2.1.0
115-
supabase: 1.11.11
116-
supabase_flutter: 1.10.24
115+
supabase: 2.3.0
116+
supabase_flutter: 2.6.0
117117
timeago: 3.6.1
118118
url_launcher: 6.3.0
119119
url_launcher_android: 6.3.10
@@ -140,9 +140,6 @@ dependencies:
140140
dependency_overrides:
141141
http: 1.2.2
142142
rxdart: 0.27.7
143-
sign_in_with_apple: 6.1.2
144-
sign_in_with_apple_platform_interface: 1.1.0
145-
sign_in_with_apple_web: 2.1.0
146143
uuid: ^4.0.0
147144
win32: 5.5.1
148145

0 commit comments

Comments
 (0)