diff --git a/data_connect/README.idx.md b/data_connect/README.idx.md new file mode 100644 index 00000000..1b2208d4 --- /dev/null +++ b/data_connect/README.idx.md @@ -0,0 +1,43 @@ +# Firebase Data Connect Quickstart + +## Introduction + +This quickstart is a movie review app to demonstrate the use of Firebase Data Connect with a Cloud SQL database. For more information about Firebase Data Connect visit [the docs](https://firebase.google.com/docs/data-connect/). + + +## Getting Started + +Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions, check out the [official documentation](https://firebase.google.com/docs/data-connect/quickstart). + +### 1. Connect to your Firebase project + +1. If you haven't already, create a Firebase project. + 1. In the [Firebase console](https://console.firebase.google.com), click + **Add project**, then follow the on-screen instructions. +2. Enable Email/Password Sign-in method [here](https://console.firebase.google.com/project/_/authentication/providers). + +### 2. Configure flutterfire + +This will automatically download and set up firebase for your project: +```sh +flutterfire configure -y -a com.example.dataconnect + +### 3. Start Emulators + +1. Click on the Firebase Data Connect icon on the VS Code sidebar to load the Extension. + a. Sign in with your Google Account if you haven't already. +2. Click on "Connect a Firebase project" and choose the project where you have set up Data Connect. +3. Click on "Start Emulators" - this should generate the Flutter SDK for you and start the emulators. + +### 4. Populate the database +In VS Code, open the `quickstart-flutter/dataconnect/dataconnect/moviedata_insert.gql` file and click the + `Run (local)` button at the top of the file. + +If you’d like to confirm that the data was correctly inserted, +open `quickstart-flutter/dataconnect/movie-connector/queries.gql` and run the `ListMovies` query. + +### 5. Running the app + +The app should already be running in the preview. If there's no preview, try one of the following: +* Ctrl/Cmd + SHIFT + P, Reload Window +* Ctrl/Cmd + SHIFT + P, Open Web Preview diff --git a/data_connect/analysis_options.yaml b/data_connect/analysis_options.yaml index f4dc98dc..86cb8820 100644 --- a/data_connect/analysis_options.yaml +++ b/data_connect/analysis_options.yaml @@ -8,9 +8,10 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml -analyzer: + +analyzer: exclude: - lib/movies_connector/** + - lib/movies_connector/** linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/data_connect/firebase.idx.json b/data_connect/firebase.idx.json new file mode 100644 index 00000000..dd862209 --- /dev/null +++ b/data_connect/firebase.idx.json @@ -0,0 +1,14 @@ +{ + "dataconnect": { + "source": "dataconnect" + }, + "emulators": { + "dataconnect": { + "port": 9403 + }, + "ui": { + "enabled": false + }, + "singleProjectMode": true + } +} diff --git a/data_connect/lib/main.dart b/data_connect/lib/main.dart index 73de9131..eca9b736 100644 --- a/data_connect/lib/main.dart +++ b/data_connect/lib/main.dart @@ -79,7 +79,7 @@ class _MyHomePageState extends State { child: _showMessage ? Column( mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.all(30.0), diff --git a/data_connect/lib/main.idx.dart b/data_connect/lib/main.idx.dart new file mode 100644 index 00000000..0351ca17 --- /dev/null +++ b/data_connect/lib/main.idx.dart @@ -0,0 +1,185 @@ +import 'package:dataconnect/models/movie.dart'; +import 'package:dataconnect/movie_state.dart'; +import 'package:dataconnect/router.dart'; +import 'package:dataconnect/widgets/list_movies.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'firebase_options.dart'; +import 'package:flutter_web_plugins/url_strategy.dart'; +import 'util/auth.dart'; +import 'movies_connector/movies.dart'; + +bool isSetup = false; +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + usePathUrlStrategy(); + try { + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + isSetup = true; + + await Auth.instance.init(); + int port = 443; + String hostName = Uri.base.host; + bool isSecure = true; + if (!kIsWeb) { + hostName = '10.0.2.2'; + port = 9403; + isSecure = false; + } + MoviesConnector.instance.dataConnect + .useDataConnectEmulator(hostName, port, isSecure: isSecure); + } catch (_) { + // The user hasn't run ./installDeps.sh yet + } + + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp.router( + theme: ThemeData.dark(), + routerConfig: router, + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key}); + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + List _topMovies = []; + List _latestMovies = []; + bool _showMessage = true; + + @override + void initState() { + super.initState(); + + if (isSetup) { + MovieState.getTopTenMovies().then((res) { + if (res.data.movies.isNotEmpty) { + if (mounted) { + setState(() { + _showMessage = false; + _topMovies = res.data.movies; + }); + } + } + }); + + MovieState.getTopTenMovies().then((res) { + setState(() { + _latestMovies = res.data.movies; + }); + }); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: SingleChildScrollView( + child: _showMessage || !isSetup + ? Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(30.0), + child: isSetup + ? Text( + 'Go to the Firebase Data Connect extension, and click start Emulators. ${_latestMovies.isEmpty ? 'Then open dataconnect/moviedata_insert.gql and the click "Run(local)".' : ''} Then, refresh the page.') + : const NumberedList(bullets: [ + 'Make sure you already have a Firebase Project', + 'In the sidebar, open The Firebase Data Connect Extension', + 'Sign into your google account associated with your firebase project', + 'Select your firebase project', + 'Open a new terminal (by clicking the + icon below) and Run "flutterfire configure -y -a com.example.dataconnect"', + 'Refresh this preview page' + ])) + ], + )) + : Column( + children: [ + ListMovies( + title: 'Top 10 Movies', + movies: _topMovies + .map( + (e) => Movie( + id: e.id, + title: e.title, + imageUrl: e.imageUrl, + description: e.description), + ) + .toList()), + ListMovies( + title: 'Latest Movies', + movies: _latestMovies + .map( + (e) => Movie( + id: e.id, + title: e.title, + imageUrl: e.imageUrl, + description: e.description), + ) + .toList()), + ], + ), + )), + ); + } +} + +class NumberedList extends StatelessWidget { + const NumberedList({super.key, required this.bullets}); + + final List bullets; + + @override + Widget build(BuildContext context) { + return Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.fromLTRB(16, 15, 16, 16), + child: Column( + children: bullets + .asMap() + .keys + .map((index) => Row(children: [ + Text( + "${index + 1}.", + style: const TextStyle( + fontSize: 16, height: 1.55, color: Colors.white), + ), + const SizedBox( + width: 5, + ), + Expanded( + child: Text( + bullets[index], + textAlign: TextAlign.left, + softWrap: true, + style: const TextStyle( + fontSize: 16, + color: Colors.white, + height: 1.55, + ), + ), + ) + ])) + .toList())); + } +} diff --git a/data_connect/lib/movies_connector/add_favorited_movie.dart b/data_connect/lib/movies_connector/add_favorited_movie.dart index a7035744..57ede3c6 100644 --- a/data_connect/lib/movies_connector/add_favorited_movie.dart +++ b/data_connect/lib/movies_connector/add_favorited_movie.dart @@ -1,49 +1,32 @@ -part of movies_connector; +part of 'movies.dart'; class AddFavoritedMovieVariablesBuilder { String movieId; - FirebaseDataConnect _dataConnect; - - AddFavoritedMovieVariablesBuilder( - this._dataConnect, { - required String this.movieId, - }); - Deserializer dataDeserializer = - (dynamic json) => AddFavoritedMovieData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (AddFavoritedMovieVariables vars) => jsonEncode(vars.toJson()); - Future> - execute() { - return this.ref().execute(); + final FirebaseDataConnect _dataConnect; + AddFavoritedMovieVariablesBuilder(this._dataConnect, {required this.movieId,}); + Deserializer dataDeserializer = (dynamic json) => AddFavoritedMovieData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (AddFavoritedMovieVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); } MutationRef ref() { - AddFavoritedMovieVariables vars = AddFavoritedMovieVariables( - movieId: movieId, - ); - - return _dataConnect.mutation( - "AddFavoritedMovie", dataDeserializer, varsSerializer, vars); + AddFavoritedMovieVariables vars= AddFavoritedMovieVariables(movieId: movieId,); + return _dataConnect.mutation("AddFavoritedMovie", dataDeserializer, varsSerializer, vars); } } class AddFavoritedMovieFavoriteMovieUpsert { String userId; - String movieId; - - AddFavoritedMovieFavoriteMovieUpsert.fromJson(dynamic json) - : userId = nativeFromJson(json['userId']), - movieId = nativeFromJson(json['movieId']) {} + AddFavoritedMovieFavoriteMovieUpsert.fromJson(dynamic json): + userId = nativeFromJson(json['userId']),movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['userId'] = nativeToJson(userId); - json['movieId'] = nativeToJson(movieId); - return json; } @@ -55,16 +38,12 @@ class AddFavoritedMovieFavoriteMovieUpsert { class AddFavoritedMovieData { AddFavoritedMovieFavoriteMovieUpsert favorite_movie_upsert; - - AddFavoritedMovieData.fromJson(dynamic json) - : favorite_movie_upsert = AddFavoritedMovieFavoriteMovieUpsert.fromJson( - json['favorite_movie_upsert']) {} + AddFavoritedMovieData.fromJson(dynamic json): + favorite_movie_upsert = AddFavoritedMovieFavoriteMovieUpsert.fromJson(json['favorite_movie_upsert']); Map toJson() { Map json = {}; - json['favorite_movie_upsert'] = favorite_movie_upsert.toJson(); - return json; } @@ -75,17 +54,13 @@ class AddFavoritedMovieData { class AddFavoritedMovieVariables { String movieId; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - AddFavoritedMovieVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + AddFavoritedMovieVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - return json; } @@ -93,3 +68,4 @@ class AddFavoritedMovieVariables { required this.movieId, }); } + diff --git a/data_connect/lib/movies_connector/add_review.dart b/data_connect/lib/movies_connector/add_review.dart index 7963a6b4..780a2d4f 100644 --- a/data_connect/lib/movies_connector/add_review.dart +++ b/data_connect/lib/movies_connector/add_review.dart @@ -1,54 +1,34 @@ -part of movies_connector; +part of 'movies.dart'; class AddReviewVariablesBuilder { String movieId; int rating; String reviewText; - FirebaseDataConnect _dataConnect; - - AddReviewVariablesBuilder( - this._dataConnect, { - required String this.movieId, - required int this.rating, - required String this.reviewText, - }); - Deserializer dataDeserializer = - (dynamic json) => AddReviewData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (AddReviewVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + AddReviewVariablesBuilder(this._dataConnect, {required this.movieId,required this.rating,required this.reviewText,}); + Deserializer dataDeserializer = (dynamic json) => AddReviewData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (AddReviewVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } MutationRef ref() { - AddReviewVariables vars = AddReviewVariables( - movieId: movieId, - rating: rating, - reviewText: reviewText, - ); - - return _dataConnect.mutation( - "AddReview", dataDeserializer, varsSerializer, vars); + AddReviewVariables vars= AddReviewVariables(movieId: movieId,rating: rating,reviewText: reviewText,); + return _dataConnect.mutation("AddReview", dataDeserializer, varsSerializer, vars); } } class AddReviewReviewUpsert { String userId; - String movieId; - - AddReviewReviewUpsert.fromJson(dynamic json) - : userId = nativeFromJson(json['userId']), - movieId = nativeFromJson(json['movieId']) {} + AddReviewReviewUpsert.fromJson(dynamic json): + userId = nativeFromJson(json['userId']),movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['userId'] = nativeToJson(userId); - json['movieId'] = nativeToJson(movieId); - return json; } @@ -60,15 +40,12 @@ class AddReviewReviewUpsert { class AddReviewData { AddReviewReviewUpsert review_upsert; - - AddReviewData.fromJson(dynamic json) - : review_upsert = AddReviewReviewUpsert.fromJson(json['review_upsert']) {} + AddReviewData.fromJson(dynamic json): + review_upsert = AddReviewReviewUpsert.fromJson(json['review_upsert']); Map toJson() { Map json = {}; - json['review_upsert'] = review_upsert.toJson(); - return json; } @@ -79,27 +56,17 @@ class AddReviewData { class AddReviewVariables { String movieId; - int rating; - String reviewText; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - AddReviewVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']), - rating = nativeFromJson(json['rating']), - reviewText = nativeFromJson(json['reviewText']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + AddReviewVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']),rating = nativeFromJson(json['rating']),reviewText = nativeFromJson(json['reviewText']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - json['rating'] = nativeToJson(rating); - json['reviewText'] = nativeToJson(reviewText); - return json; } @@ -109,3 +76,4 @@ class AddReviewVariables { required this.reviewText, }); } + diff --git a/data_connect/lib/movies_connector/delete_favorited_movie.dart b/data_connect/lib/movies_connector/delete_favorited_movie.dart index 8f0865ed..9a6affef 100644 --- a/data_connect/lib/movies_connector/delete_favorited_movie.dart +++ b/data_connect/lib/movies_connector/delete_favorited_movie.dart @@ -1,50 +1,32 @@ -part of movies_connector; +part of 'movies.dart'; class DeleteFavoritedMovieVariablesBuilder { String movieId; - FirebaseDataConnect _dataConnect; - - DeleteFavoritedMovieVariablesBuilder( - this._dataConnect, { - required String this.movieId, - }); - Deserializer dataDeserializer = - (dynamic json) => DeleteFavoritedMovieData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (DeleteFavoritedMovieVariables vars) => jsonEncode(vars.toJson()); - Future< - OperationResult> execute() { - return this.ref().execute(); + final FirebaseDataConnect _dataConnect; + DeleteFavoritedMovieVariablesBuilder(this._dataConnect, {required this.movieId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteFavoritedMovieData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteFavoritedMovieVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); } MutationRef ref() { - DeleteFavoritedMovieVariables vars = DeleteFavoritedMovieVariables( - movieId: movieId, - ); - - return _dataConnect.mutation( - "DeleteFavoritedMovie", dataDeserializer, varsSerializer, vars); + DeleteFavoritedMovieVariables vars= DeleteFavoritedMovieVariables(movieId: movieId,); + return _dataConnect.mutation("DeleteFavoritedMovie", dataDeserializer, varsSerializer, vars); } } class DeleteFavoritedMovieFavoriteMovieDelete { String userId; - String movieId; - - DeleteFavoritedMovieFavoriteMovieDelete.fromJson(dynamic json) - : userId = nativeFromJson(json['userId']), - movieId = nativeFromJson(json['movieId']) {} + DeleteFavoritedMovieFavoriteMovieDelete.fromJson(dynamic json): + userId = nativeFromJson(json['userId']),movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['userId'] = nativeToJson(userId); - json['movieId'] = nativeToJson(movieId); - return json; } @@ -56,20 +38,14 @@ class DeleteFavoritedMovieFavoriteMovieDelete { class DeleteFavoritedMovieData { DeleteFavoritedMovieFavoriteMovieDelete? favorite_movie_delete; - - DeleteFavoritedMovieData.fromJson(dynamic json) - : favorite_movie_delete = json['favorite_movie_delete'] == null - ? null - : DeleteFavoritedMovieFavoriteMovieDelete.fromJson( - json['favorite_movie_delete']) {} + DeleteFavoritedMovieData.fromJson(dynamic json): + favorite_movie_delete = json['favorite_movie_delete'] == null ? null : DeleteFavoritedMovieFavoriteMovieDelete.fromJson(json['favorite_movie_delete']); Map toJson() { Map json = {}; - if (favorite_movie_delete != null) { json['favorite_movie_delete'] = favorite_movie_delete!.toJson(); } - return json; } @@ -80,17 +56,13 @@ class DeleteFavoritedMovieData { class DeleteFavoritedMovieVariables { String movieId; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - DeleteFavoritedMovieVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteFavoritedMovieVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - return json; } @@ -98,3 +70,4 @@ class DeleteFavoritedMovieVariables { required this.movieId, }); } + diff --git a/data_connect/lib/movies_connector/delete_review.dart b/data_connect/lib/movies_connector/delete_review.dart index 43717ff8..bbbdad18 100644 --- a/data_connect/lib/movies_connector/delete_review.dart +++ b/data_connect/lib/movies_connector/delete_review.dart @@ -1,48 +1,32 @@ -part of movies_connector; +part of 'movies.dart'; class DeleteReviewVariablesBuilder { String movieId; - FirebaseDataConnect _dataConnect; - - DeleteReviewVariablesBuilder( - this._dataConnect, { - required String this.movieId, - }); - Deserializer dataDeserializer = - (dynamic json) => DeleteReviewData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (DeleteReviewVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + DeleteReviewVariablesBuilder(this._dataConnect, {required this.movieId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteReviewData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteReviewVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } MutationRef ref() { - DeleteReviewVariables vars = DeleteReviewVariables( - movieId: movieId, - ); - - return _dataConnect.mutation( - "DeleteReview", dataDeserializer, varsSerializer, vars); + DeleteReviewVariables vars= DeleteReviewVariables(movieId: movieId,); + return _dataConnect.mutation("DeleteReview", dataDeserializer, varsSerializer, vars); } } class DeleteReviewReviewDelete { String userId; - String movieId; - - DeleteReviewReviewDelete.fromJson(dynamic json) - : userId = nativeFromJson(json['userId']), - movieId = nativeFromJson(json['movieId']) {} + DeleteReviewReviewDelete.fromJson(dynamic json): + userId = nativeFromJson(json['userId']),movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['userId'] = nativeToJson(userId); - json['movieId'] = nativeToJson(movieId); - return json; } @@ -54,19 +38,14 @@ class DeleteReviewReviewDelete { class DeleteReviewData { DeleteReviewReviewDelete? review_delete; - - DeleteReviewData.fromJson(dynamic json) - : review_delete = json['review_delete'] == null - ? null - : DeleteReviewReviewDelete.fromJson(json['review_delete']) {} + DeleteReviewData.fromJson(dynamic json): + review_delete = json['review_delete'] == null ? null : DeleteReviewReviewDelete.fromJson(json['review_delete']); Map toJson() { Map json = {}; - if (review_delete != null) { json['review_delete'] = review_delete!.toJson(); } - return json; } @@ -77,17 +56,13 @@ class DeleteReviewData { class DeleteReviewVariables { String movieId; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - DeleteReviewVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteReviewVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - return json; } @@ -95,3 +70,4 @@ class DeleteReviewVariables { required this.movieId, }); } + diff --git a/data_connect/lib/movies_connector/get_actor_by_id.dart b/data_connect/lib/movies_connector/get_actor_by_id.dart index 44b3046a..061cbfad 100644 --- a/data_connect/lib/movies_connector/get_actor_by_id.dart +++ b/data_connect/lib/movies_connector/get_actor_by_id.dart @@ -1,67 +1,42 @@ -part of movies_connector; +part of 'movies.dart'; class GetActorByIdVariablesBuilder { String id; - FirebaseDataConnect _dataConnect; - - GetActorByIdVariablesBuilder( - this._dataConnect, { - required String this.id, - }); - Deserializer dataDeserializer = - (dynamic json) => GetActorByIdData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (GetActorByIdVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + GetActorByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetActorByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetActorByIdVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - GetActorByIdVariables vars = GetActorByIdVariables( - id: id, - ); - - return _dataConnect.query( - "GetActorById", dataDeserializer, varsSerializer, vars); + GetActorByIdVariables vars= GetActorByIdVariables(id: id,); + return _dataConnect.query("GetActorById", dataDeserializer, varsSerializer, vars); } } class GetActorByIdActor { String id; - String name; - String imageUrl; - List mainActors; - List supportingActors; - - GetActorByIdActor.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - name = nativeFromJson(json['name']), - imageUrl = nativeFromJson(json['imageUrl']), - mainActors = (json['mainActors'] as List) - .map((e) => GetActorByIdActorMainActors.fromJson(e)) - .toList(), - supportingActors = (json['supportingActors'] as List) - .map((e) => GetActorByIdActorSupportingActors.fromJson(e)) - .toList() {} + GetActorByIdActor.fromJson(dynamic json): + id = nativeFromJson(json['id']),name = nativeFromJson(json['name']),imageUrl = nativeFromJson(json['imageUrl']),mainActors = (json['mainActors'] as List) + .map((e) => GetActorByIdActorMainActors.fromJson(e)) + .toList(),supportingActors = (json['supportingActors'] as List) + .map((e) => GetActorByIdActorSupportingActors.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['name'] = nativeToJson(name); - json['imageUrl'] = nativeToJson(imageUrl); - json['mainActors'] = mainActors.map((e) => e.toJson()).toList(); - json['supportingActors'] = supportingActors.map((e) => e.toJson()).toList(); - return json; } @@ -76,45 +51,26 @@ class GetActorByIdActor { class GetActorByIdActorMainActors { String id; - String title; - String? genre; - List? tags; - String imageUrl; - - GetActorByIdActorMainActors.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - imageUrl = nativeFromJson(json['imageUrl']) {} + GetActorByIdActorMainActors.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -129,45 +85,26 @@ class GetActorByIdActorMainActors { class GetActorByIdActorSupportingActors { String id; - String title; - String? genre; - List? tags; - String imageUrl; - - GetActorByIdActorSupportingActors.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - imageUrl = nativeFromJson(json['imageUrl']) {} + GetActorByIdActorSupportingActors.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -182,19 +119,14 @@ class GetActorByIdActorSupportingActors { class GetActorByIdData { GetActorByIdActor? actor; - - GetActorByIdData.fromJson(dynamic json) - : actor = json['actor'] == null - ? null - : GetActorByIdActor.fromJson(json['actor']) {} + GetActorByIdData.fromJson(dynamic json): + actor = json['actor'] == null ? null : GetActorByIdActor.fromJson(json['actor']); Map toJson() { Map json = {}; - if (actor != null) { json['actor'] = actor!.toJson(); } - return json; } @@ -205,17 +137,13 @@ class GetActorByIdData { class GetActorByIdVariables { String id; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - GetActorByIdVariables.fromJson(Map json) - : id = nativeFromJson(json['id']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetActorByIdVariables.fromJson(Map json): + id = nativeFromJson(json['id']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - return json; } @@ -223,3 +151,4 @@ class GetActorByIdVariables { required this.id, }); } + diff --git a/data_connect/lib/movies_connector/get_current_user.dart b/data_connect/lib/movies_connector/get_current_user.dart index 6a2ae552..b41c9bb6 100644 --- a/data_connect/lib/movies_connector/get_current_user.dart +++ b/data_connect/lib/movies_connector/get_current_user.dart @@ -1,54 +1,39 @@ -part of movies_connector; +part of 'movies.dart'; class GetCurrentUserVariablesBuilder { - FirebaseDataConnect _dataConnect; - - GetCurrentUserVariablesBuilder( - this._dataConnect, - ); - Deserializer dataDeserializer = - (dynamic json) => GetCurrentUserData.fromJson(jsonDecode(json)); - + + final FirebaseDataConnect _dataConnect; + GetCurrentUserVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => GetCurrentUserData.fromJson(jsonDecode(json)); + Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - return _dataConnect.query( - "GetCurrentUser", dataDeserializer, emptySerializer, null); + + return _dataConnect.query("GetCurrentUser", dataDeserializer, emptySerializer, null); } } class GetCurrentUserUser { String id; - String username; - List reviews; - List favoriteMovies; - - GetCurrentUserUser.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - username = nativeFromJson(json['username']), - reviews = (json['reviews'] as List) - .map((e) => GetCurrentUserUserReviews.fromJson(e)) - .toList(), - favoriteMovies = (json['favoriteMovies'] as List) - .map((e) => GetCurrentUserUserFavoriteMovies.fromJson(e)) - .toList() {} + GetCurrentUserUser.fromJson(dynamic json): + id = nativeFromJson(json['id']),username = nativeFromJson(json['username']),reviews = (json['reviews'] as List) + .map((e) => GetCurrentUserUserReviews.fromJson(e)) + .toList(),favoriteMovies = (json['favoriteMovies'] as List) + .map((e) => GetCurrentUserUserFavoriteMovies.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['username'] = nativeToJson(username); - json['reviews'] = reviews.map((e) => e.toJson()).toList(); - json['favoriteMovies'] = favoriteMovies.map((e) => e.toJson()).toList(); - return json; } @@ -62,42 +47,24 @@ class GetCurrentUserUser { class GetCurrentUserUserReviews { String id; - int? rating; - DateTime reviewDate; - String? reviewText; - GetCurrentUserUserReviewsMovie movie; - - GetCurrentUserUserReviews.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - rating = - json['rating'] == null ? null : nativeFromJson(json['rating']), - reviewDate = nativeFromJson(json['reviewDate']), - reviewText = json['reviewText'] == null - ? null - : nativeFromJson(json['reviewText']), - movie = GetCurrentUserUserReviewsMovie.fromJson(json['movie']) {} + GetCurrentUserUserReviews.fromJson(dynamic json): + id = nativeFromJson(json['id']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),reviewDate = nativeFromJson(json['reviewDate']),reviewText = json['reviewText'] == null ? null : nativeFromJson(json['reviewText']),movie = GetCurrentUserUserReviewsMovie.fromJson(json['movie']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - if (rating != null) { json['rating'] = nativeToJson(rating); } - json['reviewDate'] = nativeToJson(reviewDate); - if (reviewText != null) { json['reviewText'] = nativeToJson(reviewText); } - json['movie'] = movie.toJson(); - return json; } @@ -112,20 +79,14 @@ class GetCurrentUserUserReviews { class GetCurrentUserUserReviewsMovie { String id; - String title; - - GetCurrentUserUserReviewsMovie.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']) {} + GetCurrentUserUserReviewsMovie.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - return json; } @@ -137,15 +98,12 @@ class GetCurrentUserUserReviewsMovie { class GetCurrentUserUserFavoriteMovies { GetCurrentUserUserFavoriteMoviesMovie movie; - - GetCurrentUserUserFavoriteMovies.fromJson(dynamic json) - : movie = GetCurrentUserUserFavoriteMoviesMovie.fromJson(json['movie']) {} + GetCurrentUserUserFavoriteMovies.fromJson(dynamic json): + movie = GetCurrentUserUserFavoriteMoviesMovie.fromJson(json['movie']); Map toJson() { Map json = {}; - json['movie'] = movie.toJson(); - return json; } @@ -156,80 +114,42 @@ class GetCurrentUserUserFavoriteMovies { class GetCurrentUserUserFavoriteMoviesMovie { String id; - String title; - String? genre; - String imageUrl; - int? releaseYear; - double? rating; - String? description; - List? tags; - List metadata; - - GetCurrentUserUserFavoriteMoviesMovie.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - imageUrl = nativeFromJson(json['imageUrl']), - releaseYear = json['releaseYear'] == null - ? null - : nativeFromJson(json['releaseYear']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - description = json['description'] == null - ? null - : nativeFromJson(json['description']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - metadata = (json['metadata'] as List) - .map((e) => - GetCurrentUserUserFavoriteMoviesMovieMetadata.fromJson(e)) - .toList() {} + GetCurrentUserUserFavoriteMoviesMovie.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),imageUrl = nativeFromJson(json['imageUrl']),releaseYear = json['releaseYear'] == null ? null : nativeFromJson(json['releaseYear']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),description = json['description'] == null ? null : nativeFromJson(json['description']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),metadata = (json['metadata'] as List) + .map((e) => GetCurrentUserUserFavoriteMoviesMovieMetadata.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - json['imageUrl'] = nativeToJson(imageUrl); - if (releaseYear != null) { json['releaseYear'] = nativeToJson(releaseYear); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - if (description != null) { json['description'] = nativeToJson(description); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - json['metadata'] = metadata.map((e) => e.toJson()).toList(); - return json; } @@ -248,19 +168,14 @@ class GetCurrentUserUserFavoriteMoviesMovie { class GetCurrentUserUserFavoriteMoviesMovieMetadata { String? director; - - GetCurrentUserUserFavoriteMoviesMovieMetadata.fromJson(dynamic json) - : director = json['director'] == null - ? null - : nativeFromJson(json['director']) {} + GetCurrentUserUserFavoriteMoviesMovieMetadata.fromJson(dynamic json): + director = json['director'] == null ? null : nativeFromJson(json['director']); Map toJson() { Map json = {}; - if (director != null) { json['director'] = nativeToJson(director); } - return json; } @@ -271,19 +186,14 @@ class GetCurrentUserUserFavoriteMoviesMovieMetadata { class GetCurrentUserData { GetCurrentUserUser? user; - - GetCurrentUserData.fromJson(dynamic json) - : user = json['user'] == null - ? null - : GetCurrentUserUser.fromJson(json['user']) {} + GetCurrentUserData.fromJson(dynamic json): + user = json['user'] == null ? null : GetCurrentUserUser.fromJson(json['user']); Map toJson() { Map json = {}; - if (user != null) { json['user'] = user!.toJson(); } - return json; } @@ -291,3 +201,4 @@ class GetCurrentUserData { this.user, }); } + diff --git a/data_connect/lib/movies_connector/get_movie_by_id.dart b/data_connect/lib/movies_connector/get_movie_by_id.dart index 9cde2545..585b2712 100644 --- a/data_connect/lib/movies_connector/get_movie_by_id.dart +++ b/data_connect/lib/movies_connector/get_movie_by_id.dart @@ -1,128 +1,72 @@ -part of movies_connector; +part of 'movies.dart'; class GetMovieByIdVariablesBuilder { String id; - FirebaseDataConnect _dataConnect; - - GetMovieByIdVariablesBuilder( - this._dataConnect, { - required String this.id, - }); - Deserializer dataDeserializer = - (dynamic json) => GetMovieByIdData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (GetMovieByIdVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + GetMovieByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetMovieByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMovieByIdVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - GetMovieByIdVariables vars = GetMovieByIdVariables( - id: id, - ); - - return _dataConnect.query( - "GetMovieById", dataDeserializer, varsSerializer, vars); + GetMovieByIdVariables vars= GetMovieByIdVariables(id: id,); + return _dataConnect.query("GetMovieById", dataDeserializer, varsSerializer, vars); } } class GetMovieByIdMovie { String id; - String title; - String imageUrl; - int? releaseYear; - String? genre; - double? rating; - String? description; - List? tags; - List metadata; - List mainActors; - List supportingActors; - List reviews; - - GetMovieByIdMovie.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - imageUrl = nativeFromJson(json['imageUrl']), - releaseYear = json['releaseYear'] == null - ? null - : nativeFromJson(json['releaseYear']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - description = json['description'] == null - ? null - : nativeFromJson(json['description']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - metadata = (json['metadata'] as List) - .map((e) => GetMovieByIdMovieMetadata.fromJson(e)) - .toList(), - mainActors = (json['mainActors'] as List) - .map((e) => GetMovieByIdMovieMainActors.fromJson(e)) - .toList(), - supportingActors = (json['supportingActors'] as List) - .map((e) => GetMovieByIdMovieSupportingActors.fromJson(e)) - .toList(), - reviews = (json['reviews'] as List) - .map((e) => GetMovieByIdMovieReviews.fromJson(e)) - .toList() {} + GetMovieByIdMovie.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),imageUrl = nativeFromJson(json['imageUrl']),releaseYear = json['releaseYear'] == null ? null : nativeFromJson(json['releaseYear']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),description = json['description'] == null ? null : nativeFromJson(json['description']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),metadata = (json['metadata'] as List) + .map((e) => GetMovieByIdMovieMetadata.fromJson(e)) + .toList(),mainActors = (json['mainActors'] as List) + .map((e) => GetMovieByIdMovieMainActors.fromJson(e)) + .toList(),supportingActors = (json['supportingActors'] as List) + .map((e) => GetMovieByIdMovieSupportingActors.fromJson(e)) + .toList(),reviews = (json['reviews'] as List) + .map((e) => GetMovieByIdMovieReviews.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - json['imageUrl'] = nativeToJson(imageUrl); - if (releaseYear != null) { json['releaseYear'] = nativeToJson(releaseYear); } - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - if (description != null) { json['description'] = nativeToJson(description); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - json['metadata'] = metadata.map((e) => e.toJson()).toList(); - json['mainActors'] = mainActors.map((e) => e.toJson()).toList(); - json['supportingActors'] = supportingActors.map((e) => e.toJson()).toList(); - json['reviews'] = reviews.map((e) => e.toJson()).toList(); - return json; } @@ -144,19 +88,14 @@ class GetMovieByIdMovie { class GetMovieByIdMovieMetadata { String? director; - - GetMovieByIdMovieMetadata.fromJson(dynamic json) - : director = json['director'] == null - ? null - : nativeFromJson(json['director']) {} + GetMovieByIdMovieMetadata.fromJson(dynamic json): + director = json['director'] == null ? null : nativeFromJson(json['director']); Map toJson() { Map json = {}; - if (director != null) { json['director'] = nativeToJson(director); } - return json; } @@ -167,25 +106,16 @@ class GetMovieByIdMovieMetadata { class GetMovieByIdMovieMainActors { String id; - String name; - String imageUrl; - - GetMovieByIdMovieMainActors.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - name = nativeFromJson(json['name']), - imageUrl = nativeFromJson(json['imageUrl']) {} + GetMovieByIdMovieMainActors.fromJson(dynamic json): + id = nativeFromJson(json['id']),name = nativeFromJson(json['name']),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['name'] = nativeToJson(name); - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -198,25 +128,16 @@ class GetMovieByIdMovieMainActors { class GetMovieByIdMovieSupportingActors { String id; - String name; - String imageUrl; - - GetMovieByIdMovieSupportingActors.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - name = nativeFromJson(json['name']), - imageUrl = nativeFromJson(json['imageUrl']) {} + GetMovieByIdMovieSupportingActors.fromJson(dynamic json): + id = nativeFromJson(json['id']),name = nativeFromJson(json['name']),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['name'] = nativeToJson(name); - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -229,42 +150,24 @@ class GetMovieByIdMovieSupportingActors { class GetMovieByIdMovieReviews { String id; - String? reviewText; - DateTime reviewDate; - int? rating; - GetMovieByIdMovieReviewsUser user; - - GetMovieByIdMovieReviews.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - reviewText = json['reviewText'] == null - ? null - : nativeFromJson(json['reviewText']), - reviewDate = nativeFromJson(json['reviewDate']), - rating = - json['rating'] == null ? null : nativeFromJson(json['rating']), - user = GetMovieByIdMovieReviewsUser.fromJson(json['user']) {} + GetMovieByIdMovieReviews.fromJson(dynamic json): + id = nativeFromJson(json['id']),reviewText = json['reviewText'] == null ? null : nativeFromJson(json['reviewText']),reviewDate = nativeFromJson(json['reviewDate']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),user = GetMovieByIdMovieReviewsUser.fromJson(json['user']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - if (reviewText != null) { json['reviewText'] = nativeToJson(reviewText); } - json['reviewDate'] = nativeToJson(reviewDate); - if (rating != null) { json['rating'] = nativeToJson(rating); } - json['user'] = user.toJson(); - return json; } @@ -279,20 +182,14 @@ class GetMovieByIdMovieReviews { class GetMovieByIdMovieReviewsUser { String id; - String username; - - GetMovieByIdMovieReviewsUser.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - username = nativeFromJson(json['username']) {} + GetMovieByIdMovieReviewsUser.fromJson(dynamic json): + id = nativeFromJson(json['id']),username = nativeFromJson(json['username']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['username'] = nativeToJson(username); - return json; } @@ -304,19 +201,14 @@ class GetMovieByIdMovieReviewsUser { class GetMovieByIdData { GetMovieByIdMovie? movie; - - GetMovieByIdData.fromJson(dynamic json) - : movie = json['movie'] == null - ? null - : GetMovieByIdMovie.fromJson(json['movie']) {} + GetMovieByIdData.fromJson(dynamic json): + movie = json['movie'] == null ? null : GetMovieByIdMovie.fromJson(json['movie']); Map toJson() { Map json = {}; - if (movie != null) { json['movie'] = movie!.toJson(); } - return json; } @@ -327,17 +219,13 @@ class GetMovieByIdData { class GetMovieByIdVariables { String id; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - GetMovieByIdVariables.fromJson(Map json) - : id = nativeFromJson(json['id']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMovieByIdVariables.fromJson(Map json): + id = nativeFromJson(json['id']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - return json; } @@ -345,3 +233,4 @@ class GetMovieByIdVariables { required this.id, }); } + diff --git a/data_connect/lib/movies_connector/get_movie_info_for_user.dart b/data_connect/lib/movies_connector/get_movie_info_for_user.dart index 9c6eee34..74f9e4ac 100644 --- a/data_connect/lib/movies_connector/get_movie_info_for_user.dart +++ b/data_connect/lib/movies_connector/get_movie_info_for_user.dart @@ -1,44 +1,30 @@ -part of movies_connector; +part of 'movies.dart'; class GetMovieInfoForUserVariablesBuilder { String movieId; - FirebaseDataConnect _dataConnect; - - GetMovieInfoForUserVariablesBuilder( - this._dataConnect, { - required String this.movieId, - }); - Deserializer dataDeserializer = - (dynamic json) => GetMovieInfoForUserData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (GetMovieInfoForUserVariables vars) => jsonEncode(vars.toJson()); - Future> - execute() { - return this.ref().execute(); + final FirebaseDataConnect _dataConnect; + GetMovieInfoForUserVariablesBuilder(this._dataConnect, {required this.movieId,}); + Deserializer dataDeserializer = (dynamic json) => GetMovieInfoForUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMovieInfoForUserVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); } QueryRef ref() { - GetMovieInfoForUserVariables vars = GetMovieInfoForUserVariables( - movieId: movieId, - ); - - return _dataConnect.query( - "GetMovieInfoForUser", dataDeserializer, varsSerializer, vars); + GetMovieInfoForUserVariables vars= GetMovieInfoForUserVariables(movieId: movieId,); + return _dataConnect.query("GetMovieInfoForUser", dataDeserializer, varsSerializer, vars); } } class GetMovieInfoForUserFavoriteMovie { String movieId; - - GetMovieInfoForUserFavoriteMovie.fromJson(dynamic json) - : movieId = nativeFromJson(json['movieId']) {} + GetMovieInfoForUserFavoriteMovie.fromJson(dynamic json): + movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - return json; } @@ -49,20 +35,14 @@ class GetMovieInfoForUserFavoriteMovie { class GetMovieInfoForUserData { GetMovieInfoForUserFavoriteMovie? favorite_movie; - - GetMovieInfoForUserData.fromJson(dynamic json) - : favorite_movie = json['favorite_movie'] == null - ? null - : GetMovieInfoForUserFavoriteMovie.fromJson( - json['favorite_movie']) {} + GetMovieInfoForUserData.fromJson(dynamic json): + favorite_movie = json['favorite_movie'] == null ? null : GetMovieInfoForUserFavoriteMovie.fromJson(json['favorite_movie']); Map toJson() { Map json = {}; - if (favorite_movie != null) { json['favorite_movie'] = favorite_movie!.toJson(); } - return json; } @@ -73,17 +53,13 @@ class GetMovieInfoForUserData { class GetMovieInfoForUserVariables { String movieId; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - GetMovieInfoForUserVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMovieInfoForUserVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - return json; } @@ -91,3 +67,4 @@ class GetMovieInfoForUserVariables { required this.movieId, }); } + diff --git a/data_connect/lib/movies_connector/list_genres.dart b/data_connect/lib/movies_connector/list_genres.dart index 8822d590..e261e5c7 100644 --- a/data_connect/lib/movies_connector/list_genres.dart +++ b/data_connect/lib/movies_connector/list_genres.dart @@ -1,39 +1,31 @@ -part of movies_connector; +part of 'movies.dart'; class ListGenresVariablesBuilder { - FirebaseDataConnect _dataConnect; - - ListGenresVariablesBuilder( - this._dataConnect, - ); - Deserializer dataDeserializer = - (dynamic json) => ListGenresData.fromJson(jsonDecode(json)); - + + final FirebaseDataConnect _dataConnect; + ListGenresVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListGenresData.fromJson(jsonDecode(json)); + Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - return _dataConnect.query( - "ListGenres", dataDeserializer, emptySerializer, null); + + return _dataConnect.query("ListGenres", dataDeserializer, emptySerializer, null); } } class ListGenresGenres { String? genre; - - ListGenresGenres.fromJson(dynamic json) - : genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']) {} + ListGenresGenres.fromJson(dynamic json): + genre = json['genre'] == null ? null : nativeFromJson(json['genre']); Map toJson() { Map json = {}; - if (genre != null) { json['genre'] = nativeToJson(genre); } - return json; } @@ -44,17 +36,14 @@ class ListGenresGenres { class ListGenresData { List genres; - - ListGenresData.fromJson(dynamic json) - : genres = (json['genres'] as List) - .map((e) => ListGenresGenres.fromJson(e)) - .toList() {} + ListGenresData.fromJson(dynamic json): + genres = (json['genres'] as List) + .map((e) => ListGenresGenres.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['genres'] = genres.map((e) => e.toJson()).toList(); - return json; } @@ -62,3 +51,4 @@ class ListGenresData { required this.genres, }); } + diff --git a/data_connect/lib/movies_connector/list_movies.dart b/data_connect/lib/movies_connector/list_movies.dart index ae7998e8..90dbd65b 100644 --- a/data_connect/lib/movies_connector/list_movies.dart +++ b/data_connect/lib/movies_connector/list_movies.dart @@ -1,119 +1,71 @@ -part of movies_connector; +part of 'movies.dart'; class ListMoviesVariablesBuilder { - Optional _orderByRating = - Optional.optional(orderDirectionDeserializer, enumSerializer); - Optional _orderByReleaseYear = - Optional.optional(orderDirectionDeserializer, enumSerializer); + Optional _orderByRating = Optional.optional(orderDirectionDeserializer, enumSerializer); + Optional _orderByReleaseYear = Optional.optional(orderDirectionDeserializer, enumSerializer); Optional _limit = Optional.optional(nativeFromJson, nativeToJson); - FirebaseDataConnect _dataConnect; + final FirebaseDataConnect _dataConnect; ListMoviesVariablesBuilder orderByRating(OrderDirection? t) { - this._orderByRating.value = t; - return this; + _orderByRating.value = t; + return this; } - ListMoviesVariablesBuilder orderByReleaseYear(OrderDirection? t) { - this._orderByReleaseYear.value = t; - return this; + _orderByReleaseYear.value = t; + return this; } - ListMoviesVariablesBuilder limit(int? t) { - this._limit.value = t; - return this; + _limit.value = t; + return this; } - ListMoviesVariablesBuilder( - this._dataConnect, - ); - Deserializer dataDeserializer = - (dynamic json) => ListMoviesData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (ListMoviesVariables vars) => jsonEncode(vars.toJson()); + ListMoviesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListMoviesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListMoviesVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - ListMoviesVariables vars = ListMoviesVariables( - orderByRating: _orderByRating, - orderByReleaseYear: _orderByReleaseYear, - limit: _limit, - ); - - return _dataConnect.query( - "ListMovies", dataDeserializer, varsSerializer, vars); + ListMoviesVariables vars= ListMoviesVariables(orderByRating: _orderByRating,orderByReleaseYear: _orderByReleaseYear,limit: _limit,); + return _dataConnect.query("ListMovies", dataDeserializer, varsSerializer, vars); } } class ListMoviesMovies { String id; - String title; - String imageUrl; - int? releaseYear; - String? genre; - double? rating; - List? tags; - String? description; - - ListMoviesMovies.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - imageUrl = nativeFromJson(json['imageUrl']), - releaseYear = json['releaseYear'] == null - ? null - : nativeFromJson(json['releaseYear']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - description = json['description'] == null - ? null - : nativeFromJson(json['description']) {} + ListMoviesMovies.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),imageUrl = nativeFromJson(json['imageUrl']),releaseYear = json['releaseYear'] == null ? null : nativeFromJson(json['releaseYear']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),description = json['description'] == null ? null : nativeFromJson(json['description']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - json['imageUrl'] = nativeToJson(imageUrl); - if (releaseYear != null) { json['releaseYear'] = nativeToJson(releaseYear); } - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - if (description != null) { json['description'] = nativeToJson(description); } - return json; } @@ -131,17 +83,14 @@ class ListMoviesMovies { class ListMoviesData { List movies; - - ListMoviesData.fromJson(dynamic json) - : movies = (json['movies'] as List) - .map((e) => ListMoviesMovies.fromJson(e)) - .toList() {} + ListMoviesData.fromJson(dynamic json): + movies = (json['movies'] as List) + .map((e) => ListMoviesMovies.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['movies'] = movies.map((e) => e.toJson()).toList(); - return json; } @@ -151,47 +100,34 @@ class ListMoviesData { } class ListMoviesVariables { - late Optional orderByRating; - - late Optional orderByReleaseYear; - - late Optional limit; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + late OptionalorderByRating; + late OptionalorderByReleaseYear; + late Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') ListMoviesVariables.fromJson(Map json) { - orderByRating = - Optional.optional(orderDirectionDeserializer, enumSerializer); - orderByRating.value = json['orderByRating'] == null - ? null - : OrderDirection.values.byName(json['orderByRating']); - - orderByReleaseYear = - Optional.optional(orderDirectionDeserializer, enumSerializer); - orderByReleaseYear.value = json['orderByReleaseYear'] == null - ? null - : OrderDirection.values.byName(json['orderByReleaseYear']); - + + orderByRating = Optional.optional(orderDirectionDeserializer, enumSerializer); + orderByRating.value = json['orderByRating'] == null ? null : OrderDirection.values.byName(json['orderByRating']); + + orderByReleaseYear = Optional.optional(orderDirectionDeserializer, enumSerializer); + orderByReleaseYear.value = json['orderByReleaseYear'] == null ? null : OrderDirection.values.byName(json['orderByReleaseYear']); + limit = Optional.optional(nativeFromJson, nativeToJson); - limit.value = - json['limit'] == null ? null : nativeFromJson(json['limit']); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + } Map toJson() { Map json = {}; - - if (orderByRating.state == OptionalState.set) { + if(orderByRating.state == OptionalState.set) { json['orderByRating'] = orderByRating.toJson(); } - - if (orderByReleaseYear.state == OptionalState.set) { + if(orderByReleaseYear.state == OptionalState.set) { json['orderByReleaseYear'] = orderByReleaseYear.toJson(); } - - if (limit.state == OptionalState.set) { + if(limit.state == OptionalState.set) { json['limit'] = limit.toJson(); } - return json; } @@ -201,3 +137,4 @@ class ListMoviesVariables { required this.limit, }); } + diff --git a/data_connect/lib/movies_connector/list_movies_by_genre.dart b/data_connect/lib/movies_connector/list_movies_by_genre.dart index 4e785a85..9d2b6bc7 100644 --- a/data_connect/lib/movies_connector/list_movies_by_genre.dart +++ b/data_connect/lib/movies_connector/list_movies_by_genre.dart @@ -1,123 +1,71 @@ -part of movies_connector; +part of 'movies.dart'; class ListMoviesByGenreVariablesBuilder { String genre; - Optional _orderByRating = - Optional.optional(orderDirectionDeserializer, enumSerializer); - Optional _orderByReleaseYear = - Optional.optional(orderDirectionDeserializer, enumSerializer); + Optional _orderByRating = Optional.optional(orderDirectionDeserializer, enumSerializer); + Optional _orderByReleaseYear = Optional.optional(orderDirectionDeserializer, enumSerializer); Optional _limit = Optional.optional(nativeFromJson, nativeToJson); - FirebaseDataConnect _dataConnect; - ListMoviesByGenreVariablesBuilder orderByRating(OrderDirection? t) { - this._orderByRating.value = t; - return this; + final FirebaseDataConnect _dataConnect; ListMoviesByGenreVariablesBuilder orderByRating(OrderDirection? t) { + _orderByRating.value = t; + return this; } - ListMoviesByGenreVariablesBuilder orderByReleaseYear(OrderDirection? t) { - this._orderByReleaseYear.value = t; - return this; + _orderByReleaseYear.value = t; + return this; } - ListMoviesByGenreVariablesBuilder limit(int? t) { - this._limit.value = t; - return this; + _limit.value = t; + return this; } - ListMoviesByGenreVariablesBuilder( - this._dataConnect, { - required String this.genre, - }); - Deserializer dataDeserializer = - (dynamic json) => ListMoviesByGenreData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (ListMoviesByGenreVariables vars) => jsonEncode(vars.toJson()); - Future> - execute() { - return this.ref().execute(); + ListMoviesByGenreVariablesBuilder(this._dataConnect, {required this.genre,}); + Deserializer dataDeserializer = (dynamic json) => ListMoviesByGenreData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListMoviesByGenreVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); } QueryRef ref() { - ListMoviesByGenreVariables vars = ListMoviesByGenreVariables( - genre: genre, - orderByRating: _orderByRating, - orderByReleaseYear: _orderByReleaseYear, - limit: _limit, - ); - - return _dataConnect.query( - "ListMoviesByGenre", dataDeserializer, varsSerializer, vars); + ListMoviesByGenreVariables vars= ListMoviesByGenreVariables(genre: genre,orderByRating: _orderByRating,orderByReleaseYear: _orderByReleaseYear,limit: _limit,); + return _dataConnect.query("ListMoviesByGenre", dataDeserializer, varsSerializer, vars); } } class ListMoviesByGenreMovies { String id; - String title; - String imageUrl; - int? releaseYear; - String? genre; - double? rating; - List? tags; - String? description; - - ListMoviesByGenreMovies.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - imageUrl = nativeFromJson(json['imageUrl']), - releaseYear = json['releaseYear'] == null - ? null - : nativeFromJson(json['releaseYear']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - tags = json['tags'] == null - ? null - : (json['tags'] as List) - .map((e) => nativeFromJson(e)) - .toList(), - description = json['description'] == null - ? null - : nativeFromJson(json['description']) {} + ListMoviesByGenreMovies.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),imageUrl = nativeFromJson(json['imageUrl']),releaseYear = json['releaseYear'] == null ? null : nativeFromJson(json['releaseYear']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),tags = json['tags'] == null ? null : (json['tags'] as List) + .map((e) => nativeFromJson(e)) + .toList(),description = json['description'] == null ? null : nativeFromJson(json['description']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - json['imageUrl'] = nativeToJson(imageUrl); - if (releaseYear != null) { json['releaseYear'] = nativeToJson(releaseYear); } - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - if (tags != null) { json['tags'] = tags?.map((e) => nativeToJson(e)).toList(); } - if (description != null) { json['description'] = nativeToJson(description); } - return json; } @@ -135,17 +83,14 @@ class ListMoviesByGenreMovies { class ListMoviesByGenreData { List movies; - - ListMoviesByGenreData.fromJson(dynamic json) - : movies = (json['movies'] as List) - .map((e) => ListMoviesByGenreMovies.fromJson(e)) - .toList() {} + ListMoviesByGenreData.fromJson(dynamic json): + movies = (json['movies'] as List) + .map((e) => ListMoviesByGenreMovies.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['movies'] = movies.map((e) => e.toJson()).toList(); - return json; } @@ -156,51 +101,36 @@ class ListMoviesByGenreData { class ListMoviesByGenreVariables { String genre; - - late Optional orderByRating; - - late Optional orderByReleaseYear; - - late Optional limit; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - ListMoviesByGenreVariables.fromJson(Map json) - : genre = nativeFromJson(json['genre']) { - orderByRating = - Optional.optional(orderDirectionDeserializer, enumSerializer); - orderByRating.value = json['orderByRating'] == null - ? null - : OrderDirection.values.byName(json['orderByRating']); - - orderByReleaseYear = - Optional.optional(orderDirectionDeserializer, enumSerializer); - orderByReleaseYear.value = json['orderByReleaseYear'] == null - ? null - : OrderDirection.values.byName(json['orderByReleaseYear']); - + late OptionalorderByRating; + late OptionalorderByReleaseYear; + late Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListMoviesByGenreVariables.fromJson(Map json): + genre = nativeFromJson(json['genre']) { + + orderByRating = Optional.optional(orderDirectionDeserializer, enumSerializer); + orderByRating.value = json['orderByRating'] == null ? null : OrderDirection.values.byName(json['orderByRating']); + + orderByReleaseYear = Optional.optional(orderDirectionDeserializer, enumSerializer); + orderByReleaseYear.value = json['orderByReleaseYear'] == null ? null : OrderDirection.values.byName(json['orderByReleaseYear']); + limit = Optional.optional(nativeFromJson, nativeToJson); - limit.value = - json['limit'] == null ? null : nativeFromJson(json['limit']); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + } Map toJson() { Map json = {}; - json['genre'] = nativeToJson(genre); - - if (orderByRating.state == OptionalState.set) { + if(orderByRating.state == OptionalState.set) { json['orderByRating'] = orderByRating.toJson(); } - - if (orderByReleaseYear.state == OptionalState.set) { + if(orderByReleaseYear.state == OptionalState.set) { json['orderByReleaseYear'] = orderByReleaseYear.toJson(); } - - if (limit.state == OptionalState.set) { + if(limit.state == OptionalState.set) { json['limit'] = limit.toJson(); } - return json; } @@ -211,3 +141,4 @@ class ListMoviesByGenreVariables { required this.limit, }); } + diff --git a/data_connect/lib/movies_connector/list_movies_by_partial_title.dart b/data_connect/lib/movies_connector/list_movies_by_partial_title.dart index cdb1d38f..3f61a41e 100644 --- a/data_connect/lib/movies_connector/list_movies_by_partial_title.dart +++ b/data_connect/lib/movies_connector/list_movies_by_partial_title.dart @@ -1,83 +1,46 @@ -part of movies_connector; +part of 'movies.dart'; class ListMoviesByPartialTitleVariablesBuilder { String input; - FirebaseDataConnect _dataConnect; - - ListMoviesByPartialTitleVariablesBuilder( - this._dataConnect, { - required String this.input, - }); - Deserializer dataDeserializer = - (dynamic json) => ListMoviesByPartialTitleData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (ListMoviesByPartialTitleVariables vars) => jsonEncode(vars.toJson()); - Future< - QueryResult> execute() { - return this.ref().execute(); + final FirebaseDataConnect _dataConnect; + ListMoviesByPartialTitleVariablesBuilder(this._dataConnect, {required this.input,}); + Deserializer dataDeserializer = (dynamic json) => ListMoviesByPartialTitleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListMoviesByPartialTitleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); } - QueryRef - ref() { - ListMoviesByPartialTitleVariables vars = ListMoviesByPartialTitleVariables( - input: input, - ); - - return _dataConnect.query( - "ListMoviesByPartialTitle", dataDeserializer, varsSerializer, vars); + QueryRef ref() { + ListMoviesByPartialTitleVariables vars= ListMoviesByPartialTitleVariables(input: input,); + return _dataConnect.query("ListMoviesByPartialTitle", dataDeserializer, varsSerializer, vars); } } class ListMoviesByPartialTitleMovies { String id; - String title; - String? genre; - double? rating; - String imageUrl; - String? description; - - ListMoviesByPartialTitleMovies.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - imageUrl = nativeFromJson(json['imageUrl']), - description = json['description'] == null - ? null - : nativeFromJson(json['description']) {} + ListMoviesByPartialTitleMovies.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),imageUrl = nativeFromJson(json['imageUrl']),description = json['description'] == null ? null : nativeFromJson(json['description']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - json['imageUrl'] = nativeToJson(imageUrl); - if (description != null) { json['description'] = nativeToJson(description); } - return json; } @@ -93,17 +56,14 @@ class ListMoviesByPartialTitleMovies { class ListMoviesByPartialTitleData { List movies; - - ListMoviesByPartialTitleData.fromJson(dynamic json) - : movies = (json['movies'] as List) - .map((e) => ListMoviesByPartialTitleMovies.fromJson(e)) - .toList() {} + ListMoviesByPartialTitleData.fromJson(dynamic json): + movies = (json['movies'] as List) + .map((e) => ListMoviesByPartialTitleMovies.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - json['movies'] = movies.map((e) => e.toJson()).toList(); - return json; } @@ -114,17 +74,13 @@ class ListMoviesByPartialTitleData { class ListMoviesByPartialTitleVariables { String input; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - ListMoviesByPartialTitleVariables.fromJson(Map json) - : input = nativeFromJson(json['input']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListMoviesByPartialTitleVariables.fromJson(Map json): + input = nativeFromJson(json['input']); Map toJson() { Map json = {}; - json['input'] = nativeToJson(input); - return json; } @@ -132,3 +88,4 @@ class ListMoviesByPartialTitleVariables { required this.input, }); } + diff --git a/data_connect/lib/movies_connector/movies.dart b/data_connect/lib/movies_connector/movies.dart index eae8dfc9..20ee94d3 100644 --- a/data_connect/lib/movies_connector/movies.dart +++ b/data_connect/lib/movies_connector/movies.dart @@ -1,5 +1,4 @@ library movies_connector; - import 'package:firebase_data_connect/firebase_data_connect.dart'; import 'dart:convert'; @@ -33,162 +32,104 @@ part 'search_all.dart'; part 'list_movies_by_partial_title.dart'; -enum OrderDirection { - ASC, - DESC, -} -OrderDirection orderDirectionDeserializer(dynamic data) { - return OrderDirection.values.byName(data); -} + enum OrderDirection { + + ASC, + + DESC, + + } + OrderDirection orderDirectionDeserializer(dynamic data) { + return OrderDirection.values.byName(data); + } + + String enumSerializer(Enum e) { return e.name; } + + class MoviesConnector { - UpsertUserVariablesBuilder upsertUser({ - required String username, - }) { - return UpsertUserVariablesBuilder( - dataConnect, - username: username, - ); - } - - AddFavoritedMovieVariablesBuilder addFavoritedMovie({ - required String movieId, - }) { - return AddFavoritedMovieVariablesBuilder( - dataConnect, - movieId: movieId, - ); - } - - DeleteFavoritedMovieVariablesBuilder deleteFavoritedMovie({ - required String movieId, - }) { - return DeleteFavoritedMovieVariablesBuilder( - dataConnect, - movieId: movieId, - ); - } - - AddReviewVariablesBuilder addReview({ - required String movieId, - required int rating, - required String reviewText, - }) { - return AddReviewVariablesBuilder( - dataConnect, - movieId: movieId, - rating: rating, - reviewText: reviewText, - ); - } - - UpdateReviewVariablesBuilder updateReview({ - required String movieId, - required int rating, - required String reviewText, - }) { - return UpdateReviewVariablesBuilder( - dataConnect, - movieId: movieId, - rating: rating, - reviewText: reviewText, - ); - } - - DeleteReviewVariablesBuilder deleteReview({ - required String movieId, - }) { - return DeleteReviewVariablesBuilder( - dataConnect, - movieId: movieId, - ); - } - - ListMoviesVariablesBuilder listMovies() { - return ListMoviesVariablesBuilder( - dataConnect, - ); - } - - ListMoviesByGenreVariablesBuilder listMoviesByGenre({ - required String genre, - }) { - return ListMoviesByGenreVariablesBuilder( - dataConnect, - genre: genre, - ); - } - - ListGenresVariablesBuilder listGenres() { - return ListGenresVariablesBuilder( - dataConnect, - ); - } - - GetMovieByIdVariablesBuilder getMovieById({ - required String id, - }) { - return GetMovieByIdVariablesBuilder( - dataConnect, - id: id, - ); - } - - GetActorByIdVariablesBuilder getActorById({ - required String id, - }) { - return GetActorByIdVariablesBuilder( - dataConnect, - id: id, - ); - } - - GetCurrentUserVariablesBuilder getCurrentUser() { - return GetCurrentUserVariablesBuilder( - dataConnect, - ); - } - - GetMovieInfoForUserVariablesBuilder getMovieInfoForUser({ - required String movieId, - }) { - return GetMovieInfoForUserVariablesBuilder( - dataConnect, - movieId: movieId, - ); - } - - SearchAllVariablesBuilder searchAll({ - required int minYear, - required int maxYear, - required double minRating, - required double maxRating, - required String genre, - }) { - return SearchAllVariablesBuilder( - dataConnect, - minYear: minYear, - maxYear: maxYear, - minRating: minRating, - maxRating: maxRating, - genre: genre, - ); - } - - ListMoviesByPartialTitleVariablesBuilder listMoviesByPartialTitle({ - required String input, - }) { - return ListMoviesByPartialTitleVariablesBuilder( - dataConnect, - input: input, - ); - } + + + UpsertUserVariablesBuilder upsertUser ({required String username, }) { + return UpsertUserVariablesBuilder(dataConnect, username: username,); + } + + + AddFavoritedMovieVariablesBuilder addFavoritedMovie ({required String movieId, }) { + return AddFavoritedMovieVariablesBuilder(dataConnect, movieId: movieId,); + } + + + DeleteFavoritedMovieVariablesBuilder deleteFavoritedMovie ({required String movieId, }) { + return DeleteFavoritedMovieVariablesBuilder(dataConnect, movieId: movieId,); + } + + + AddReviewVariablesBuilder addReview ({required String movieId, required int rating, required String reviewText, }) { + return AddReviewVariablesBuilder(dataConnect, movieId: movieId,rating: rating,reviewText: reviewText,); + } + + + UpdateReviewVariablesBuilder updateReview ({required String movieId, required int rating, required String reviewText, }) { + return UpdateReviewVariablesBuilder(dataConnect, movieId: movieId,rating: rating,reviewText: reviewText,); + } + + + DeleteReviewVariablesBuilder deleteReview ({required String movieId, }) { + return DeleteReviewVariablesBuilder(dataConnect, movieId: movieId,); + } + + + ListMoviesVariablesBuilder listMovies () { + return ListMoviesVariablesBuilder(dataConnect, ); + } + + + ListMoviesByGenreVariablesBuilder listMoviesByGenre ({required String genre, }) { + return ListMoviesByGenreVariablesBuilder(dataConnect, genre: genre,); + } + + + ListGenresVariablesBuilder listGenres () { + return ListGenresVariablesBuilder(dataConnect, ); + } + + + GetMovieByIdVariablesBuilder getMovieById ({required String id, }) { + return GetMovieByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetActorByIdVariablesBuilder getActorById ({required String id, }) { + return GetActorByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetCurrentUserVariablesBuilder getCurrentUser () { + return GetCurrentUserVariablesBuilder(dataConnect, ); + } + + + GetMovieInfoForUserVariablesBuilder getMovieInfoForUser ({required String movieId, }) { + return GetMovieInfoForUserVariablesBuilder(dataConnect, movieId: movieId,); + } + + + SearchAllVariablesBuilder searchAll ({required int minYear, required int maxYear, required double minRating, required double maxRating, required String genre, }) { + return SearchAllVariablesBuilder(dataConnect, minYear: minYear,maxYear: maxYear,minRating: minRating,maxRating: maxRating,genre: genre,); + } + + + ListMoviesByPartialTitleVariablesBuilder listMoviesByPartialTitle ({required String input, }) { + return ListMoviesByPartialTitleVariablesBuilder(dataConnect, input: input,); + } + static ConnectorConfig connectorConfig = ConnectorConfig( 'us-central1', @@ -206,3 +147,4 @@ class MoviesConnector { FirebaseDataConnect dataConnect; } + diff --git a/data_connect/lib/movies_connector/search_all.dart b/data_connect/lib/movies_connector/search_all.dart index c57c9944..a8585f32 100644 --- a/data_connect/lib/movies_connector/search_all.dart +++ b/data_connect/lib/movies_connector/search_all.dart @@ -1,4 +1,4 @@ -part of movies_connector; +part of 'movies.dart'; class SearchAllVariablesBuilder { Optional _input = Optional.optional(nativeFromJson, nativeToJson); @@ -8,82 +8,45 @@ class SearchAllVariablesBuilder { double maxRating; String genre; - FirebaseDataConnect _dataConnect; + final FirebaseDataConnect _dataConnect; SearchAllVariablesBuilder input(String? t) { - this._input.value = t; - return this; + _input.value = t; + return this; } - SearchAllVariablesBuilder( - this._dataConnect, { - required int this.minYear, - required int this.maxYear, - required double this.minRating, - required double this.maxRating, - required String this.genre, - }); - Deserializer dataDeserializer = - (dynamic json) => SearchAllData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (SearchAllVariables vars) => jsonEncode(vars.toJson()); + SearchAllVariablesBuilder(this._dataConnect, {required this.minYear,required this.maxYear,required this.minRating,required this.maxRating,required this.genre,}); + Deserializer dataDeserializer = (dynamic json) => SearchAllData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (SearchAllVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } QueryRef ref() { - SearchAllVariables vars = SearchAllVariables( - input: _input, - minYear: minYear, - maxYear: maxYear, - minRating: minRating, - maxRating: maxRating, - genre: genre, - ); - - return _dataConnect.query( - "SearchAll", dataDeserializer, varsSerializer, vars); + SearchAllVariables vars= SearchAllVariables(input: _input,minYear: minYear,maxYear: maxYear,minRating: minRating,maxRating: maxRating,genre: genre,); + return _dataConnect.query("SearchAll", dataDeserializer, varsSerializer, vars); } } class SearchAllMoviesMatchingTitle { String id; - String title; - String? genre; - double? rating; - String imageUrl; - - SearchAllMoviesMatchingTitle.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - imageUrl = nativeFromJson(json['imageUrl']) {} + SearchAllMoviesMatchingTitle.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -98,43 +61,24 @@ class SearchAllMoviesMatchingTitle { class SearchAllMoviesMatchingDescription { String id; - String title; - String? genre; - double? rating; - String imageUrl; - - SearchAllMoviesMatchingDescription.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']), - genre = json['genre'] == null - ? null - : nativeFromJson(json['genre']), - rating = json['rating'] == null - ? null - : nativeFromJson(json['rating']), - imageUrl = nativeFromJson(json['imageUrl']) {} + SearchAllMoviesMatchingDescription.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']),genre = json['genre'] == null ? null : nativeFromJson(json['genre']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - if (genre != null) { json['genre'] = nativeToJson(genre); } - if (rating != null) { json['rating'] = nativeToJson(rating); } - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -149,25 +93,16 @@ class SearchAllMoviesMatchingDescription { class SearchAllActorsMatchingName { String id; - String name; - String imageUrl; - - SearchAllActorsMatchingName.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - name = nativeFromJson(json['name']), - imageUrl = nativeFromJson(json['imageUrl']) {} + SearchAllActorsMatchingName.fromJson(dynamic json): + id = nativeFromJson(json['id']),name = nativeFromJson(json['name']),imageUrl = nativeFromJson(json['imageUrl']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['name'] = nativeToJson(name); - json['imageUrl'] = nativeToJson(imageUrl); - return json; } @@ -180,47 +115,26 @@ class SearchAllActorsMatchingName { class SearchAllReviewsMatchingText { String id; - int? rating; - String? reviewText; - DateTime reviewDate; - SearchAllReviewsMatchingTextMovie movie; - SearchAllReviewsMatchingTextUser user; - - SearchAllReviewsMatchingText.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - rating = - json['rating'] == null ? null : nativeFromJson(json['rating']), - reviewText = json['reviewText'] == null - ? null - : nativeFromJson(json['reviewText']), - reviewDate = nativeFromJson(json['reviewDate']), - movie = SearchAllReviewsMatchingTextMovie.fromJson(json['movie']), - user = SearchAllReviewsMatchingTextUser.fromJson(json['user']) {} + SearchAllReviewsMatchingText.fromJson(dynamic json): + id = nativeFromJson(json['id']),rating = json['rating'] == null ? null : nativeFromJson(json['rating']),reviewText = json['reviewText'] == null ? null : nativeFromJson(json['reviewText']),reviewDate = nativeFromJson(json['reviewDate']),movie = SearchAllReviewsMatchingTextMovie.fromJson(json['movie']),user = SearchAllReviewsMatchingTextUser.fromJson(json['user']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - if (rating != null) { json['rating'] = nativeToJson(rating); } - if (reviewText != null) { json['reviewText'] = nativeToJson(reviewText); } - json['reviewDate'] = nativeToJson(reviewDate); - json['movie'] = movie.toJson(); - json['user'] = user.toJson(); - return json; } @@ -236,20 +150,14 @@ class SearchAllReviewsMatchingText { class SearchAllReviewsMatchingTextMovie { String id; - String title; - - SearchAllReviewsMatchingTextMovie.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - title = nativeFromJson(json['title']) {} + SearchAllReviewsMatchingTextMovie.fromJson(dynamic json): + id = nativeFromJson(json['id']),title = nativeFromJson(json['title']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['title'] = nativeToJson(title); - return json; } @@ -261,20 +169,14 @@ class SearchAllReviewsMatchingTextMovie { class SearchAllReviewsMatchingTextUser { String id; - String username; - - SearchAllReviewsMatchingTextUser.fromJson(dynamic json) - : id = nativeFromJson(json['id']), - username = nativeFromJson(json['username']) {} + SearchAllReviewsMatchingTextUser.fromJson(dynamic json): + id = nativeFromJson(json['id']),username = nativeFromJson(json['username']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - json['username'] = nativeToJson(username); - return json; } @@ -286,43 +188,26 @@ class SearchAllReviewsMatchingTextUser { class SearchAllData { List moviesMatchingTitle; - List moviesMatchingDescription; - List actorsMatchingName; - List reviewsMatchingText; - - SearchAllData.fromJson(dynamic json) - : moviesMatchingTitle = (json['moviesMatchingTitle'] as List) - .map((e) => SearchAllMoviesMatchingTitle.fromJson(e)) - .toList(), - moviesMatchingDescription = - (json['moviesMatchingDescription'] as List) - .map((e) => SearchAllMoviesMatchingDescription.fromJson(e)) - .toList(), - actorsMatchingName = (json['actorsMatchingName'] as List) - .map((e) => SearchAllActorsMatchingName.fromJson(e)) - .toList(), - reviewsMatchingText = (json['reviewsMatchingText'] as List) - .map((e) => SearchAllReviewsMatchingText.fromJson(e)) - .toList() {} + SearchAllData.fromJson(dynamic json): + moviesMatchingTitle = (json['moviesMatchingTitle'] as List) + .map((e) => SearchAllMoviesMatchingTitle.fromJson(e)) + .toList(),moviesMatchingDescription = (json['moviesMatchingDescription'] as List) + .map((e) => SearchAllMoviesMatchingDescription.fromJson(e)) + .toList(),actorsMatchingName = (json['actorsMatchingName'] as List) + .map((e) => SearchAllActorsMatchingName.fromJson(e)) + .toList(),reviewsMatchingText = (json['reviewsMatchingText'] as List) + .map((e) => SearchAllReviewsMatchingText.fromJson(e)) + .toList(); Map toJson() { Map json = {}; - - json['moviesMatchingTitle'] = - moviesMatchingTitle.map((e) => e.toJson()).toList(); - - json['moviesMatchingDescription'] = - moviesMatchingDescription.map((e) => e.toJson()).toList(); - - json['actorsMatchingName'] = - actorsMatchingName.map((e) => e.toJson()).toList(); - - json['reviewsMatchingText'] = - reviewsMatchingText.map((e) => e.toJson()).toList(); - + json['moviesMatchingTitle'] = moviesMatchingTitle.map((e) => e.toJson()).toList(); + json['moviesMatchingDescription'] = moviesMatchingDescription.map((e) => e.toJson()).toList(); + json['actorsMatchingName'] = actorsMatchingName.map((e) => e.toJson()).toList(); + json['reviewsMatchingText'] = reviewsMatchingText.map((e) => e.toJson()).toList(); return json; } @@ -335,48 +220,31 @@ class SearchAllData { } class SearchAllVariables { - late Optional input; - + late Optionalinput; int minYear; - int maxYear; - double minRating; - double maxRating; - String genre; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - SearchAllVariables.fromJson(Map json) - : minYear = nativeFromJson(json['minYear']), - maxYear = nativeFromJson(json['maxYear']), - minRating = nativeFromJson(json['minRating']), - maxRating = nativeFromJson(json['maxRating']), - genre = nativeFromJson(json['genre']) { + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + SearchAllVariables.fromJson(Map json): + minYear = nativeFromJson(json['minYear']),maxYear = nativeFromJson(json['maxYear']),minRating = nativeFromJson(json['minRating']),maxRating = nativeFromJson(json['maxRating']),genre = nativeFromJson(json['genre']) { + input = Optional.optional(nativeFromJson, nativeToJson); - input.value = - json['input'] == null ? null : nativeFromJson(json['input']); + input.value = json['input'] == null ? null : nativeFromJson(json['input']); + } Map toJson() { Map json = {}; - - if (input.state == OptionalState.set) { + if(input.state == OptionalState.set) { json['input'] = input.toJson(); } - json['minYear'] = nativeToJson(minYear); - json['maxYear'] = nativeToJson(maxYear); - json['minRating'] = nativeToJson(minRating); - json['maxRating'] = nativeToJson(maxRating); - json['genre'] = nativeToJson(genre); - return json; } @@ -389,3 +257,4 @@ class SearchAllVariables { required this.genre, }); } + diff --git a/data_connect/lib/movies_connector/update_review.dart b/data_connect/lib/movies_connector/update_review.dart index 8740b36b..7cd12419 100644 --- a/data_connect/lib/movies_connector/update_review.dart +++ b/data_connect/lib/movies_connector/update_review.dart @@ -1,54 +1,34 @@ -part of movies_connector; +part of 'movies.dart'; class UpdateReviewVariablesBuilder { String movieId; int rating; String reviewText; - FirebaseDataConnect _dataConnect; - - UpdateReviewVariablesBuilder( - this._dataConnect, { - required String this.movieId, - required int this.rating, - required String this.reviewText, - }); - Deserializer dataDeserializer = - (dynamic json) => UpdateReviewData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (UpdateReviewVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + UpdateReviewVariablesBuilder(this._dataConnect, {required this.movieId,required this.rating,required this.reviewText,}); + Deserializer dataDeserializer = (dynamic json) => UpdateReviewData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateReviewVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } MutationRef ref() { - UpdateReviewVariables vars = UpdateReviewVariables( - movieId: movieId, - rating: rating, - reviewText: reviewText, - ); - - return _dataConnect.mutation( - "UpdateReview", dataDeserializer, varsSerializer, vars); + UpdateReviewVariables vars= UpdateReviewVariables(movieId: movieId,rating: rating,reviewText: reviewText,); + return _dataConnect.mutation("UpdateReview", dataDeserializer, varsSerializer, vars); } } class UpdateReviewReviewUpdate { String userId; - String movieId; - - UpdateReviewReviewUpdate.fromJson(dynamic json) - : userId = nativeFromJson(json['userId']), - movieId = nativeFromJson(json['movieId']) {} + UpdateReviewReviewUpdate.fromJson(dynamic json): + userId = nativeFromJson(json['userId']),movieId = nativeFromJson(json['movieId']); Map toJson() { Map json = {}; - json['userId'] = nativeToJson(userId); - json['movieId'] = nativeToJson(movieId); - return json; } @@ -60,19 +40,14 @@ class UpdateReviewReviewUpdate { class UpdateReviewData { UpdateReviewReviewUpdate? review_update; - - UpdateReviewData.fromJson(dynamic json) - : review_update = json['review_update'] == null - ? null - : UpdateReviewReviewUpdate.fromJson(json['review_update']) {} + UpdateReviewData.fromJson(dynamic json): + review_update = json['review_update'] == null ? null : UpdateReviewReviewUpdate.fromJson(json['review_update']); Map toJson() { Map json = {}; - if (review_update != null) { json['review_update'] = review_update!.toJson(); } - return json; } @@ -83,27 +58,17 @@ class UpdateReviewData { class UpdateReviewVariables { String movieId; - int rating; - String reviewText; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - UpdateReviewVariables.fromJson(Map json) - : movieId = nativeFromJson(json['movieId']), - rating = nativeFromJson(json['rating']), - reviewText = nativeFromJson(json['reviewText']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateReviewVariables.fromJson(Map json): + movieId = nativeFromJson(json['movieId']),rating = nativeFromJson(json['rating']),reviewText = nativeFromJson(json['reviewText']); Map toJson() { Map json = {}; - json['movieId'] = nativeToJson(movieId); - json['rating'] = nativeToJson(rating); - json['reviewText'] = nativeToJson(reviewText); - return json; } @@ -113,3 +78,4 @@ class UpdateReviewVariables { required this.reviewText, }); } + diff --git a/data_connect/lib/movies_connector/upsert_user.dart b/data_connect/lib/movies_connector/upsert_user.dart index 1bdc55f2..79c70eb6 100644 --- a/data_connect/lib/movies_connector/upsert_user.dart +++ b/data_connect/lib/movies_connector/upsert_user.dart @@ -1,43 +1,30 @@ -part of movies_connector; +part of 'movies.dart'; class UpsertUserVariablesBuilder { String username; - FirebaseDataConnect _dataConnect; - - UpsertUserVariablesBuilder( - this._dataConnect, { - required String this.username, - }); - Deserializer dataDeserializer = - (dynamic json) => UpsertUserData.fromJson(jsonDecode(json)); - Serializer varsSerializer = - (UpsertUserVariables vars) => jsonEncode(vars.toJson()); + final FirebaseDataConnect _dataConnect; + UpsertUserVariablesBuilder(this._dataConnect, {required this.username,}); + Deserializer dataDeserializer = (dynamic json) => UpsertUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpsertUserVariables vars) => jsonEncode(vars.toJson()); Future> execute() { - return this.ref().execute(); + return ref().execute(); } MutationRef ref() { - UpsertUserVariables vars = UpsertUserVariables( - username: username, - ); - - return _dataConnect.mutation( - "UpsertUser", dataDeserializer, varsSerializer, vars); + UpsertUserVariables vars= UpsertUserVariables(username: username,); + return _dataConnect.mutation("UpsertUser", dataDeserializer, varsSerializer, vars); } } class UpsertUserUserUpsert { String id; - - UpsertUserUserUpsert.fromJson(dynamic json) - : id = nativeFromJson(json['id']) {} + UpsertUserUserUpsert.fromJson(dynamic json): + id = nativeFromJson(json['id']); Map toJson() { Map json = {}; - json['id'] = nativeToJson(id); - return json; } @@ -48,15 +35,12 @@ class UpsertUserUserUpsert { class UpsertUserData { UpsertUserUserUpsert user_upsert; - - UpsertUserData.fromJson(dynamic json) - : user_upsert = UpsertUserUserUpsert.fromJson(json['user_upsert']) {} + UpsertUserData.fromJson(dynamic json): + user_upsert = UpsertUserUserUpsert.fromJson(json['user_upsert']); Map toJson() { Map json = {}; - json['user_upsert'] = user_upsert.toJson(); - return json; } @@ -67,17 +51,13 @@ class UpsertUserData { class UpsertUserVariables { String username; - - @Deprecated( - 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.') - UpsertUserVariables.fromJson(Map json) - : username = nativeFromJson(json['username']) {} + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpsertUserVariables.fromJson(Map json): + username = nativeFromJson(json['username']); Map toJson() { Map json = {}; - json['username'] = nativeToJson(username); - return json; } @@ -85,3 +65,4 @@ class UpsertUserVariables { required this.username, }); } + diff --git a/data_connect/lib/profile.dart b/data_connect/lib/profile.dart index 01e356ac..3488234c 100644 --- a/data_connect/lib/profile.dart +++ b/data_connect/lib/profile.dart @@ -20,16 +20,15 @@ class Profile extends StatelessWidget { stream: MovieState.subscribeToCurrentUser(), builder: (context, snapshot) { final res = snapshot.data; - if (res == null || res.data.user == null) { + if (res == null) { return const Center( child: CircularProgressIndicator(), ); } - final displayName = - FirebaseAuth.instance.currentUser?.displayName ?? ''; + final displayName = FirebaseAuth.instance.currentUser!.displayName; final favoriteMovies = res.data.user!.favoriteMovies.map((e) => e.movie).toList(); - final reviews = res.data.user == null ? [] : res.data.user!.reviews; + final reviews = res.data.user!.reviews; return RefreshIndicator( child: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), diff --git a/data_connect/lib/sign_up.dart b/data_connect/lib/sign_up.dart index 72332c02..e640acd1 100644 --- a/data_connect/lib/sign_up.dart +++ b/data_connect/lib/sign_up.dart @@ -1,4 +1,3 @@ -import 'package:dataconnect/movie_state.dart'; import 'package:dataconnect/movies_connector/movies.dart'; import 'package:dataconnect/widgets/auth_dialog.dart'; import 'package:firebase_auth/firebase_auth.dart'; @@ -26,7 +25,6 @@ class _SignUpState extends State { email: _username, password: _password); await FirebaseAuth.instance.currentUser!.updateDisplayName(_name); await MoviesConnector.instance.upsertUser(username: _username).execute(); - MovieState.triggerUpdateFavorite(); if (mounted) { context.go('/home'); } diff --git a/data_connect/linux/.gitignore b/data_connect/linux/.gitignore deleted file mode 100644 index d3896c98..00000000 --- a/data_connect/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/data_connect/linux/CMakeLists.txt b/data_connect/linux/CMakeLists.txt deleted file mode 100644 index daf37073..00000000 --- a/data_connect/linux/CMakeLists.txt +++ /dev/null @@ -1,145 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "dataconnect") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.dataconnect") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") -endif() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/data_connect/linux/flutter/CMakeLists.txt b/data_connect/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd0164..00000000 --- a/data_connect/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/data_connect/linux/flutter/generated_plugin_registrant.cc b/data_connect/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index f6f23bfe..00000000 --- a/data_connect/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); - url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); -} diff --git a/data_connect/linux/flutter/generated_plugin_registrant.h b/data_connect/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47b..00000000 --- a/data_connect/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/data_connect/linux/flutter/generated_plugins.cmake b/data_connect/linux/flutter/generated_plugins.cmake deleted file mode 100644 index f16b4c34..00000000 --- a/data_connect/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - url_launcher_linux -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/data_connect/linux/main.cc b/data_connect/linux/main.cc deleted file mode 100644 index e7c5c543..00000000 --- a/data_connect/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/data_connect/linux/my_application.cc b/data_connect/linux/my_application.cc deleted file mode 100644 index 8540fcb3..00000000 --- a/data_connect/linux/my_application.cc +++ /dev/null @@ -1,124 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "dataconnect"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "dataconnect"); - } - - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GApplication::startup. -static void my_application_startup(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application startup. - - G_APPLICATION_CLASS(my_application_parent_class)->startup(application); -} - -// Implements GApplication::shutdown. -static void my_application_shutdown(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application shutdown. - - G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; - G_APPLICATION_CLASS(klass)->startup = my_application_startup; - G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); -} diff --git a/data_connect/linux/my_application.h b/data_connect/linux/my_application.h deleted file mode 100644 index 72271d5e..00000000 --- a/data_connect/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/data_connect/macos/.gitignore b/data_connect/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/data_connect/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/data_connect/macos/Flutter/Flutter-Debug.xcconfig b/data_connect/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index 4b81f9b2..00000000 --- a/data_connect/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/data_connect/macos/Flutter/Flutter-Release.xcconfig b/data_connect/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index 5caa9d15..00000000 --- a/data_connect/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/data_connect/macos/Flutter/GeneratedPluginRegistrant.swift b/data_connect/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index a7118855..00000000 --- a/data_connect/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import firebase_app_check -import firebase_auth -import firebase_core -import url_launcher_macos - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLTFirebaseAppCheckPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAppCheckPlugin")) - FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) - FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) - UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) -} diff --git a/data_connect/macos/Podfile b/data_connect/macos/Podfile deleted file mode 100644 index c795730d..00000000 --- a/data_connect/macos/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -platform :osx, '10.14' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_macos_build_settings(target) - end -end diff --git a/data_connect/macos/Podfile.lock b/data_connect/macos/Podfile.lock deleted file mode 100644 index 7cb336e7..00000000 --- a/data_connect/macos/Podfile.lock +++ /dev/null @@ -1,131 +0,0 @@ -PODS: - - AppCheckCore (11.2.0): - - GoogleUtilities/Environment (~> 8.0) - - GoogleUtilities/UserDefaults (~> 8.0) - - PromisesObjC (~> 2.4) - - Firebase/AppCheck (11.4.2): - - Firebase/CoreOnly - - FirebaseAppCheck (~> 11.4.0) - - Firebase/Auth (11.4.2): - - Firebase/CoreOnly - - FirebaseAuth (~> 11.4.0) - - Firebase/CoreOnly (11.4.2): - - FirebaseCore (= 11.4.2) - - firebase_app_check (0.3.1-4): - - Firebase/AppCheck (~> 11.4.0) - - Firebase/CoreOnly (~> 11.4.0) - - firebase_core - - FlutterMacOS - - firebase_auth (5.3.3): - - Firebase/Auth (~> 11.4.0) - - Firebase/CoreOnly (~> 11.4.0) - - firebase_core - - FlutterMacOS - - firebase_core (3.8.0): - - Firebase/CoreOnly (~> 11.4.0) - - FlutterMacOS - - FirebaseAppCheck (11.4.0): - - AppCheckCore (~> 11.0) - - FirebaseAppCheckInterop (~> 11.0) - - FirebaseCore (~> 11.0) - - GoogleUtilities/Environment (~> 8.0) - - GoogleUtilities/UserDefaults (~> 8.0) - - FirebaseAppCheckInterop (11.5.0) - - FirebaseAuth (11.4.0): - - FirebaseAppCheckInterop (~> 11.0) - - FirebaseAuthInterop (~> 11.0) - - FirebaseCore (~> 11.4) - - FirebaseCoreExtension (~> 11.4) - - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - - GoogleUtilities/Environment (~> 8.0) - - GTMSessionFetcher/Core (< 5.0, >= 3.4) - - RecaptchaInterop (~> 100.0) - - FirebaseAuthInterop (11.5.0) - - FirebaseCore (11.4.2): - - FirebaseCoreInternal (< 12.0, >= 11.4.2) - - GoogleUtilities/Environment (~> 8.0) - - GoogleUtilities/Logger (~> 8.0) - - FirebaseCoreExtension (11.4.1): - - FirebaseCore (~> 11.0) - - FirebaseCoreInternal (11.5.0): - - "GoogleUtilities/NSData+zlib (~> 8.0)" - - FlutterMacOS (1.0.0) - - GoogleUtilities/AppDelegateSwizzler (8.0.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Privacy - - GoogleUtilities/Environment (8.0.2): - - GoogleUtilities/Privacy - - GoogleUtilities/Logger (8.0.2): - - GoogleUtilities/Environment - - GoogleUtilities/Privacy - - GoogleUtilities/Network (8.0.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Privacy - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (8.0.2)": - - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (8.0.2) - - GoogleUtilities/Reachability (8.0.2): - - GoogleUtilities/Logger - - GoogleUtilities/Privacy - - GoogleUtilities/UserDefaults (8.0.2): - - GoogleUtilities/Logger - - GoogleUtilities/Privacy - - GTMSessionFetcher/Core (4.1.0) - - PromisesObjC (2.4.0) - -DEPENDENCIES: - - firebase_app_check (from `Flutter/ephemeral/.symlinks/plugins/firebase_app_check/macos`) - - firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`) - - firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - -SPEC REPOS: - trunk: - - AppCheckCore - - Firebase - - FirebaseAppCheck - - FirebaseAppCheckInterop - - FirebaseAuth - - FirebaseAuthInterop - - FirebaseCore - - FirebaseCoreExtension - - FirebaseCoreInternal - - GoogleUtilities - - GTMSessionFetcher - - PromisesObjC - -EXTERNAL SOURCES: - firebase_app_check: - :path: Flutter/ephemeral/.symlinks/plugins/firebase_app_check/macos - firebase_auth: - :path: Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos - firebase_core: - :path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos - FlutterMacOS: - :path: Flutter/ephemeral - -SPEC CHECKSUMS: - AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f - Firebase: 7fd5466678d964be78fbf536d8a3385da19c4828 - firebase_app_check: 27a62bd66d30049207742fcb7fc996bdb82ba622 - firebase_auth: 85ed6c80b24da60af13391f9cdc0e566440b1963 - firebase_core: d95c4a2225d7b6ed46bc31fb2a6f421fc7c8285b - FirebaseAppCheck: 933cbda29279ed316b82360bca77602ac1af1ff2 - FirebaseAppCheckInterop: d265d9f4484e7ec1c591086408840fdd383d1213 - FirebaseAuth: c359af98bd703cbf4293eec107a40de08ede6ce6 - FirebaseAuthInterop: 1219bee9b23e6ebe84c256a0d95adab53d11c331 - FirebaseCore: 6b32c57269bd999aab34354c3923d92a6e5f3f84 - FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e - FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d - GTMSessionFetcher: 923b710231ad3d6f3f0495ac1ced35421e07d9a6 - PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - -PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3 - -COCOAPODS: 1.16.2 diff --git a/data_connect/macos/Runner.xcodeproj/project.pbxproj b/data_connect/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 1cfc1f84..00000000 --- a/data_connect/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,807 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 0B54BE36095256A990923F60 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2C7FA3F3771C2A29C4152FF /* Pods_RunnerTests.framework */; }; - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 682E69E29E5999549E31008B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCBDA75210EC7C9219DEEA17 /* Pods_Runner.framework */; }; - E81C99BCE641EAAC42D0435C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F9721B425DB992F996064CCA /* GoogleService-Info.plist */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 04AEC284C642086067839821 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 0D7D17F289FAFC2610AFF3B2 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* dataconnect.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dataconnect.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 5074E90362781627D86FABAA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 8B4A2D9CD56B4E2E89139CB8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - AA887168DC22BA276076B2A8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; - B2ADFEFAAEAA3DEBDB5C916D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - B2C7FA3F3771C2A29C4152FF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F9721B425DB992F996064CCA /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; - FCBDA75210EC7C9219DEEA17 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0B54BE36095256A990923F60 /* Pods_RunnerTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 682E69E29E5999549E31008B /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - F9721B425DB992F996064CCA /* GoogleService-Info.plist */, - CB6772AFF3560852DF3C4E63 /* Pods */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* dataconnect.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - CB6772AFF3560852DF3C4E63 /* Pods */ = { - isa = PBXGroup; - children = ( - 04AEC284C642086067839821 /* Pods-Runner.debug.xcconfig */, - 8B4A2D9CD56B4E2E89139CB8 /* Pods-Runner.release.xcconfig */, - 5074E90362781627D86FABAA /* Pods-Runner.profile.xcconfig */, - 0D7D17F289FAFC2610AFF3B2 /* Pods-RunnerTests.debug.xcconfig */, - B2ADFEFAAEAA3DEBDB5C916D /* Pods-RunnerTests.release.xcconfig */, - AA887168DC22BA276076B2A8 /* Pods-RunnerTests.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - FCBDA75210EC7C9219DEEA17 /* Pods_Runner.framework */, - B2C7FA3F3771C2A29C4152FF /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - DE64E3F8A561EACF28AA5DB4 /* [CP] Check Pods Manifest.lock */, - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 03EF311D5499B576A847F58B /* [CP] Check Pods Manifest.lock */, - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - D515E6E5EBB879A7D1A062B1 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* dataconnect.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - E81C99BCE641EAAC42D0435C /* GoogleService-Info.plist in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 03EF311D5499B576A847F58B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; - D515E6E5EBB879A7D1A062B1 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - DE64E3F8A561EACF28AA5DB4 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0D7D17F289FAFC2610AFF3B2 /* Pods-RunnerTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.dataconnect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dataconnect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dataconnect"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B2ADFEFAAEAA3DEBDB5C916D /* Pods-RunnerTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.dataconnect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dataconnect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dataconnect"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AA887168DC22BA276076B2A8 /* Pods-RunnerTests.profile.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.dataconnect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dataconnect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dataconnect"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.15; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.15; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.15; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/data_connect/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/data_connect/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/data_connect/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/data_connect/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/data_connect/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 143b9623..00000000 --- a/data_connect/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data_connect/macos/Runner.xcworkspace/contents.xcworkspacedata b/data_connect/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/data_connect/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/data_connect/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/data_connect/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/data_connect/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/data_connect/macos/Runner/AppDelegate.swift b/data_connect/macos/Runner/AppDelegate.swift deleted file mode 100644 index b3c17614..00000000 --- a/data_connect/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } - - override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { - return true - } -} diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d9..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eba..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa4..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb57226..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318e..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e72..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632cf..00000000 Binary files a/data_connect/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/data_connect/macos/Runner/Base.lproj/MainMenu.xib b/data_connect/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/data_connect/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data_connect/macos/Runner/Configs/AppInfo.xcconfig b/data_connect/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 564cead6..00000000 --- a/data_connect/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = dataconnect - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.dataconnect - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/data_connect/macos/Runner/Configs/Debug.xcconfig b/data_connect/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/data_connect/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/data_connect/macos/Runner/Configs/Release.xcconfig b/data_connect/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/data_connect/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/data_connect/macos/Runner/Configs/Warnings.xcconfig b/data_connect/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/data_connect/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/data_connect/macos/Runner/DebugProfile.entitlements b/data_connect/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a30..00000000 --- a/data_connect/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/data_connect/macos/Runner/Info.plist b/data_connect/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/data_connect/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/data_connect/macos/Runner/MainFlutterWindow.swift b/data_connect/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 3cc05eb2..00000000 --- a/data_connect/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/data_connect/macos/Runner/Release.entitlements b/data_connect/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/data_connect/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/data_connect/macos/RunnerTests/RunnerTests.swift b/data_connect/macos/RunnerTests/RunnerTests.swift deleted file mode 100644 index 61f3bd1f..00000000 --- a/data_connect/macos/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Cocoa -import FlutterMacOS -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/data_connect/pubspec.yaml b/data_connect/pubspec.yaml index 7f6126da..c82bf893 100644 --- a/data_connect/pubspec.yaml +++ b/data_connect/pubspec.yaml @@ -68,8 +68,7 @@ flutter: # To add assets to your application, add an assets section, like this: # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + # - assets/open-in-new-tab.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images