diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index a752976..ccaba3b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -22,7 +22,12 @@
-
+
+
+
+
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 09c6a60..7dc59b0 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -2,6 +2,8 @@ PODS:
- app_links (0.0.1):
- Flutter
- Flutter (1.0.0)
+ - image_picker_ios (0.0.1):
+ - Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -14,6 +16,7 @@ PODS:
DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- Flutter (from `Flutter`)
+ - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -23,6 +26,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/app_links/ios"
Flutter:
:path: Flutter
+ image_picker_ios:
+ :path: ".symlinks/plugins/image_picker_ios/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
@@ -33,6 +38,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
+ image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index bfc2127..e6045ba 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -45,5 +45,16 @@
UIApplicationSupportsIndirectInputEvents
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLSchemes
+
+ io.supabase.flutterquickstart
+
+
+
diff --git a/lib/main.dart b/lib/main.dart
index 3dd3002..2d3811f 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -10,8 +10,11 @@ import 'utils/constants.dart';
WidgetsFlutterBinding.ensureInitialized();
await Supabase.initialize(
- url: 'http://192.168.179.86:8000/',//'https://vvtefqdqahcpzgolvupv.supabase.co',//'https://vvtefqdqahcpzgolvupv.supabase.co',//
- anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ2dGVmcWRxYWhjcHpnb2x2dXB2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTYwMjE2NTIsImV4cCI6MjAzMTU5NzY1Mn0.1bp5V61Oguo5zLUhCFJmCabUY1sujeISr_CR2XUKvh4',//'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ2dGVmcWRxYWhjcHpnb2x2dXB2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTYwMjE3ODksImV4cCI6MjAzMTU5Nzc4OX0.6g5EtS9HrgxC6cpCYgOT0HLpA4lEnASQbKs9mfnUM7k',//Constants.supabaseAnnonKey,//
+ url: 'https://vvtefqdqahcpzgolvupv.supabase.co',
+ anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ2dGVmcWRxYWhjcHpnb2x2dXB2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTYwMjE3ODksImV4cCI6MjAzMTU5Nzc4OX0.6g5EtS9HrgxC6cpCYgOT0HLpA4lEnASQbKs9mfnUM7k',
+ //Locale
+ //url:'http://192.168.179.86:8000/',//
+ // annonKey: //Constants.supabaseAnnonKey,//'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ2dGVmcWRxYWhjcHpnb2x2dXB2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTYwMjE2NTIsImV4cCI6MjAzMTU5NzY1Mn0.1bp5V61Oguo5zLUhCFJmCabUY1sujeISr_CR2XUKvh4',//
);
runApp( MyApp());
}
@@ -20,10 +23,27 @@ import 'utils/constants.dart';
final supabase = Supabase.instance.client;
/// Error message to display the user when unexpected error occurs.
const unexpectedErrorMessage = 'Unexpected error occurred.';
-
class MyApp extends StatelessWidget {
const MyApp({super.key});
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ debugShowCheckedModeBanner: false,
+ //title: 'Recipes',
+ theme: ThemeData(
+ colorScheme: ColorScheme.fromSwatch().copyWith(
+ primary: const Color(0xff263341),
+ secondary: const Color(0xff8DB646), // Your accent color
+ ),
+ ),
+ home: HomePage(),
+ );
+ }
+}
+/* class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
@override
Widget build(BuildContext context) {
return const MaterialApp(
@@ -71,90 +91,9 @@ class _HomePageState extends State {
}
}
-/* class MyApp extends StatelessWidget { */
- //MyApp({super.key});
-
- /* @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- //title: 'Recipes',
- theme: ThemeData(
- colorScheme: ColorScheme.fromSwatch().copyWith(
- primary: Colors.white,
- secondary: const Color(0xff8DB646), // Your accent color
- ),
- ),
- home: const HomePage(),
- );
- } */
+
+
- /* @override
- Widget build(BuildContext context) {
-
- return MaterialApp(
- title: 'Supabase Flutter',
- theme: ThemeData.dark().copyWith(
- primaryColor: Colors.green,
- textButtonTheme: TextButtonThemeData(
- style: TextButton.styleFrom(
- foregroundColor: Colors.green,
- ),
- ),
- elevatedButtonTheme: ElevatedButtonThemeData(
- style: ElevatedButton.styleFrom(
- foregroundColor: Colors.white,
- backgroundColor: Colors.green,
- ),
- ),
- ),
- initialRoute: '/',
- routes: {
- '/': (_) => const SplashPage(),
- '/login': (_) => const LoginPage(),
- '/account': (_) => const AccountPage(),
- },
- );
- } */
-/* Future readData() async {
- final response = await Supabase.instance.client.from('events').select();
- if (response.error == null) {
- final data = response.data;
- print('Fetched data: $data');
- } else {
- print('Error reading data: ${response.error!.message}');
- }}
-
- final _future = Supabase.instance.client
- .from('events')
- .select();
- @override
- Widget build(BuildContext context) {
- return Directionality(
- textDirection: TextDirection.ltr,
- child: Scaffold(
- appBar: AppBar(
- title: Text('Home Page'),
- ),
- body: FutureBuilder(
- future: _future,
- builder: (context, snapshot) {
-
-}
- final countries = snapshot.data!;
- return ListView.builder(
- itemCount: countries.length,
- itemBuilder: ((context, index) {
- final country = countries[index];
- return ListTile(
- title: Text(country['name']),
- );
- }),
- );})));
- }
-}
-
-class _execute {
-}*/
\ No newline at end of file
+ */
\ No newline at end of file
diff --git a/lib/screens/details.dart b/lib/screens/details.dart
index 9580eea..36c34a7 100644
--- a/lib/screens/details.dart
+++ b/lib/screens/details.dart
@@ -4,35 +4,11 @@ import 'package:learn_project/utils/widgets.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
class DetailsPage extends StatelessWidget {
- //final Recipe recipe;
- final _future = Supabase.instance.client
- .from('events')
- .select();
- //const DetailsPage({required this.recipe});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: FutureBuilder(
- future: _future,
- builder: (context, snapshot) {
- if (!snapshot.hasData) {
- return const Center(child: CircularProgressIndicator());
- }
- final events = snapshot.data!;
- return ListView.builder(
- itemCount: events.length,
- itemBuilder: ((context, index) {
- final event = events[index];
- return ListTile(
- title: Text(event['name']),
- );
- }),
- );
- },
- ),
- );
- }
- /* @override
+ final Recipe recipe;
+
+ const DetailsPage({required this.recipe});
+
+ @override
Widget build(BuildContext context) {
return Scaffold(
body: NestedScrollView(
@@ -95,7 +71,7 @@ class DetailsPage extends StatelessWidget {
),
),
);
- } */
+ }
}
class RecipeSteps extends StatelessWidget {
@@ -183,3 +159,6 @@ class NutritionWidget extends StatelessWidget {
);
}
}
+final _future = Supabase.instance.client
+ .from('events')
+ .select();
\ No newline at end of file
diff --git a/lib/screens/details_db.dart b/lib/screens/details_db.dart
new file mode 100644
index 0000000..c3b6978
--- /dev/null
+++ b/lib/screens/details_db.dart
@@ -0,0 +1,43 @@
+import 'package:flutter/material.dart';
+import 'package:learn_project/utils/class.dart';
+import 'package:learn_project/utils/widgets.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+import 'dart:async';
+
+class DetailsPage extends StatelessWidget {
+
+
+ @override
+ Widget build(BuildContext context) {
+ final _future2 = Supabase.instance.client
+ .from('events')
+ .select();
+
+ return Scaffold(
+ body: FutureBuilder(
+ future: _future2,
+ builder: (context, snapshot) {
+ if (snapshot.connectionState == ConnectionState.waiting) {
+ return const Center(child: CircularProgressIndicator());
+ } else if (snapshot.hasError) {
+ return Center(child: Text('Error: ${snapshot.error}'));
+ } else if (!snapshot.hasData) {
+ return const Center(child: Text('No data found'));
+ }
+ final events = snapshot.data!;
+ return ListView.builder(
+ itemCount: events.length,
+ itemBuilder: ((context, index) {
+ final event = events[index];
+ return ListTile(
+ title: Text(event['name']),
+ subtitle: Text(event['description']),
+ );
+ }),
+ );
+ },
+ ),
+ );
+ }
+}
+
diff --git a/lib/screens/home.dart b/lib/screens/home.dart
index 0b5da6e..b7fad00 100644
--- a/lib/screens/home.dart
+++ b/lib/screens/home.dart
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
-import 'package:learn_project/screens/details.dart';
+import 'package:learn_project/screens/details_db.dart';
import 'package:learn_project/utils/data.dart';
class HomePage extends StatelessWidget {
@@ -144,7 +144,7 @@ class HomePage extends StatelessWidget {
context,
MaterialPageRoute(
builder: (context) => DetailsPage(
- //_future: Data.recipes[index],
+ //recipe: Data.recipes[index],
)));
},
child: Card(